Finish undo of #310 fill with zeros (not actually needed)

release/4.3a0
Jose Luis Blanco-Claraco 2020-06-19 09:00:15 +02:00
parent 9fc0901655
commit 741df283d0
No known key found for this signature in database
GPG Key ID: D443304FBD70A641
1 changed files with 2 additions and 5 deletions

View File

@ -71,24 +71,22 @@ namespace gtsam {
} }
/// Construct from a container of the sizes of each block. /// Construct from a container of the sizes of each block.
/// Uninitialized blocks are filled with zeros.
template<typename CONTAINER> template<typename CONTAINER>
SymmetricBlockMatrix(const CONTAINER& dimensions, bool appendOneDimension = false) : SymmetricBlockMatrix(const CONTAINER& dimensions, bool appendOneDimension = false) :
blockStart_(0) blockStart_(0)
{ {
fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension); fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
matrix_.setZero(variableColOffsets_.back(), variableColOffsets_.back()); matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back());
assertInvariants(); assertInvariants();
} }
/// Construct from iterator over the sizes of each vertical block. /// Construct from iterator over the sizes of each vertical block.
/// Uninitialized blocks are filled with zeros.
template<typename ITERATOR> template<typename ITERATOR>
SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension = false) : SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension = false) :
blockStart_(0) blockStart_(0)
{ {
fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension); fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension);
matrix_.setZero(variableColOffsets_.back(), variableColOffsets_.back()); matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back());
assertInvariants(); assertInvariants();
} }
@ -418,4 +416,3 @@ namespace gtsam {
class CholeskyFailed; class CholeskyFailed;
} }