aGrUM 3.1.1
a C++ library for (probabilistic) graphical models
projections4MultiDim.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_PROJECTIONS_4_MULTI_DIM_H
50#define GUM_PROJECTIONS_4_MULTI_DIM_H
51
52#include <atomic>
53#include <mutex>
54
57
58namespace gum {
59
60 // ==========================================================================
62 // ==========================================================================
64
82 template < typename GUM_ELEMENT >
84 const gum::VariableSet& del_vars);
85
103 template < typename GUM_ELEMENT >
106 const gum::VariableSet& del_vars);
107
125 template < typename GUM_ELEMENT >
128 const gum::VariableSet& del_vars);
129
147 template < typename GUM_ELEMENT >
150 const gum::VariableSet& del_vars);
151
152 // @}
153 // ==========================================================================
155 // ==========================================================================
157
175 template < typename GUM_ELEMENT >
177 const gum::VariableSet& del_vars);
178
196 template < typename GUM_ELEMENT >
199 const gum::VariableSet& del_vars);
200
218 template < typename GUM_ELEMENT >
221 const gum::VariableSet& del_vars);
222
240 template < typename GUM_ELEMENT >
243 const gum::VariableSet& del_vars);
244
245 // @}
246 // ==========================================================================
248 // ==========================================================================
250
268 template < typename GUM_ELEMENT >
270 const gum::VariableSet& del_vars);
271
289 template < typename GUM_ELEMENT >
292 const gum::VariableSet& del_vars);
293
311 template < typename GUM_ELEMENT >
314 const gum::VariableSet& del_vars);
315
333 template < typename GUM_ELEMENT >
336 const gum::VariableSet& del_vars);
337
338 // @}
339 // ==========================================================================
341 // ==========================================================================
343
361 template < typename GUM_ELEMENT >
364 const gum::VariableSet& del_vars);
365
383 template < typename GUM_ELEMENT >
386 const gum::VariableSet& del_vars);
387
405 template < typename GUM_ELEMENT >
408 const gum::VariableSet& del_vars);
409
427 template < typename GUM_ELEMENT >
430 const gum::VariableSet& del_vars);
431
432 // @}
433 // ==========================================================================
435 // ==========================================================================
437
449 template < typename GUM_ELEMENT >
453 const GUM_ELEMENT (*f)(const GUM_ELEMENT&, const GUM_ELEMENT&));
454
466 template < typename GUM_ELEMENT >
470 const GUM_ELEMENT (*f)(const GUM_ELEMENT&, const GUM_ELEMENT&));
471
472 // @}
473 // ==========================================================================
475 // ==========================================================================
477
496 template < typename GUM_ELEMENT >
499 const gum::VariableSet& del_vars);
500
519 template < typename GUM_ELEMENT >
522 const gum::VariableSet& del_vars);
523
524
543 template < typename GUM_ELEMENT >
546 const gum::VariableSet& del_vars);
547
566 template < typename GUM_ELEMENT >
569 const gum::VariableSet& del_vars);
570
571
590 template < typename GUM_ELEMENT >
593 const gum::VariableSet& del_vars);
594
613 template < typename GUM_ELEMENT >
616 const gum::VariableSet& del_vars);
617
618
637 template < typename GUM_ELEMENT >
640 const gum::VariableSet& del_vars);
641
660 template < typename GUM_ELEMENT >
663 const gum::VariableSet& del_vars);
664
666
668 template < typename GUM_ELEMENT >
671 const gum::VariableSet& del_vars);
672
674 template < typename GUM_ELEMENT >
677 const gum::VariableSet& del_vars);
678
680 template < typename GUM_ELEMENT >
683 const gum::VariableSet& del_vars);
684
687 template < typename GUM_ELEMENT >
690 const gum::VariableSet& del_vars);
691
692
693 // ==========================================================================
694 // DO NOT FORGET TO REGISTER YOUR PROJECTION FUNCTIONS AT THE END OF FILE
695 // projections4MultiDim_tpl.h
696 // ==========================================================================
697
702 template < typename GUM_ELEMENT >
704
709 template < typename GUM_ELEMENT >
711
725 template < typename GUM_ELEMENT >
729
744 template < typename GUM_ELEMENT >
745 struct Projections4MultiDimInitialize< GUM_ELEMENT* > {
746 void init();
747 };
748
749} /* namespace gum */
750
751// always include the templatized implementations
753
754#endif /* GUM_PROJECTIONS_4_MULTI_DIM_H */
Multidimensional matrix stored as an array in memory.
Class implementingting a function graph.
<agrum/base/multidim/multiDimImplementation.h>
GUM_ELEMENT projectMaxMultiDimArray(const MultiDimArray< GUM_ELEMENT > *table, Instantiation *instantiation=0)
A specialized function for projecting a multiDimArray using a Max operator.
GUM_ELEMENT * projectSumMultiDimArray4Pointers(const MultiDimArray< GUM_ELEMENT * > *table, Instantiation *instantiation=0)
a specialized function for projecting a multiDimArray using a Sum operator
GUM_ELEMENT * projectMaxMultiDimArray4Pointers(const MultiDimArray< GUM_ELEMENT * > *table, Instantiation *instantiation=0)
A specialized function for projecting a multiDimArray using a Max operator.
GUM_ELEMENT projectMinMultiDimArray(const MultiDimArray< GUM_ELEMENT > *table, Instantiation *instantiation=0)
A specialized function for projecting a multiDimArray using a Min operator.
GUM_ELEMENT * projectMinMultiDimArray4Pointers(const MultiDimArray< GUM_ELEMENT * > *table, Instantiation *instantiation=0)
A specialized function for projecting a multiDimArray using a Min operator.
GUM_ELEMENT * projectProductMultiDimArray4Pointers(const MultiDimArray< GUM_ELEMENT * > *table, Instantiation *instantiation=0)
a function for projecting a multiDimArray using a Product operator
GUM_ELEMENT projectProductMultiDimArray(const MultiDimArray< GUM_ELEMENT > *table, Instantiation *instantiation=0)
a function for projecting a multiDimArray using a Product operator
GUM_ELEMENT projectSumMultiDimArray(const MultiDimArray< GUM_ELEMENT > *table, Instantiation *instantiation=0)
a specialized function for projecting a multiDimArray using a Sum operator
Header of the MultiDimArray class.
Headers of MultiDimFunctionGraph.
gum is the global namespace for all aGrUM entities
Definition agrum.h:46
MultiDimFunctionGraph< GUM_ELEMENT > * projectSumMultiDimFunctionGraph(const MultiDimFunctionGraph< GUM_ELEMENT > *table, const gum::VariableSet &del_vars)
a specialized function for projecting a multiDimFunctionGraph using a summation
MultiDimFunctionGraph< GUM_ELEMENT > * projectMaxMultiDimFunctionGraph(const MultiDimFunctionGraph< GUM_ELEMENT > *table, const gum::VariableSet &del_vars)
a specialized function for projecting a multiDimFunctionGraph using a Max operator
Set< const DiscreteVariable * > VariableSet
MultiDimFunctionGraph< GUM_ELEMENT > * projectProductMultiDimFunctionGraph(const MultiDimFunctionGraph< GUM_ELEMENT > *table, const gum::VariableSet &del_vars)
a specialized function for projecting a multiDimFunctionGraph using products
GUM_ELEMENT projectProduct(const MultiDimImplementation< GUM_ELEMENT > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a Product
MultiDimArray< GUM_ELEMENT > * ProjectFuncMultiDimArray(const MultiDimArray< GUM_ELEMENT > *t1, const MultiDimArray< GUM_ELEMENT > *t2, const GUM_ELEMENT(*f)(const GUM_ELEMENT &, const GUM_ELEMENT &))
a specialized function for functionally projecting a multiDimArray
GUM_ELEMENT projectSum(const MultiDimImplementation< GUM_ELEMENT > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a sum
GUM_ELEMENT projectMin(const MultiDimImplementation< GUM_ELEMENT > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a Min
MultiDimImplementation< GUM_ELEMENT > * combine2MultiDimArrays(const MultiDimImplementation< GUM_ELEMENT > *t1, const MultiDimImplementation< GUM_ELEMENT > *t2, const GUM_ELEMENT(*f)(const GUM_ELEMENT &, const GUM_ELEMENT &))
a specialized function for functionally projecting a multiDimArray
GUM_ELEMENT projectMax(const MultiDimImplementation< GUM_ELEMENT > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a Max
void pointerProjections4MultiDimInit()
the function used to register all the projections on multidimImplementations over pointers types.
MultiDimFunctionGraph< GUM_ELEMENT > * projectMinMultiDimFunctionGraph(const MultiDimFunctionGraph< GUM_ELEMENT > *table, const gum::VariableSet &del_vars)
a specialized function for projecting a multiDimFunctionGraph using a Min operator
void projections4MultiDimInit()
the function used to register all the projection operators on multidimImplementations over non-pointe...
Efficient functionals for projecting multiDimensional tables.
a class used to register projections over non-pointers types