Skip to content

Commit

Permalink
Finish undo of #310 fill with zeros (not actually needed)
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Jun 19, 2020
1 parent 9fc0901 commit 741df28
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions gtsam/base/SymmetricBlockMatrix.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,24 +71,22 @@ namespace gtsam {
}

/// Construct from a container of the sizes of each block.
/// Uninitialized blocks are filled with zeros.
template<typename CONTAINER>
SymmetricBlockMatrix(const CONTAINER& dimensions, bool appendOneDimension = false) :
blockStart_(0)
{
fillOffsets(dimensions.begin(), dimensions.end(), appendOneDimension);
matrix_.setZero(variableColOffsets_.back(), variableColOffsets_.back());
matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back());
assertInvariants();
}

/// Construct from iterator over the sizes of each vertical block.
/// Uninitialized blocks are filled with zeros.
template<typename ITERATOR>
SymmetricBlockMatrix(ITERATOR firstBlockDim, ITERATOR lastBlockDim, bool appendOneDimension = false) :
blockStart_(0)
{
fillOffsets(firstBlockDim, lastBlockDim, appendOneDimension);
matrix_.setZero(variableColOffsets_.back(), variableColOffsets_.back());
matrix_.resize(variableColOffsets_.back(), variableColOffsets_.back());
assertInvariants();
}

Expand Down Expand Up @@ -418,4 +416,3 @@ namespace gtsam {
class CholeskyFailed;

}

0 comments on commit 741df28

Please sign in to comment.