I'm trying to compile a large code base which IEGEN have few dependencies. By doing this, I got the following error: error C2338: THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD
that passes is:
// Eigen \ src \ core \ DenseCoeffsBase.h / ** \ Here returns a reference to the coefficient on the index * this method is only allowed for the expression vector, and matrix expression, LinearAccessBit. * * \ Sa operator [] (index) constant, operator () (index, index), x (), y (), z (), W () * / EIGEN_STRONG_INLINE scalar & amp; Operator [] (index index) {#ifndef EIGEN2_SUPPORT EIGEN_STATIC_ASSERT (Derivative :: IsVectorAtCompileTime, THE_BRACKET_OPERATOR_IS_ONLY_FOR_VECTORS__USE_THE_PARENTHESIS_OPERATOR_INSTEAD) #endif eigen_assert (index> = 0 & index; size ()); Return derivative (). CoEffRef (index); }
As Eigen dependencies are on all code, how can I get this error trigger line? (Of course, there are []
using a line of access codes to a Eigen matrix, much , the line I'm looking for).
Yes, also faced a similar problem. I have defined a matrix:
Eigen :: MatrixXf minor2x2 (2,2)
. The matrix minor2x2
was started like this:
minor2x2 [0] = 1.0f; Small 2x2 [1] = 1.0 F; Small 2x2 [2] = 1.0 f; Small 2x2 [3] = 1.0 f;
That was the error started. The solution to the problem is to replace minor2x2 (i)
for minor2x2 [i]
. I think that Eigen :: Finding Matrix
is probably useful
No comments:
Post a Comment