24 #include <boost/range/adaptor/reversed.hpp> 30 template <
class CONDITIONAL>
37 template <
class CONDITIONAL>
40 std::ofstream of(s.c_str());
44 typename CONDITIONAL::Frontals frontals = conditional->frontals();
45 Key me = frontals.front();
46 typename CONDITIONAL::Parents parents = conditional->parents();
48 of << keyFormatter(
p) <<
"->" << keyFormatter(me) << std::endl;
void print(const Matrix &A, const string &s, ostream &stream)
const KeyFormatter & formatter
std::function< std::string(Key)> KeyFormatter
Typedef for a function to format a key, i.e. to convert it to a string.
void saveGraph(const std::string &s, const KeyFormatter &keyFormatter=DefaultKeyFormatter) const
void reverse(const MatrixType &m)
std::uint64_t Key
Integer nonlinear key type.
void print(const std::string &s="BayesNet", const KeyFormatter &formatter=DefaultKeyFormatter) const override