28 #ifndef DOXYGEN_SHOULD_SKIP_THIS 30 # include <agrum/tools/graphicalModels/variableNodeMap.h> 35 # include <agrum/tools/graphicalModels/variableNodeMap_inl.h> 41 VariableNodeMap::VariableNodeMap() { GUM_CONSTRUCTOR(VariableNodeMap); }
44 VariableNodeMap::VariableNodeMap(
const VariableNodeMap& source) {
45 GUM_CONS_CPY(VariableNodeMap);
51 VariableNodeMap::~VariableNodeMap() {
52 GUM_DESTRUCTOR(VariableNodeMap);
58 VariableNodeMap& VariableNodeMap::operator=(
const VariableNodeMap& source) {
65 void VariableNodeMap::clear() {
66 for (
auto iter = nodes2vars__.begin(); iter != nodes2vars__.end(); ++iter)
70 names2nodes__.clear();
74 std::string VariableNodeMap::toString()
const {
75 std::stringstream stream;
77 stream <<
"list of associations:" << std::endl;
78 stream << nodes2vars__ << std::endl << std::endl;
79 stream <<
"list of variable names:" << std::endl;
80 stream << names2nodes__ << std::endl;
86 void VariableNodeMap::copy__(
const VariableNodeMap& source) {
87 for (
auto iter = source.nodes2vars__.begin();
88 iter != source.nodes2vars__.end();
90 nodes2vars__.insert(iter.first(), iter.second()->clone());
94 names2nodes__ = source.names2nodes__;
98 std::ostream& operator<<(std::ostream& stream,
const VariableNodeMap& v) {
99 stream << v.toString();