aGrUM
3.2.0
a C++ library for (probabilistic) graphical models
Toggle main menu visibility
DFSCode.h
Go to the documentation of this file.
1
/****************************************************************************
2
* This file is part of the aGrUM/pyAgrum library. *
3
* *
4
* Copyright (c) 2005-2026 by *
5
* - Pierre-Henri WUILLEMIN(_at_LIP6) *
6
* - Christophe GONZALES(_at_AMU) *
7
* *
8
* The aGrUM/pyAgrum library is free software; you can redistribute it *
9
* and/or modify it under the terms of either : *
10
* *
11
* - the GNU Lesser General Public License as published by *
12
* the Free Software Foundation, either version 3 of the License, *
13
* or (at your option) any later version, *
14
* - the MIT license (MIT), *
15
* - or both in dual license, as here. *
16
* *
17
* (see https://agrum.gitlab.io/articles/dual-licenses-lgplv3mit.html) *
18
* *
19
* This aGrUM/pyAgrum library is distributed in the hope that it will be *
20
* useful, but WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, *
21
* INCLUDING BUT NOT LIMITED TO THE WARRANTIES MERCHANTABILITY or FITNESS *
22
* FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE *
23
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER *
24
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, *
25
* ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR *
26
* OTHER DEALINGS IN THE SOFTWARE. *
27
* *
28
* See LICENCES for more details. *
29
* *
30
* SPDX-FileCopyrightText: Copyright 2005-2026 *
31
* - Pierre-Henri WUILLEMIN(_at_LIP6) *
32
* - Christophe GONZALES(_at_AMU) *
33
* SPDX-License-Identifier: LGPL-3.0-or-later OR MIT *
34
* *
35
* Contact : info_at_agrum_dot_org *
36
* homepage : http://agrum.gitlab.io *
37
* gitlab : https://gitlab.com/agrumery/agrum *
38
* *
39
****************************************************************************/
40
41
48
49
#include <ostream>
50
#include <vector>
51
52
#include <
agrum/PRM/gspan/edgeCode.h
>
53
54
#ifndef GUM_DFS_CODE_H
55
# define GUM_DFS_CODE_H
56
57
namespace
gum
{
58
namespace
prm
{
59
namespace
gspan
{
60
72
class
GUM_PUBLIC_PRM
DFSCode
{
73
public
:
84
static
bool
validNeighbors
(
EdgeCode
* e1,
EdgeCode
* e2);
85
90
DFSCode
();
91
97
DFSCode
(
const
DFSCode
& source);
98
104
~DFSCode
();
105
109
std::vector< EdgeCode* >
codes
;
110
116
DFSCode
&
operator=
(
const
DFSCode
& source);
117
123
bool
operator==
(
const
DFSCode
& code)
const
;
124
130
bool
operator!=
(
const
DFSCode
& code)
const
;
131
137
bool
operator<
(
const
DFSCode
& code)
const
;
138
144
bool
operator<=
(
const
DFSCode
& code)
const
;
145
147
using
iterator
= std::vector< EdgeCode* >::iterator;
148
150
using
const_iterator
= std::vector< EdgeCode* >::const_iterator;
151
};
152
159
std::ostream&
operator<<
(std::ostream& out,
const
DFSCode
& code);
160
161
162
}
/* namespace gspan */
163
}
/* namespace prm */
164
}
/* namespace gum */
165
166
# ifndef GUM_NO_INLINE
167
# include <
agrum/PRM/gspan/DFSCode_inl.h
>
168
# endif
// GUM_NO_INLINE
169
170
#endif
/* GUM_DFS_CODE_H */
DFSCode_inl.h
Inline implementation of the DFSCode class.
gum::prm::gspan::DFSCode
Reprensent a Depth First Search coding of a graph.
Definition
DFSCode.h:72
gum::prm::gspan::DFSCode::operator=
DFSCode & operator=(const DFSCode &source)
Copy operator.
Definition
DFSCode_inl.h:79
gum::prm::gspan::DFSCode::codes
std::vector< EdgeCode * > codes
The vector containing the EdgeCode composing this DFSCode.
Definition
DFSCode.h:109
gum::prm::gspan::DFSCode::operator==
bool operator==(const DFSCode &code) const
Equality operator.
Definition
DFSCode.cpp:73
gum::prm::gspan::DFSCode::const_iterator
std::vector< EdgeCode * >::const_iterator const_iterator
Code alias.
Definition
DFSCode.h:150
gum::prm::gspan::DFSCode::operator<=
bool operator<=(const DFSCode &code) const
Lesser or equal than operator.
Definition
DFSCode_inl.h:90
gum::prm::gspan::DFSCode::iterator
std::vector< EdgeCode * >::iterator iterator
Code alias.
Definition
DFSCode.h:147
gum::prm::gspan::DFSCode::operator!=
bool operator!=(const DFSCode &code) const
Difference operator.
Definition
DFSCode.cpp:85
gum::prm::gspan::DFSCode::DFSCode
DFSCode()
Default constructor.
Definition
DFSCode_inl.h:57
gum::prm::gspan::DFSCode::validNeighbors
static bool validNeighbors(EdgeCode *e1, EdgeCode *e2)
Returns true of e2 is a valid neighbor for e1 (i.e.
Definition
DFSCode_inl.h:101
gum::prm::gspan::DFSCode::operator<
bool operator<(const DFSCode &code) const
Lesser than operator.
Definition
DFSCode.cpp:97
edgeCode.h
Headers of the EdgeCode class.
gum::prm::gspan
Definition
DFSCode.cpp:57
gum::prm::gspan::operator<<
std::ostream & operator<<(std::ostream &out, const DFSCode &code)
Print code in out.
Definition
DFSCode.cpp:59
gum::prm
namespace for all probabilistic relational models entities
Definition
agrum.h:68
gum
gum is the global namespace for all aGrUM entities
Definition
agrum.h:46
gum::prm::gspan::EdgeCode
represent a DFS code used by gspan.
Definition
edgeCode.h:72
aGrUM
3.2.0
© PHW&CG&others - 2022
DoXyGeN 1.18.0