Registered Member
|
Hi
I am new to eigen and trying to use it using Visual Studio 2008. I have taken the VectorXd as member variable in one class but compiler gives this error . Any idea why ? error C2039: 'YOU_CALLED_A_FIXED_SIZE_METHOD_ON_A_DYNAMIC_SIZE_MATRIX_OR_VECTOR' : is not a member of 'Eigen::internal::static_assertion<condition>' 6> with 6> [ 6> condition=false 6> ] 6> d:\work\quantum-1.1\core\itk\utilites\eigen-3.1.3\eigen\src/Core/CwiseNullaryOp.h(218) : while compiling class template member function 'const Eigen::CwiseNullaryOp<NullaryOp,PlainObjectType> Eigen::DenseBase<Derived>::Constant(const double &)' 6> with 6> [ 6> NullaryOp=Eigen::internal::scalar_constant_op<double>, 6> PlainObjectType=Eigen::Array<double,-1,1>, 6> Derived=Eigen::Array<double,-1,1> 6> ] 6> d:\work\quantum-1.1\core\itk\utilites\eigen-3.1.3\eigen\src/Core/CwiseNullaryOp.h(598) : while compiling class template member function 'const Eigen::CwiseNullaryOp<NullaryOp,PlainObjectType> Eigen::DenseBase<Derived>::Ones(void)' 6> with 6> [ 6> NullaryOp=Eigen::internal::scalar_constant_op<double>, 6> PlainObjectType=Eigen::Array<double,-1,1>, 6> Derived=Eigen::Array<double,-1,1> |
Registered Member
|
My code looks like this
|
Moderator
|
Your error must come from another line of code.
|
Registered Member
|
Hi
Yes i fixed the problem but still it is strange. In class i initialized function like that. m_Paramters = VectorXd(numberOfParameters); m_Paramters.fill(0); When i changed it to m_Parameters = VectorXd::Zero(numberOfParameters); Error gone but it doesn't producing error in every time. In some classes first code is working I donot know why. Alex |
Registered users: Bing [Bot], Google [Bot], Sogou [Bot]