Change ordering back to OptionalOrdering typedef

release/4.3a0
Gerry Chen 2019-10-10 01:02:38 -04:00
parent bc511a26ec
commit 5900eaa8ec
2 changed files with 8 additions and 8 deletions

View File

@ -27,7 +27,7 @@ namespace gtsam {
/* ************************************************************************* */
Marginals::Marginals(const NonlinearFactorGraph& graph, const Values& solution, Factorization factorization,
boost::optional<const Ordering &> ordering)
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering)
: values_(solution), factorization_(factorization) {
gttic(MarginalsConstructor);
graph_ = *graph.linearize(solution);
@ -36,7 +36,7 @@ Marginals::Marginals(const NonlinearFactorGraph& graph, const Values& solution,
/* ************************************************************************* */
Marginals::Marginals(const GaussianFactorGraph& graph, const VectorValues& solution, Factorization factorization,
boost::optional<const Ordering &> ordering)
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering)
: graph_(graph), factorization_(factorization) {
gttic(MarginalsConstructor);
Values vals;
@ -49,14 +49,14 @@ Marginals::Marginals(const GaussianFactorGraph& graph, const VectorValues& solut
/* ************************************************************************* */
Marginals::Marginals(const GaussianFactorGraph& graph, const Values& solution, Factorization factorization,
boost::optional<const Ordering &> ordering)
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering)
: graph_(graph), values_(solution), factorization_(factorization) {
gttic(MarginalsConstructor);
computeBayesTree(ordering);
}
/* ************************************************************************* */
void Marginals::computeBayesTree(boost::optional<const Ordering &> ordering) {
void Marginals::computeBayesTree(EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering) {
// Compute BayesTree
if(factorization_ == CHOLESKY)
bayesTree_ = *graph_.eliminateMultifrontal(ordering, EliminatePreferCholesky);

View File

@ -58,7 +58,7 @@ public:
* @param ordering An optional variable ordering for elimination.
*/
Marginals(const NonlinearFactorGraph& graph, const Values& solution, Factorization factorization = CHOLESKY,
boost::optional<const Ordering &> ordering = boost::none);
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering = boost::none);
/** Construct a marginals class from a linear factor graph.
* @param graph The factor graph defining the full joint density on all variables.
@ -67,7 +67,7 @@ public:
* @param ordering An optional variable ordering for elimination.
*/
Marginals(const GaussianFactorGraph& graph, const Values& solution, Factorization factorization = CHOLESKY,
boost::optional<const Ordering &> ordering = boost::none);
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering = boost::none);
/** Construct a marginals class from a linear factor graph.
* @param graph The factor graph defining the full joint density on all variables.
@ -76,7 +76,7 @@ public:
* @param ordering An optional variable ordering for elimination.
*/
Marginals(const GaussianFactorGraph& graph, const VectorValues& solution, Factorization factorization = CHOLESKY,
boost::optional<const Ordering &> ordering = boost::none);
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering = boost::none);
/** print */
void print(const std::string& str = "Marginals: ", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
@ -103,7 +103,7 @@ public:
protected:
/** Compute the Bayes Tree as a helper function to the constructor */
void computeBayesTree(boost::optional<const Ordering &> ordering);
void computeBayesTree(EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering);
};