aGrUM 2.3.2
a C++ library for (probabilistic) graphical models
operators4MultiDim.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_OPERATORS_4_MULTI_DIM_H
50#define GUM_OPERATORS_4_MULTI_DIM_H
51
52#include <atomic>
53#include <mutex>
54
58
59namespace gum {
60
61 // ==========================================================================
63 // ==========================================================================
65
82 template < typename T >
84 const MultiDimArray< T >* t2);
85
102 template < typename T >
105
122 template < typename T >
124 const MultiDimArray< T* >* t2);
125
142 template < typename T >
145
162 template < typename T >
165
182 template < typename T >
185
187 // ==========================================================================
189 // ==========================================================================
191
208 template < typename T >
210 const MultiDimArray< T >* t2);
211
228 template < typename T >
231
248 template < typename T >
250 const MultiDimArray< T* >* t2);
251
268 template < typename T >
272
289 template < typename T >
292
309 template < typename T >
313
315 // ==========================================================================
317 // ==========================================================================
319
336 template < typename T >
338 const MultiDimArray< T >* t2);
339
356 template < typename T >
359
376 template < typename T >
378 const MultiDimArray< T* >* t2);
379
396 template < typename T >
400
417 template < typename T >
420
437 template < typename T >
441
443 // ==========================================================================
445 // ==========================================================================
447
464 template < typename T >
466 const MultiDimArray< T >* t2);
467
484 template < typename T >
487
504 template < typename T >
506 const MultiDimArray< T* >* t2);
507
524 template < typename T >
528
545 template < typename T >
548
565 template < typename T >
568
570 // ==========================================================================
572 // ==========================================================================
574
589 template < typename T >
592
607 template < typename T >
611
613 // ==========================================================================
615 // ==========================================================================
617
620 template < typename T >
623
626 template < typename T >
629
632 template < typename T >
635
638 template < typename T >
641
643
644 // ==========================================================================
645 // DO NOT FORGET TO REGISTER YOUR BINARY FUNCTIONS AT THE END OF FILE
646 // operators4MultiDim_tpl.h
647 // ==========================================================================
648
654 template < typename GUM_SCALAR >
656
662 template < typename GUM_SCALAR >
664
679 template < typename GUM_SCALAR >
683
699 template < typename GUM_SCALAR >
703
705
706} /* namespace gum */
707
708// always include the templatized implementations
710
711#endif /* GUM_OPERATORS_4_MULTI_DIM_H */
Multidimensional matrix stored as an array in memory.
Class implementingting a function graph.
<agrum/base/multidim/multiDimImplementation.h>
void operators4MultiDimInit()
the function used to register all the operators on multidimImplementations over non-pointers types.
MultiDimArray< T * > * multiply2MultiDimArrays4Pointers(const MultiDimArray< T * > *t1, const MultiDimArray< T * > *t2)
a specialized function for multiplying two multiDimArrays
MultiDimArray< T > * subtract2MultiDimArrays(const MultiDimArray< T > *t1, const MultiDimArray< T > *t2)
a specialized function for subtracting two multiDimArrays
MultiDimArray< T > * divide2MultiDimArrays(const MultiDimArray< T > *t1, const MultiDimArray< T > *t2)
a specialized function for dividing two multiDimArrays
void pointerOperators4MultiDimInit()
the function used to register all the operators on multidimImplementations over pointers types.
MultiDimFunctionGraph< T > * divide2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for dividing two multiDimArrays
MultiDimArray< T * > * divide2MultiDimArrays4Pointers(const MultiDimArray< T * > *t1, const MultiDimArray< T * > *t2)
a specialized function for dividing two multiDimArrays
MultiDimArray< T > * add2MultiDimArrays(const MultiDimArray< T > *t1, const MultiDimArray< T > *t2)
a specialized function for summing two multiDimArrays
MultiDimArray< T * > * subtract2MultiDimArrays4Pointers(const MultiDimArray< T * > *t1, const MultiDimArray< T * > *t2)
a specialized function for subtracting two multiDimArrays
MultiDimFunctionGraph< T > * maximise2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for compare value from two multiDimFunctionGraphs and gets the maximal
MultiDimFunctionGraph< T > * multiply2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for multiplying two multiDimArrays
MultiDimFunctionGraph< T > * subtract2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for subtracting two multiDimArrays
MultiDimArray< T * > * add2MultiDimArrays4Pointers(const MultiDimArray< T * > *t1, const MultiDimArray< T * > *t2)
a specialized function for summing two multiDimArrays
MultiDimArray< T > * multiply2MultiDimArrays(const MultiDimArray< T > *t1, const MultiDimArray< T > *t2)
a specialized function for multiplying two multiDimArrays
MultiDimFunctionGraph< T > * add2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for summing two multiDimArrays
Header of the MultiDimArray class.
Headers of MultiDimFunctionGraph.
gum is the global namespace for all aGrUM entities
Definition agrum.h:46
value_type & operator*()
Returns the value pointed to by the iterator.
Formula operator/(const Formula &a, const Formula &b)
HashTableIteratorSafe< Key, Val > operator+(Size i) const
Returns a new iterator pointing to i elements further in the hashtable.
ListConstIterator< Val >::difference_type operator-(const ListConstIterator< Val > &iter1, const ListConstIterator< Val > &iter2)
For STL compliance, a distance operator.
Definition list_tpl.h:349
Efficient functionals for combining multiDims.
a class used to register operators over non-pointers types
Class used to compute response times for benchmark purposes.