aGrUM
3.2.0
a C++ library for (probabilistic) graphical models
Toggle main menu visibility
partialInstantiation4MultiDim.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
#ifndef GUM_PARTIAL_INSTANTIATION_4_MULTI_DIM_H
50
#define GUM_PARTIAL_INSTANTIATION_4_MULTI_DIM_H
51
52
#include <atomic>
53
#include <mutex>
54
55
#include <
agrum/base/variables/discreteVariable.h
>
56
57
// #include <agrum/base/multidim/implementations/multiDimImplementation.h>
58
// #include <agrum/base/multidim/implementations/multiDimArray.h>
59
// #include <agrum/base/multidim/implementations/multiDimDecorator.h>
60
61
namespace
gum
{
62
63
template
<
typename
GUM_ELEMENT >
64
class
MultiDimImplementation
;
65
66
template
<
typename
GUM_ELEMENT >
67
class
MultiDimArray
;
68
69
template
<
typename
GUM_ELEMENT >
70
class
MultiDimDecorator
;
71
90
template
<
typename
GUM_ELEMENT >
91
MultiDimArray< GUM_ELEMENT >
*
92
partialInstantiationMultiDimArray
(
const
MultiDimArray< GUM_ELEMENT >
* table,
93
const
HashTable< const DiscreteVariable*, Idx >
& inst_vars);
94
114
template
<
typename
GUM_ELEMENT >
115
MultiDimImplementation< GUM_ELEMENT >
*
116
partialInstantiationMultiDimArray
(
const
MultiDimImplementation< GUM_ELEMENT >
* table,
117
const
HashTable< const DiscreteVariable*, Idx >
& inst_vars);
118
138
template
<
typename
GUM_ELEMENT >
139
MultiDimArray< GUM_ELEMENT* >
*
partialInstantiationMultiDimArray4Pointers
(
140
const
MultiDimArray< GUM_ELEMENT* >
* table,
141
const
HashTable< const DiscreteVariable*, Idx >
& inst_vars);
142
162
template
<
typename
GUM_ELEMENT >
163
MultiDimImplementation< GUM_ELEMENT* >
*
partialInstantiationMultiDimArray4Pointers
(
164
const
MultiDimImplementation< GUM_ELEMENT* >
* table,
165
const
HashTable< const DiscreteVariable*, Idx >
& inst_vars);
166
175
template
<
typename
GUM_ELEMENT >
176
MultiDimImplementation< GUM_ELEMENT >
*
177
partialInstantiation
(
const
MultiDimImplementation< GUM_ELEMENT >
& table,
178
const
HashTable< const DiscreteVariable*, Idx >
& inst_vars);
179
188
template
<
typename
GUM_ELEMENT >
189
MultiDimImplementation< GUM_ELEMENT >
*
190
partialInstantiation
(
const
MultiDimDecorator< GUM_ELEMENT >
& table,
191
const
HashTable< const DiscreteVariable*, Idx >
& inst_vars);
192
193
// ==========================================================================
194
// DO NOT FORGET TO REGISTER YOUR PARTIAL INSTANTIATION FUNCTIONS AT THE END
195
// OF FILE partialInstantiation4MultiDim_tpl.h
196
// ==========================================================================
197
202
template
<
typename
GUM_ELEMENT >
203
void
partialInstantiation4MultiDimInit
();
204
209
template
<
typename
GUM_ELEMENT >
210
void
pointerPartialInstantiation4MultiDimInit
();
211
230
template
<
typename
GUM_ELEMENT >
231
struct
PartialInstantiation4MultiDimInitialize
{
235
void
init
();
236
};
237
257
template
<
typename
GUM_ELEMENT >
258
struct
PartialInstantiation4MultiDimInitialize
< GUM_ELEMENT* > {
262
void
init
();
263
};
264
265
}
/* namespace gum */
266
267
// always include the templatized implementations
268
#include <
agrum/base/multidim/utils/partialInstantiation4MultiDim_tpl.h
>
269
270
#endif
/* GUM_PARTIAL_INSTANTIATION_4_MULTI_DIM_H */
gum::HashTable
The class for generic Hash Tables.
Definition
hashTable.h:640
gum::MultiDimArray
Multidimensional matrix stored as an array in memory.
Definition
multiDimArray.h:75
gum::MultiDimDecorator
Decorator design pattern in order to separate implementations from multidimensional matrix concepts.
Definition
multiDimDecorator.h:81
gum::MultiDimImplementation
<agrum/base/multidim/multiDimImplementation.h>
Definition
multiDimImplementation.h:85
discreteVariable.h
Base class for discrete random variable.
gum
gum is the global namespace for all aGrUM entities
Definition
agrum.h:46
gum::partialInstantiation4MultiDimInit
void partialInstantiation4MultiDimInit()
The function used to register all the instantiation operators on multidimImplementations over non-poi...
Definition
partialInstantiation4MultiDim_tpl.h:117
gum::partialInstantiation
MultiDimImplementation< GUM_ELEMENT > * partialInstantiation(const MultiDimImplementation< GUM_ELEMENT > &table, const HashTable< const DiscreteVariable *, Idx > &inst_vars)
Instantiate variables in a MultiDimImplementation.
gum::partialInstantiationMultiDimArray
MultiDimArray< GUM_ELEMENT > * partialInstantiationMultiDimArray(const MultiDimArray< GUM_ELEMENT > *table, const HashTable< const DiscreteVariable *, Idx > &inst_vars)
A specialized function for instantiating variables in a multiDimArray.
gum::partialInstantiationMultiDimArray4Pointers
MultiDimArray< GUM_ELEMENT * > * partialInstantiationMultiDimArray4Pointers(const MultiDimArray< GUM_ELEMENT * > *table, const HashTable< const DiscreteVariable *, Idx > &inst_vars)
A specialized function for instantiating variables in a MultiDimArray.
gum::pointerPartialInstantiation4MultiDimInit
void pointerPartialInstantiation4MultiDimInit()
The function used to register all the instantiations on multidimImplementations over pointers types.
Definition
partialInstantiation4MultiDim_tpl.h:139
partialInstantiation4MultiDim_tpl.h
Implementation for partial instantiation functions.
gum::PartialInstantiation4MultiDimInitialize< GUM_ELEMENT * >::init
void init()
Initialize the partial instantiation functions.
Definition
partialInstantiation4MultiDim_tpl.h:165
gum::PartialInstantiation4MultiDimInitialize
A class used to register instantiation functions over non-pointers types.
Definition
partialInstantiation4MultiDim.h:231
gum::PartialInstantiation4MultiDimInitialize::init
void init()
Initialize the partial instantiation functions.
Definition
partialInstantiation4MultiDim_tpl.h:160
aGrUM
3.2.0
© PHW&CG&others - 2022
DoXyGeN 1.18.0