44 void print(
const std::string&
s =
"")
const ;
65 template<
class CLIQUE>
85 typedef typename FactorGraphType::Eliminate
Eliminate;
120 This& operator=(
const This& other);
126 bool equals(
const This& other,
double tol = 1
e-9)
const;
130 void print(
const std::string&
s =
"",
142 return nodes_.empty();
146 const Nodes&
nodes()
const {
return nodes_; }
152 const Roots&
roots()
const {
return roots_; }
156 typename Nodes::const_iterator
c = nodes_.find(j);
157 if(c == nodes_.end())
158 throw std::out_of_range(
"Requested the BayesTree clique for a key that is not in the BayesTree");
167 size_t numCachedSeparatorMarginals()
const;
174 sharedConditional marginalFactor(
Key j,
const Eliminate&
function = EliminationTraitsType::DefaultEliminate)
const;
180 sharedFactorGraph joint(
Key j1,
Key j2,
const Eliminate&
function = EliminationTraitsType::DefaultEliminate)
const;
186 sharedBayesNet jointBayesNet(
Key j1,
Key j2,
const Eliminate&
function = EliminationTraitsType::DefaultEliminate)
const;
199 void saveGraph(
const std::string&
filename,
210 template<
class CONTAINER>
211 Key findParentClique(
const CONTAINER& parents)
const;
217 void deleteCachedShortcuts();
223 void removePath(sharedClique clique, BayesNetType* bn, Cliques* orphans);
229 void removeTop(
const KeyVector&
keys, BayesNetType* bn, Cliques* orphans);
233 Cliques removeSubtree(
const sharedClique& subtree);
238 void insertRoot(
const sharedClique& subtree);
241 void addClique(
const sharedClique& clique,
const sharedClique& parent_clique = sharedClique());
249 void dot(std::ostream &
s, sharedClique clique,
const KeyFormatter& keyFormatter,
250 int parentnum = 0)
const;
256 void removeClique(sharedClique clique);
259 void fillNodesIndex(
const sharedClique& subtree);
265 #ifdef GTSAM_ENABLE_BOOST_SERIALIZATION 267 friend class boost::serialization::access;
268 template<
class ARCHIVE>
269 void serialize(ARCHIVE & ar,
const unsigned int ) {
270 ar & BOOST_SERIALIZATION_NVP(nodes_);
271 ar & BOOST_SERIALIZATION_NVP(roots_);
280 template <
class CLIQUE,
typename =
void>
284 typedef typename CLIQUE::ConditionalType
Base;
300 this->keys_.assign(clique->conditional()->beginParents(),
301 clique->conditional()->endParents());
305 const std::string&
s =
"",
307 clique->print(
s +
"stored clique",
formatter);
void print(const Matrix &A, const string &s, ostream &stream)
std::shared_ptr< FactorGraphType > sharedFactorGraph
void print(const std::string &s="", const KeyFormatter &formatter=DefaultKeyFormatter) const override
FactorGraphType::Eliminate Eliminate
sharedClique sharedNode
Synonym for sharedClique (TODO: remove)
A thin wrapper around std::list that uses boost's fast_pool_allocator.
double dot(const V1 &a, const V2 &b)
std::string serialize(const T &input)
serializes to a string
const Nodes & nodes() const
std::size_t maxSeparatorSize
std::shared_ptr< CliqueType > clique
std::vector< T, typename internal::FastDefaultVectorAllocator< T >::type > FastVector
std::shared_ptr< BayesNetType > sharedBayesNet
std::shared_ptr< ConditionalType > sharedConditional
NonlinearFactorGraph graph
static const KeyFormatter DefaultKeyFormatter
Clique Node
Synonym for Clique (TODO: remove)
std::shared_ptr< Clique > sharedClique
Shared pointer to a clique.
std::shared_ptr< FactorType > sharedFactor
const KeyFormatter & formatter
CLIQUE::EliminationTraitsType EliminationTraitsType
sharedClique operator[](Key j) const
BayesTreeOrphanWrapper(const std::shared_ptr< CliqueType > &clique)
Construct a new Bayes Tree Orphan Wrapper object.
FastVector< std::size_t > conditionalSizes
CLIQUE Clique
The clique type, normally BayesTreeClique.
CLIQUE::ConditionalType ConditionalType
double avgConditionalSize
FastVector< std::size_t > separatorSizes
ConcurrentMap< Key, sharedClique > Nodes
Array< double, 1, 3 > e(1./3., 0.5, 2.)
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
CLIQUE::FactorGraphType FactorGraphType
A thin wrapper around std::vector that uses a custom allocator.
const sharedClique & clique(Key j) const
ofstream os("timeSchurFactors.csv")
const Roots & roots() const
FastList< sharedClique > Cliques
FastVector< sharedClique > Roots
CLIQUE::BayesNetType BayesNetType
std::shared_ptr< This > shared_ptr
CLIQUE::ConditionalType Base
FastVector< Key > KeyVector
Define collection type once and for all - also used in wrappers.
std::size_t maxConditionalSize
std::uint64_t Key
Integer nonlinear key type.
CLIQUE::FactorType FactorType