From 989ab9a94f61061c4867a044a1327b8064dd3867 Mon Sep 17 00:00:00 2001 From: Yong-Dian Jian Date: Mon, 18 Oct 2010 19:23:15 +0000 Subject: [PATCH] add an simple interface to add prior --- linear/GaussianFactorGraph.cpp | 4 ++++ linear/GaussianFactorGraph.h | 2 ++ 2 files changed, 6 insertions(+) diff --git a/linear/GaussianFactorGraph.cpp b/linear/GaussianFactorGraph.cpp index 86d7efbe9..126a5e131 100644 --- a/linear/GaussianFactorGraph.cpp +++ b/linear/GaussianFactorGraph.cpp @@ -174,4 +174,8 @@ GaussianFactorGraph GaussianFactorGraph::add_priors(double sigma, const Gaussian return result; } +GaussianFactorGraph GaussianFactorGraph::add_priors(double sigma) const { + return add_priors(sigma, GaussianVariableIndex<>(*this)) ; +} + } // namespace gtsam diff --git a/linear/GaussianFactorGraph.h b/linear/GaussianFactorGraph.h index 69ff3aa84..256c7b453 100644 --- a/linear/GaussianFactorGraph.h +++ b/linear/GaussianFactorGraph.h @@ -150,6 +150,8 @@ namespace gtsam { * @param sigma Standard deviation of Gaussian */ GaussianFactorGraph add_priors(double sigma, const GaussianVariableIndex<>& variableIndex) const; + GaussianFactorGraph add_priors(double sigma) const; + };