37#ifndef __BITPIT_OPERATORS_HPP__
38#define __BITPIT_OPERATORS_HPP__
56# include "bitpit_common.hpp"
67 const std::vector< T > &,
68 const std::vector< T > &
72 const std::vector< T > &,
78 const std::vector< T > &
81std::vector< std::vector< T > >
operator+ (
83 const std::vector< std::vector< T > > &
86std::vector< std::vector< T > >
operator+ (
87 const std::vector< std::vector< T > > &,
93std::vector< T >& operator+= (
95 const std::vector< T > &
98std::vector< T >& operator+= (
103std::vector< std::vector< T > >& operator+= (
104 std::vector< std::vector< T > > &,
110std::vector< T > operator- (
111 const std::vector< T > &,
112 const std::vector< T > &
115std::vector< T > operator- (
116 const std::vector< T > &,
120std::vector< T > operator- (
122 const std::vector< T > &
125std::vector< std::vector< T > > operator- (
127 const std::vector< std::vector< T > > &
130std::vector< std::vector< T > > operator- (
131 const std::vector< std::vector< T > > &,
137std::vector< T >& operator-= (
139 const std::vector< T > &
142std::vector< T >& operator-= (
147std::vector< std::vector< T > >& operator-= (
148 std::vector< std::vector< T > > &,
154std::vector< T > operator* (
155 const std::vector< T > &,
156 const std::vector< T > &
159std::vector< T > operator* (
160 const std::vector< T > &,
164std::vector< T > operator* (
166 const std::vector< T > &
169std::vector< std::vector < T > > operator* (
171 const std::vector< std::vector< T > > &
174std::vector< std::vector< T > > operator* (
175 const std::vector< std::vector< T > > &,
181std::vector<T>& operator*= (
183 const std::vector<T> &
186std::vector<T>& operator*= (
191std::vector< std::vector<T> >& operator*= (
192 std::vector< std::vector<T> > &,
198std::vector< T > operator/ (
199 const std::vector< T > &,
200 const std::vector< T > &
203std::vector< T > operator/ (
204 const std::vector< T > &,
208std::vector< T > operator/ (
210 const std::vector< T > &
213std::vector< std::vector< T > > operator/ (
215 const std::vector< std::vector< T > > &
218std::vector< std::vector< T > > operator/ (
219 const std::vector< std::vector< T > > &,
225std::vector<T>& operator/= (
227 const std::vector<T> &
230std::vector<T>& operator/= (
235std::vector< std::vector<T> >& operator/= (
236 std::vector< std::vector<T> > &,
243 const std::vector< T > &
248 const std::vector< T > &
258 const std::vector< T > &
265std::istream& operator>> (
270std::ifstream& operator>> (
278 const std::vector< T > &,
279 const std::vector< T > &
283 const std::vector< T > &,
289 const std::vector< T > &
292std::vector< std::vector< T > >
min(
293 const std::vector< std::vector< T > > &,
297std::vector< std::vector< T > >
min(
299 const std::vector< std::vector< T > > &
303template<typename T, typename std::enable_if< std::is_scalar< T >::value>::type* =
nullptr>
308template <
class T,
class T1>
310 const std::vector<T> &,
317 const std::vector< T > &,
318 const std::vector< T > &
322 const std::vector< T > &,
328 const std::vector< T > &
331std::vector< std::vector< T > >
max(
332 const std::vector< std::vector< T > > &,
336std::vector< std::vector< T > >
max(
338 const std::vector< std::vector< T > > &
342template<typename T, typename std::enable_if< std::is_scalar< T >::value>::type* =
nullptr>
347template <
class T,
class T1>
349 const std::vector<T> &,
354template <class T, typename std::enable_if< std::is_scalar< T >::value>::type* =
nullptr>
359template <
class T,
class T1>
361 const std::vector< T > &,
368 const std::vector< T > &
394 const std::vector< T > &
398 const std::vector< T > &
402 const std::vector< T > &,
407 const std::vector< T > &
413 const std::vector< T > &,
414 const std::vector< T > &
420 std::vector<T>
const &,
421 std::vector<T>
const &
425template<typename T, typename std::enable_if< std::is_scalar< T >::value>::type* =
nullptr>
433 const std::vector<T> &,
434 unsigned int padding = 0
436template<typename T, typename std::enable_if< std::is_scalar< T >::value>::type* =
nullptr>
444 const std::vector<T> &,
445 unsigned int padding = 0
451template <
class T,
size_t d>
453 const std::array<T, d> &,
454 const std::array<T, d> &
456template <
class T,
size_t d>
458 const std::array<T, d> &,
461template <
class T,
size_t d>
464 const std::array<T, d> &
466template <
class T,
size_t d,
size_t e>
467std::array<std::array<T, e>, d>
operator+ (
469 const std::array<std::array<T, e>, d> &
471template <
class T,
size_t d,
size_t e>
472std::array<std::array<T, e>, d>
operator+ (
473 const std::array<std::array<T, e>, d> &,
478template <
class T,
size_t d>
479std::array< T, d >& operator+= (
480 std::array< T, d > &,
481 const std::array< T, d > &
483template <
class T,
size_t d>
484std::array< T, d >& operator+= (
485 std::array< T, d > &,
488template <
class T,
size_t d,
size_t e>
489std::array< std::array< T, e >, d >& operator+= (
490 std::array< std::array< T, e >, d > &,
495template <
class T,
size_t d>
496std::array<T, d> operator- (
497 const std::array<T, d> &,
498 const std::array<T, d> &
500template <
class T,
size_t d>
501std::array<T, d> operator- (
502 const std::array<T, d> &,
505template <
class T,
size_t d>
506std::array<T, d> operator- (
508 const std::array<T, d> &
510template <
class T,
size_t d,
size_t e>
511std::array<std::array<T, e>, d> operator- (
513 const std::array<std::array<T, e>, d> &
515template <
class T,
size_t d,
size_t e>
516std::array<std::array<T, e>, d> operator- (
517 const std::array<std::array<T, e>, d> &,
522template <
class T,
size_t d>
523std::array< T, d >& operator-= (
524 std::array< T, d > &,
525 const std::array< T, d > &
527template <
class T,
size_t d>
528std::array< T, d >& operator-= (
529 std::array< T, d > &,
532template <
class T,
size_t d,
size_t e>
533std::array< std::array< T, e >, d >& operator-= (
534 std::array< std::array< T, e >, d > &,
539template <
class T,
size_t d>
540std::array<T, d> operator* (
541 const std::array<T, d> &,
542 const std::array<T, d> &
544template <
class T,
size_t d>
545std::array<T, d> operator* (
546 const std::array<T, d> &,
549template <
class T,
size_t d>
550std::array<T, d> operator* (
552 const std::array<T, d> &
554template <
class T,
size_t d,
size_t e>
555std::array<std::array<T, e>, d> operator* (
557 const std::array<std::array<T, e>, d> &
559template <
class T,
size_t d,
size_t e>
560std::array<std::array<T, e>, d> operator* (
561 const std::array<std::array<T, e>, d> &,
566template <
class T,
size_t d>
567std::array< T, d >& operator*= (
568 std::array< T, d > &,
569 const std::array< T, d > &
571template <
class T,
size_t d>
572std::array< T, d >& operator*= (
573 std::array< T, d > &,
576template <
class T,
size_t d,
size_t e>
577std::array< std::array< T, e >, d >& operator*= (
578 std::array< std::array< T, e >, d > &,
583template <
class T,
size_t d>
584std::array<T, d> operator/ (
585 const std::array<T, d> &,
586 const std::array<T, d> &
588template <
class T,
size_t d>
589std::array<T, d> operator/ (
590 const std::array<T, d> &,
593template <
class T,
size_t d>
594std::array<T, d> operator/ (
596 const std::array<T, d> &
598template <
class T,
size_t d,
size_t e>
599std::array<std::array<T, e>, d> operator/ (
601 const std::array<std::array<T, e>, d> &
603template <
class T,
size_t d,
size_t e>
604std::array<std::array<T, e>, d> operator/ (
605 const std::array<std::array<T, e>, d> &,
610template <
class T,
size_t d>
611std::array< T, d >& operator/= (
612 std::array< T, d > &,
613 const std::array< T, d > &
615template <
class T,
size_t d>
616std::array< T, d >& operator/= (
617 std::array< T, d > &,
620template <
class T,
size_t d,
size_t e>
621std::array< std::array< T, e >, d >& operator/= (
622 std::array< std::array< T, e >, d > &,
627template <
class T,
size_t d>
630 const std::array<T, d> &
632template <
class T,
size_t d>
635 const std::array<T, d> &
642template <
class T,
size_t d>
645 const std::array<T, d> &
651template <
class T,
size_t d>
652std::istream& operator>> (
656template <
class T,
size_t d>
657std::ifstream& operator>> (
663template <
class T,
size_t d>
665 const std::array<T, d> &,
666 const std::array<T, d> &
668template <
class T,
size_t d>
670 const std::array<T, d> &,
673template <
class T,
size_t d>
676 const std::array<T, d> &
678template <
class T,
size_t d,
size_t n>
679std::array<std::array<T, n>, d>
min(
680 const std::array<std::array<T, n>, d> &,
683template <
class T,
size_t d,
size_t n>
684std::array<std::array<T, n>, d>
min(
686 const std::array<std::array<T, n>, d> &
690template <
class T,
size_t d,
class T1>
692 const std::array<T, d> &,
697template <
class T,
size_t d>
699 const std::array<T, d> &,
700 const std::array<T, d> &
702template <
class T,
size_t d>
704 const std::array<T, d> &,
707template <
class T,
size_t d>
710 const std::array<T, d> &
712template <
class T,
size_t d,
size_t n>
713std::array<std::array<T, n>, d>
max(
714 const std::array<std::array<T, n>, d> &,
717template <
class T,
size_t d,
size_t n>
718std::array<std::array<T, n>, d>
max(
720 const std::array<std::array<T, n>, d> &
724template <
class T,
size_t d,
class T1>
726 const std::array<T, d> &,
731template <
class T,
size_t d,
class T1>
733 const std::array<T, d> &,
738template <
class T,
size_t d>
740 const std::array<T, d> &
744template <
class T,
size_t d>
751template <
class T,
size_t d>
753 const std::array<T, d> &
755template <
class T,
size_t d>
757 const std::array<T, d> &
759template <
class T,
size_t d>
761 const std::array<T, d> &,
764template <
class T,
size_t d>
766 const std::array<T, d> &
770template <
class T,
size_t d>
772 const std::array<T, d> &,
773 const std::array<T, d> &
777template <
class T,
size_t d>
779 std::array<T, 2>
const &,
780 std::array<T, 2>
const &
783template <
class T,
size_t d>
785 std::array<T, 3>
const &,
786 std::array<T, 3>
const &
790template<
class T,
size_t d>
793 const std::array<T, d> &,
794 unsigned int padding = 0
796template<
class T,
size_t d>
799 const std::array<T, d> &,
800 unsigned int padding = 0
807# include "Operators.tpp"
808# include "Operators_vector.tpp"
809# include "MathOperators_vector.tpp"
811# include "MathOperators_array.tpp"
: Basic operator for (C++11) std::array
std::ostream & display(std::ostream &, const T &)
std::array< T, d > abs(const std::array< T, d > &x)
void sum(const std::array< T, d > &x, T1 &s)
double norm(const std::array< T, d > &x, int p)
std::array< T, 3 > crossProduct(const std::array< T, 3 > &x, const std::array< T, 3 > &y)
void maxval(const std::array< T, d > &x, T1 &max_value)
void minval(const std::array< T, d > &x, T1 &min_value)
T dotProduct(const std::array< T, d > &x, const std::array< T, d > &y)
double norm1(const std::array< T, d > &x)
double norm2(const std::array< T, d > &x)
std::array< T, d > max(const std::array< T, d > &x, const std::array< T, d > &y)
double normInf(const std::array< T, d > &x)
std::vector< T > min(const std::vector< T > &, const std::vector< T > &)
std::array< T, d > pow(std::array< T, d > &x, double p)
T uipow(const T &, unsigned int)
std::vector< T > operator+(const std::vector< T > &, const std::vector< T > &)
std::ostream & operator<<(std::ostream &, const std::vector< T > &)