Allow for other Eigen matrix types

release/4.3a0
dellaert 2014-10-15 00:27:43 +02:00
parent 625b939b66
commit 2092705d12
1 changed files with 2 additions and 2 deletions

View File

@ -74,8 +74,8 @@ namespace gtsam {
}
/** Construct from a container of the sizes of each vertical block and a pre-prepared matrix. */
template<typename CONTAINER>
VerticalBlockMatrix(const CONTAINER& dimensions, const Matrix& matrix, bool appendOneDimension = false) :
template<typename CONTAINER, typename DERIVED>
VerticalBlockMatrix(const CONTAINER& dimensions, const Eigen::MatrixBase<DERIVED>& matrix, bool appendOneDimension = false) :
matrix_(matrix), rowStart_(0), rowEnd_(matrix.rows()), blockStart_(0)
{
fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);