Format using BORG conventions
parent
99947c7c6d
commit
15ba23bf46
|
@ -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;
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue