aGrUM  0.14.2
structuralConstraintSliceOrder.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  ***************************************************************************/
38 
40 #ifdef GUM_NO_INLINE
42 #endif /* GUM_NO_INLINE */
43 
44 namespace gum {
45 
46  namespace learning {
47 
50  GUM_CONSTRUCTOR(StructuralConstraintSliceOrder);
51  }
52 
55  const NodeProperty< NodeId >& order) {
56  for (auto iter = order.cbegin(); iter != order.cend(); ++iter) {
57  _DiGraph__graph.addNodeWithId(iter.key());
58  }
59  _SliceOrder__order = order;
60 
61  GUM_CONSTRUCTOR(StructuralConstraintSliceOrder);
62  }
63 
66  const DiGraph& graph, const NodeProperty< NodeId >& order) :
68  _SliceOrder__order(order) {
69  GUM_CONSTRUCTOR(StructuralConstraintSliceOrder);
70  }
71 
74  const StructuralConstraintSliceOrder& from) :
77  GUM_CONS_CPY(StructuralConstraintSliceOrder);
78  }
79 
83  StructuralConstraintDiGraph(std::move(from)),
85  GUM_CONS_MOV(StructuralConstraintSliceOrder);
86  }
87 
90  GUM_DESTRUCTOR(StructuralConstraintSliceOrder);
91  }
92 
96  if (this != &from) {
99  }
100  return *this;
101  }
102 
106  if (this != &from) {
108  _SliceOrder__order = std::move(from._SliceOrder__order);
109  }
110  return *this;
111  }
112 
113  } /* namespace learning */
114 
115 } /* namespace gum */
STL namespace.
StructuralConstraintSliceOrder & operator=(const StructuralConstraintSliceOrder &from)
copy operator
NodeProperty< NodeId > _SliceOrder__order
slices to which belong the nodes
the structural constraint imposing a partial order over nodes
gum is the global namespace for all aGrUM entities
Definition: agrum.h:25
StructuralConstraintDiGraph & operator=(const StructuralConstraintDiGraph &from)
copy operator
The class for generic Hash Tables.
Definition: hashTable.h:676
const const_iterator & cend() const noexcept
Returns the unsafe const_iterator pointing to the end of the hashtable.
Base class for all oriented graphs.
Definition: diGraph.h:108
const_iterator cbegin() const
Returns an unsafe const_iterator pointing to the beginning of the hashtable.
The base class for structural constraints used by learning algorithms that learn a directed graph str...
the structural constraint imposing a partial order over nodes
the structural constraint imposing a partial order over nodes