38 public Conditional<SymbolicFactor, SymbolicConditional> {
67 template<
typename ITERATOR>
71 (
BaseFactor&)result = BaseFactor::FromIterators(firstKey, lastKey);
72 result.nrFrontals_ = nrFrontals;
77 template<
typename ITERATOR>
81 result->keys_.assign(firstKey, lastKey);
82 result->nrFrontals_ = nrFrontals;
87 template<
class CONTAINER>
89 return FromIterators(keys.begin(), keys.end(), nrFrontals);
93 template<
class CONTAINER>
95 return FromIteratorsShared(keys.begin(), keys.end(), nrFrontals);
109 const std::string& str =
"",
110 const KeyFormatter& keyFormatter = DefaultKeyFormatter)
const override;
113 bool equals(
const This& c,
double tol = 1e-9)
const;
119 friend class boost::serialization::access;
120 template<
class Archive>
121 void serialize(Archive & ar,
const unsigned int ) {
122 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(
BaseFactor);
Typedefs for easier changing of types.
Concept check for values that can be used in unit tests.
Base class for conditional densities.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
std::string serialize(const T &input)
serializes to a string
Definition: serialization.h:112
void print(const Matrix &A, const string &s, ostream &stream)
print without optional string, must specify cout yourself
Definition: Matrix.cpp:155
std::uint64_t Key
Integer nonlinear key type.
Definition: types.h:69
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
A manifold defines a space in which there is a notion of a linear tangent space that can be centered ...
Definition: concepts.h:30
Template to create a binary predicate.
Definition: Testable.h:111
A helper that implements the traits interface for GTSAM types.
Definition: Testable.h:151
TODO: Update comments.
Definition: Conditional.h:41
This is the base class for all factor types.
Definition: Factor.h:56
KeyVector::const_iterator const_iterator
Const iterator over keys.
Definition: Factor.h:68
KeyVector::iterator iterator
Iterator over keys.
Definition: Factor.h:65
SymbolicConditional is a conditional with keys but no probability data, produced by symbolic eliminat...
Definition: SymbolicConditional.h:38
SymbolicConditional(Key j, Key parent1, Key parent2, Key parent3)
Three parents.
Definition: SymbolicConditional.h:64
SymbolicConditional()
Empty Constructor to make serialization possible.
Definition: SymbolicConditional.h:52
static SymbolicConditional FromKeys(const CONTAINER &keys, size_t nrFrontals)
Named constructor from an arbitrary number of keys and frontals.
Definition: SymbolicConditional.h:88
BaseFactor::const_iterator const_iterator
iterator to keys
Definition: SymbolicConditional.h:46
boost::shared_ptr< This > shared_ptr
Typedef to the conditional base class.
Definition: SymbolicConditional.h:44
Conditional< BaseFactor, This > BaseConditional
Typedef to the factor base class.
Definition: SymbolicConditional.h:43
static SymbolicConditional::shared_ptr FromIteratorsShared(ITERATOR firstKey, ITERATOR lastKey, size_t nrFrontals)
Named constructor from an arbitrary number of keys and frontals.
Definition: SymbolicConditional.h:78
static SymbolicConditional FromIterators(ITERATOR firstKey, ITERATOR lastKey, size_t nrFrontals)
Named constructor from an arbitrary number of keys and frontals.
Definition: SymbolicConditional.h:68
SymbolicConditional(Key j, Key parent)
Single parent.
Definition: SymbolicConditional.h:58
SymbolicConditional(Key j)
No parents.
Definition: SymbolicConditional.h:55
SymbolicConditional(Key j, Key parent1, Key parent2)
Two parents.
Definition: SymbolicConditional.h:61
SymbolicFactor::shared_ptr clone() const
Copy this object as its actual derived type.
Definition: SymbolicConditional.h:101
BaseFactor::iterator iterator
Boost shared_ptr to this class.
Definition: SymbolicConditional.h:45
SymbolicFactor BaseFactor
Typedef to this class.
Definition: SymbolicConditional.h:42
static SymbolicConditional::shared_ptr FromKeysShared(const CONTAINER &keys, size_t nrFrontals)
Named constructor from an arbitrary number of keys and frontals.
Definition: SymbolicConditional.h:94
SymbolicFactor represents a symbolic factor that specifies graph topology but is not associated with ...
Definition: SymbolicFactor.h:39
boost::shared_ptr< This > shared_ptr
Overriding the shared_ptr typedef.
Definition: SymbolicFactor.h:48