Format using BORG conventions

release/4.3a0
dellaert 2014-02-15 12:02:37 -05:00
parent 99947c7c6d
commit 15ba23bf46
1 changed files with 26 additions and 26 deletions

View File

@ -21,32 +21,32 @@
namespace gtsam { namespace gtsam {
/* ************************************************************************* */ /* ************************************************************************* */
VerticalBlockMatrix VerticalBlockMatrix::LikeActiveViewOf(const VerticalBlockMatrix& other) VerticalBlockMatrix VerticalBlockMatrix::LikeActiveViewOf(
{ const VerticalBlockMatrix& other) {
VerticalBlockMatrix result; VerticalBlockMatrix result;
result.variableColOffsets_.resize(other.nBlocks() + 1); result.variableColOffsets_.resize(other.nBlocks() + 1);
for(size_t i = 0; i < result.variableColOffsets_.size(); ++i) for (size_t i = 0; i < result.variableColOffsets_.size(); ++i)
result.variableColOffsets_[i] = result.variableColOffsets_[i] = other.variableColOffsets_[other.blockStart_
other.variableColOffsets_[other.blockStart_ + i] - other.variableColOffsets_[other.blockStart_]; + i] - other.variableColOffsets_[other.blockStart_];
result.matrix_.resize(other.rows(), result.variableColOffsets_.back()); result.matrix_.resize(other.rows(), result.variableColOffsets_.back());
result.rowEnd_ = other.rows(); result.rowEnd_ = other.rows();
result.assertInvariants(); result.assertInvariants();
return result; return result;
} }
/* ************************************************************************* */ /* ************************************************************************* */
VerticalBlockMatrix VerticalBlockMatrix::LikeActiveViewOf(const SymmetricBlockMatrix& other, DenseIndex height) VerticalBlockMatrix VerticalBlockMatrix::LikeActiveViewOf(
{ const SymmetricBlockMatrix& other, DenseIndex height) {
VerticalBlockMatrix result; VerticalBlockMatrix result;
result.variableColOffsets_.resize(other.nBlocks() + 1); result.variableColOffsets_.resize(other.nBlocks() + 1);
for(size_t i = 0; i < result.variableColOffsets_.size(); ++i) for (size_t i = 0; i < result.variableColOffsets_.size(); ++i)
result.variableColOffsets_[i] = result.variableColOffsets_[i] = other.variableColOffsets_[other.blockStart_
other.variableColOffsets_[other.blockStart_ + i] - other.variableColOffsets_[other.blockStart_]; + i] - other.variableColOffsets_[other.blockStart_];
result.matrix_.resize(height, result.variableColOffsets_.back()); result.matrix_.resize(height, result.variableColOffsets_.back());
result.rowEnd_ = height; result.rowEnd_ = height;
result.assertInvariants(); result.assertInvariants();
return result; return result;
} }
} }