Made BayesNet argument a reference (and moved printStats to the right place)
parent
0554532fcd
commit
e9e40c733d
|
@ -112,14 +112,14 @@ namespace gtsam {
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
template<class CONDITIONAL>
|
template<class CONDITIONAL>
|
||||||
void BayesNet<CONDITIONAL>::push_back(const BayesNet<CONDITIONAL> bn) {
|
void BayesNet<CONDITIONAL>::push_back(const BayesNet<CONDITIONAL>& bn) {
|
||||||
BOOST_FOREACH(sharedConditional conditional,bn.conditionals_)
|
BOOST_FOREACH(sharedConditional conditional,bn.conditionals_)
|
||||||
push_back(conditional);
|
push_back(conditional);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* ************************************************************************* */
|
/* ************************************************************************* */
|
||||||
template<class CONDITIONAL>
|
template<class CONDITIONAL>
|
||||||
void BayesNet<CONDITIONAL>::push_front(const BayesNet<CONDITIONAL> bn) {
|
void BayesNet<CONDITIONAL>::push_front(const BayesNet<CONDITIONAL>& bn) {
|
||||||
BOOST_FOREACH(sharedConditional conditional,bn.conditionals_)
|
BOOST_FOREACH(sharedConditional conditional,bn.conditionals_)
|
||||||
push_front(conditional);
|
push_front(conditional);
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,9 +93,6 @@ public:
|
||||||
void print(const std::string& s = "",
|
void print(const std::string& s = "",
|
||||||
const IndexFormatter& formatter = DefaultIndexFormatter) const;
|
const IndexFormatter& formatter = DefaultIndexFormatter) const;
|
||||||
|
|
||||||
/** print statistics */
|
|
||||||
void printStats(const std::string& s = "") const;
|
|
||||||
|
|
||||||
/** check equality */
|
/** check equality */
|
||||||
bool equals(const BayesNet& other, double tol = 1e-9) const;
|
bool equals(const BayesNet& other, double tol = 1e-9) const;
|
||||||
|
|
||||||
|
@ -108,6 +105,9 @@ public:
|
||||||
return conditionals_.size();
|
return conditionals_.size();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/** print statistics */
|
||||||
|
void printStats(const std::string& s = "") const;
|
||||||
|
|
||||||
/** return keys in reverse topological sort order, i.e., elimination order */
|
/** return keys in reverse topological sort order, i.e., elimination order */
|
||||||
FastList<Index> ordering() const;
|
FastList<Index> ordering() const;
|
||||||
|
|
||||||
|
@ -190,10 +190,10 @@ public:
|
||||||
}
|
}
|
||||||
|
|
||||||
/// push_back an entire Bayes net
|
/// push_back an entire Bayes net
|
||||||
void push_back(const BayesNet<CONDITIONAL> bn);
|
void push_back(const BayesNet<CONDITIONAL>& bn);
|
||||||
|
|
||||||
/// push_front an entire Bayes net
|
/// push_front an entire Bayes net
|
||||||
void push_front(const BayesNet<CONDITIONAL> bn);
|
void push_front(const BayesNet<CONDITIONAL>& bn);
|
||||||
|
|
||||||
/** += syntax for push_back, e.g. bayesNet += c1, c2, c3
|
/** += syntax for push_back, e.g. bayesNet += c1, c2, c3
|
||||||
* @param conditional The conditional to add to the back of the BayesNet
|
* @param conditional The conditional to add to the back of the BayesNet
|
||||||
|
|
Loading…
Reference in New Issue