aGrUM  0.14.2
interfaceGraph.cpp
Go to the documentation of this file.
1 /***************************************************************************
2  * Copyright (C) 2005 by Christophe GONZALES and Pierre-Henri WUILLEMIN *
3  * {prenom.nom}_at_lip6.fr *
4  * *
5  * This program is free software; you can redistribute it and/or modify *
6  * it under the terms of the GNU General Public License as published by *
7  * the Free Software Foundation; either version 2 of the License, or *
8  * (at your option) any later version. *
9  * *
10  * This program is distributed in the hope that it will be useful, *
11  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
12  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
13  * GNU General Public License for more details. *
14  * *
15  * You should have received a copy of the GNU General Public License *
16  * along with this program; if not, write to the *
17  * Free Software Foundation, Inc., *
18  * 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
19  ***************************************************************************/
28 
29 namespace gum {
30  namespace prm {
31  namespace gspan {
32 
33  std::ostream& operator<<(std::ostream& out, const LabelData& data) {
34  out << data.l;
35  return out;
36  }
37 
38  // LabelData
39 
40  LabelData::LabelData() : id(0) { GUM_CONSTRUCTOR(LabelData); }
41 
42  LabelData::LabelData(const LabelData& from) : id(from.id), l(from.l) {
43  GUM_CONS_CPY(LabelData);
44  }
45 
46  LabelData::~LabelData() { GUM_DESTRUCTOR(LabelData); }
47 
48  bool LabelData::operator==(const LabelData& from) const {
49  return (id == from.id) && (l == from.l) && (tree_width == from.tree_width);
50  }
51 
52  bool LabelData::operator!=(const LabelData& from) const {
53  return (id != from.id) && (l != from.l) && (tree_width != from.tree_width);
54  }
55 
56 
57 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
58 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
59 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
60  template class NodeData< double >;
61 # endif
62 # endif
63 #endif
64 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
65 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
66 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
67  template class EdgeData< double >;
68 # endif
69 # endif
70 #endif
71 #ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
72 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
73 # ifndef GUM_NO_EXTERN_TEMPLATE_CLASS
74  template class InterfaceGraph< double >;
75 # endif
76 # endif
77 #endif
78 
79  } /* namespace gspan */
80  } /* namespace prm */
81 } /* namespace gum */
std::ostream & operator<<(std::ostream &out, const DFSCode &code)
Print code in out.
Definition: DFSCode.cpp:37
Inner class to handle data about labels in this interface graph.
std::string l
The string version of this label.
bool operator==(const LabelData &from) const
Equality operator.
Inner class to handle data about edges in __graph.
This class represent the interface graph of a given gum::prm::PRMSystem<GUM_SCALAR>.
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
bool operator!=(const LabelData &from) const
Difference operator.
Inner class to handle data about nodes in __graph.
Idx id
An unique identifier for this label.
Headers of InterfaceGraph.
Size tree_width
The size in terms of tree width of the given label.