From 2ad0cd4417fac4669bae8710d81b38d6f5bea049 Mon Sep 17 00:00:00 2001 From: Richard Roberts Date: Thu, 3 Oct 2013 19:10:13 +0000 Subject: [PATCH] Fixed compile error on linux --- gtsam/linear/NoiseModel.cpp | 8 ++++---- gtsam/linear/NoiseModel.h | 12 ++++++------ 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gtsam/linear/NoiseModel.cpp b/gtsam/linear/NoiseModel.cpp index e10428034..56628c55d 100644 --- a/gtsam/linear/NoiseModel.cpp +++ b/gtsam/linear/NoiseModel.cpp @@ -107,7 +107,7 @@ void Gaussian::WhitenInPlace(Matrix& H) const { } /* ************************************************************************* */ -void Gaussian::WhitenInPlace(Eigen::Block& H) const { +void Gaussian::WhitenInPlace(Eigen::Block H) const { H = thisR() * H; } @@ -238,7 +238,7 @@ void Diagonal::WhitenInPlace(Matrix& H) const { } /* ************************************************************************* */ -void Diagonal::WhitenInPlace(Eigen::Block& H) const { +void Diagonal::WhitenInPlace(Eigen::Block H) const { H = invsigmas().asDiagonal() * H; } @@ -315,7 +315,7 @@ void Constrained::WhitenInPlace(Matrix& H) const { } /* ************************************************************************* */ -void Constrained::WhitenInPlace(Eigen::Block& H) const { +void Constrained::WhitenInPlace(Eigen::Block H) const { // selective scaling // Scale row i of H by sigmas[i], basically multiplying H with diag(sigmas) // Set inf_mask flag is true so that if invsigmas[i] is inf, i.e. sigmas[i] = 0, @@ -466,7 +466,7 @@ void Isotropic::WhitenInPlace(Matrix& H) const { } /* ************************************************************************* */ -void Isotropic::WhitenInPlace(Eigen::Block& H) const { +void Isotropic::WhitenInPlace(Eigen::Block H) const { H *= invsigma_; } diff --git a/gtsam/linear/NoiseModel.h b/gtsam/linear/NoiseModel.h index 8f8fe835f..f73360579 100644 --- a/gtsam/linear/NoiseModel.h +++ b/gtsam/linear/NoiseModel.h @@ -199,7 +199,7 @@ namespace gtsam { /** * In-place version */ - virtual void WhitenInPlace(Eigen::Block& H) const; + virtual void WhitenInPlace(Eigen::Block H) const; /** * Whiten a system, in place as well @@ -297,7 +297,7 @@ namespace gtsam { virtual Vector unwhiten(const Vector& v) const; virtual Matrix Whiten(const Matrix& H) const; virtual void WhitenInPlace(Matrix& H) const; - virtual void WhitenInPlace(Eigen::Block& H) const; + virtual void WhitenInPlace(Eigen::Block H) const; /** * Return standard deviations (sqrt of diagonal) @@ -447,7 +447,7 @@ namespace gtsam { /// with a non-zero sigma. Other rows remain untouched. virtual Matrix Whiten(const Matrix& H) const; virtual void WhitenInPlace(Matrix& H) const; - virtual void WhitenInPlace(Eigen::Block& H) const; + virtual void WhitenInPlace(Eigen::Block H) const; /** * Apply QR factorization to the system [A b], taking into account constraints @@ -527,7 +527,7 @@ namespace gtsam { virtual Vector unwhiten(const Vector& v) const; virtual Matrix Whiten(const Matrix& H) const; virtual void WhitenInPlace(Matrix& H) const; - virtual void WhitenInPlace(Eigen::Block& H) const; + virtual void WhitenInPlace(Eigen::Block H) const; /** * Return standard deviation @@ -575,7 +575,7 @@ namespace gtsam { virtual Vector unwhiten(const Vector& v) const { return v; } virtual Matrix Whiten(const Matrix& H) const { return H; } virtual void WhitenInPlace(Matrix& H) const {} - virtual void WhitenInPlace(Eigen::Block& H) const {} + virtual void WhitenInPlace(Eigen::Block H) const {} private: /** Serialization function */ @@ -710,7 +710,7 @@ namespace gtsam { }; /// Cauchy implements the "Cauchy" robust error model (Lee2013IROS). Contributed by: - /// Dipl.-Inform. Jan Oberländer (M.Sc.), FZI Research Center for + /// Dipl.-Inform. Jan Oberl�nder (M.Sc.), FZI Research Center for /// Information Technology, Karlsruhe, Germany. /// oberlaender@fzi.de /// Thanks Jan!