Formatting only

release/4.3a0
dellaert 2015-06-21 12:57:26 -07:00
parent 67013cba05
commit 0d0a9e5b16
1 changed files with 105 additions and 104 deletions

View File

@ -13,8 +13,7 @@
#include <gtsam/base/FastVector.h> #include <gtsam/base/FastVector.h>
#include <gtsam/inference/Ordering.h> #include <gtsam/inference/Ordering.h>
namespace gtsam namespace gtsam {
{
/** /**
* A cluster-tree is associated with a factor graph and is defined as in Koller-Friedman: * A cluster-tree is associated with a factor graph and is defined as in Koller-Friedman:
@ -23,8 +22,7 @@ namespace gtsam
* \nosubgrouping * \nosubgrouping
*/ */
template<class BAYESTREE, class GRAPH> template<class BAYESTREE, class GRAPH>
class ClusterTree class ClusterTree {
{
public: public:
typedef GRAPH FactorGraphType; ///< The factor graph type typedef GRAPH FactorGraphType; ///< The factor graph type
typedef typename GRAPH::FactorType FactorType; ///< The type of factors typedef typename GRAPH::FactorType FactorType; ///< The type of factors
@ -41,8 +39,10 @@ namespace gtsam
typedef FastVector<sharedFactor> Factors; typedef FastVector<sharedFactor> Factors;
typedef FastVector<boost::shared_ptr<Cluster> > Children; typedef FastVector<boost::shared_ptr<Cluster> > Children;
Cluster() {} Cluster() {
Cluster(Key key, const Factors& factors) : factors(factors) { }
Cluster(Key key, const Factors& factors) :
factors(factors) {
orderedFrontalKeys.push_back(key); orderedFrontalKeys.push_back(key);
} }
@ -51,10 +51,13 @@ namespace gtsam
Children children; ///< sub-trees Children children; ///< sub-trees
int problemSize_; int problemSize_;
int problemSize() const { return problemSize_; } int problemSize() const {
return problemSize_;
}
/** print this node */ /** print this node */
void print(const std::string& s = "", const KeyFormatter& keyFormatter = DefaultKeyFormatter) const; void print(const std::string& s = "", const KeyFormatter& keyFormatter =
DefaultKeyFormatter) const;
}; };
typedef boost::shared_ptr<Cluster> sharedCluster; ///< Shared pointer to Cluster typedef boost::shared_ptr<Cluster> sharedCluster; ///< Shared pointer to Cluster
@ -124,7 +127,5 @@ namespace gtsam
}; };
} }