Enhancement #949

Initialization of Vector with dim and gen

Added by C. Emmerich about 12 years ago. Updated about 12 years ago.

Status:ResolvedStart date:03/14/2012
Priority:NormalDue date:
Assignee:M. Rolf% Done:

100%

Category:-
Target version:NemoMath 0.4

Description

Initialization of a Vector with dimensions of an existing vector and a generator is not convenient. Example code:

RealVector v(dim(5), 0.0);
RealVector v1(v.dimension(), 1.0);                         // <-works perfectly
RealVector v2(v.dimension(), uniform<double>(0, 1.0));     // <- compiler error
RealVector v3(dim(v.dimension()),uniform<double>(0, 1.0)); // <- work arround

Error:

Vector.h:67: error: ‘nemo::VectorDimension::VectorDimension(unsigned int)’ is private

History

#1 Updated by M. Rolf about 12 years ago

  • Assignee set to M. Rolf
  • Target version set to NemoMath 0.4
  • % Done changed from 0 to 100

#2 Updated by M. Rolf about 12 years ago

  • Status changed from New to Resolved

Also available in: Atom PDF