28 template<
class FACTOR,
class DERIVEDFACTOR>
30 std::cout << s <<
" P(";
31 for(
Key key: frontals())
32 std::cout <<
" " << formatter(key);
35 for(
Key parent: parents())
36 std::cout <<
" " << formatter(parent);
37 std::cout <<
")" << std::endl;
41 template<
class FACTOR,
class DERIVEDFACTOR>
Base class for conditional densities.
Global functions in a separate testing namespace.
Definition: chartTesting.h:28
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
TODO: Update comments.
Definition: Conditional.h:41
size_t nrFrontals_
The first nrFrontal variables are frontal and the rest are parents.
Definition: Conditional.h:44
void print(const std::string &s="Conditional", const KeyFormatter &formatter=DefaultKeyFormatter) const
print with optional formatter
Definition: Conditional-inst.h:29
bool equals(const This &c, double tol=1e-9) const
check equality
Definition: Conditional-inst.h:42