Added constructors from a BayesTree to the SymbolicFactorGraph

release/4.3a0
Stephen Williams 2012-06-21 20:26:30 +00:00
parent eab2496f6e
commit 48b33c44d3
2 changed files with 13 additions and 4 deletions

View File

@ -27,9 +27,13 @@ namespace gtsam {
using namespace std;
/* ************************************************************************* */
SymbolicFactorGraph::SymbolicFactorGraph(const BayesNet<IndexConditional>& bayesNet) :
SymbolicFactorGraph::SymbolicFactorGraph(const SymbolicBayesNet& bayesNet) :
FactorGraph<IndexFactor>(bayesNet) {}
/* ************************************************************************* */
SymbolicFactorGraph::SymbolicFactorGraph(const SymbolicBayesTree& bayesTree) :
FactorGraph<IndexFactor>(bayesTree) {}
/* ************************************************************************* */
void SymbolicFactorGraph::push_factor(Index key) {
push_back(boost::make_shared<IndexFactor>(key));

View File

@ -23,12 +23,14 @@
namespace gtsam { template<class FACTOR> class EliminationTree; }
namespace gtsam { template<class CONDITIONAL> class BayesNet; }
namespace gtsam { template<class CONDITIONAL, class CLIQUE> class BayesTree; }
namespace gtsam { class IndexConditional; }
namespace gtsam {
typedef BayesNet<IndexConditional> SymbolicBayesNet;
typedef EliminationTree<IndexFactor> SymbolicEliminationTree;
typedef BayesNet<IndexConditional> SymbolicBayesNet;
typedef BayesTree<IndexConditional> SymbolicBayesTree;
/** Symbolic IndexFactor Graph
* \nosubgrouping
@ -45,7 +47,10 @@ namespace gtsam {
}
/** 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