Returning empty noise model from QR and fix for backwards-compatibility in old code
parent
073679f831
commit
941cd93bf6
|
|
@ -476,6 +476,11 @@ namespace gtsam {
|
|||
// Use in-place QR dense Ab appropriate to NoiseModel
|
||||
gttic(QR);
|
||||
SharedDiagonal noiseModel = model_->QR(matrix_);
|
||||
// In the new unordered code, empty noise model indicates unit noise model, and I already
|
||||
// modified QR to return an empty noise model. This just creates a unit noise model in that
|
||||
// case because this old code does not handle empty noise models.
|
||||
if(!noiseModel)
|
||||
noiseModel = noiseModel::Unit::Create(std::min(matrix_.rows(), matrix_.cols() - 1));
|
||||
gttoc(QR);
|
||||
|
||||
// Zero the lower-left triangle. todo: not all of these entries actually
|
||||
|
|
|
|||
|
|
@ -131,7 +131,7 @@ SharedDiagonal Gaussian::QR(Matrix& Ab) const {
|
|||
// TODO: necessary to isolate last column?
|
||||
// householder(Ab, maxRank);
|
||||
|
||||
return Unit::Create(maxRank);
|
||||
return SharedDiagonal();
|
||||
}
|
||||
|
||||
void Gaussian::WhitenSystem(vector<Matrix>& A, Vector& b) const {
|
||||
|
|
|
|||
Loading…
Reference in New Issue