aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
completeProjections4MultiDim.h
Go to the documentation of this file.
1/****************************************************************************
2 * This file is part of the aGrUM/pyAgrum library. *
3 * *
4 * Copyright (c) 2005-2025 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-2025 *
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
49
50#ifndef GUM_COMPLETE_PROJECTIONS_4_MULTI_DIM_H
51#define GUM_COMPLETE_PROJECTIONS_4_MULTI_DIM_H
52
53#include <atomic>
54#include <mutex>
55
57
58namespace gum {
59
60 // ==========================================================================
62 // ==========================================================================
64
86 template < typename GUM_SCALAR >
88 Instantiation* instantiation = 0);
89
111 template < typename GUM_SCALAR >
113 Instantiation* instantiation = 0);
114
136 template < typename GUM_SCALAR >
138 Instantiation* instantiation = 0);
139
161 template < typename GUM_SCALAR >
163 Instantiation* instantiation = 0);
164
166 // ==========================================================================
168 // ==========================================================================
170
192 template < typename GUM_SCALAR >
194 Instantiation* instantiation = 0);
195
217 template < typename GUM_SCALAR >
219 Instantiation* instantiation = 0);
220
242 template < typename GUM_SCALAR >
244 Instantiation* instantiation = 0);
245
267 template < typename GUM_SCALAR >
269 Instantiation* instantiation = 0);
270
272 // ==========================================================================
274 // ==========================================================================
276
299 template < typename GUM_SCALAR >
301 Instantiation* instantiation = 0);
302
325 template < typename GUM_SCALAR >
327 Instantiation* instantiation = 0);
328
351 template < typename GUM_SCALAR >
353 Instantiation* instantiation = 0);
354
377 template < typename GUM_SCALAR >
379 Instantiation* instantiation = 0);
380
382 // ==========================================================================
384 // ==========================================================================
386
408 template < typename GUM_SCALAR >
410 Instantiation* instantiation = 0);
411
433 template < typename GUM_SCALAR >
435 Instantiation* instantiation = 0);
436
458 template < typename GUM_SCALAR >
460 Instantiation* instantiation = 0);
461
483 template < typename GUM_SCALAR >
484 GUM_SCALAR*
486 Instantiation* instantiation = 0);
487
489
491 template < typename GUM_SCALAR >
493 Instantiation* instantiation = 0);
494
496 template < typename GUM_SCALAR >
498 Instantiation* instantiation = 0);
499
501 template < typename GUM_SCALAR >
503 Instantiation* instantiation = 0);
504
507 template < typename GUM_SCALAR >
509 Instantiation* instantiation = 0);
510
511 // ==========================================================================
512 // DO NOT FORGET TO REGISTER YOUR PROJECTION FUNCTIONS AT THE END OF FILE
513 // completeProjections4MultiDim_tpl.h
514 // ==========================================================================
515
521 template < typename GUM_SCALAR >
523
529 template < typename GUM_SCALAR >
531
547 template < typename GUM_SCALAR >
551
567 template < typename GUM_SCALAR >
571
572} /* namespace gum */
573
574// always include the templatized implementations
576
577#endif /* GUM_COMPLETE_PROJECTIONS_4_MULTI_DIM_H */
Class for assigning/browsing values to tuples of discrete variables.
Multidimensional matrix stored as an array in memory.
<agrum/base/multidim/multiDimImplementation.h>
Efficient functionals for projecting multidim tables over all their variables.
void pointerCompleteProjections4MultiDimInit()
The function used to register all the complete projections on multidimImplementations over pointers t...
GUM_SCALAR projectProductMultiDimArray(const MultiDimArray< GUM_SCALAR > *table, Instantiation *instantiation=0)
a function for projecting a multiDimArray using a Product operator
GUM_SCALAR projectSumMultiDimArray(const MultiDimArray< GUM_SCALAR > *table, Instantiation *instantiation=0)
a specialized function for projecting a multiDimArray using a Sum operator
void completeProjections4MultiDimInit()
the function used to register all the complete projection operators on multidimImplementations over n...
GUM_SCALAR * projectMaxMultiDimArray4Pointers(const MultiDimArray< GUM_SCALAR * > *table, Instantiation *instantiation=0)
A specialized function for projecting a multiDimArray using a Max operator.
GUM_SCALAR projectMinMultiDimArray(const MultiDimArray< GUM_SCALAR > *table, Instantiation *instantiation=0)
A specialized function for projecting a multiDimArray using a Min operator.
GUM_SCALAR * projectProductMultiDimArray4Pointers(const MultiDimArray< GUM_SCALAR * > *table, Instantiation *instantiation=0)
a function for projecting a multiDimArray using a Product operator
GUM_SCALAR projectMaxMultiDimArray(const MultiDimArray< GUM_SCALAR > *table, Instantiation *instantiation=0)
A specialized function for projecting a multiDimArray using a Max operator.
GUM_SCALAR * projectSumMultiDimArray4Pointers(const MultiDimArray< GUM_SCALAR * > *table, Instantiation *instantiation=0)
a specialized function for projecting a multiDimArray using a Sum operator
GUM_SCALAR * projectMinMultiDimArray4Pointers(const MultiDimArray< GUM_SCALAR * > *table, Instantiation *instantiation=0)
A specialized function for projecting a multiDimArray using a Min operator.
Header of the MultiDimArray class.
gum is the global namespace for all aGrUM entities
Definition agrum.h:46
GUM_SCALAR projectProduct(const MultiDimImplementation< GUM_SCALAR > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a Product
GUM_SCALAR projectMin(const MultiDimImplementation< GUM_SCALAR > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a Min
GUM_SCALAR projectMax(const MultiDimImplementation< GUM_SCALAR > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a Max
GUM_SCALAR projectSum(const MultiDimImplementation< GUM_SCALAR > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a sum
a class used to register complete projections over non-pointers types