aGrUM 2.3.2
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-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
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_SCALAR >
84 const gum::VariableSet& del_vars);
85
103 template < typename GUM_SCALAR >
106 const gum::VariableSet& del_vars);
107
125 template < typename GUM_SCALAR >
128 const gum::VariableSet& del_vars);
129
147 template < typename GUM_SCALAR >
150 const gum::VariableSet& del_vars);
151
152 // @}
153 // ==========================================================================
155 // ==========================================================================
157
175 template < typename GUM_SCALAR >
177 const gum::VariableSet& del_vars);
178
196 template < typename GUM_SCALAR >
199 const gum::VariableSet& del_vars);
200
218 template < typename GUM_SCALAR >
221 const gum::VariableSet& del_vars);
222
240 template < typename GUM_SCALAR >
243 const gum::VariableSet& del_vars);
244
245 // @}
246 // ==========================================================================
248 // ==========================================================================
250
268 template < typename GUM_SCALAR >
270 const gum::VariableSet& del_vars);
271
289 template < typename GUM_SCALAR >
292 const gum::VariableSet& del_vars);
293
311 template < typename GUM_SCALAR >
314 const gum::VariableSet& del_vars);
315
333 template < typename GUM_SCALAR >
336 const gum::VariableSet& del_vars);
337
338 // @}
339 // ==========================================================================
341 // ==========================================================================
343
361 template < typename GUM_SCALAR >
363 const gum::VariableSet& del_vars);
364
382 template < typename GUM_SCALAR >
385 const gum::VariableSet& del_vars);
386
404 template < typename GUM_SCALAR >
407 const gum::VariableSet& del_vars);
408
426 template < typename GUM_SCALAR >
429 const gum::VariableSet& del_vars);
430
431 // @}
432 // ==========================================================================
434 // ==========================================================================
436
448 template < typename GUM_SCALAR >
451 const GUM_SCALAR (*f)(const GUM_SCALAR&,
452 const GUM_SCALAR&));
453
465 template < typename GUM_SCALAR >
469 const GUM_SCALAR (*f)(const GUM_SCALAR&, const GUM_SCALAR&));
470
471 // @}
472 // ==========================================================================
474 // ==========================================================================
476
495 template < typename GUM_SCALAR >
498 const gum::VariableSet& del_vars);
499
518 template < typename GUM_SCALAR >
521 const gum::VariableSet& del_vars);
522
523
542 template < typename GUM_SCALAR >
545 const gum::VariableSet& del_vars);
546
565 template < typename GUM_SCALAR >
568 const gum::VariableSet& del_vars);
569
570
589 template < typename GUM_SCALAR >
592 const gum::VariableSet& del_vars);
593
612 template < typename GUM_SCALAR >
615 const gum::VariableSet& del_vars);
616
617
636 template < typename GUM_SCALAR >
639 const gum::VariableSet& del_vars);
640
659 template < typename GUM_SCALAR >
662 const gum::VariableSet& del_vars);
663
665
667 template < typename GUM_SCALAR >
670 const gum::VariableSet& del_vars);
671
673 template < typename GUM_SCALAR >
676 const gum::VariableSet& del_vars);
677
679 template < typename GUM_SCALAR >
682 const gum::VariableSet& del_vars);
683
686 template < typename GUM_SCALAR >
689 const gum::VariableSet& del_vars);
690
691
692 // ==========================================================================
693 // DO NOT FORGET TO REGISTER YOUR PROJECTION FUNCTIONS AT THE END OF FILE
694 // projections4MultiDim_tpl.h
695 // ==========================================================================
696
701 template < typename GUM_SCALAR >
703
708 template < typename GUM_SCALAR >
710
724 template < typename GUM_SCALAR >
728
743 template < typename GUM_SCALAR >
747
748} /* namespace gum */
749
750// always include the templatized implementations
752
753#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_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
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.
Headers of MultiDimFunctionGraph.
gum is the global namespace for all aGrUM entities
Definition agrum.h:46
MultiDimFunctionGraph< GUM_SCALAR > * projectMinMultiDimFunctionGraph(const MultiDimFunctionGraph< GUM_SCALAR > *table, const gum::VariableSet &del_vars)
a specialized function for projecting a multiDimFunctionGraph using a Min operator
GUM_SCALAR projectProduct(const MultiDimImplementation< GUM_SCALAR > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a Product
Set< const DiscreteVariable * > VariableSet
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
MultiDimFunctionGraph< GUM_SCALAR > * projectProductMultiDimFunctionGraph(const MultiDimFunctionGraph< GUM_SCALAR > *table, const gum::VariableSet &del_vars)
a specialized function for projecting a multiDimFunctionGraph using products
MultiDimFunctionGraph< GUM_SCALAR > * projectMaxMultiDimFunctionGraph(const MultiDimFunctionGraph< GUM_SCALAR > *table, const gum::VariableSet &del_vars)
a specialized function for projecting a multiDimFunctionGraph using a Max operator
MultiDimArray< GUM_SCALAR > * ProjectFuncMultiDimArray(const MultiDimArray< GUM_SCALAR > *t1, const MultiDimArray< GUM_SCALAR > *t2, const GUM_SCALAR(*f)(const GUM_SCALAR &, const GUM_SCALAR &))
a specialized function for functionally projecting a multiDimArray
MultiDimFunctionGraph< GUM_SCALAR > * projectSumMultiDimFunctionGraph(const MultiDimFunctionGraph< GUM_SCALAR > *table, const gum::VariableSet &del_vars)
a specialized function for projecting a multiDimFunctionGraph using a summation
MultiDimImplementation< GUM_SCALAR > * combine2MultiDimArrays(const MultiDimImplementation< GUM_SCALAR > *t1, const MultiDimImplementation< GUM_SCALAR > *t2, const GUM_SCALAR(*f)(const GUM_SCALAR &, const GUM_SCALAR &))
a specialized function for functionally projecting a multiDimArray
GUM_SCALAR projectSum(const MultiDimImplementation< GUM_SCALAR > &table, Instantiation *instantiation=0)
the function to be used to project a MultiDimImplementation using a sum
void pointerProjections4MultiDimInit()
the function used to register all the projections on multidimImplementations over pointers types.
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