Change ordering back to OptionalOrdering typedef
parent
bc511a26ec
commit
5900eaa8ec
|
|
@ -27,7 +27,7 @@ namespace gtsam {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
Marginals::Marginals(const NonlinearFactorGraph& graph, const Values& solution, Factorization factorization,
|
Marginals::Marginals(const NonlinearFactorGraph& graph, const Values& solution, Factorization factorization,
|
||||||
boost::optional<const Ordering &> ordering)
|
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering)
|
||||||
: values_(solution), factorization_(factorization) {
|
: values_(solution), factorization_(factorization) {
|
||||||
gttic(MarginalsConstructor);
|
gttic(MarginalsConstructor);
|
||||||
graph_ = *graph.linearize(solution);
|
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,
|
Marginals::Marginals(const GaussianFactorGraph& graph, const VectorValues& solution, Factorization factorization,
|
||||||
boost::optional<const Ordering &> ordering)
|
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering)
|
||||||
: graph_(graph), factorization_(factorization) {
|
: graph_(graph), factorization_(factorization) {
|
||||||
gttic(MarginalsConstructor);
|
gttic(MarginalsConstructor);
|
||||||
Values vals;
|
Values vals;
|
||||||
|
|
@ -49,14 +49,14 @@ Marginals::Marginals(const GaussianFactorGraph& graph, const VectorValues& solut
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
Marginals::Marginals(const GaussianFactorGraph& graph, const Values& solution, Factorization factorization,
|
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) {
|
: graph_(graph), values_(solution), factorization_(factorization) {
|
||||||
gttic(MarginalsConstructor);
|
gttic(MarginalsConstructor);
|
||||||
computeBayesTree(ordering);
|
computeBayesTree(ordering);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
void Marginals::computeBayesTree(boost::optional<const Ordering &> ordering) {
|
void Marginals::computeBayesTree(EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering) {
|
||||||
// Compute BayesTree
|
// Compute BayesTree
|
||||||
if(factorization_ == CHOLESKY)
|
if(factorization_ == CHOLESKY)
|
||||||
bayesTree_ = *graph_.eliminateMultifrontal(ordering, EliminatePreferCholesky);
|
bayesTree_ = *graph_.eliminateMultifrontal(ordering, EliminatePreferCholesky);
|
||||||
|
|
|
||||||
|
|
@ -58,7 +58,7 @@ public:
|
||||||
* @param ordering An optional variable ordering for elimination.
|
* @param ordering An optional variable ordering for elimination.
|
||||||
*/
|
*/
|
||||||
Marginals(const NonlinearFactorGraph& graph, const Values& solution, Factorization factorization = CHOLESKY,
|
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.
|
/** Construct a marginals class from a linear factor graph.
|
||||||
* @param graph The factor graph defining the full joint density on all variables.
|
* @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.
|
* @param ordering An optional variable ordering for elimination.
|
||||||
*/
|
*/
|
||||||
Marginals(const GaussianFactorGraph& graph, const Values& solution, Factorization factorization = CHOLESKY,
|
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.
|
/** Construct a marginals class from a linear factor graph.
|
||||||
* @param graph The factor graph defining the full joint density on all variables.
|
* @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.
|
* @param ordering An optional variable ordering for elimination.
|
||||||
*/
|
*/
|
||||||
Marginals(const GaussianFactorGraph& graph, const VectorValues& solution, Factorization factorization = CHOLESKY,
|
Marginals(const GaussianFactorGraph& graph, const VectorValues& solution, Factorization factorization = CHOLESKY,
|
||||||
boost::optional<const Ordering &> ordering = boost::none);
|
EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering = boost::none);
|
||||||
|
|
||||||
/** print */
|
/** print */
|
||||||
void print(const std::string& str = "Marginals: ", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
|
void print(const std::string& str = "Marginals: ", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
|
||||||
|
|
@ -103,7 +103,7 @@ public:
|
||||||
protected:
|
protected:
|
||||||
|
|
||||||
/** Compute the Bayes Tree as a helper function to the constructor */
|
/** Compute the Bayes Tree as a helper function to the constructor */
|
||||||
void computeBayesTree(boost::optional<const Ordering &> ordering);
|
void computeBayesTree(EliminateableFactorGraph<GaussianFactorGraph>::OptionalOrdering ordering);
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue