41 typedef boost::shared_ptr<This> shared_ptr;
42 typedef boost::weak_ptr<This> weak_ptr;
46 Base::FactorType::shared_ptr cachedFactor_;
47 Vector gradientContribution_;
48 #ifdef USE_BROKEN_FAST_BACKSUBSTITUTE 59 cachedFactor_(other.cachedFactor_),
60 gradientContribution_(other.gradientContribution_) {}
65 Base::operator=(other);
66 cachedFactor_ = other.cachedFactor_;
67 gradientContribution_ = other.gradientContribution_;
72 void setEliminationResult(
73 const FactorGraphType::EliminationResult& eliminationResult);
76 Base::FactorType::shared_ptr&
cachedFactor() {
return cachedFactor_; }
81 bool equals(
const This& other,
double tol = 1e-9)
const;
84 void print(
const std::string& s =
"",
85 const KeyFormatter& formatter = DefaultKeyFormatter)
const;
91 bool optimizeWildfireNode(
const KeySet& replaced,
double threshold,
99 void nnz_internal(
size_t* result)
const;
100 size_t calculate_nnz()
const;
117 void findAll(
const KeySet& markedMask,
KeySet* keys)
const;
124 bool isDirty(
const KeySet& replaced,
const KeySet& changed)
const;
136 bool valuesChanged(
const KeySet& replaced,
const Vector& originalValues,
140 void markFrontalsAsChanged(
KeySet* changed)
const;
143 void restoreFromOriginals(
const Vector& originalValues,
147 friend class boost::serialization::access;
148 template <
class ARCHIVE>
149 void serialize(ARCHIVE& ar,
const unsigned int ) {
150 ar& BOOST_SERIALIZATION_BASE_OBJECT_NVP(
Base);
151 ar& BOOST_SERIALIZATION_NVP(cachedFactor_);
152 ar& BOOST_SERIALIZATION_NVP(gradientContribution_);
167 size_t optimizeWildfire(
const ISAM2Clique::shared_ptr& root,
double threshold,
168 const KeySet& replaced, VectorValues* delta);
170 size_t optimizeWildfireNonRecursive(
const ISAM2Clique::shared_ptr& root,
171 double threshold,
const KeySet& replaced,
172 VectorValues* delta);
A conditional Gaussian functions as the node in a Bayes network It has a set of parents y,...
Definition: GaussianConditional.h:36
Conditional Gaussian Base class.
boost::shared_ptr< This > shared_ptr
shared_ptr to this class
Definition: GaussianConditional.h:42
ISAM2Clique(const ISAM2Clique &other)
Copy constructor, does not copy solution pointers as these are invalid in different trees.
Definition: ISAM2Clique.h:57
ISAM2Clique()
Default constructor.
Definition: ISAM2Clique.h:53
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:141
Template to create a binary predicate.
Definition: Testable.h:110
Chordal Bayes Net, the result of eliminating a factor graph.
This is the base class for BayesTree cliques.
Definition: BayesTreeCliqueBase.h:48
size_t optimizeWildfire(const ISAM2Clique::shared_ptr &root, double threshold, const KeySet &keys, VectorValues *delta)
Optimize the BayesTree, starting from the root.
Definition: ISAM2Clique.cpp:224
const Vector & gradientContribution() const
Access the gradient contribution.
Definition: ISAM2Clique.h:79
boost::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:33
Specialized Clique structure for ISAM2, incorporating caching and gradient contribution TODO: more do...
Definition: ISAM2Clique.h:36
ISAM2Clique & operator=(const ISAM2Clique &other)
Assignment operator, does not copy solution pointers as these are invalid in different trees.
Definition: ISAM2Clique.h:64
This class represents a collection of vector-valued variables associated each with a unique integer i...
Definition: VectorValues.h:73
Base class for cliques of a BayesTree.
Base::FactorType::shared_ptr & cachedFactor()
Access the cached factor.
Definition: ISAM2Clique.h:76
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
Linear Factor Graph where all factors are Gaussians.