Updated print functions
parent
6b1e1d16d5
commit
0b13c437fe
|
@ -68,9 +68,9 @@ namespace gtsam {
|
|||
std::cout << str << "(" << keyFormatter(key) << ")\n";
|
||||
BOOST_FOREACH(const sharedFactor& factor, factors) {
|
||||
if(factor)
|
||||
factor->print(str + "| ");
|
||||
factor->print(str);
|
||||
else
|
||||
std::cout << str << "| null factor\n";
|
||||
std::cout << str << "null factor\n";
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -189,6 +189,25 @@ namespace gtsam {
|
|||
}
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
template<class BAYESTREE, class GRAPH>
|
||||
void JunctionTreeUnordered<BAYESTREE,GRAPH>::Node::print(
|
||||
const std::string& s, const KeyFormatter& keyFormatter) const
|
||||
{
|
||||
std::cout << s;
|
||||
BOOST_FOREACH(Key j, keys)
|
||||
std::cout << j << " ";
|
||||
std::cout << "problemSize = " << problemSize_ << std::endl;
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
template<class BAYESTREE, class GRAPH>
|
||||
void JunctionTreeUnordered<BAYESTREE,GRAPH>::print(
|
||||
const std::string& s = "", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const
|
||||
{
|
||||
treeTraversal::PrintForest(*this, s, keyFormatter);
|
||||
}
|
||||
|
||||
/* ************************************************************************* */
|
||||
template<class BAYESTREE, class GRAPH>
|
||||
template<class ETREE>
|
||||
|
|
|
@ -68,6 +68,9 @@ namespace gtsam {
|
|||
Keys keys; ///< Frontal keys of this node
|
||||
Factors factors; ///< Factors associated with this node
|
||||
Children children; ///< sub-trees
|
||||
|
||||
/** print this node */
|
||||
void print(const std::string& s = "", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
|
||||
};
|
||||
|
||||
typedef boost::shared_ptr<Node> sharedNode; ///< Shared pointer to Node
|
||||
|
@ -112,6 +115,9 @@ namespace gtsam {
|
|||
std::pair<boost::shared_ptr<BayesTreeType>, boost::shared_ptr<FactorGraphType> >
|
||||
eliminate(const Eliminate& function) const;
|
||||
|
||||
/** Print the junction tree */
|
||||
void print(const std::string& s = "", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
|
||||
|
||||
/// @}
|
||||
|
||||
/// @name Advanced Interface
|
||||
|
|
Loading…
Reference in New Issue