Fixed signed/unsigned warnings
parent
0726a5ffbc
commit
2925995d25
|
|
@ -26,7 +26,7 @@ namespace gtsam {
|
|||
GaussianFactor(keys), info_(augmentedInformation)
|
||||
{
|
||||
// Check number of variables
|
||||
if(Base::keys_.size() != augmentedInformation.nBlocks() - 1)
|
||||
if((DenseIndex)Base::keys_.size() != augmentedInformation.nBlocks() - 1)
|
||||
throw std::invalid_argument(
|
||||
"Error in HessianFactor constructor input. Number of provided keys plus\n"
|
||||
"one for the information vector must equal the number of provided matrix blocks.");
|
||||
|
|
@ -38,4 +38,4 @@ namespace gtsam {
|
|||
"must be the information vector, but the last provided block had more than one column.");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -387,9 +387,9 @@ void HessianFactor::updateATA(const HessianFactor& update, const Scatter& scatte
|
|||
// Apply updates to the upper triangle
|
||||
gttic(update);
|
||||
for(DenseIndex j2=0; j2<update.info_.nBlocks(); ++j2) {
|
||||
DenseIndex slot2 = (j2 == update.size()) ? this->info_.nBlocks()-1 : slots[j2];
|
||||
DenseIndex slot2 = (j2 == (DenseIndex)update.size()) ? this->info_.nBlocks()-1 : slots[j2];
|
||||
for(DenseIndex j1=0; j1<=j2; ++j1) {
|
||||
DenseIndex slot1 = (j1 == update.size()) ? this->info_.nBlocks()-1 : slots[j1];
|
||||
DenseIndex slot1 = (j1 == (DenseIndex)update.size()) ? this->info_.nBlocks()-1 : slots[j1];
|
||||
if(slot2 > slot1)
|
||||
info_(slot1, slot2).noalias() += update.info_(j1, j2);
|
||||
else if(slot1 > slot2)
|
||||
|
|
|
|||
|
|
@ -39,11 +39,11 @@ namespace gtsam {
|
|||
Base(keys), Ab_(augmentedMatrix)
|
||||
{
|
||||
// Check noise model dimension
|
||||
if(model && model->dim() != augmentedMatrix.rows())
|
||||
if(model && (DenseIndex)model->dim() != augmentedMatrix.rows())
|
||||
throw InvalidNoiseModel(augmentedMatrix.rows(), model->dim());
|
||||
|
||||
// Check number of variables
|
||||
if(Base::keys_.size() != augmentedMatrix.nBlocks() - 1)
|
||||
if((DenseIndex)Base::keys_.size() != augmentedMatrix.nBlocks() - 1)
|
||||
throw std::invalid_argument(
|
||||
"Error in JacobianFactor constructor input. Number of provided keys plus\n"
|
||||
"one for the RHS vector must equal the number of provided matrix blocks.");
|
||||
|
|
|
|||
Loading…
Reference in New Issue