SymbolicBayesNet.h
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2 
3  * GTSAM Copyright 2010, Georgia Tech Research Corporation,
4  * Atlanta, Georgia 30332-0415
5  * All Rights Reserved
6  * Authors: Frank Dellaert, et al. (see THANKS for the full author list)
7 
8  * See LICENSE for the license information
9 
10  * -------------------------------------------------------------------------- */
11 
19 #pragma once
20 
23 #include <gtsam/base/types.h>
24 
25 namespace gtsam {
26 
30  class SymbolicBayesNet : public FactorGraph<SymbolicConditional> {
31 
32  public:
33 
37  typedef boost::shared_ptr<This> shared_ptr;
38  typedef boost::shared_ptr<ConditionalType> sharedConditional;
39 
42 
45 
47  template<typename ITERATOR>
48  SymbolicBayesNet(ITERATOR firstConditional, ITERATOR lastConditional) : Base(firstConditional, lastConditional) {}
49 
51  template<class CONTAINER>
52  explicit SymbolicBayesNet(const CONTAINER& conditionals) : Base(conditionals) {}
53 
55  template<class DERIVEDCONDITIONAL>
57 
59  virtual ~SymbolicBayesNet() {}
60 
62 
65 
67  GTSAM_EXPORT bool equals(const This& bn, double tol = 1e-9) const;
68 
70  GTSAM_EXPORT void print(
71  const std::string& s = "SymbolicBayesNet",
72  const KeyFormatter& formatter = DefaultKeyFormatter) const override {
74  }
75 
77 
80 
81  GTSAM_EXPORT void saveGraph(const std::string &s, const KeyFormatter& keyFormatter = DefaultKeyFormatter) const;
82 
84 
85  private:
88  template<class ARCHIVE>
89  void serialize(ARCHIVE & ar, const unsigned int /*version*/) {
90  ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(Base);
91  }
92 };
93 
95  template<>
96  struct traits<SymbolicBayesNet> : public Testable<SymbolicBayesNet> {
97  };
98 
99 } //\ namespace gtsam
GTSAM_EXPORT void saveGraph(const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
Typedefs for easier changing of types.
GTSAM_EXPORT void print(const std::string &s="SymbolicBayesNet", const KeyFormatter &formatter=DefaultKeyFormatter) const override
print
FactorGraph< SymbolicConditional > Base
boost::shared_ptr< This > shared_ptr
void serialize(ARCHIVE &ar, const unsigned int)
NonlinearFactorGraph graph
static const KeyFormatter DefaultKeyFormatter
Definition: Key.h:43
const KeyFormatter & formatter
GTSAM_EXPORT bool equals(const This &bn, double tol=1e-9) const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Definition: Key.h:35
Array< double, 1, 3 > e(1./3., 0.5, 2.)
RealScalar s
friend class boost::serialization::access
traits
Definition: chartTesting.h:28
virtual ~SymbolicBayesNet()
Destructor.
virtual void print(const std::string &s="FactorGraph", const KeyFormatter &formatter=DefaultKeyFormatter) const
print out graph
SymbolicConditional ConditionalType
boost::shared_ptr< ConditionalType > sharedConditional
Factor Graph Base Class.
const G double tol
Definition: Group.h:83
SymbolicBayesNet(const CONTAINER &conditionals)
SymbolicBayesNet(ITERATOR firstConditional, ITERATOR lastConditional)
SymbolicBayesNet(const FactorGraph< DERIVEDCONDITIONAL > &graph)


gtsam
Author(s):
autogenerated on Sat May 8 2021 02:45:07