c++ - Block operations won't work on Eigen -


the block operations on eigen won't work. i'm getting bunch of errors like:

error: ‘eigen::vector4d’ has no member named ‘head’ 

the line of code generating error is:

outvector.push_back(out.head<3>()); 

where out eigen::vector4d , outvector std::vector<eigen::vector4d>.

the full error output is:

portalspace2.cpp: in member function ‘virtual std::vector<eigen::matrix<double, 3, 1> > portalspace::pointofreference::vectorsfrompoint(std::tr1::shared_ptr<manifold::point>)’: portalspace2.cpp:73:26: error: ‘eigen::vector4d’ has no member named ‘head’ portalspace2.cpp:73:34: error: expected primary-expression before ‘)’ token portalspace2.cpp: in member function ‘virtual std::tr1::shared_ptr<manifold::point> portalspace::pointofreference::pointfromvector(eigen::vector3d)’: portalspace2.cpp:84:24: error: ‘eigen::vector4d’ has no member named ‘tail’ portalspace2.cpp:85:24: error: ‘eigen::vector4d’ has no member named ‘tail’ portalspace2.cpp:96:28: error: ‘class portalspace::point’ has no member named ‘tail’ portalspace2.cpp:96:49: error: ‘eigen::vector4d’ has no member named ‘tail’ portalspace2.cpp:97:13: error: expected initializer before ‘<<’ token portalspace2.cpp:98:32: error: ‘y’ not declared in scope portalspace2.cpp: in member function ‘virtual void portalspace::pointofreference::move(eigen::vector3d)’: portalspace2.cpp:116:13: error: ‘vector’ not declared in scope portalspace2.cpp:116:13: note: suggested alternative: in file included /usr/include/c++/4.7/vector:65:0,                  portalspace2.h:4,                  portalspace2.cpp:5: /usr/include/c++/4.7/bits/stl_vector.h:208:11: note:   ‘std::vector’ portalspace2.cpp:119:28: error: no match ‘operator[]’ in ‘((portalspace::pointofreference*)this)->portalspace::pointofreference::position[0]’ portalspace2.cpp:120:28: error: no match ‘operator[]’ in ‘((portalspace::pointofreference*)this)->portalspace::pointofreference::position[0]’ portalspace2.cpp:121:24: error: ‘eigen::vector4d’ has no member named ‘tail’ portalspace2.cpp:122:24: error: ‘eigen::vector4d’ has no member named ‘tail’ portalspace2.cpp:133:28: error: ‘class portalspace::point’ has no member named ‘tail’ portalspace2.cpp:133:49: error: ‘eigen::vector4d’ has no member named ‘tail’ portalspace2.cpp:134:13: error: expected initializer before ‘<<’ token portalspace2.cpp:135:2: error: ‘coordinates’ not declared in scope portalspace2.cpp:135:19: error: ‘y’ not declared in scope portalspace2.cpp:140:12: error: ‘eigen::matrix4d’ has no member named ‘column’ portalspace2.cpp:141:12: error: ‘eigen::matrix4d’ has no member named ‘column’ portalspace2.cpp:141:26: error: ‘eigen::vector4d’ has no member named ‘tail’ portalspace2.cpp:142:12: error: ‘eigen::matrix4d’ has no member named ‘column’ portalspace2.cpp:142:43: error: no match ‘operator[]’ in ‘((portalspace::pointofreference*)this)->portalspace::pointofreference::position[1]’ portalspace2.cpp:142:55: error: no match ‘operator[]’ in ‘((portalspace::pointofreference*)this)->portalspace::pointofreference::position[2]’ portalspace2.cpp:142:67: error: no match ‘operator[]’ in ‘((portalspace::pointofreference*)this)->portalspace::pointofreference::position[3]’ portalspace2.cpp:143:12: error: ‘eigen::matrix4d’ has no member named ‘column’ portalspace2.cpp:143:34: error: ‘eigen::matrix4d’ has no member named ‘column’ portalspace2.cpp:143:60: error: ‘eigen::matrix4d’ has no member named ‘column’ portalspace2.cpp:149:23: error: expected primary-expression before ‘.’ token portalspace2.cpp:150:31: error: expected primary-expression before ‘<<’ token portalspace2.cpp:156:14: error: expected primary-expression before ‘.’ token portalspace2.cpp:157:31: error: expected primary-expression before ‘<<’ token portalspace2.cpp:162:14: error: expected primary-expression before ‘.’ token portalspace2.cpp:163:31: error: expected primary-expression before ‘<<’ token in file included /usr/include/eigen2/eigen/core:137:0,                  /usr/include/eigen2/eigen/dense:1,                  manifold.h:7,                  portalspace2.h:7,                  portalspace2.cpp:5: /usr/include/eigen2/eigen/src/core/product.h: in instantiation of ‘const typename eigen::productreturntype<derived, otherderived>::type eigen::matrixbase<derived>::operator*(const eigen::matrixbase<otherderived>&) const [with otherderived = eigen::matrix<double, 4, 4>; derived = eigen::matrix<double, 3, 3>; typename eigen::productreturntype<derived, otherderived>::type = eigen::product<const eigen::matrix<double, 3, 3>&, const eigen::matrix<double, 4, 4>&, 0>]’: portalspace2.cpp:170:20:   required here /usr/include/eigen2/eigen/src/core/product.h:297:3: error: ‘invalid_matrix_product’ not member of ‘eigen::ei_static_assert<false>’ in file included /usr/include/eigen2/eigen/core:125:0,                  /usr/include/eigen2/eigen/dense:1,                  manifold.h:7,                  portalspace2.h:7,                  portalspace2.cpp:5: /usr/include/eigen2/eigen/src/core/assign.h: in instantiation of ‘derived& eigen::matrixbase<derived>::lazyassign(const eigen::matrixbase<otherderived>&) [with otherderived = eigen::matrix<double, 3, 4, 2, 3, 4>; derived = eigen::matrix<double, 4, 4>]’: /usr/include/eigen2/eigen/src/core/assign.h:447:123:   required ‘static derived& eigen::ei_assign_selector<derived, otherderived, false, false>::run(derived&, const otherderived&) [with derived = eigen::matrix<double, 4, 4>; otherderived = eigen::matrix<double, 3, 4, 2, 3, 4>]’ /usr/include/eigen2/eigen/src/core/matrix.h:554:87:   required ‘eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols>& eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols>::_set_noalias(const eigen::matrixbase<otherderived>&) [with otherderived = eigen::matrix<double, 3, 4, 2, 3, 4>; _scalar = double; int _rows = 4; int _cols = 4; int _options = 2; int _maxrows = 4; int _maxcols = 4; eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols> = eigen::matrix<double, 4, 4>]’ /usr/include/eigen2/eigen/src/core/matrix.h:538:94:   required ‘void eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols>::_set_selector(const otherderived&, const eigen::ei_meta_true&) [with otherderived = eigen::product<const eigen::matrix<double, 3, 3>&, const eigen::matrix<double, 4, 4>&, 0>; _scalar = double; int _rows = 4; int _cols = 4; int _options = 2; int _maxrows = 4; int _maxcols = 4]’ /usr/include/eigen2/eigen/src/core/matrix.h:533:7:   required ‘eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols>& eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols>::_set(const eigen::matrixbase<otherderived>&) [with otherderived = eigen::product<const eigen::matrix<double, 3, 3>&, const eigen::matrix<double, 4, 4>&, 0>; _scalar = double; int _rows = 4; int _cols = 4; int _options = 2; int _maxrows = 4; int _maxcols = 4; eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols> = eigen::matrix<double, 4, 4>]’ /usr/include/eigen2/eigen/src/core/matrix.h:283:24:   required ‘eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols>& eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols>::operator=(const eigen::matrixbase<otherderived>&) [with otherderived = eigen::product<const eigen::matrix<double, 3, 3>&, const eigen::matrix<double, 4, 4>&, 0>; _scalar = double; int _rows = 4; int _cols = 4; int _options = 2; int _maxrows = 4; int _maxcols = 4; eigen::matrix<_scalar, _rows, _cols, _options, _maxrows, _maxcols> = eigen::matrix<double, 4, 4>]’ portalspace2.cpp:170:20:   required here /usr/include/eigen2/eigen/src/core/assign.h:428:3: error: ‘you_mixed_matrices_of_different_sizes’ not member of ‘eigen::ei_static_assert<false>’ make: *** [all] error 1 

there's several unrelated compiler errors in there, i'll work on when there.

it seems using eigen2 while code expecting eigen3 since function head() not exist in eigen2 (it called start()).


Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -