aGrUM  0.16.0
operators4MultiDim.h
Go to the documentation of this file.
1 
30 #ifndef GUM_OPERATORS_4_MULTI_DIM_H
31 #define GUM_OPERATORS_4_MULTI_DIM_H
32 
33 #include <agrum/core/timer.h>
37 
38 namespace gum {
39 
40  // ==========================================================================
42  // ==========================================================================
44 
61  template < typename T >
62  MultiDimArray< T >* add2MultiDimArrays(const MultiDimArray< T >* t1,
63  const MultiDimArray< T >* t2);
64 
81  template < typename T >
82  MultiDimImplementation< T >*
83  add2MultiDimArrays(const MultiDimImplementation< T >* t1,
84  const MultiDimImplementation< T >* t2);
85 
102  template < typename T >
103  MultiDimArray< T* >* add2MultiDimArrays4Pointers(const MultiDimArray< T* >* t1,
104  const MultiDimArray< T* >* t2);
105 
122  template < typename T >
123  MultiDimImplementation< T* >*
124  add2MultiDimArrays4Pointers(const MultiDimImplementation< T* >* t1,
125  const MultiDimImplementation< T* >* t2);
126 
143  template < typename T >
144  MultiDimFunctionGraph< T >*
145  add2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T >* t1,
146  const MultiDimFunctionGraph< T >* t2);
147 
164  template < typename T >
165  MultiDimImplementation< T >*
166  add2MultiDimFunctionGraphs(const MultiDimImplementation< T >* t1,
167  const MultiDimImplementation< T >* t2);
168 
170  // ==========================================================================
172  // ==========================================================================
174 
191  template < typename T >
192  MultiDimArray< T >* subtract2MultiDimArrays(const MultiDimArray< T >* t1,
193  const MultiDimArray< T >* t2);
194 
211  template < typename T >
212  MultiDimImplementation< T >*
213  subtract2MultiDimArrays(const MultiDimImplementation< T >* t1,
214  const MultiDimImplementation< T >* t2);
215 
232  template < typename T >
233  MultiDimArray< T* >*
234  subtract2MultiDimArrays4Pointers(const MultiDimArray< T* >* t1,
235  const MultiDimArray< T* >* t2);
236 
253  template < typename T >
254  MultiDimImplementation< T* >*
255  subtract2MultiDimArrays4Pointers(const MultiDimImplementation< T* >* t1,
256  const MultiDimImplementation< T* >* t2);
257 
274  template < typename T >
275  MultiDimFunctionGraph< T >*
276  subtract2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T >* t1,
277  const MultiDimFunctionGraph< T >* t2);
278 
295  template < typename T >
296  MultiDimImplementation< T >*
297  subtract2MultiDimFunctionGraphs(const MultiDimImplementation< T >* t1,
298  const MultiDimImplementation< T >* t2);
299 
301  // ==========================================================================
303  // ==========================================================================
305 
322  template < typename T >
323  MultiDimArray< T >* multiply2MultiDimArrays(const MultiDimArray< T >* t1,
324  const MultiDimArray< T >* t2);
325 
342  template < typename T >
343  MultiDimImplementation< T >*
344  multiply2MultiDimArrays(const MultiDimImplementation< T >* t1,
345  const MultiDimImplementation< T >* t2);
346 
363  template < typename T >
364  MultiDimArray< T* >*
365  multiply2MultiDimArrays4Pointers(const MultiDimArray< T* >* t1,
366  const MultiDimArray< T* >* t2);
367 
384  template < typename T >
385  MultiDimImplementation< T* >*
386  multiply2MultiDimArrays4Pointers(const MultiDimImplementation< T* >* t1,
387  const MultiDimImplementation< T* >* t2);
388 
405  template < typename T >
406  MultiDimFunctionGraph< T >*
407  multiply2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T >* t1,
408  const MultiDimFunctionGraph< T >* t2);
409 
426  template < typename T >
427  MultiDimImplementation< T >*
428  multiply2MultiDimFunctionGraphs(const MultiDimImplementation< T >* t1,
429  const MultiDimImplementation< T >* t2);
430 
432  // ==========================================================================
434  // ==========================================================================
436 
453  template < typename T >
454  MultiDimArray< T >* divide2MultiDimArrays(const MultiDimArray< T >* t1,
455  const MultiDimArray< T >* t2);
456 
473  template < typename T >
474  MultiDimImplementation< T >*
475  divide2MultiDimArrays(const MultiDimImplementation< T >* t1,
476  const MultiDimImplementation< T >* t2);
477 
494  template < typename T >
495  MultiDimArray< T* >*
496  divide2MultiDimArrays4Pointers(const MultiDimArray< T* >* t1,
497  const MultiDimArray< T* >* t2);
498 
515  template < typename T >
516  MultiDimImplementation< T* >*
517  divide2MultiDimArrays4Pointers(const MultiDimImplementation< T* >* t1,
518  const MultiDimImplementation< T* >* t2);
519 
536  template < typename T >
537  MultiDimFunctionGraph< T >*
538  divide2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T >* t1,
539  const MultiDimFunctionGraph< T >* t2);
540 
557  template < typename T >
558  MultiDimImplementation< T >*
559  divide2MultiDimFunctionGraphs(const MultiDimImplementation< T >* t1,
560  const MultiDimImplementation< T >* t2);
561 
563  // ==========================================================================
565  // ==========================================================================
567 
582  template < typename T >
583  MultiDimFunctionGraph< T >*
584  maximise2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T >* t1,
585  const MultiDimFunctionGraph< T >* t2);
586 
601  template < typename T >
602  MultiDimImplementation< T >*
603  maximise2MultiDimFunctionGraphs(const MultiDimImplementation< T >* t1,
604  const MultiDimImplementation< T >* t2);
605 
607  // ==========================================================================
609  // ==========================================================================
611 
614  template < typename T >
615  MultiDimImplementation< T >* operator+(const MultiDimImplementation< T >&,
616  const MultiDimImplementation< T >&);
617 
620  template < typename T >
621  MultiDimImplementation< T >* operator-(const MultiDimImplementation< T >&,
622  const MultiDimImplementation< T >&);
623 
626  template < typename T >
627  MultiDimImplementation< T >* operator*(const MultiDimImplementation< T >&,
628  const MultiDimImplementation< T >&);
629 
632  template < typename T >
633  MultiDimImplementation< T >* operator/(const MultiDimImplementation< T >&,
634  const MultiDimImplementation< T >&);
635 
637 
638  // ==========================================================================
639  // DO NOT FORGET TO REGISTER YOUR BINARY FUNCTIONS AT THE END OF FILE
640  // operators4MultiDim_tpl.h
641  // ==========================================================================
642 
648  template < typename GUM_SCALAR >
649  void operators4MultiDimInit();
650 
656  template < typename GUM_SCALAR >
658 
673  template < typename GUM_SCALAR >
675  void init() { operators4MultiDimInit< GUM_SCALAR >(); };
676  };
677 
693  template < typename GUM_SCALAR >
694  struct Operators4MultiDimInitialize< GUM_SCALAR* > {
695  void init() { pointerOperators4MultiDimInit< GUM_SCALAR >(); };
696  };
697 
699 
700 } /* namespace gum */
701 
702 // always include the templatized implementations
704 
705 #endif /* GUM_OPERATORS_4_MULTI_DIM_H */
MultiDimArray< T > * multiply2MultiDimArrays(const MultiDimArray< T > *t1, const MultiDimArray< T > *t2)
a specialized function for multiplying two multiDimArraysThe function produces a tensorial product of...
Formula operator+(const Formula &a, const Formula &b)
Definition: formula_inl.h:479
void operators4MultiDimInit()
the function used to register all the operators on multidimImplementations over non-pointers types...
MultiDimArray< T *> * divide2MultiDimArrays4Pointers(const MultiDimArray< T * > *t1, const MultiDimArray< T * > *t2)
a specialized function for dividing two multiDimArraysThe function produces a tensorial division of t...
MultiDimArray< T *> * add2MultiDimArrays4Pointers(const MultiDimArray< T * > *t1, const MultiDimArray< T * > *t2)
a specialized function for summing two multiDimArraysThe function produces a tensorial addition of t1...
MultiDimFunctionGraph< T > * subtract2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for subtracting two multiDimArraysThe function produces a tensorial subtractio...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
Definition: agrum.h:25
a class used to register operators over non-pointers typesThis class is of course completely redundan...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
MultiDimArray< T *> * subtract2MultiDimArrays4Pointers(const MultiDimArray< T * > *t1, const MultiDimArray< T * > *t2)
a specialized function for subtracting two multiDimArraysThe function produces a tensorial subtractio...
MultiDimArray< T *> * multiply2MultiDimArrays4Pointers(const MultiDimArray< T * > *t1, const MultiDimArray< T * > *t2)
a specialized function for multiplying two multiDimArraysThe function produces a tensorial product of...
void pointerOperators4MultiDimInit()
the function used to register all the operators on multidimImplementations over pointers types...
Formula operator/(const Formula &a, const Formula &b)
Definition: formula_inl.h:494
MultiDimFunctionGraph< T > * multiply2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for multiplying two multiDimArraysThe function produces a tensorial product of...
Formula operator*(const Formula &a, const Formula &b)
Definition: formula_inl.h:489
ListConstIterator< Val >::difference_type operator-(const ListConstIterator< Val > &iter1, const ListConstIterator< Val > &iter2)
For STL compliance, a distance operator.
Definition: list_tpl.h:349
MultiDimArray< T > * add2MultiDimArrays(const MultiDimArray< T > *t1, const MultiDimArray< T > *t2)
a specialized function for summing two multiDimArraysThe function produces a tensorial addition of t1...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
MultiDimArray< T > * subtract2MultiDimArrays(const MultiDimArray< T > *t1, const MultiDimArray< T > *t2)
a specialized function for subtracting two multiDimArraysThe function produces a tensorial subtractio...
MultiDimFunctionGraph< T > * add2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for summing two multiDimArraysThe function produces a tensorial addition of t1...
MultiDimFunctionGraph< T > * divide2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for dividing two multiDimArraysThe function produces a tensorial division of t...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.
MultiDimFunctionGraph< T > * maximise2MultiDimFunctionGraphs(const MultiDimFunctionGraph< T > *t1, const MultiDimFunctionGraph< T > *t2)
a specialized function for compare value from two multiDimFunctionGraphs and gets the maximalThe func...
MultiDimArray< T > * divide2MultiDimArrays(const MultiDimArray< T > *t1, const MultiDimArray< T > *t2)
a specialized function for dividing two multiDimArraysThe function produces a tensorial division of t...
Copyright 2005-2019 Pierre-Henri WUILLEMIN et Christophe GONZALES (LIP6) {prenom.nom}_at_lip6.fr.