38 public Conditional<SymbolicFactor, SymbolicConditional> {
67 template<
typename ITERATOR>
71 (BaseFactor&)result = BaseFactor::FromIterators(firstKey, lastKey);
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 =
"",
113 bool equals(
const This&
c,
double tol = 1
e-9)
const;
119 friend class boost::serialization::access;
120 template<
class Archive>
122 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseFactor);
123 ar & BOOST_SERIALIZATION_BASE_OBJECT_NVP(BaseConditional);
void print(const Matrix &A, const string &s, ostream &stream)
Base class for conditional densities.
Typedefs for easier changing of types.
static SymbolicConditional::shared_ptr FromIteratorsShared(ITERATOR firstKey, ITERATOR lastKey, size_t nrFrontals)
Concept check for values that can be used in unit tests.
SymbolicConditional(Key j, Key parent1, Key parent2, Key parent3)
static SymbolicConditional::shared_ptr FromKeysShared(const CONTAINER &keys, size_t nrFrontals)
static SymbolicConditional FromKeys(const CONTAINER &keys, size_t nrFrontals)
static const KeyFormatter DefaultKeyFormatter
static SymbolicConditional FromIterators(ITERATOR firstKey, ITERATOR lastKey, size_t nrFrontals)
SymbolicFactor BaseFactor
Typedef to this class.
boost::shared_ptr< This > shared_ptr
Typedef to the conditional base class.
SymbolicConditional(Key j, Key parent)
SymbolicConditional(Key j, Key parent1, Key parent2)
~SymbolicConditional() override
Conditional< BaseFactor, This > BaseConditional
Typedef to the factor base class.
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
BaseFactor::const_iterator const_iterator
iterator to keys
KeyVector::iterator iterator
Iterator over keys.
BaseFactor::iterator iterator
Boost shared_ptr to this class.
boost::shared_ptr< This > shared_ptr
Array< double, 1, 3 > e(1./3., 0.5, 2.)
SymbolicFactor::shared_ptr clone() const
Copy this object as its actual derived type.
SymbolicConditional(Key j)
void serialize(Archive &ar, const unsigned int)
KeyVector::const_iterator const_iterator
Const iterator over keys.
std::uint64_t Key
Integer nonlinear key type.