IT++ Logo
operators.h
Go to the documentation of this file.
1 
30 #ifndef OPERATORS_H
31 #define OPERATORS_H
32 
33 #include <itpp/base/vec.h>
34 #include <itpp/base/mat.h>
35 #include <itpp/base/converters.h>
36 #include <itpp/itexports.h>
37 
38 namespace itpp
39 {
40 
41 //---------------------- between scalars and complex<double> -----------------
43 inline std::complex<double> operator+(const int &x, const std::complex<double> &y) {return std::complex<double>(x + y.real(), y.imag());}
45 inline std::complex<double> operator+(const float &x, const std::complex<double> &y) {return std::complex<double>(x + y.real(), y.imag());}
47 inline std::complex<double> operator+(const std::complex<double> &x, const int &y) {return std::complex<double>(x.real() + y, x.imag());}
49 inline std::complex<double> operator+(const std::complex<double> &x, const float &y) {return std::complex<double>(x.real() + y, x.imag());}
50 
52 inline std::complex<double> operator-(const int &x, const std::complex<double> &y) {return std::complex<double>(x - y.real(), -y.imag());}
54 inline std::complex<double> operator-(const float &x, const std::complex<double> &y) {return std::complex<double>(x - y.real(), -y.imag());}
56 inline std::complex<double> operator-(const std::complex<double> &x, const int &y) {return std::complex<double>(x.real() - y, x.imag());}
58 inline std::complex<double> operator-(const std::complex<double> &x, const float &y) {return std::complex<double>(x.real() - y, x.imag());}
59 
61 inline std::complex<double> operator*(const int &x, const std::complex<double> &y) {return std::complex<double>(x*y.real(), x*y.imag());}
63 inline std::complex<double> operator*(const float &x, const std::complex<double> &y) {return std::complex<double>(x*y.real(), x*y.imag());}
65 inline std::complex<double> operator*(const std::complex<double> &x, const int &y) {return std::complex<double>(x.real()*y, x.imag()*y);}
67 inline std::complex<double> operator*(const std::complex<double> &x, const float &y) {return std::complex<double>(x.real()*y, x.imag()*y);}
68 
70 inline std::complex<double> operator/(const std::complex<double> &x, const int &y) {return std::complex<double>(x.real() / y, x.imag() / y);}
72 inline std::complex<double> operator/(const std::complex<double> &x, const float &y) {return std::complex<double>(x.real() / y, x.imag() / y);}
73 
74 
75 //---------------------- between vec and scalar --------------------
76 
81 inline vec operator+(const float &s, const vec &v) {return static_cast<double>(s) + v;}
82 
87 inline vec operator+(const short &s, const vec &v) {return static_cast<double>(s) + v;}
88 
93 inline vec operator+(const int &s, const vec &v) {return static_cast<double>(s) + v;}
94 
99 inline vec operator+(const vec &v, const float &s) {return static_cast<double>(s) + v;}
100 
105 inline vec operator+(const vec &v, const short &s) {return static_cast<double>(s) + v;}
106 
111 inline vec operator+(const vec &v, const int &s) {return static_cast<double>(s) + v;}
112 
117 inline vec operator-(const float &s, const vec &v) {return static_cast<double>(s) - v;}
118 
123 inline vec operator-(const short &s, const vec &v) {return static_cast<double>(s) - v;}
124 
129 inline vec operator-(const int &s, const vec &v) {return static_cast<double>(s) - v;}
130 
135 inline vec operator-(const vec &v, const float &s) {return v -static_cast<double>(s);}
136 
141 inline vec operator-(const vec &v, const short &s) {return v -static_cast<double>(s);}
142 
147 inline vec operator-(const vec &v, const int &s) {return v -static_cast<double>(s);}
148 
153 inline vec operator*(const float &s, const vec &v) {return static_cast<double>(s)*v;}
154 
159 inline vec operator*(const short &s, const vec &v) {return static_cast<double>(s)*v;}
160 
165 inline vec operator*(const int &s, const vec &v) {return static_cast<double>(s)*v;}
166 
171 cvec operator*(const std::complex<double> &s, const vec &v);
172 
177 inline vec operator*(const vec &v, const float &s) {return static_cast<double>(s)*v;}
178 
183 inline vec operator*(const vec &v, const short &s) {return static_cast<double>(s)*v;}
184 
189 inline vec operator*(const vec &v, const int &s) {return static_cast<double>(s)*v;}
190 
195 cvec operator*(const vec &v, const std::complex<double> &s);
196 
201 inline vec operator/(const vec &v, const float &s) {return v / static_cast<double>(s);}
202 
207 inline vec operator/(const vec &v, const short &s) {return v / static_cast<double>(s);}
208 
213 inline vec operator/(const vec &v, const int &s) {return v / static_cast<double>(s);}
214 
215 
216 //---------------------- between ivec and scalar --------------------
217 
222 ITPP_EXPORT vec operator+(const double &s, const ivec &v);
223 
228 inline vec operator+(const ivec &v, const double &s) { return s + v;}
229 
234 ITPP_EXPORT vec operator-(const double &s, const ivec &v);
235 
240 inline vec operator-(const ivec &v, const double &s) { return v + (-s); }
241 
246 ITPP_EXPORT vec operator*(const double &s, const ivec &v);
247 
252 inline vec operator*(const ivec &v, const double &s) { return s*v; }
253 
258 ITPP_EXPORT vec operator/(const double &s, const ivec &v);
259 
264 ITPP_EXPORT vec operator/(const ivec &v, const double &s);
265 
270 ITPP_EXPORT cvec operator+(const std::complex<double> &s, const ivec &v);
271 
276 inline cvec operator+(const ivec &v, const std::complex<double> &s) { return s + v;}
277 
282 ITPP_EXPORT cvec operator-(const std::complex<double> &s, const ivec &v);
283 
288 inline cvec operator-(const ivec &v, const std::complex<double> &s) { return v + (-s); }
289 
294 ITPP_EXPORT cvec operator*(const std::complex<double> &s, const ivec &v);
295 
300 inline cvec operator*(const ivec &v, const std::complex<double> &s) { return s*v; }
301 
306 ITPP_EXPORT cvec operator/(const std::complex<double> &s, const ivec &v);
307 
312 ITPP_EXPORT cvec operator/(const ivec &v, const std::complex<double> &s);
313 
314 //---------------------- between cvec and scalar --------------------
315 
320 ITPP_EXPORT cvec operator+(const double &s, const cvec &v);
321 
326 inline cvec operator+(const float &s, const cvec &v) {return static_cast<double>(s) + v;}
327 
332 inline cvec operator+(const short &s, const cvec &v) {return static_cast<double>(s) + v;}
333 
338 inline cvec operator+(const int &s, const cvec &v) {return static_cast<double>(s) + v;}
339 
344 inline cvec operator+(const cvec &v, const float &s) {return s + v;}
345 
350 inline cvec operator+(const cvec &v, const double &s) {return s + v;}
351 
356 inline cvec operator+(const cvec &v, const short &s) {return s + v;}
357 
362 inline cvec operator+(const cvec &v, const int &s) {return s + v;}
363 
368 ITPP_EXPORT cvec operator-(const double &s, const cvec &v);
369 
374 inline cvec operator-(const float &s, const cvec &v) {return static_cast<double>(s) - v;}
375 
380 inline cvec operator-(const short &s, const cvec &v) {return static_cast<double>(s) - v;}
381 
386 inline cvec operator-(const int &s, const cvec &v) {return static_cast<double>(s) - v;}
387 
392 inline cvec operator-(const cvec &v, const float &s) {return v + (-s);}
393 
398 inline cvec operator-(const cvec &v, const double &s) {return v + (-s);}
399 
404 inline cvec operator-(const cvec &v, const short &s) {return v + (-s);}
405 
410 inline cvec operator-(const cvec &v, const int &s) {return v + (-s);}
411 
416 ITPP_EXPORT cvec operator*(const double &s, const cvec &v);
417 
422 inline cvec operator*(const float &s, const cvec &v) {return static_cast<double>(s)*v;}
423 
428 inline cvec operator*(const short &s, const cvec &v) {return static_cast<double>(s)*v;}
429 
434 inline cvec operator*(const int &s, const cvec &v) {return static_cast<double>(s)*v;}
435 
440 inline cvec operator*(const cvec &v, const float &s) {return s*v;}
441 
446 inline cvec operator*(const cvec &v, const double &s) {return s*v;}
447 
452 inline cvec operator*(const cvec &v, const short &s) {return s*v;}
453 
458 inline cvec operator*(const cvec &v, const int &s) {return s*v;}
459 
464 ITPP_EXPORT cvec operator/(const cvec &v, const double &s);
465 
470 ITPP_EXPORT cvec operator/(const double &s, const cvec &v);
471 
476 inline cvec operator/(const cvec &v, const float &s) {return v / static_cast<double>(s);}
477 
482 inline cvec operator/(const cvec &v, const short &s) {return v / static_cast<double>(s);}
483 
488 inline cvec operator/(const cvec &v, const int &s) {return v / static_cast<double>(s);}
489 
490 //---------------------- between mat and scalar --------------------
491 
496 inline mat operator+(const float &s, const mat &m) {return static_cast<double>(s) + m;}
497 
502 inline mat operator+(const short &s, const mat &m) {return static_cast<double>(s) + m;}
503 
508 inline mat operator+(const int &s, const mat &m) {return static_cast<double>(s) + m;}
509 
514 inline mat operator+(const mat &m, const float &s) {return static_cast<double>(s) + m;}
515 
520 inline mat operator+(const mat &m, const short &s) {return static_cast<double>(s) + m;}
521 
526 inline mat operator+(const mat &m, const int &s) {return static_cast<double>(s) + m;}
527 
532 inline mat operator-(const float &s, const mat &m) {return static_cast<double>(s) - m;}
533 
538 inline mat operator-(const short &s, const mat &m) {return static_cast<double>(s) - m;}
539 
544 inline mat operator-(const int &s, const mat &m) {return static_cast<double>(s) - m;}
545 
550 inline mat operator-(const mat &m, const float &s) {return m -static_cast<double>(s);}
551 
556 inline mat operator-(const mat &m, const short &s) {return m -static_cast<double>(s);}
557 
562 inline mat operator-(const mat &m, const int &s) {return m -static_cast<double>(s);}
563 
568 inline mat operator*(const float &s, const mat &m) {return static_cast<double>(s)*m;}
569 
574 inline mat operator*(const short &s, const mat &m) {return static_cast<double>(s)*m;}
575 
580 inline mat operator*(const int &s, const mat &m) {return static_cast<double>(s)*m;}
581 
586 inline mat operator*(const mat &m, const float &s) {return static_cast<double>(s)*m;}
587 
592 inline mat operator*(const mat &m, const short &s) {return static_cast<double>(s)*m;}
593 
598 inline mat operator*(const mat &m, const int &s) {return static_cast<double>(s)*m;}
599 
604 inline mat operator/(const mat &m, const float &s) {return m / static_cast<double>(s);}
605 
610 inline mat operator/(const mat &m, const short &s) {return m / static_cast<double>(s);}
611 
616 inline mat operator/(const mat &m, const int &s) {return m / static_cast<double>(s);}
617 
618 //---------------------- between cmat and scalar --------------------
619 
624 ITPP_EXPORT cmat operator+(const double &s, const cmat &m);
625 
630 ITPP_EXPORT cmat operator-(const double &s, const cmat &m);
631 
636 ITPP_EXPORT cmat operator*(const double &s, const cmat &m);
637 
642 ITPP_EXPORT cmat operator*(const std::complex<double> &s, const mat &m);
643 
648 inline cmat operator*(const mat &m, const std::complex<double> &s) {return s*m;}
649 
654 ITPP_EXPORT cmat operator/(const cmat &m, const double &s);
655 
656 //---------------------- between vec and vectors --------------------
657 
662 ITPP_EXPORT vec operator+(const bvec &a, const vec &b);
663 
668 ITPP_EXPORT vec operator+(const svec &a, const vec &b);
669 
674 ITPP_EXPORT vec operator+(const ivec &a, const vec &b);
675 
680 inline vec operator+(const vec &a, const bvec &b) {return b + a;}
681 
686 inline vec operator+(const vec &a, const svec &b) {return b + a;}
687 
692 inline vec operator+(const vec &a, const ivec &b) {return b + a;}
693 
698 inline vec operator-(const bvec &a, const vec &b) {return a + (-b);}
699 
704 inline vec operator-(const svec &a, const vec &b) {return a + (-b);}
705 
710 inline vec operator-(const ivec &a, const vec &b) {return a + (-b);}
711 
716 inline vec operator-(const vec &a, const bvec &b) {return a + (-b);}
717 
722 inline vec operator-(const vec &a, const svec &b) {return a + (-b);}
723 
728 inline vec operator-(const vec &a, const ivec &b) {return a + (-b);}
729 
734 ITPP_EXPORT double operator*(const bvec &a, const vec &b);
735 
740 ITPP_EXPORT double operator*(const svec &a, const vec &b);
741 
746 ITPP_EXPORT double operator*(const ivec &a, const vec &b);
747 
752 inline double operator*(const vec &a, const bvec &b) {return b*a;}
753 
758 inline double operator*(const vec &a, const svec &b) {return b*a;}
759 
764 inline double operator*(const vec &a, const ivec &b) {return b*a;}
765 
766 //---------------------- between cvec and vectors --------------------
767 
772 ITPP_EXPORT cvec operator+(const bvec &a, const cvec &b);
773 
778 ITPP_EXPORT cvec operator+(const svec &a, const cvec &b);
779 
784 ITPP_EXPORT cvec operator+(const ivec &a, const cvec &b);
785 
790 inline cvec operator+(const cvec &a, const bvec &b) {return b + a;}
791 
796 inline cvec operator+(const cvec &a, const svec &b) {return b + a;}
797 
802 inline cvec operator+(const cvec &a, const ivec &b) {return b + a;}
803 
808 inline cvec operator-(const bvec &a, const cvec &b) {return a + (-b);}
809 
814 inline cvec operator-(const svec &a, const cvec &b) {return a + (-b);}
815 
820 inline cvec operator-(const ivec &a, const cvec &b) {return a + (-b);}
821 
826 inline cvec operator-(const cvec &a, const bvec &b) {return a + (-b);}
827 
832 inline cvec operator-(const cvec &a, const svec &b) {return a + (-b);}
833 
838 inline cvec operator-(const cvec &a, const ivec &b) {return a + (-b);}
839 
844 ITPP_EXPORT std::complex<double> operator*(const bvec &a, const cvec &b);
845 
850 ITPP_EXPORT std::complex<double> operator*(const svec &a, const cvec &b);
851 
856 ITPP_EXPORT std::complex<double> operator*(const ivec &a, const cvec &b);
857 
862 inline std::complex<double> operator*(const cvec &a, const bvec &b) {return b*a;}
863 
868 inline std::complex<double> operator*(const cvec &a, const svec &b) {return b*a;}
869 
874 inline std::complex<double> operator*(const cvec &a, const ivec &b) {return b*a;}
875 
876 //---------------------- between mat and matricies --------------------
877 
882 ITPP_EXPORT mat operator+(const bmat &a, const mat &b);
883 
888 ITPP_EXPORT mat operator+(const smat &a, const mat &b);
889 
894 ITPP_EXPORT mat operator+(const imat &a, const mat &b);
895 
900 inline mat operator+(const mat &a, const bmat &b) {return b + a;}
901 
906 inline mat operator+(const mat &a, const smat &b) {return b + a;}
907 
912 inline mat operator+(const mat &a, const imat &b) {return b + a;}
913 
918 inline mat operator-(const bmat &a, const mat &b) {return a + (-b);}
919 
924 inline mat operator-(const smat &a, const mat &b) {return a + (-b);}
925 
930 inline mat operator-(const imat &a, const mat &b) {return a + (-b);}
931 
936 inline mat operator-(const mat &a, const bmat &b) {return a + (-b);}
937 
942 inline mat operator-(const mat &a, const smat &b) {return a + (-b);}
943 
948 inline mat operator-(const mat &a, const imat &b) {return a + (-b);}
949 
950 //---------------------- between cmat and matricies --------------------
951 
956 ITPP_EXPORT cmat operator+(const bmat &a, const cmat &b);
957 
962 ITPP_EXPORT cmat operator+(const smat &a, const cmat &b);
963 
968 ITPP_EXPORT cmat operator+(const imat &a, const cmat &b);
969 
974 ITPP_EXPORT cmat operator+(const mat &a, const cmat &b);
975 
980 inline cmat operator+(const cmat &a, const bmat &b) {return b + a;}
981 
986 inline cmat operator+(const cmat &a, const smat &b) {return b + a;}
987 
992 inline cmat operator+(const cmat &a, const imat &b) {return b + a;}
993 
998 inline cmat operator+(const cmat &a, const mat &b) {return b + a;}
999 
1004 inline cmat operator-(const bmat &a, const cmat &b) {return a + (-b);}
1005 
1010 inline cmat operator-(const smat &a, const cmat &b) {return a + (-b);}
1011 
1016 inline cmat operator-(const imat &a, const cmat &b) {return a + (-b);}
1017 
1022 inline cmat operator-(const mat &a, const cmat &b) {return a + (-b);}
1023 
1028 inline cmat operator-(const cmat &a, const bmat &b) {return a + (-b);}
1029 
1034 inline cmat operator-(const cmat &a, const smat &b) {return a + (-b);}
1035 
1040 inline cmat operator-(const cmat &a, const imat &b) {return a + (-b);}
1041 
1046 inline cmat operator-(const cmat &a, const mat &b) {return a + (-b);}
1047 
1052 inline cmat operator*(const mat &a, const cmat &b) {return to_cmat(a)*b;}
1053 
1058 inline cmat operator*(const bmat &a, const cmat &b) {return to_cmat(a)*b;}
1059 
1064 inline cmat operator*(const smat &a, const cmat &b) {return to_cmat(a)*b;}
1065 
1070 inline cmat operator*(const imat &a, const cmat &b) {return to_cmat(a)*b;}
1071 
1076 inline cmat operator*(const cmat &a, const mat &b) {return a*to_cmat(b);}
1077 
1082 inline cmat operator*(const cmat &a, const bmat &b) {return a*to_cmat(b);}
1083 
1088 inline cmat operator*(const cmat &a, const smat &b) {return a*to_cmat(b);}
1089 
1094 inline cmat operator*(const cmat &a, const imat &b) {return a*to_cmat(b);}
1095 
1096 } // namespace itpp
1097 
1098 #endif // #ifndef OPERATORS_H
1099 
Matrix Class (Templated)
Definition: mat.h:202
mat operator+(const mat &a, const smat &b)
Addition operator for mat and smat.
Definition: operators.h:906
mat operator-(const mat &a, const bmat &b)
Subtraction operator for mat and bmat.
Definition: operators.h:936
mat operator+(const mat &m, const int &s)
Addition operator for mat and int.
Definition: operators.h:526
mat operator-(const mat &a, const smat &b)
Subtraction operator for mat and smat.
Definition: operators.h:942
cmat operator*(const bmat &a, const cmat &b)
Multiplication operator for bmat and cmat.
Definition: operators.h:1058
cmat operator+(const cmat &a, const imat &b)
Addition operator for cmat and imat.
Definition: operators.h:992
cmat operator*(const cmat &a, const mat &b)
Multiplication operator for cmat and mat.
Definition: operators.h:1076
cmat operator*(const mat &m, const std::complex< double > &s)
Multiplication operator for mat and complex<double>
Definition: operators.h:648
cmat operator*(const cmat &a, const smat &b)
Multiplication operator for cmat and smat.
Definition: operators.h:1088
mat operator+(const short &s, const mat &m)
Addition operator for short and mat.
Definition: operators.h:502
mat operator*(const mat &m, const float &s)
Multiplication operator for mat and float.
Definition: operators.h:586
mat operator*(const int &s, const mat &m)
Multiplication operator for int and mat.
Definition: operators.h:580
cmat operator+(const cmat &a, const bmat &b)
Addition operator for cmat and bmat.
Definition: operators.h:980
mat operator-(const mat &m, const int &s)
Subtraction operator for mat and int.
Definition: operators.h:562
cmat operator-(const cmat &a, const imat &b)
Subtraction operator for cmat and imat.
Definition: operators.h:1040
mat operator-(const imat &a, const mat &b)
Subtraction operator for imat and mat.
Definition: operators.h:930
mat operator+(const float &s, const mat &m)
Addition operator for float and mat.
Definition: operators.h:496
mat operator-(const mat &m, const float &s)
Subtraction operator for mat and float.
Definition: operators.h:550
mat operator+(const mat &a, const bmat &b)
Addition operator for mat and bmat.
Definition: operators.h:900
mat operator*(const float &s, const mat &m)
Multiplication operator for float and mat.
Definition: operators.h:568
cmat operator-(const mat &a, const cmat &b)
Subtraction operator for mat and cmat.
Definition: operators.h:1022
mat operator+(const int &s, const mat &m)
Addition operator for int and mat.
Definition: operators.h:508
cmat operator*(const mat &a, const cmat &b)
Multiplication operator for mat and cmat.
Definition: operators.h:1052
cmat operator*(const cmat &a, const bmat &b)
Multiplication operator for cmat and bmat.
Definition: operators.h:1082
cmat operator-(const cmat &a, const bmat &b)
Subtraction operator for cmat and bmat.
Definition: operators.h:1028
cmat operator*(const imat &a, const cmat &b)
Multiplication operator for imat and cmat.
Definition: operators.h:1070
cmat operator-(const smat &a, const cmat &b)
Subtraction operator for smat and cmat.
Definition: operators.h:1010
mat operator/(const mat &m, const short &s)
Division operator for mat and short.
Definition: operators.h:610
cmat operator+(const cmat &a, const mat &b)
Addition operator for cmat and mat.
Definition: operators.h:998
cmat operator*(const cmat &a, const imat &b)
Multiplication operator for cmat and imat.
Definition: operators.h:1094
mat operator-(const mat &m, const short &s)
Subtraction operator for mat and short.
Definition: operators.h:556
mat operator-(const int &s, const mat &m)
Subtraction operator for int and mat.
Definition: operators.h:544
cmat operator-(const bmat &a, const cmat &b)
Subtraction operator for bmat and cmat.
Definition: operators.h:1004
mat operator+(const mat &m, const short &s)
Addition operator for mat and short.
Definition: operators.h:520
ITPP_EXPORT mat operator+(const bmat &a, const mat &b)
Addition operator for bmat and mat.
mat operator*(const mat &m, const int &s)
Multiplication operator for mat and int.
Definition: operators.h:598
cmat operator-(const cmat &a, const smat &b)
Subtraction operator for cmat and smat.
Definition: operators.h:1034
cmat operator+(const cmat &a, const smat &b)
Addition operator for cmat and smat.
Definition: operators.h:986
mat operator-(const float &s, const mat &m)
Subtraction operator for float and mat.
Definition: operators.h:532
cmat operator-(const cmat &a, const mat &b)
Subtraction operator for cmat and mat.
Definition: operators.h:1046
mat operator-(const smat &a, const mat &b)
Subtraction operator for smat and mat.
Definition: operators.h:924
mat operator+(const mat &a, const imat &b)
Addition operator for mat and imat.
Definition: operators.h:912
mat operator*(const mat &m, const short &s)
Multiplication operator for mat and short.
Definition: operators.h:592
cmat operator-(const imat &a, const cmat &b)
Subtraction operator for imat and cmat.
Definition: operators.h:1016
cmat operator*(const smat &a, const cmat &b)
Multiplication operator for smat and cmat.
Definition: operators.h:1064
mat operator/(const mat &m, const int &s)
Division operator for mat and int.
Definition: operators.h:616
mat operator+(const mat &m, const float &s)
Addition operator for mat and float.
Definition: operators.h:514
mat operator-(const short &s, const mat &m)
Subtraction operator for short and mat.
Definition: operators.h:538
mat operator*(const short &s, const mat &m)
Multiplication operator for short and mat.
Definition: operators.h:574
mat operator/(const mat &m, const float &s)
Division operator for mat and float.
Definition: operators.h:604
mat operator-(const mat &a, const imat &b)
Subtraction operator for mat and imat.
Definition: operators.h:948
ITPP_EXPORT cmat operator+(const bmat &a, const cmat &b)
Addition operator for bmat and cmat.
mat operator-(const bmat &a, const mat &b)
Subtraction operator for bmat and mat.
Definition: operators.h:918
Vector Class (Templated)
Definition: vec.h:245
vec operator-(const vec &v, const float &s)
Subtraction operator for vec and float.
Definition: operators.h:135
cvec operator+(const cvec &v, const int &s)
Addition operator for cvec and int.
Definition: operators.h:362
vec operator-(const short &s, const vec &v)
Subtraction operator for short and vec.
Definition: operators.h:123
vec operator+(const short &s, const vec &v)
Addition operator for short and vec.
Definition: operators.h:87
vec operator-(const bvec &a, const vec &b)
Subtraction operator for bvec and vec.
Definition: operators.h:698
vec operator*(const vec &v, const int &s)
Multiplication operator for vec and int.
Definition: operators.h:189
cvec operator+(const float &s, const cvec &v)
Addition operator for float and cvec.
Definition: operators.h:326
vec operator+(const vec &v, const float &s)
Addition operator for vec and float.
Definition: operators.h:99
vec operator+(const ivec &v, const double &s)
Addition operator for ivec and double.
Definition: operators.h:228
cvec operator-(const float &s, const cvec &v)
Subtraction operator for float and cvec.
Definition: operators.h:374
vec operator-(const vec &v, const int &s)
Subtraction operator for vec and int.
Definition: operators.h:147
vec operator+(const vec &v, const short &s)
Addition operator for vec and short.
Definition: operators.h:105
cvec operator*(const cvec &v, const double &s)
Multiplication operator for cvec and double.
Definition: operators.h:446
vec operator-(const svec &a, const vec &b)
Subtraction operator for svec and vec.
Definition: operators.h:704
cvec operator+(const cvec &a, const ivec &b)
Addition operator for cvec and ivec.
Definition: operators.h:802
cvec operator*(const cvec &v, const short &s)
Multiplication operator for cvec and short.
Definition: operators.h:452
cvec operator/(const cvec &v, const int &s)
Division operator for cvec and int.
Definition: operators.h:488
cvec operator*(const short &s, const cvec &v)
Multiplication operator for short and cvec.
Definition: operators.h:428
cvec operator-(const cvec &v, const short &s)
Subtraction operator for cvec and short.
Definition: operators.h:404
double operator*(const vec &a, const ivec &b)
Multiplication operator for vec and ivec.
Definition: operators.h:764
cvec operator-(const ivec &v, const std::complex< double > &s)
Subtraction operator for ivec and complex<double>
Definition: operators.h:288
cvec operator/(const cvec &v, const short &s)
Division operator for cvec and short.
Definition: operators.h:482
vec operator*(const vec &v, const short &s)
Multiplication operator for vec and short.
Definition: operators.h:183
cvec operator-(const svec &a, const cvec &b)
Subtraction operator for svec and cvec.
Definition: operators.h:814
vec operator-(const vec &a, const svec &b)
Subtraction operator for vec and svec.
Definition: operators.h:722
cvec operator/(const cvec &v, const float &s)
Division operator for cvec and float.
Definition: operators.h:476
std::complex< double > operator*(const cvec &a, const bvec &b)
Multiplication operator for cvec and bvec.
Definition: operators.h:862
vec operator*(const ivec &v, const double &s)
Multiplication operator for ivec and double.
Definition: operators.h:252
std::complex< double > operator*(const cvec &a, const ivec &b)
Multiplication operator for cvec and ivec.
Definition: operators.h:874
cvec operator*(const cvec &v, const float &s)
Multiplication operator for cvec and float.
Definition: operators.h:440
vec operator-(const int &s, const vec &v)
Subtraction operator for int and vec.
Definition: operators.h:129
vec operator*(const vec &v, const float &s)
Multiplication operator for vec and float.
Definition: operators.h:177
std::complex< double > operator*(const cvec &a, const svec &b)
Multiplication operator for cvec and svec.
Definition: operators.h:868
cvec operator-(const cvec &a, const svec &b)
Subtraction operator for cvec and svec.
Definition: operators.h:832
cvec operator-(const cvec &a, const ivec &b)
Subtraction operator for cvec and ivec.
Definition: operators.h:838
vec operator-(const float &s, const vec &v)
Subtraction operator for float and vec.
Definition: operators.h:117
cvec operator+(const cvec &v, const short &s)
Addition operator for cvec and short.
Definition: operators.h:356
cvec operator+(const cvec &v, const float &s)
Addition operator for cvec and float.
Definition: operators.h:344
vec operator-(const vec &v, const short &s)
Subtraction operator for vec and short.
Definition: operators.h:141
vec operator*(const short &s, const vec &v)
Multiplication operator for short and vec.
Definition: operators.h:159
cvec operator+(const ivec &v, const std::complex< double > &s)
Addition operator for ivec and complex<double>
Definition: operators.h:276
vec operator-(const ivec &a, const vec &b)
Subtraction operator for ivec and vec.
Definition: operators.h:710
vec operator+(const vec &a, const ivec &b)
Addition operator for vec and ivec.
Definition: operators.h:692
double operator*(const vec &a, const bvec &b)
Multiplication operator for vec and bvec.
Definition: operators.h:752
vec operator-(const vec &a, const bvec &b)
Subtraction operator for vec and bvec.
Definition: operators.h:716
cvec operator-(const int &s, const cvec &v)
Subtraction operator for int and cvec.
Definition: operators.h:386
vec operator/(const vec &v, const int &s)
Division operator for vec and int.
Definition: operators.h:213
cvec operator-(const cvec &v, const int &s)
Subtraction operator for cvec and int.
Definition: operators.h:410
cvec operator-(const cvec &v, const double &s)
Subtraction operator for cvec and double.
Definition: operators.h:398
cvec operator-(const bvec &a, const cvec &b)
Subtraction operator for bvec and cvec.
Definition: operators.h:808
vec operator/(const vec &v, const short &s)
Division operator for vec and short.
Definition: operators.h:207
vec operator+(const vec &a, const svec &b)
Addition operator for vec and svec.
Definition: operators.h:686
vec operator*(const float &s, const vec &v)
Multiplication operator for float and vec.
Definition: operators.h:153
cvec operator-(const cvec &a, const bvec &b)
Subtraction operator for cvec and bvec.
Definition: operators.h:826
vec operator*(const int &s, const vec &v)
Multiplication operator for int and vec.
Definition: operators.h:165
cvec operator+(const short &s, const cvec &v)
Addition operator for short and cvec.
Definition: operators.h:332
cvec operator+(const cvec &v, const double &s)
Addition operator for cvec and double.
Definition: operators.h:350
cvec operator*(const cvec &v, const int &s)
Multiplication operator for cvec and int.
Definition: operators.h:458
cvec operator-(const cvec &v, const float &s)
Subtraction operator for cvec and float.
Definition: operators.h:392
vec operator/(const vec &v, const float &s)
Division operator for vec and float.
Definition: operators.h:201
cvec operator+(const cvec &a, const bvec &b)
Addition operator for cvec and bvec.
Definition: operators.h:790
vec operator+(const float &s, const vec &v)
Addition operator for float and vec.
Definition: operators.h:81
vec operator+(const vec &a, const bvec &b)
Addition operator for vec and bvec.
Definition: operators.h:680
cvec operator+(const int &s, const cvec &v)
Addition operator for int and cvec.
Definition: operators.h:338
vec operator+(const int &s, const vec &v)
Addition operator for int and vec.
Definition: operators.h:93
cvec operator*(const ivec &v, const std::complex< double > &s)
Multiplication operator for ivec and complex<double>
Definition: operators.h:300
cvec operator+(const cvec &a, const svec &b)
Addition operator for cvec and svec.
Definition: operators.h:796
cvec operator-(const ivec &a, const cvec &b)
Subtraction operator for ivec and cvec.
Definition: operators.h:820
double operator*(const vec &a, const svec &b)
Multiplication operator for vec and svec.
Definition: operators.h:758
cvec operator-(const short &s, const cvec &v)
Subtraction operator for short and cvec.
Definition: operators.h:380
cvec operator*(const int &s, const cvec &v)
Multiplication operator for int and cvec.
Definition: operators.h:434
vec operator+(const vec &v, const int &s)
Addition operator for vec and int.
Definition: operators.h:111
cvec operator*(const float &s, const cvec &v)
Multiplication operator for float and cvec.
Definition: operators.h:422
vec operator-(const vec &a, const ivec &b)
Subtraction operator for vec and ivec.
Definition: operators.h:728
vec operator-(const ivec &v, const double &s)
Subtraction operator for ivec and double.
Definition: operators.h:240
Definitions of converters between different vector and matrix types.
Matrix Class Definitions.
Mat< bin > bmat
bin matrix
Definition: mat.h:508
itpp namespace
Definition: itmex.h:37
cmat to_cmat(const Mat< T > &m)
Converts a Mat<T> to cmat.
Definition: converters.h:232
Mat< Num_T > operator-(const Mat< Num_T > &m1, const Mat< Num_T > &m2)
Subtraction of two matrices.
Definition: mat.h:1382
GF2mat operator*(const GF2mat &X, const GF2mat &Y)
GF(2) matrix multiplication.
Definition: gf2mat.cpp:847
Mat< Num_T > operator/(const Mat< Num_T > &m, Num_T t)
Element-wise division by a scalar.
Definition: mat.h:1670
GF2mat operator+(const GF2mat &X, const GF2mat &Y)
GF(2) matrix addition.
Definition: gf2mat.cpp:948
Templated Vector Class Definitions.

Generated on Tue Aug 17 2021 10:59:15 for IT++ by Doxygen 1.9.1