Added constructors from a BayesTree to the SymbolicFactorGraph
parent
eab2496f6e
commit
48b33c44d3
|
@ -27,10 +27,14 @@ namespace gtsam {
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
SymbolicFactorGraph::SymbolicFactorGraph(const BayesNet<IndexConditional>& bayesNet) :
|
SymbolicFactorGraph::SymbolicFactorGraph(const SymbolicBayesNet& bayesNet) :
|
||||||
FactorGraph<IndexFactor>(bayesNet) {}
|
FactorGraph<IndexFactor>(bayesNet) {}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
|
SymbolicFactorGraph::SymbolicFactorGraph(const SymbolicBayesTree& bayesTree) :
|
||||||
|
FactorGraph<IndexFactor>(bayesTree) {}
|
||||||
|
|
||||||
|
/* ************************************************************************* */
|
||||||
void SymbolicFactorGraph::push_factor(Index key) {
|
void SymbolicFactorGraph::push_factor(Index key) {
|
||||||
push_back(boost::make_shared<IndexFactor>(key));
|
push_back(boost::make_shared<IndexFactor>(key));
|
||||||
}
|
}
|
||||||
|
|
|
@ -23,12 +23,14 @@
|
||||||
|
|
||||||
namespace gtsam { template<class FACTOR> class EliminationTree; }
|
namespace gtsam { template<class FACTOR> class EliminationTree; }
|
||||||
namespace gtsam { template<class CONDITIONAL> class BayesNet; }
|
namespace gtsam { template<class CONDITIONAL> class BayesNet; }
|
||||||
|
namespace gtsam { template<class CONDITIONAL, class CLIQUE> class BayesTree; }
|
||||||
namespace gtsam { class IndexConditional; }
|
namespace gtsam { class IndexConditional; }
|
||||||
|
|
||||||
namespace gtsam {
|
namespace gtsam {
|
||||||
|
|
||||||
|
typedef EliminationTree<IndexFactor> SymbolicEliminationTree;
|
||||||
typedef BayesNet<IndexConditional> SymbolicBayesNet;
|
typedef BayesNet<IndexConditional> SymbolicBayesNet;
|
||||||
typedef EliminationTree<IndexFactor> SymbolicEliminationTree;
|
typedef BayesTree<IndexConditional> SymbolicBayesTree;
|
||||||
|
|
||||||
/** Symbolic IndexFactor Graph
|
/** Symbolic IndexFactor Graph
|
||||||
* \nosubgrouping
|
* \nosubgrouping
|
||||||
|
@ -45,7 +47,10 @@ namespace gtsam {
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Construct from a BayesNet */
|
/** Construct from a BayesNet */
|
||||||
SymbolicFactorGraph(const BayesNet<IndexConditional>& bayesNet);
|
SymbolicFactorGraph(const SymbolicBayesNet& bayesNet);
|
||||||
|
|
||||||
|
/** Construct from a BayesTree */
|
||||||
|
SymbolicFactorGraph(const SymbolicBayesTree& bayesTree);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct from a factor graph of any type
|
* Construct from a factor graph of any type
|
||||||
|
|
Loading…
Reference in New Issue