Cleanups in BayesTree and SymbolicBayesTree
parent
4fa8332c77
commit
79ce96dceb
|
|
@ -93,8 +93,6 @@ namespace gtsam {
|
|||
/** Root cliques */
|
||||
std::vector<sharedClique> roots_;
|
||||
|
||||
public:
|
||||
|
||||
/// @name Standard Constructors
|
||||
/// @{
|
||||
|
||||
|
|
@ -104,32 +102,26 @@ namespace gtsam {
|
|||
/** Copy constructor */
|
||||
BayesTreeUnordered(const This& other);
|
||||
|
||||
protected:
|
||||
/** Assignment operator */
|
||||
This& operator=(const This& other);
|
||||
|
||||
public:
|
||||
/// @}
|
||||
/// @name Advanced Constructors
|
||||
/// @{
|
||||
|
||||
/** Destructor */
|
||||
virtual ~BayesTreeUnordered() {}
|
||||
|
||||
/// @}
|
||||
|
||||
/** Assignment operator */
|
||||
This& operator=(const This& other);
|
||||
|
||||
/// @name Testable
|
||||
/// @{
|
||||
|
||||
protected:
|
||||
/** check equality */
|
||||
bool equals(const This& other, double tol = 1e-9) const;
|
||||
|
||||
public:
|
||||
/** print */
|
||||
void print(const std::string& s = "",
|
||||
const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
|
||||
|
||||
public:
|
||||
/// @}
|
||||
|
||||
/// @name Standard Interface
|
||||
/// @{
|
||||
|
||||
|
|
|
|||
|
|
@ -19,13 +19,16 @@
|
|||
#include <boost/foreach.hpp>
|
||||
|
||||
#include <gtsam/symbolic/SymbolicBayesTreeUnordered.h>
|
||||
#include <gtsam/symbolic/SymbolicFactorGraphUnordered.h>
|
||||
#include <gtsam/symbolic/SymbolicBayesNetUnordered.h>
|
||||
#include <gtsam/inference/BayesTreeUnordered-inst.h>
|
||||
#include <gtsam/inference/BayesTreeCliqueBaseUnordered-inst.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
||||
void SymbolicBayesTreeUnordered::noop() const {
|
||||
|
||||
bool SymbolicBayesTreeUnordered::equals(const This& other, double tol /* = 1e-9 */) const
|
||||
{
|
||||
return Base::equals(other, tol);
|
||||
}
|
||||
|
||||
// /* ************************************************************************* */
|
||||
|
|
|
|||
|
|
@ -20,12 +20,16 @@
|
|||
|
||||
#include <gtsam/inference/BayesTreeUnordered.h>
|
||||
#include <gtsam/inference/BayesTreeCliqueBaseUnordered.h>
|
||||
#include <gtsam/symbolic/SymbolicFactorGraphUnordered.h>
|
||||
#include <gtsam/symbolic/SymbolicBayesNetUnordered.h>
|
||||
|
||||
namespace gtsam {
|
||||
|
||||
// Forward declarations
|
||||
class SymbolicFactorGraphUnordered;
|
||||
class SymbolicBayesNetUnordered;
|
||||
class SymbolicConditionalUnordered;
|
||||
|
||||
/* ************************************************************************* */
|
||||
/// A clique in a SymbolicBayesTree
|
||||
class GTSAM_EXPORT SymbolicBayesTreeCliqueUnordered :
|
||||
public BayesTreeCliqueBaseUnordered<SymbolicBayesTreeCliqueUnordered, SymbolicFactorGraphUnordered, SymbolicBayesNetUnordered>
|
||||
{
|
||||
|
|
@ -35,10 +39,12 @@ namespace gtsam {
|
|||
typedef boost::shared_ptr<This> shared_ptr;
|
||||
typedef boost::weak_ptr<This> weak_ptr;
|
||||
SymbolicBayesTreeCliqueUnordered() {}
|
||||
SymbolicBayesTreeCliqueUnordered(const SymbolicConditionalUnordered::shared_ptr& conditional) : Base(conditional) {}
|
||||
SymbolicBayesTreeCliqueUnordered(const boost::shared_ptr<SymbolicConditionalUnordered>& conditional) : Base(conditional) {}
|
||||
};
|
||||
|
||||
/* ************************************************************************* */
|
||||
/// A Bayes tree that represents the connectivity between variables but is not associated with any
|
||||
/// probability functions.
|
||||
class GTSAM_EXPORT SymbolicBayesTreeUnordered :
|
||||
public BayesTreeUnordered<SymbolicBayesTreeCliqueUnordered>
|
||||
{
|
||||
|
|
@ -49,31 +55,8 @@ namespace gtsam {
|
|||
typedef SymbolicBayesTreeUnordered This;
|
||||
typedef boost::shared_ptr<This> shared_ptr;
|
||||
|
||||
/** Insert a new conditional */
|
||||
//void insert(const sharedConditional& conditional);
|
||||
|
||||
/** check equality */
|
||||
bool equals(const This& other, double tol = 1e-9) const { return Base::equals(other, tol); }
|
||||
|
||||
/** print */
|
||||
void print(const std::string& s = "",
|
||||
const KeyFormatter& keyFormatter = DefaultKeyFormatter) const { Base::print(s, keyFormatter); }
|
||||
|
||||
|
||||
protected:
|
||||
|
||||
/**
|
||||
* Add a conditional to the front of a clique, i.e. a conditional whose
|
||||
* parents are already in the clique or its separators. This function does
|
||||
* not check for this condition, it just updates the data structures.
|
||||
*/
|
||||
//void addToCliqueFront(const sharedConditional& conditional, const sharedClique& clique);
|
||||
|
||||
private:
|
||||
|
||||
// Dummy method to export class
|
||||
void noop() const;
|
||||
|
||||
bool equals(const This& other, double tol = 1e-9) const;
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue