Skip to content

Commit c0c8972

Browse files
committed
inplace_QR *already* zeros out below diagonal
1 parent c87050b commit c0c8972

File tree

2 files changed

+0
-11
lines changed

2 files changed

+0
-11
lines changed

gtsam/linear/JacobianFactor.cpp

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -827,8 +827,6 @@ std::pair<GaussianConditional::shared_ptr, JacobianFactor::shared_ptr> Eliminate
827827
// The inplace variant will have no valid rows anymore below m==n
828828
// and only entries above the diagonal are valid.
829829
inplace_QR(Ab.matrix());
830-
// We zero below the diagonal to agree with the result from noieModel QR
831-
Ab.matrix().triangularView<Eigen::StrictlyLower>().setZero();
832830
size_t m = Ab.rows(), n = Ab.cols() - 1;
833831
size_t maxRank = min(m, n);
834832
jointFactor->model_ = noiseModel::Unit::Create(maxRank);

gtsam/linear/NoiseModel.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -191,8 +191,6 @@ SharedDiagonal Gaussian::QR(Matrix& Ab) const {
191191

192192
gttic(Gaussian_noise_model_QR);
193193

194-
static const bool debug = false;
195-
196194
// get size(A) and maxRank
197195
// TODO: really no rank problems ?
198196
size_t m = Ab.rows(), n = Ab.cols()-1;
@@ -201,15 +199,8 @@ SharedDiagonal Gaussian::QR(Matrix& Ab) const {
201199
// pre-whiten everything (cheaply if possible)
202200
WhitenInPlace(Ab);
203201

204-
if(debug) gtsam::print(Ab, "Whitened Ab: ");
205-
206202
// Eigen QR - much faster than older householder approach
207203
inplace_QR(Ab);
208-
Ab.triangularView<Eigen::StrictlyLower>().setZero();
209-
210-
// hand-coded householder implementation
211-
// TODO: necessary to isolate last column?
212-
// householder(Ab, maxRank);
213204

214205
return noiseModel::Unit::Create(maxRank);
215206
}

0 commit comments

Comments
 (0)