From 6b7222ea992e82765249590a6dbfd81a7cd2ba9d Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Thu, 24 Oct 2024 17:42:29 -0400 Subject: [PATCH 1/7] remove reference for shared_ptr --- gtsam/linear/PCGSolver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/linear/PCGSolver.h b/gtsam/linear/PCGSolver.h index 17cc2d3db2..42bb3fccc6 100644 --- a/gtsam/linear/PCGSolver.h +++ b/gtsam/linear/PCGSolver.h @@ -42,7 +42,7 @@ struct GTSAM_EXPORT PCGSolverParameters : public ConjugateGradientParameters { PCGSolverParameters() {} PCGSolverParameters( - const std::shared_ptr &preconditioner) + const std::shared_ptr preconditioner) : preconditioner(preconditioner) {} void print(std::ostream &os) const override; From 2258c6431ec8f2369c5fc600a7f729719028568e Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Thu, 24 Oct 2024 17:42:50 -0400 Subject: [PATCH 2/7] fix wrapping for matlab --- gtsam/linear/linear.i | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gtsam/linear/linear.i b/gtsam/linear/linear.i index eecc0192c3..6b454af05e 100644 --- a/gtsam/linear/linear.i +++ b/gtsam/linear/linear.i @@ -733,10 +733,10 @@ virtual class BlockJacobiPreconditionerParameters : gtsam::PreconditionerParamet #include virtual class PCGSolverParameters : gtsam::ConjugateGradientParameters { PCGSolverParameters(); - PCGSolverParameters(gtsam::PreconditionerParameters* preconditioner); + PCGSolverParameters(const gtsam::PreconditionerParameters* preconditioner); void print(string s = ""); - - gtsam::PreconditionerParameters* preconditioner; + + std::shared_ptr preconditioner; }; #include From 328ee4d150aa235937a28d92f1dbf178b90d0b13 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Thu, 24 Oct 2024 17:43:00 -0400 Subject: [PATCH 3/7] update issue template --- .github/ISSUE_TEMPLATE/bug-report.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug-report.md b/.github/ISSUE_TEMPLATE/bug-report.md index 9f15b2b7c2..d7a35b1242 100644 --- a/.github/ISSUE_TEMPLATE/bug-report.md +++ b/.github/ISSUE_TEMPLATE/bug-report.md @@ -3,12 +3,12 @@ name: "Bug Report" about: Submit a bug report to help us improve GTSAM --- + + - - ## Description From 23d28b64dc8f0f4c66022fff06adc2c6a433c6a1 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Thu, 24 Oct 2024 17:43:08 -0400 Subject: [PATCH 4/7] make executable --- containers/hub_push.sh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100644 => 100755 containers/hub_push.sh diff --git a/containers/hub_push.sh b/containers/hub_push.sh old mode 100644 new mode 100755 From e7dea395622f2a0c7b267c711e0c2db7f1c0eabe Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sat, 26 Oct 2024 18:08:10 -0400 Subject: [PATCH 5/7] make function inline to avoid multiple definition error --- gtsam/nonlinear/internal/ChiSquaredInverse.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/nonlinear/internal/ChiSquaredInverse.h b/gtsam/nonlinear/internal/ChiSquaredInverse.h index dbf83f92b4..6707be1fe3 100644 --- a/gtsam/nonlinear/internal/ChiSquaredInverse.h +++ b/gtsam/nonlinear/internal/ChiSquaredInverse.h @@ -36,7 +36,7 @@ namespace internal { * @param alpha Quantile value * @return double */ -double chi_squared_quantile(const double dofs, const double alpha) { +inline double chi_squared_quantile(const double dofs, const double alpha) { return 2 * igami(dofs / 2, alpha); } From 0271eb637c69ac77d4b309765d7318fbaa6c3448 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sat, 26 Oct 2024 18:08:30 -0400 Subject: [PATCH 6/7] remove redunant assignment of boolean flag --- gtsam/nonlinear/NonlinearConjugateGradientOptimizer.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/nonlinear/NonlinearConjugateGradientOptimizer.h b/gtsam/nonlinear/NonlinearConjugateGradientOptimizer.h index bd106afbed..e3d90a5913 100644 --- a/gtsam/nonlinear/NonlinearConjugateGradientOptimizer.h +++ b/gtsam/nonlinear/NonlinearConjugateGradientOptimizer.h @@ -146,7 +146,7 @@ double lineSearch(const S &system, const V currentValues, const W &gradient) { double newError = system.error(newValues); while (true) { - const bool flag = (maxStep - newStep > newStep - minStep) ? true : false; + const bool flag = (maxStep - newStep > newStep - minStep); const double testStep = flag ? newStep + resphi * (maxStep - newStep) : newStep - resphi * (newStep - minStep); From 92b3272823eaa74a3d8a08bde6d8a2dedb1543c9 Mon Sep 17 00:00:00 2001 From: Varun Agrawal Date: Sat, 26 Oct 2024 18:08:43 -0400 Subject: [PATCH 7/7] make shared_ptr a reference --- gtsam/linear/PCGSolver.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gtsam/linear/PCGSolver.h b/gtsam/linear/PCGSolver.h index 42bb3fccc6..17cc2d3db2 100644 --- a/gtsam/linear/PCGSolver.h +++ b/gtsam/linear/PCGSolver.h @@ -42,7 +42,7 @@ struct GTSAM_EXPORT PCGSolverParameters : public ConjugateGradientParameters { PCGSolverParameters() {} PCGSolverParameters( - const std::shared_ptr preconditioner) + const std::shared_ptr &preconditioner) : preconditioner(preconditioner) {} void print(std::ostream &os) const override;