21 #include <boost/range.hpp> 39 template<
class FACTOR,
class DERIVEDCONDITIONAL>
52 typedef boost::iterator_range<typename FACTOR::const_iterator>
Frontals;
55 typedef boost::iterator_range<typename FACTOR::const_iterator>
Parents;
77 bool equals(
const This&
c,
double tol = 1
e-9)
const;
95 throw std::invalid_argument(
"Requested Conditional::firstFrontalKey from a conditional with zero frontal keys");
137 FACTOR&
asFactor() {
return static_cast<FACTOR&
>(
static_cast<DERIVEDCONDITIONAL&
>(*this)); }
140 const FACTOR&
asFactor()
const {
return static_cast<const FACTOR&
>(
static_cast<const DERIVEDCONDITIONAL&
>(*this)); }
143 friend class boost::serialization::access;
144 template<
class ARCHIVE>
146 ar & BOOST_SERIALIZATION_NVP(nrFrontals_);
Conditional(size_t nrFrontals)
FACTOR::const_iterator endParents() const
Frontals frontals() const
size_t nrFrontals() const
static const KeyFormatter DefaultKeyFormatter
Key firstFrontalKey() const
void serialize(ARCHIVE &ar, const unsigned int)
const KeyFormatter & formatter
void print(const std::string &s="Conditional", const KeyFormatter &formatter=DefaultKeyFormatter) const
FACTOR::const_iterator beginParents() const
FACTOR::iterator endFrontals()
FACTOR::iterator endParents()
FACTOR::const_iterator endFrontals() const
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
FACTOR::iterator beginFrontals()
FACTOR::const_iterator beginFrontals() const
FACTOR::iterator beginParents()
boost::iterator_range< typename FACTOR::const_iterator > Parents
const FACTOR & asFactor() const
Conditional< FACTOR, DERIVEDCONDITIONAL > This
Typedef to this class.
std::uint64_t Key
Integer nonlinear key type.
boost::iterator_range< typename FACTOR::const_iterator > Frontals
bool equals(const This &c, double tol=1e-9) const