Registered Member
|
Hi,
With Eigen 3.2.7, I try to concatenate (vertical) (vertcat in a great numerical tools) of sparses A, B sparse and C the result of [A;B] I try to do something as: spMatC->middleRows(spMatA->rows(), 0) = *spMatA; spMatC->middleRows(spMatA->rows(), spMatB->rows()) = *spMatB; But I have some build errors: Error 5 error C2039: 'insertBackByOuterInner' : is not a member of 'Eigen::Block<Derived,-1,-1,false>' eigen\eigen\src\SparseCore\SparseMatrixBase.h 227 1 nlsSparse Error 3 error C2039: 'reserve' : is not a member of 'Eigen::Block<Derived,-1,-1,false>' eigen\eigen\src\SparseCore\SparseMatrixBase.h 220 1 nlsSparse Error 1 error C2039: 'resize' : is not a member of 'Eigen::Block<Derived,-1,-1,false>' eigen\eigen\src\SparseCore\SparseMatrixBase.h 218 1 nlsSparse Error 2 error C2039: 'setZero' : is not a member of 'Eigen::Block<Derived,-1,-1,false>' eigen\eigen\src\SparseCore\SparseMatrixBase.h 219 1 nlsSparse Error 4 error C2039: 'startVec' : is not a member of 'Eigen::Block<Derived,-1,-1,false>' eigen\eigen\src\SparseCore\SparseMatrixBase.h 223 1 nlsSparse [A,B] works perfectly: spMatC->middleCols(0, spMatA->cols()) = *spMatA; spMatC->middleCols(spMatA->cols(), spMatB->cols()) = *spMatB; Maybe it is not the good way to do ? Thanks for your help |
Moderator
|
This is because for sparse matrices, you can only write to consecutive columns (resp. rows) of a column-major (resp. row-major) sparse matrix. It is strange that you don't get an error like not operator= found....
|
Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot]