Fixed more warnings
parent
3da894b152
commit
737e3806bb
|
|
@ -211,21 +211,21 @@ namespace gtsam
|
||||||
{
|
{
|
||||||
if(blockType_ == SelfAdjoint)
|
if(blockType_ == SelfAdjoint)
|
||||||
{
|
{
|
||||||
assert(other.blockType() == SelfAdjoint);
|
assert((BlockType)other.blockType() == SelfAdjoint);
|
||||||
triangularView() += other.triangularView().nestedExpression();
|
triangularView() += other.triangularView().nestedExpression();
|
||||||
}
|
}
|
||||||
else if(blockType_ == Plain)
|
else if(blockType_ == Plain)
|
||||||
{
|
{
|
||||||
assert(other.blockType() == Plain || other.blockType() == Transposed);
|
assert((BlockType)other.blockType() == Plain || (BlockType)other.blockType() == Transposed);
|
||||||
if(other.blockType() == Transposed)
|
if((BlockType)other.blockType() == Transposed)
|
||||||
myBlock_ += other.myBlock_.transpose();
|
myBlock_ += other.myBlock_.transpose();
|
||||||
else
|
else
|
||||||
myBlock_ += other.myBlock_;
|
myBlock_ += other.myBlock_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(other.blockType() == Plain || other.blockType() == Transposed);
|
assert((BlockType)other.blockType() == Plain || (BlockType)other.blockType() == Transposed);
|
||||||
if(other.blockType() == Transposed)
|
if((BlockType)other.blockType() == Transposed)
|
||||||
myBlock_.transpose() += other.myBlock_.transpose();
|
myBlock_.transpose() += other.myBlock_.transpose();
|
||||||
else
|
else
|
||||||
myBlock_.transpose() += other.myBlock_;
|
myBlock_.transpose() += other.myBlock_;
|
||||||
|
|
@ -310,21 +310,21 @@ namespace gtsam
|
||||||
{
|
{
|
||||||
if(blockType_ == SelfAdjoint)
|
if(blockType_ == SelfAdjoint)
|
||||||
{
|
{
|
||||||
assert(other.blockType() == SelfAdjoint);
|
assert((BlockType)other.blockType() == SelfAdjoint);
|
||||||
triangularView() = other.triangularView().nestedExpression();
|
triangularView() = other.triangularView().nestedExpression();
|
||||||
}
|
}
|
||||||
else if(blockType_ == Plain)
|
else if(blockType_ == Plain)
|
||||||
{
|
{
|
||||||
assert(other.blockType() == Plain || other.blockType() == Transposed);
|
assert((BlockType)other.blockType() == Plain || (BlockType)other.blockType() == Transposed);
|
||||||
if(other.blockType() == Transposed)
|
if((BlockType)other.blockType() == Transposed)
|
||||||
myBlock_ = other.myBlock_.transpose();
|
myBlock_ = other.myBlock_.transpose();
|
||||||
else
|
else
|
||||||
myBlock_ = other.myBlock_;
|
myBlock_ = other.myBlock_;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assert(other.blockType() == Plain || other.blockType() == Transposed);
|
assert((BlockType)other.blockType() == Plain || (BlockType)other.blockType() == Transposed);
|
||||||
if(other.blockType() == Transposed)
|
if((BlockType)other.blockType() == Transposed)
|
||||||
myBlock_.transpose() = other.myBlock_.transpose();
|
myBlock_.transpose() = other.myBlock_.transpose();
|
||||||
else
|
else
|
||||||
myBlock_.transpose() = other.myBlock_;
|
myBlock_.transpose() = other.myBlock_;
|
||||||
|
|
|
||||||
|
|
@ -448,10 +448,10 @@ void HessianFactor::updateATA(const JacobianFactor& update, const Scatter& scatt
|
||||||
gttic(update);
|
gttic(update);
|
||||||
DenseIndex nrInfoBlocks = this->info_.nBlocks(), nrUpdateBlocks = updateBlocks.nBlocks();
|
DenseIndex nrInfoBlocks = this->info_.nBlocks(), nrUpdateBlocks = updateBlocks.nBlocks();
|
||||||
for(DenseIndex j2 = 0; j2 < nrUpdateBlocks; ++j2) { // Horizontal block of Hessian
|
for(DenseIndex j2 = 0; j2 < nrUpdateBlocks; ++j2) { // Horizontal block of Hessian
|
||||||
DenseIndex slot2 = (j2 == update.size()) ? nrInfoBlocks-1 : slots[j2];
|
DenseIndex slot2 = (j2 == (DenseIndex)update.size()) ? nrInfoBlocks-1 : slots[j2];
|
||||||
assert(slot2 >= 0 && slot2 <= nrInfoBlocks);
|
assert(slot2 >= 0 && slot2 <= nrInfoBlocks);
|
||||||
for(DenseIndex j1 = 0; j1 <= j2; ++j1) { // Vertical block of Hessian
|
for(DenseIndex j1 = 0; j1 <= j2; ++j1) { // Vertical block of Hessian
|
||||||
DenseIndex slot1 = (j1 == update.size()) ? nrInfoBlocks-1 : slots[j1];
|
DenseIndex slot1 = (j1 == (DenseIndex)update.size()) ? nrInfoBlocks-1 : slots[j1];
|
||||||
assert(slot1 >= 0 && slot1 < nrInfoBlocks);
|
assert(slot1 >= 0 && slot1 < nrInfoBlocks);
|
||||||
if(slot1 != slot2)
|
if(slot1 != slot2)
|
||||||
info_(slot1, slot2).knownOffDiagonal() += updateBlocks(j1).transpose() * updateBlocks(j2);
|
info_(slot1, slot2).knownOffDiagonal() += updateBlocks(j1).transpose() * updateBlocks(j2);
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue