Closed florent-lamiraux closed 6 months ago
I tried to add a unit test in test/matrix-view.cc
but I have not been able to make a matrix view of a matrix and to iterate on the blocks. If you can start something, I will be happy to finish it.
Have you seen the documentation of MatrixBlockView
? The view is built using MatrixBlocks.[lr]view
. Then it should be something like
for (MatrixBlockView::block_iterator block (view); block.valid(); ++block)
{
// Access the current block
view._block(block); // Returns an Eigen::Block object.
// For the current block
block.ri() // row, input
block.ci() // col, input
block.ro() // row, output
block.co() // col, output
block.rs() // number of rows
block.cs() // number of cols
}
In Debug mode, in method
Eigen::internal::variable_if_dynamic<T, Value>::setValue
, ifValue
is notDynamic
there is a check that the input argument is equal to theValue
template parameter. This check failed in the tests compiled in debug mode.This modification fixes the issue.