Go to the documentation of this file.
36 #include <itpp/itexports.h>
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());}
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());}
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);}
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);}
81 inline vec
operator+(
const float &s,
const vec &v) {
return static_cast<double>(s) + v;}
87 inline vec
operator+(
const short &s,
const vec &v) {
return static_cast<double>(s) + v;}
93 inline vec
operator+(
const int &s,
const vec &v) {
return static_cast<double>(s) + v;}
99 inline vec
operator+(
const vec &v,
const float &s) {
return static_cast<double>(s) + v;}
105 inline vec
operator+(
const vec &v,
const short &s) {
return static_cast<double>(s) + v;}
111 inline vec
operator+(
const vec &v,
const int &s) {
return static_cast<double>(s) + v;}
117 inline vec
operator-(
const float &s,
const vec &v) {
return static_cast<double>(s) - v;}
123 inline vec
operator-(
const short &s,
const vec &v) {
return static_cast<double>(s) - v;}
129 inline vec
operator-(
const int &s,
const vec &v) {
return static_cast<double>(s) - v;}
135 inline vec
operator-(
const vec &v,
const float &s) {
return v -
static_cast<double>(s);}
141 inline vec
operator-(
const vec &v,
const short &s) {
return v -
static_cast<double>(s);}
147 inline vec
operator-(
const vec &v,
const int &s) {
return v -
static_cast<double>(s);}
153 inline vec
operator*(
const float &s,
const vec &v) {
return static_cast<double>(s)*v;}
159 inline vec
operator*(
const short &s,
const vec &v) {
return static_cast<double>(s)*v;}
165 inline vec
operator*(
const int &s,
const vec &v) {
return static_cast<double>(s)*v;}
177 inline vec
operator*(
const vec &v,
const float &s) {
return static_cast<double>(s)*v;}
183 inline vec
operator*(
const vec &v,
const short &s) {
return static_cast<double>(s)*v;}
189 inline vec
operator*(
const vec &v,
const int &s) {
return static_cast<double>(s)*v;}
201 inline vec
operator/(
const vec &v,
const float &s) {
return v /
static_cast<double>(s);}
207 inline vec
operator/(
const vec &v,
const short &s) {
return v /
static_cast<double>(s);}
213 inline vec
operator/(
const vec &v,
const int &s) {
return v /
static_cast<double>(s);}
228 inline vec
operator+(
const ivec &v,
const double &s) {
return s + v;}
240 inline vec
operator-(
const ivec &v,
const double &s) {
return v + (-s); }
252 inline vec
operator*(
const ivec &v,
const double &s) {
return s*v; }
276 inline cvec
operator+(
const ivec &v,
const std::complex<double> &s) {
return s + v;}
288 inline cvec
operator-(
const ivec &v,
const std::complex<double> &s) {
return v + (-s); }
300 inline cvec
operator*(
const ivec &v,
const std::complex<double> &s) {
return s*v; }
326 inline cvec
operator+(
const float &s,
const cvec &v) {
return static_cast<double>(s) + v;}
332 inline cvec
operator+(
const short &s,
const cvec &v) {
return static_cast<double>(s) + v;}
338 inline cvec
operator+(
const int &s,
const cvec &v) {
return static_cast<double>(s) + v;}
344 inline cvec
operator+(
const cvec &v,
const float &s) {
return s + v;}
350 inline cvec
operator+(
const cvec &v,
const double &s) {
return s + v;}
356 inline cvec
operator+(
const cvec &v,
const short &s) {
return s + v;}
362 inline cvec
operator+(
const cvec &v,
const int &s) {
return s + v;}
374 inline cvec
operator-(
const float &s,
const cvec &v) {
return static_cast<double>(s) - v;}
380 inline cvec
operator-(
const short &s,
const cvec &v) {
return static_cast<double>(s) - v;}
386 inline cvec
operator-(
const int &s,
const cvec &v) {
return static_cast<double>(s) - v;}
392 inline cvec
operator-(
const cvec &v,
const float &s) {
return v + (-s);}
398 inline cvec
operator-(
const cvec &v,
const double &s) {
return v + (-s);}
404 inline cvec
operator-(
const cvec &v,
const short &s) {
return v + (-s);}
410 inline cvec
operator-(
const cvec &v,
const int &s) {
return v + (-s);}
422 inline cvec
operator*(
const float &s,
const cvec &v) {
return static_cast<double>(s)*v;}
428 inline cvec
operator*(
const short &s,
const cvec &v) {
return static_cast<double>(s)*v;}
434 inline cvec
operator*(
const int &s,
const cvec &v) {
return static_cast<double>(s)*v;}
440 inline cvec
operator*(
const cvec &v,
const float &s) {
return s*v;}
446 inline cvec
operator*(
const cvec &v,
const double &s) {
return s*v;}
452 inline cvec
operator*(
const cvec &v,
const short &s) {
return s*v;}
458 inline cvec
operator*(
const cvec &v,
const int &s) {
return s*v;}
476 inline cvec
operator/(
const cvec &v,
const float &s) {
return v /
static_cast<double>(s);}
482 inline cvec
operator/(
const cvec &v,
const short &s) {
return v /
static_cast<double>(s);}
488 inline cvec
operator/(
const cvec &v,
const int &s) {
return v /
static_cast<double>(s);}
496 inline mat
operator+(
const float &s,
const mat &m) {
return static_cast<double>(s) + m;}
502 inline mat
operator+(
const short &s,
const mat &m) {
return static_cast<double>(s) + m;}
508 inline mat
operator+(
const int &s,
const mat &m) {
return static_cast<double>(s) + m;}
514 inline mat
operator+(
const mat &m,
const float &s) {
return static_cast<double>(s) + m;}
520 inline mat
operator+(
const mat &m,
const short &s) {
return static_cast<double>(s) + m;}
526 inline mat
operator+(
const mat &m,
const int &s) {
return static_cast<double>(s) + m;}
532 inline mat
operator-(
const float &s,
const mat &m) {
return static_cast<double>(s) - m;}
538 inline mat
operator-(
const short &s,
const mat &m) {
return static_cast<double>(s) - m;}
544 inline mat
operator-(
const int &s,
const mat &m) {
return static_cast<double>(s) - m;}
550 inline mat
operator-(
const mat &m,
const float &s) {
return m -
static_cast<double>(s);}
556 inline mat
operator-(
const mat &m,
const short &s) {
return m -
static_cast<double>(s);}
562 inline mat
operator-(
const mat &m,
const int &s) {
return m -
static_cast<double>(s);}
568 inline mat
operator*(
const float &s,
const mat &m) {
return static_cast<double>(s)*m;}
574 inline mat
operator*(
const short &s,
const mat &m) {
return static_cast<double>(s)*m;}
580 inline mat
operator*(
const int &s,
const mat &m) {
return static_cast<double>(s)*m;}
586 inline mat
operator*(
const mat &m,
const float &s) {
return static_cast<double>(s)*m;}
592 inline mat
operator*(
const mat &m,
const short &s) {
return static_cast<double>(s)*m;}
598 inline mat
operator*(
const mat &m,
const int &s) {
return static_cast<double>(s)*m;}
604 inline mat
operator/(
const mat &m,
const float &s) {
return m /
static_cast<double>(s);}
610 inline mat
operator/(
const mat &m,
const short &s) {
return m /
static_cast<double>(s);}
616 inline mat
operator/(
const mat &m,
const int &s) {
return m /
static_cast<double>(s);}
648 inline cmat
operator*(
const mat &m,
const std::complex<double> &s) {
return s*m;}
680 inline vec
operator+(
const vec &a,
const bvec &b) {
return b + a;}
686 inline vec
operator+(
const vec &a,
const svec &b) {
return b + a;}
692 inline vec
operator+(
const vec &a,
const ivec &b) {
return b + a;}
698 inline vec
operator-(
const bvec &a,
const vec &b) {
return a + (-b);}
704 inline vec
operator-(
const svec &a,
const vec &b) {
return a + (-b);}
710 inline vec
operator-(
const ivec &a,
const vec &b) {
return a + (-b);}
716 inline vec
operator-(
const vec &a,
const bvec &b) {
return a + (-b);}
722 inline vec
operator-(
const vec &a,
const svec &b) {
return a + (-b);}
728 inline vec
operator-(
const vec &a,
const ivec &b) {
return a + (-b);}
752 inline double operator*(
const vec &a,
const bvec &b) {
return b*a;}
758 inline double operator*(
const vec &a,
const svec &b) {
return b*a;}
764 inline double operator*(
const vec &a,
const ivec &b) {
return b*a;}
790 inline cvec
operator+(
const cvec &a,
const bvec &b) {
return b + a;}
796 inline cvec
operator+(
const cvec &a,
const svec &b) {
return b + a;}
802 inline cvec
operator+(
const cvec &a,
const ivec &b) {
return b + a;}
808 inline cvec
operator-(
const bvec &a,
const cvec &b) {
return a + (-b);}
814 inline cvec
operator-(
const svec &a,
const cvec &b) {
return a + (-b);}
820 inline cvec
operator-(
const ivec &a,
const cvec &b) {
return a + (-b);}
826 inline cvec
operator-(
const cvec &a,
const bvec &b) {
return a + (-b);}
832 inline cvec
operator-(
const cvec &a,
const svec &b) {
return a + (-b);}
838 inline cvec
operator-(
const cvec &a,
const ivec &b) {
return a + (-b);}
862 inline std::complex<double>
operator*(
const cvec &a,
const bvec &b) {
return b*a;}
868 inline std::complex<double>
operator*(
const cvec &a,
const svec &b) {
return b*a;}
874 inline std::complex<double>
operator*(
const cvec &a,
const ivec &b) {
return b*a;}
906 inline mat
operator+(
const mat &a,
const smat &b) {
return b + a;}
912 inline mat
operator+(
const mat &a,
const imat &b) {
return b + a;}
924 inline mat
operator-(
const smat &a,
const mat &b) {
return a + (-b);}
930 inline mat
operator-(
const imat &a,
const mat &b) {
return a + (-b);}
942 inline mat
operator-(
const mat &a,
const smat &b) {
return a + (-b);}
948 inline mat
operator-(
const mat &a,
const imat &b) {
return a + (-b);}
986 inline cmat
operator+(
const cmat &a,
const smat &b) {
return b + a;}
992 inline cmat
operator+(
const cmat &a,
const imat &b) {
return b + a;}
998 inline cmat
operator+(
const cmat &a,
const mat &b) {
return b + a;}
1010 inline cmat
operator-(
const smat &a,
const cmat &b) {
return a + (-b);}
1016 inline cmat
operator-(
const imat &a,
const cmat &b) {
return a + (-b);}
1022 inline cmat
operator-(
const mat &a,
const cmat &b) {
return a + (-b);}
1034 inline cmat
operator-(
const cmat &a,
const smat &b) {
return a + (-b);}
1040 inline cmat
operator-(
const cmat &a,
const imat &b) {
return a + (-b);}
1046 inline cmat
operator-(
const cmat &a,
const mat &b) {
return a + (-b);}
1098 #endif // #ifndef OPERATORS_H
ITPP_EXPORT cmat operator+(const bmat &a, const cmat &b)
Addition operator for bmat and cmat.
ITPP_EXPORT cvec operator+(const double &s, const cvec &v)
Addition operator for double and cvec.
ITPP_EXPORT double operator*(const svec &a, const vec &b)
Multiplication operator for svec and vec.
ITPP_EXPORT std::complex< double > operator*(const ivec &a, const cvec &b)
Multiplication operator for ivec and cvec.
ITPP_EXPORT mat operator+(const bmat &a, const mat &b)
Addition operator for bmat and mat.
Mat< Num_T > operator/(const Mat< Num_T > &m, Num_T t)
Element-wise division by a scalar.
Mat< Num_T > operator-(const Mat< Num_T > &m1, const Mat< Num_T > &m2)
Subtraction of two matrices.
Mat< bin > bmat
bin matrix
ITPP_EXPORT cvec operator*(const double &s, const cvec &v)
Multiplication operator for double and cvec.
ITPP_EXPORT cmat operator+(const imat &a, const cmat &b)
Addition operator for imat and cmat.
Matrix Class Definitions.
ITPP_EXPORT mat operator+(const smat &a, const mat &b)
Addition operator for smat and mat.
ITPP_EXPORT std::complex< double > operator*(const svec &a, const cvec &b)
Multiplication operator for svec and cvec.
ITPP_EXPORT cmat operator+(const mat &a, const cmat &b)
Addition operator for mat and cmat.
ITPP_EXPORT cmat operator+(const smat &a, const cmat &b)
Addition operator for smat and cmat.
ITPP_EXPORT cvec operator/(const std::complex< double > &s, const ivec &v)
Division operator for complex<double> and ivec.
GF2mat operator*(const GF2mat &X, const GF2mat &Y)
GF(2) matrix multiplication.
ITPP_EXPORT double operator*(const ivec &a, const vec &b)
Multiplication operator for ivec and vec.
ITPP_EXPORT vec operator*(const double &s, const ivec &v)
Multiplication operator for double and ivec.
cvec operator*(const vec &v, const std::complex< double > &s)
Multiplication operator for vec and complex<double>
ITPP_EXPORT cvec operator+(const svec &a, const cvec &b)
Addition operator for svec and cvec.
ITPP_EXPORT vec operator+(const double &s, const ivec &v)
Addition operator for double and ivec.
ITPP_EXPORT cvec operator/(const double &s, const cvec &v)
Division operator for double and cvec.
cvec operator*(const std::complex< double > &s, const vec &v)
Multiplication operator for complex<double> and vec.
ITPP_EXPORT cvec operator-(const std::complex< double > &s, const ivec &v)
Subtraction operator for complex<double> and ivec.
ITPP_EXPORT std::complex< double > operator*(const bvec &a, const cvec &b)
Multiplication operator for bvec and cvec.
GF2mat operator+(const GF2mat &X, const GF2mat &Y)
GF(2) matrix addition.
ITPP_EXPORT cmat operator*(const double &s, const cmat &m)
Multiplication operator for double and cmat.
ITPP_EXPORT cvec operator/(const ivec &v, const std::complex< double > &s)
Division operator for ivec and complex<double>
ITPP_EXPORT double operator*(const bvec &a, const vec &b)
Multiplication operator for bvec and vec.
ITPP_EXPORT mat operator+(const imat &a, const mat &b)
Addition operator for imat and mat.
ITPP_EXPORT vec operator+(const bvec &a, const vec &b)
Addition operator for bvec and vec.
ITPP_EXPORT vec operator/(const ivec &v, const double &s)
Division operator for ivec and double.
Templated Vector Class Definitions.
ITPP_EXPORT cmat operator+(const double &s, const cmat &m)
Addition operator for double and cmat.
cmat to_cmat(const Mat< T > &m)
Converts a Mat<T> to cmat.
ITPP_EXPORT vec operator+(const ivec &a, const vec &b)
Addition operator for ivec and vec.
ITPP_EXPORT cvec operator+(const std::complex< double > &s, const ivec &v)
Addition operator for complex<double> and ivec.
ITPP_EXPORT cvec operator*(const std::complex< double > &s, const ivec &v)
Multiplication operator for complex<double> and ivec.
ITPP_EXPORT vec operator+(const svec &a, const vec &b)
Addition operator for svec and vec.
Definitions of converters between different vector and matrix types.
ITPP_EXPORT cmat operator*(const std::complex< double > &s, const mat &m)
Multiplication operator for complex<double> and mat.
ITPP_EXPORT cvec operator+(const ivec &a, const cvec &b)
Addition operator for ivec and cvec.
ITPP_EXPORT cmat operator-(const double &s, const cmat &m)
Subtraction operator for double and cmat.
ITPP_EXPORT vec operator-(const double &s, const ivec &v)
Subtraction operator for double and ivec.
ITPP_EXPORT cmat operator/(const cmat &m, const double &s)
Division operator for cmat and double.
ITPP_EXPORT cvec operator/(const cvec &v, const double &s)
Division operator for cvec and double.
ITPP_EXPORT vec operator/(const double &s, const ivec &v)
Division operator for double and ivec.
ITPP_EXPORT cvec operator-(const double &s, const cvec &v)
Subtraction operator for double and cvec.
ITPP_EXPORT cvec operator+(const bvec &a, const cvec &b)
Addition operator for bvec and cvec.
Generated on Thu Apr 11 2019 00:00:00 for IT++ by Doxygen 1.8.18