aGrUM
0.20.2
a C++ library for (probabilistic) graphical models
set.cpp
Go to the documentation of this file.
1
/**
2
*
3
* Copyright 2005-2020 Pierre-Henri WUILLEMIN(@LIP6) & Christophe GONZALES(@AMU)
4
* info_at_agrum_dot_org
5
*
6
* This library is free software: you can redistribute it and/or modify
7
* it under the terms of the GNU Lesser General Public License as published by
8
* the Free Software Foundation, either version 3 of the License, or
9
* (at your option) any later version.
10
*
11
* This library is distributed in the hope that it will be useful,
12
* but WITHOUT ANY WARRANTY; without even the implied warranty of
13
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14
* GNU Lesser General Public License for more details.
15
*
16
* You should have received a copy of the GNU Lesser General Public License
17
* along with this library. If not, see <http://www.gnu.org/licenses/>.
18
*
19
*/
20
21
22
/** @file
23
* @brief Outlined implementation of Sets
24
*
25
* @author Christophe GONZALES(@AMU) and Pierre-Henri WUILLEMIN(@LIP6)
26
*/
27
28
#
ifndef
DOXYGEN_SHOULD_SKIP_THIS
29
30
#
include
<
agrum
/
tools
/
core
/
set
.
h
>
31
32
namespace
gum
{
33
34
// creates (if needed) and returns the iterator SetIterEndSafe__
35
const
SetIteratorSafe
<
int
>*
SetIteratorStaticEnd
::
endSafe4Statics
() {
36
static
bool
first_time
=
true
;
37
38
if
(
first_time
) {
39
first_time
=
false
;
40
SetIterEndSafe__
=
new
SetIteratorSafe
<
int
>;
41
#
ifdef
GUM_DEBUG_MODE
42
__debug__
::
dec_creation__
(
"SetIteratorSafe"
,
43
"__set_static_end"
,
44
0,
45
"static variable correction"
,
46
0);
47
__debug__
::
dec_creation__
(
"HashTableConstIteratorSafe"
,
48
"__set_static_end"
,
49
0,
50
"static variable correction"
,
51
0);
52
#
endif
53
}
54
55
return
SetIterEndSafe__
;
56
}
57
58
// creates (if needed) and returns the iterator SetIterEndSafe__
59
const
SetIteratorSafe
<
int
>*
SetIteratorStaticEnd
::
constEndSafe4Statics
() {
60
return
endSafe4Statics
();
61
}
62
63
// creates (if needed) and returns the iterator SetIterEnd__
64
const
SetIterator
<
int
>*
SetIteratorStaticEnd
::
end4Statics
() {
65
static
bool
first_time
=
true
;
66
67
if
(
first_time
) {
68
first_time
=
false
;
69
SetIterEnd__
=
new
SetIterator
<
int
>;
70
#
ifdef
GUM_DEBUG_MODE
71
__debug__
::
dec_creation__
(
"SetIterator"
,
72
"__set_static_end"
,
73
0,
74
"static variable correction"
,
75
0);
76
__debug__
::
dec_creation__
(
"HashTableConstIterator"
,
77
"__set_static_end"
,
78
0,
79
"static variable correction"
,
80
0);
81
#
endif
82
}
83
84
return
SetIterEnd__
;
85
}
86
87
// creates (if needed) and returns the iterator SetIterEnd__
88
const
SetIterator
<
int
>*
SetIteratorStaticEnd
::
constEnd4Statics
() {
89
return
end4Statics
();
90
}
91
92
// create the end iterator for all Sets
93
const
SetIteratorSafe
<
int
>*
SetIteratorStaticEnd
::
SetIterEndSafe__
94
=
SetIteratorStaticEnd
::
endSafe4Statics
();
95
96
// create the end iterator for all Sets
97
const
SetIterator
<
int
>*
SetIteratorStaticEnd
::
SetIterEnd__
98
=
SetIteratorStaticEnd
::
end4Statics
();
99
100
}
/* namespace gum */
101
102
#
endif
/* DOXYGEN_SHOULD_SKIP_THIS */
103
104
105
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
106
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
107
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
108
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
109
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
110
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
111
template
class
gum::Set<
int
>;
112
#
endif
113
#
endif
114
#
endif
115
#
endif
116
#
endif
117
#
endif
118
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
119
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
120
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
121
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
122
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
123
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
124
template
class
gum::Set<
long
>;
125
#
endif
126
#
endif
127
#
endif
128
#
endif
129
#
endif
130
#
endif
131
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
132
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
133
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
134
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
135
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
136
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
137
template
class
gum::Set<
unsigned
int
>;
138
#
endif
139
#
endif
140
#
endif
141
#
endif
142
#
endif
143
#
endif
144
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
145
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
146
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
147
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
148
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
149
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
150
template
class
gum::Set<
unsigned
long
>;
151
#
endif
152
#
endif
153
#
endif
154
#
endif
155
#
endif
156
#
endif
157
158
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
159
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
160
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
161
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
162
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
163
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
164
template
class
gum::Set<
double
>;
165
#
endif
166
#
endif
167
#
endif
168
#
endif
169
#
endif
170
#
endif
171
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
172
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
173
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
174
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
175
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
176
#
ifndef
GUM_NO_EXTERN_TEMPLATE_CLASS
177
template
class
gum::Set< std::string >;
178
#
endif
179
#
endif
180
#
endif
181
#
endif
182
#
endif
183
#
endif
gum::Set::emplace
INLINE void emplace(Args &&... args)
Definition:
set_tpl.h:669