operators.h
Go to the documentation of this file.
#ifndef OPERATORS_H
#define OPERATORS_H
#include <itpp/base/vec.h>
#include <itpp/base/mat.h>
#include <itpp/base/converters.h>
#include <itpp/itexports.h>
namespace itpp
{
//---------------------- between scalars and complex<double> -----------------
inline std::complex<double> operator+(const int &x, const std::complex<double> &y) {return std::complex<double>(x + y.real(), y.imag());}
inline std::complex<double> operator+(const float &x, const std::complex<double> &y) {return std::complex<double>(x + y.real(), y.imag());}
inline std::complex<double> operator+(const std::complex<double> &x, const int &y) {return std::complex<double>(x.real() + y, x.imag());}
inline std::complex<double> operator+(const std::complex<double> &x, const float &y) {return std::complex<double>(x.real() + y, x.imag());}
inline std::complex<double> operator-(const int &x, const std::complex<double> &y) {return std::complex<double>(x - y.real(), -y.imag());}
inline std::complex<double> operator-(const float &x, const std::complex<double> &y) {return std::complex<double>(x - y.real(), -y.imag());}
inline std::complex<double> operator-(const std::complex<double> &x, const int &y) {return std::complex<double>(x.real() - y, x.imag());}
inline std::complex<double> operator-(const std::complex<double> &x, const float &y) {return std::complex<double>(x.real() - y, x.imag());}
inline std::complex<double> operator*(const int &x, const std::complex<double> &y) {return std::complex<double>(x*y.real(), x*y.imag());}
inline std::complex<double> operator*(const float &x, const std::complex<double> &y) {return std::complex<double>(x*y.real(), x*y.imag());}
inline std::complex<double> operator*(const std::complex<double> &x, const int &y) {return std::complex<double>(x.real()*y, x.imag()*y);}
inline std::complex<double> operator*(const std::complex<double> &x, const float &y) {return std::complex<double>(x.real()*y, x.imag()*y);}
inline std::complex<double> operator/(const std::complex<double> &x, const int &y) {return std::complex<double>(x.real() / y, x.imag() / y);}
inline std::complex<double> operator/(const std::complex<double> &x, const float &y) {return std::complex<double>(x.real() / y, x.imag() / y);}
//---------------------- between vec and scalar --------------------
inline vec operator+(const float &s, const vec &v) {return static_cast<double>(s) + v;}
inline vec operator+(const short &s, const vec &v) {return static_cast<double>(s) + v;}
inline vec operator+(const int &s, const vec &v) {return static_cast<double>(s) + v;}
inline vec operator+(const vec &v, const float &s) {return static_cast<double>(s) + v;}
inline vec operator+(const vec &v, const short &s) {return static_cast<double>(s) + v;}
inline vec operator+(const vec &v, const int &s) {return static_cast<double>(s) + v;}
inline vec operator-(const float &s, const vec &v) {return static_cast<double>(s) - v;}
inline vec operator-(const short &s, const vec &v) {return static_cast<double>(s) - v;}
inline vec operator-(const int &s, const vec &v) {return static_cast<double>(s) - v;}
inline vec operator-(const vec &v, const float &s) {return v -static_cast<double>(s);}
inline vec operator-(const vec &v, const short &s) {return v -static_cast<double>(s);}
inline vec operator-(const vec &v, const int &s) {return v -static_cast<double>(s);}
inline vec operator*(const float &s, const vec &v) {return static_cast<double>(s)*v;}
inline vec operator*(const short &s, const vec &v) {return static_cast<double>(s)*v;}
inline vec operator*(const int &s, const vec &v) {return static_cast<double>(s)*v;}
cvec operator*(const std::complex<double> &s, const vec &v);
inline vec operator*(const vec &v, const float &s) {return static_cast<double>(s)*v;}
inline vec operator*(const vec &v, const short &s) {return static_cast<double>(s)*v;}
inline vec operator*(const vec &v, const int &s) {return static_cast<double>(s)*v;}
cvec operator*(const vec &v, const std::complex<double> &s);
inline vec operator/(const vec &v, const float &s) {return v / static_cast<double>(s);}
inline vec operator/(const vec &v, const short &s) {return v / static_cast<double>(s);}
inline vec operator/(const vec &v, const int &s) {return v / static_cast<double>(s);}
//---------------------- between ivec and scalar --------------------
ITPP_EXPORT vec operator+(const double &s, const ivec &v);
inline vec operator+(const ivec &v, const double &s) { return s + v;}
ITPP_EXPORT vec operator-(const double &s, const ivec &v);
inline vec operator-(const ivec &v, const double &s) { return v + (-s); }
ITPP_EXPORT vec operator*(const double &s, const ivec &v);
inline vec operator*(const ivec &v, const double &s) { return s*v; }
ITPP_EXPORT vec operator/(const double &s, const ivec &v);
ITPP_EXPORT vec operator/(const ivec &v, const double &s);
ITPP_EXPORT cvec operator+(const std::complex<double> &s, const ivec &v);
inline cvec operator+(const ivec &v, const std::complex<double> &s) { return s + v;}
ITPP_EXPORT cvec operator-(const std::complex<double> &s, const ivec &v);
inline cvec operator-(const ivec &v, const std::complex<double> &s) { return v + (-s); }
ITPP_EXPORT cvec operator*(const std::complex<double> &s, const ivec &v);
inline cvec operator*(const ivec &v, const std::complex<double> &s) { return s*v; }
ITPP_EXPORT cvec operator/(const std::complex<double> &s, const ivec &v);
ITPP_EXPORT cvec operator/(const ivec &v, const std::complex<double> &s);
//---------------------- between cvec and scalar --------------------
ITPP_EXPORT cvec operator+(const double &s, const cvec &v);
inline cvec operator+(const float &s, const cvec &v) {return static_cast<double>(s) + v;}
inline cvec operator+(const short &s, const cvec &v) {return static_cast<double>(s) + v;}
inline cvec operator+(const int &s, const cvec &v) {return static_cast<double>(s) + v;}
inline cvec operator+(const cvec &v, const float &s) {return s + v;}
inline cvec operator+(const cvec &v, const double &s) {return s + v;}
inline cvec operator+(const cvec &v, const short &s) {return s + v;}
inline cvec operator+(const cvec &v, const int &s) {return s + v;}
ITPP_EXPORT cvec operator-(const double &s, const cvec &v);
inline cvec operator-(const float &s, const cvec &v) {return static_cast<double>(s) - v;}
inline cvec operator-(const short &s, const cvec &v) {return static_cast<double>(s) - v;}
inline cvec operator-(const int &s, const cvec &v) {return static_cast<double>(s) - v;}
inline cvec operator-(const cvec &v, const float &s) {return v + (-s);}
inline cvec operator-(const cvec &v, const double &s) {return v + (-s);}
inline cvec operator-(const cvec &v, const short &s) {return v + (-s);}
inline cvec operator-(const cvec &v, const int &s) {return v + (-s);}
ITPP_EXPORT cvec operator*(const double &s, const cvec &v);
inline cvec operator*(const float &s, const cvec &v) {return static_cast<double>(s)*v;}
inline cvec operator*(const short &s, const cvec &v) {return static_cast<double>(s)*v;}
inline cvec operator*(const int &s, const cvec &v) {return static_cast<double>(s)*v;}
inline cvec operator*(const cvec &v, const float &s) {return s*v;}
inline cvec operator*(const cvec &v, const double &s) {return s*v;}
inline cvec operator*(const cvec &v, const short &s) {return s*v;}
inline cvec operator*(const cvec &v, const int &s) {return s*v;}
ITPP_EXPORT cvec operator/(const cvec &v, const double &s);
ITPP_EXPORT cvec operator/(const double &s, const cvec &v);
inline cvec operator/(const cvec &v, const float &s) {return v / static_cast<double>(s);}
inline cvec operator/(const cvec &v, const short &s) {return v / static_cast<double>(s);}
inline cvec operator/(const cvec &v, const int &s) {return v / static_cast<double>(s);}
//---------------------- between mat and scalar --------------------
inline mat operator+(const float &s, const mat &m) {return static_cast<double>(s) + m;}
inline mat operator+(const short &s, const mat &m) {return static_cast<double>(s) + m;}
inline mat operator+(const int &s, const mat &m) {return static_cast<double>(s) + m;}
inline mat operator+(const mat &m, const float &s) {return static_cast<double>(s) + m;}
inline mat operator+(const mat &m, const short &s) {return static_cast<double>(s) + m;}
inline mat operator+(const mat &m, const int &s) {return static_cast<double>(s) + m;}
inline mat operator-(const float &s, const mat &m) {return static_cast<double>(s) - m;}
inline mat operator-(const short &s, const mat &m) {return static_cast<double>(s) - m;}
inline mat operator-(const int &s, const mat &m) {return static_cast<double>(s) - m;}
inline mat operator-(const mat &m, const float &s) {return m -static_cast<double>(s);}
inline mat operator-(const mat &m, const short &s) {return m -static_cast<double>(s);}
inline mat operator-(const mat &m, const int &s) {return m -static_cast<double>(s);}
inline mat operator*(const float &s, const mat &m) {return static_cast<double>(s)*m;}
inline mat operator*(const short &s, const mat &m) {return static_cast<double>(s)*m;}
inline mat operator*(const int &s, const mat &m) {return static_cast<double>(s)*m;}
inline mat operator*(const mat &m, const float &s) {return static_cast<double>(s)*m;}
inline mat operator*(const mat &m, const short &s) {return static_cast<double>(s)*m;}
inline mat operator*(const mat &m, const int &s) {return static_cast<double>(s)*m;}
inline mat operator/(const mat &m, const float &s) {return m / static_cast<double>(s);}
inline mat operator/(const mat &m, const short &s) {return m / static_cast<double>(s);}
inline mat operator/(const mat &m, const int &s) {return m / static_cast<double>(s);}
//---------------------- between cmat and scalar --------------------
ITPP_EXPORT cmat operator+(const double &s, const cmat &m);
ITPP_EXPORT cmat operator-(const double &s, const cmat &m);
ITPP_EXPORT cmat operator*(const double &s, const cmat &m);
ITPP_EXPORT cmat operator*(const std::complex<double> &s, const mat &m);
inline cmat operator*(const mat &m, const std::complex<double> &s) {return s*m;}
ITPP_EXPORT cmat operator/(const cmat &m, const double &s);
//---------------------- between vec and vectors --------------------
ITPP_EXPORT vec operator+(const bvec &a, const vec &b);
ITPP_EXPORT vec operator+(const svec &a, const vec &b);
ITPP_EXPORT vec operator+(const ivec &a, const vec &b);
inline vec operator+(const vec &a, const bvec &b) {return b + a;}
inline vec operator+(const vec &a, const svec &b) {return b + a;}
inline vec operator+(const vec &a, const ivec &b) {return b + a;}
inline vec operator-(const bvec &a, const vec &b) {return a + (-b);}
inline vec operator-(const svec &a, const vec &b) {return a + (-b);}
inline vec operator-(const ivec &a, const vec &b) {return a + (-b);}
inline vec operator-(const vec &a, const bvec &b) {return a + (-b);}
inline vec operator-(const vec &a, const svec &b) {return a + (-b);}
inline vec operator-(const vec &a, const ivec &b) {return a + (-b);}
ITPP_EXPORT double operator*(const bvec &a, const vec &b);
ITPP_EXPORT double operator*(const svec &a, const vec &b);
ITPP_EXPORT double operator*(const ivec &a, const vec &b);
inline double operator*(const vec &a, const bvec &b) {return b*a;}
inline double operator*(const vec &a, const svec &b) {return b*a;}
inline double operator*(const vec &a, const ivec &b) {return b*a;}
//---------------------- between cvec and vectors --------------------
ITPP_EXPORT cvec operator+(const bvec &a, const cvec &b);
ITPP_EXPORT cvec operator+(const svec &a, const cvec &b);
ITPP_EXPORT cvec operator+(const ivec &a, const cvec &b);
inline cvec operator+(const cvec &a, const bvec &b) {return b + a;}
inline cvec operator+(const cvec &a, const svec &b) {return b + a;}
inline cvec operator+(const cvec &a, const ivec &b) {return b + a;}
inline cvec operator-(const bvec &a, const cvec &b) {return a + (-b);}
inline cvec operator-(const svec &a, const cvec &b) {return a + (-b);}
inline cvec operator-(const ivec &a, const cvec &b) {return a + (-b);}
inline cvec operator-(const cvec &a, const bvec &b) {return a + (-b);}
inline cvec operator-(const cvec &a, const svec &b) {return a + (-b);}
inline cvec operator-(const cvec &a, const ivec &b) {return a + (-b);}
ITPP_EXPORT std::complex<double> operator*(const bvec &a, const cvec &b);
ITPP_EXPORT std::complex<double> operator*(const svec &a, const cvec &b);
ITPP_EXPORT std::complex<double> operator*(const ivec &a, const cvec &b);
inline std::complex<double> operator*(const cvec &a, const bvec &b) {return b*a;}
inline std::complex<double> operator*(const cvec &a, const svec &b) {return b*a;}
inline std::complex<double> operator*(const cvec &a, const ivec &b) {return b*a;}
//---------------------- between mat and matricies --------------------
ITPP_EXPORT mat operator+(const bmat &a, const mat &b);
ITPP_EXPORT mat operator+(const smat &a, const mat &b);
ITPP_EXPORT mat operator+(const imat &a, const mat &b);
inline mat operator+(const mat &a, const bmat &b) {return b + a;}
inline mat operator+(const mat &a, const smat &b) {return b + a;}
inline mat operator+(const mat &a, const imat &b) {return b + a;}
inline mat operator-(const bmat &a, const mat &b) {return a + (-b);}
inline mat operator-(const smat &a, const mat &b) {return a + (-b);}
inline mat operator-(const imat &a, const mat &b) {return a + (-b);}
inline mat operator-(const mat &a, const bmat &b) {return a + (-b);}
inline mat operator-(const mat &a, const smat &b) {return a + (-b);}
inline mat operator-(const mat &a, const imat &b) {return a + (-b);}
//---------------------- between cmat and matricies --------------------
ITPP_EXPORT cmat operator+(const bmat &a, const cmat &b);
ITPP_EXPORT cmat operator+(const smat &a, const cmat &b);
ITPP_EXPORT cmat operator+(const imat &a, const cmat &b);
ITPP_EXPORT cmat operator+(const mat &a, const cmat &b);
inline cmat operator+(const cmat &a, const bmat &b) {return b + a;}
inline cmat operator+(const cmat &a, const smat &b) {return b + a;}
inline cmat operator+(const cmat &a, const imat &b) {return b + a;}
inline cmat operator+(const cmat &a, const mat &b) {return b + a;}
inline cmat operator-(const bmat &a, const cmat &b) {return a + (-b);}
inline cmat operator-(const smat &a, const cmat &b) {return a + (-b);}
inline cmat operator-(const imat &a, const cmat &b) {return a + (-b);}
inline cmat operator-(const mat &a, const cmat &b) {return a + (-b);}
inline cmat operator-(const cmat &a, const bmat &b) {return a + (-b);}
inline cmat operator-(const cmat &a, const smat &b) {return a + (-b);}
inline cmat operator-(const cmat &a, const imat &b) {return a + (-b);}
inline cmat operator-(const cmat &a, const mat &b) {return a + (-b);}
inline cmat operator*(const mat &a, const cmat &b) {return to_cmat(a)*b;}
inline cmat operator*(const bmat &a, const cmat &b) {return to_cmat(a)*b;}
inline cmat operator*(const smat &a, const cmat &b) {return to_cmat(a)*b;}
inline cmat operator*(const imat &a, const cmat &b) {return to_cmat(a)*b;}
inline cmat operator*(const cmat &a, const mat &b) {return a*to_cmat(b);}
inline cmat operator*(const cmat &a, const bmat &b) {return a*to_cmat(b);}
inline cmat operator*(const cmat &a, const smat &b) {return a*to_cmat(b);}
inline cmat operator*(const cmat &a, const imat &b) {return a*to_cmat(b);}
} // namespace itpp
#endif // #ifndef OPERATORS_H
itpp::Array
General array class.
Definition array.h:105
itpp::Mat
Matrix Class (Templated)
Definition mat.h:202
itpp::Mat::operator+
mat operator+(const mat &a, const smat &b)
Addition operator for mat and smat.
Definition operators.h:906
itpp::Mat::operator-
mat operator-(const mat &a, const bmat &b)
Subtraction operator for mat and bmat.
Definition operators.h:936
itpp::Mat::operator+
mat operator+(const mat &m, const int &s)
Addition operator for mat and int.
Definition operators.h:526
itpp::Mat::operator-
mat operator-(const mat &a, const smat &b)
Subtraction operator for mat and smat.
Definition operators.h:942
itpp::Mat::operator*
cmat operator*(const bmat &a, const cmat &b)
Multiplication operator for bmat and cmat.
Definition operators.h:1058
itpp::Mat::operator+
cmat operator+(const cmat &a, const imat &b)
Addition operator for cmat and imat.
Definition operators.h:992
itpp::Mat::operator*
cmat operator*(const cmat &a, const mat &b)
Multiplication operator for cmat and mat.
Definition operators.h:1076
itpp::Mat::operator*
cmat operator*(const mat &m, const std::complex< double > &s)
Multiplication operator for mat and complex<double>
Definition operators.h:648
itpp::Mat::operator*
cmat operator*(const cmat &a, const smat &b)
Multiplication operator for cmat and smat.
Definition operators.h:1088
itpp::Mat::operator+
mat operator+(const short &s, const mat &m)
Addition operator for short and mat.
Definition operators.h:502
itpp::Mat::operator*
mat operator*(const mat &m, const float &s)
Multiplication operator for mat and float.
Definition operators.h:586
itpp::Mat::operator*
mat operator*(const int &s, const mat &m)
Multiplication operator for int and mat.
Definition operators.h:580
itpp::Mat::operator+
cmat operator+(const cmat &a, const bmat &b)
Addition operator for cmat and bmat.
Definition operators.h:980
itpp::Mat::operator-
mat operator-(const mat &m, const int &s)
Subtraction operator for mat and int.
Definition operators.h:562
itpp::Mat::operator-
cmat operator-(const cmat &a, const imat &b)
Subtraction operator for cmat and imat.
Definition operators.h:1040
itpp::Mat::operator-
mat operator-(const imat &a, const mat &b)
Subtraction operator for imat and mat.
Definition operators.h:930
itpp::Mat::operator+
mat operator+(const float &s, const mat &m)
Addition operator for float and mat.
Definition operators.h:496
itpp::Mat::operator-
mat operator-(const mat &m, const float &s)
Subtraction operator for mat and float.
Definition operators.h:550
itpp::Mat::operator+
mat operator+(const mat &a, const bmat &b)
Addition operator for mat and bmat.
Definition operators.h:900
itpp::Mat::operator*
mat operator*(const float &s, const mat &m)
Multiplication operator for float and mat.
Definition operators.h:568
itpp::Mat::operator-
cmat operator-(const mat &a, const cmat &b)
Subtraction operator for mat and cmat.
Definition operators.h:1022
itpp::Mat::operator+
mat operator+(const int &s, const mat &m)
Addition operator for int and mat.
Definition operators.h:508
itpp::Mat::operator*
cmat operator*(const mat &a, const cmat &b)
Multiplication operator for mat and cmat.
Definition operators.h:1052
itpp::Mat::operator*
cmat operator*(const cmat &a, const bmat &b)
Multiplication operator for cmat and bmat.
Definition operators.h:1082
itpp::Mat::operator-
cmat operator-(const cmat &a, const bmat &b)
Subtraction operator for cmat and bmat.
Definition operators.h:1028
itpp::Mat::operator*
cmat operator*(const imat &a, const cmat &b)
Multiplication operator for imat and cmat.
Definition operators.h:1070
itpp::Mat::operator-
cmat operator-(const smat &a, const cmat &b)
Subtraction operator for smat and cmat.
Definition operators.h:1010
itpp::Mat::operator/
mat operator/(const mat &m, const short &s)
Division operator for mat and short.
Definition operators.h:610
itpp::Mat::operator+
cmat operator+(const cmat &a, const mat &b)
Addition operator for cmat and mat.
Definition operators.h:998
itpp::Mat::operator*
cmat operator*(const cmat &a, const imat &b)
Multiplication operator for cmat and imat.
Definition operators.h:1094
itpp::Mat::operator-
mat operator-(const mat &m, const short &s)
Subtraction operator for mat and short.
Definition operators.h:556
itpp::Mat::operator-
mat operator-(const int &s, const mat &m)
Subtraction operator for int and mat.
Definition operators.h:544
itpp::Mat::operator-
cmat operator-(const bmat &a, const cmat &b)
Subtraction operator for bmat and cmat.
Definition operators.h:1004
itpp::Mat::operator+
mat operator+(const mat &m, const short &s)
Addition operator for mat and short.
Definition operators.h:520
itpp::Mat::operator+
ITPP_EXPORT mat operator+(const bmat &a, const mat &b)
Addition operator for bmat and mat.
itpp::Mat::operator*
mat operator*(const mat &m, const int &s)
Multiplication operator for mat and int.
Definition operators.h:598
itpp::Mat::operator-
cmat operator-(const cmat &a, const smat &b)
Subtraction operator for cmat and smat.
Definition operators.h:1034
itpp::Mat::operator+
cmat operator+(const cmat &a, const smat &b)
Addition operator for cmat and smat.
Definition operators.h:986
itpp::Mat::operator-
mat operator-(const float &s, const mat &m)
Subtraction operator for float and mat.
Definition operators.h:532
itpp::Mat::operator-
cmat operator-(const cmat &a, const mat &b)
Subtraction operator for cmat and mat.
Definition operators.h:1046
itpp::Mat::operator-
mat operator-(const smat &a, const mat &b)
Subtraction operator for smat and mat.
Definition operators.h:924
itpp::Mat::operator+
mat operator+(const mat &a, const imat &b)
Addition operator for mat and imat.
Definition operators.h:912
itpp::Mat::operator*
mat operator*(const mat &m, const short &s)
Multiplication operator for mat and short.
Definition operators.h:592
itpp::Mat::operator-
cmat operator-(const imat &a, const cmat &b)
Subtraction operator for imat and cmat.
Definition operators.h:1016
itpp::Mat::operator*
cmat operator*(const smat &a, const cmat &b)
Multiplication operator for smat and cmat.
Definition operators.h:1064
itpp::Mat::operator/
mat operator/(const mat &m, const int &s)
Division operator for mat and int.
Definition operators.h:616
itpp::Mat::operator+
mat operator+(const mat &m, const float &s)
Addition operator for mat and float.
Definition operators.h:514
itpp::Mat::operator-
mat operator-(const short &s, const mat &m)
Subtraction operator for short and mat.
Definition operators.h:538
itpp::Mat::operator*
mat operator*(const short &s, const mat &m)
Multiplication operator for short and mat.
Definition operators.h:574
itpp::Mat::operator/
mat operator/(const mat &m, const float &s)
Division operator for mat and float.
Definition operators.h:604
itpp::Mat::operator-
mat operator-(const mat &a, const imat &b)
Subtraction operator for mat and imat.
Definition operators.h:948
itpp::Mat::operator+
ITPP_EXPORT cmat operator+(const bmat &a, const cmat &b)
Addition operator for bmat and cmat.
itpp::Mat::operator-
mat operator-(const bmat &a, const mat &b)
Subtraction operator for bmat and mat.
Definition operators.h:918
itpp::Vec< double >
itpp::Vec::operator-
vec operator-(const vec &v, const float &s)
Subtraction operator for vec and float.
Definition operators.h:135
itpp::Vec::operator+
cvec operator+(const cvec &v, const int &s)
Addition operator for cvec and int.
Definition operators.h:362
itpp::Vec::operator-
vec operator-(const short &s, const vec &v)
Subtraction operator for short and vec.
Definition operators.h:123
itpp::Vec::operator+
vec operator+(const short &s, const vec &v)
Addition operator for short and vec.
Definition operators.h:87
itpp::Vec::operator-
vec operator-(const bvec &a, const vec &b)
Subtraction operator for bvec and vec.
Definition operators.h:698
itpp::Vec::operator*
vec operator*(const vec &v, const int &s)
Multiplication operator for vec and int.
Definition operators.h:189
itpp::Vec::operator+
cvec operator+(const float &s, const cvec &v)
Addition operator for float and cvec.
Definition operators.h:326
itpp::Vec::operator+
vec operator+(const vec &v, const float &s)
Addition operator for vec and float.
Definition operators.h:99
itpp::Vec::operator+
vec operator+(const ivec &v, const double &s)
Addition operator for ivec and double.
Definition operators.h:228
itpp::Vec::operator-
cvec operator-(const float &s, const cvec &v)
Subtraction operator for float and cvec.
Definition operators.h:374
itpp::Vec::operator-
vec operator-(const vec &v, const int &s)
Subtraction operator for vec and int.
Definition operators.h:147
itpp::Vec::operator+
vec operator+(const vec &v, const short &s)
Addition operator for vec and short.
Definition operators.h:105
itpp::Vec::operator*
cvec operator*(const cvec &v, const double &s)
Multiplication operator for cvec and double.
Definition operators.h:446
itpp::Vec::operator-
vec operator-(const svec &a, const vec &b)
Subtraction operator for svec and vec.
Definition operators.h:704
itpp::Vec::operator+
cvec operator+(const cvec &a, const ivec &b)
Addition operator for cvec and ivec.
Definition operators.h:802
itpp::Vec::operator*
cvec operator*(const cvec &v, const short &s)
Multiplication operator for cvec and short.
Definition operators.h:452
itpp::Vec::operator/
cvec operator/(const cvec &v, const int &s)
Division operator for cvec and int.
Definition operators.h:488
itpp::Vec::operator*
cvec operator*(const short &s, const cvec &v)
Multiplication operator for short and cvec.
Definition operators.h:428
itpp::Vec::operator-
cvec operator-(const cvec &v, const short &s)
Subtraction operator for cvec and short.
Definition operators.h:404
itpp::Vec::operator*
double operator*(const vec &a, const ivec &b)
Multiplication operator for vec and ivec.
Definition operators.h:764
itpp::Vec::operator-
cvec operator-(const ivec &v, const std::complex< double > &s)
Subtraction operator for ivec and complex<double>
Definition operators.h:288
itpp::Vec::operator/
cvec operator/(const cvec &v, const short &s)
Division operator for cvec and short.
Definition operators.h:482
itpp::Vec::operator*
vec operator*(const vec &v, const short &s)
Multiplication operator for vec and short.
Definition operators.h:183
itpp::Vec::operator-
cvec operator-(const svec &a, const cvec &b)
Subtraction operator for svec and cvec.
Definition operators.h:814
itpp::Vec::operator-
vec operator-(const vec &a, const svec &b)
Subtraction operator for vec and svec.
Definition operators.h:722
itpp::Vec::operator/
cvec operator/(const cvec &v, const float &s)
Division operator for cvec and float.
Definition operators.h:476
itpp::Vec::operator*
std::complex< double > operator*(const cvec &a, const bvec &b)
Multiplication operator for cvec and bvec.
Definition operators.h:862
itpp::Vec::operator*
vec operator*(const ivec &v, const double &s)
Multiplication operator for ivec and double.
Definition operators.h:252
itpp::Vec::operator*
std::complex< double > operator*(const cvec &a, const ivec &b)
Multiplication operator for cvec and ivec.
Definition operators.h:874
itpp::Vec::operator*
cvec operator*(const cvec &v, const float &s)
Multiplication operator for cvec and float.
Definition operators.h:440
itpp::Vec::operator-
vec operator-(const int &s, const vec &v)
Subtraction operator for int and vec.
Definition operators.h:129
itpp::Vec::operator*
vec operator*(const vec &v, const float &s)
Multiplication operator for vec and float.
Definition operators.h:177
itpp::Vec::operator*
std::complex< double > operator*(const cvec &a, const svec &b)
Multiplication operator for cvec and svec.
Definition operators.h:868
itpp::Vec::operator-
cvec operator-(const cvec &a, const svec &b)
Subtraction operator for cvec and svec.
Definition operators.h:832
itpp::Vec::operator-
cvec operator-(const cvec &a, const ivec &b)
Subtraction operator for cvec and ivec.
Definition operators.h:838
itpp::Vec::operator-
vec operator-(const float &s, const vec &v)
Subtraction operator for float and vec.
Definition operators.h:117
itpp::Vec::operator+
cvec operator+(const cvec &v, const short &s)
Addition operator for cvec and short.
Definition operators.h:356
itpp::Vec::operator+
cvec operator+(const cvec &v, const float &s)
Addition operator for cvec and float.
Definition operators.h:344
itpp::Vec::operator-
vec operator-(const vec &v, const short &s)
Subtraction operator for vec and short.
Definition operators.h:141
itpp::Vec::operator*
vec operator*(const short &s, const vec &v)
Multiplication operator for short and vec.
Definition operators.h:159
itpp::Vec::operator+
cvec operator+(const ivec &v, const std::complex< double > &s)
Addition operator for ivec and complex<double>
Definition operators.h:276
itpp::Vec::operator-
vec operator-(const ivec &a, const vec &b)
Subtraction operator for ivec and vec.
Definition operators.h:710
itpp::Vec::operator+
vec operator+(const vec &a, const ivec &b)
Addition operator for vec and ivec.
Definition operators.h:692
itpp::Vec::operator*
double operator*(const vec &a, const bvec &b)
Multiplication operator for vec and bvec.
Definition operators.h:752
itpp::Vec::operator-
vec operator-(const vec &a, const bvec &b)
Subtraction operator for vec and bvec.
Definition operators.h:716
itpp::Vec::operator-
cvec operator-(const int &s, const cvec &v)
Subtraction operator for int and cvec.
Definition operators.h:386
itpp::Vec::operator/
vec operator/(const vec &v, const int &s)
Division operator for vec and int.
Definition operators.h:213
itpp::Vec::operator-
cvec operator-(const cvec &v, const int &s)
Subtraction operator for cvec and int.
Definition operators.h:410
itpp::Vec::operator-
cvec operator-(const cvec &v, const double &s)
Subtraction operator for cvec and double.
Definition operators.h:398
itpp::Vec::operator-
cvec operator-(const bvec &a, const cvec &b)
Subtraction operator for bvec and cvec.
Definition operators.h:808
itpp::Vec::operator/
vec operator/(const vec &v, const short &s)
Division operator for vec and short.
Definition operators.h:207
itpp::Vec::operator+
vec operator+(const vec &a, const svec &b)
Addition operator for vec and svec.
Definition operators.h:686
itpp::Vec::operator*
vec operator*(const float &s, const vec &v)
Multiplication operator for float and vec.
Definition operators.h:153
itpp::Vec::operator-
cvec operator-(const cvec &a, const bvec &b)
Subtraction operator for cvec and bvec.
Definition operators.h:826
itpp::Vec::operator*
vec operator*(const int &s, const vec &v)
Multiplication operator for int and vec.
Definition operators.h:165
itpp::Vec::operator+
cvec operator+(const short &s, const cvec &v)
Addition operator for short and cvec.
Definition operators.h:332
itpp::Vec::operator+
cvec operator+(const cvec &v, const double &s)
Addition operator for cvec and double.
Definition operators.h:350
itpp::Vec::operator*
cvec operator*(const cvec &v, const int &s)
Multiplication operator for cvec and int.
Definition operators.h:458
itpp::Vec::operator-
cvec operator-(const cvec &v, const float &s)
Subtraction operator for cvec and float.
Definition operators.h:392
itpp::Vec::operator/
vec operator/(const vec &v, const float &s)
Division operator for vec and float.
Definition operators.h:201
itpp::Vec::operator+
cvec operator+(const cvec &a, const bvec &b)
Addition operator for cvec and bvec.
Definition operators.h:790
itpp::Vec::operator+
vec operator+(const float &s, const vec &v)
Addition operator for float and vec.
Definition operators.h:81
itpp::Vec::operator+
vec operator+(const vec &a, const bvec &b)
Addition operator for vec and bvec.
Definition operators.h:680
itpp::Vec::operator+
cvec operator+(const int &s, const cvec &v)
Addition operator for int and cvec.
Definition operators.h:338
itpp::Vec::operator+
vec operator+(const int &s, const vec &v)
Addition operator for int and vec.
Definition operators.h:93
itpp::Vec::operator*
cvec operator*(const ivec &v, const std::complex< double > &s)
Multiplication operator for ivec and complex<double>
Definition operators.h:300
itpp::Vec::operator+
cvec operator+(const cvec &a, const svec &b)
Addition operator for cvec and svec.
Definition operators.h:796
itpp::Vec::operator-
cvec operator-(const ivec &a, const cvec &b)
Subtraction operator for ivec and cvec.
Definition operators.h:820
itpp::Vec::operator*
double operator*(const vec &a, const svec &b)
Multiplication operator for vec and svec.
Definition operators.h:758
itpp::Vec::operator-
cvec operator-(const short &s, const cvec &v)
Subtraction operator for short and cvec.
Definition operators.h:380
itpp::Vec::operator*
cvec operator*(const int &s, const cvec &v)
Multiplication operator for int and cvec.
Definition operators.h:434
itpp::Vec::operator+
vec operator+(const vec &v, const int &s)
Addition operator for vec and int.
Definition operators.h:111
itpp::Vec::operator*
cvec operator*(const float &s, const cvec &v)
Multiplication operator for float and cvec.
Definition operators.h:422
itpp::Vec::operator-
vec operator-(const vec &a, const ivec &b)
Subtraction operator for vec and ivec.
Definition operators.h:728
itpp::Vec::operator-
vec operator-(const ivec &v, const double &s)
Subtraction operator for ivec and double.
Definition operators.h:240
converters.h
Definitions of converters between different vector and matrix types.
mat.h
Matrix Class Definitions.
bmat
Mat< bin > bmat
bin matrix
Definition mat.h:508
itpp
itpp namespace
Definition itmex.h:37
itpp::to_cmat
cmat to_cmat(const Mat< T > &m)
Converts a Mat<T> to cmat.
Definition converters.h:232
itpp::operator-
Mat< Num_T > operator-(const Mat< Num_T > &m1, const Mat< Num_T > &m2)
Subtraction of two matrices.
Definition mat.h:1382
itpp::operator*
GF2mat operator*(const GF2mat &X, const GF2mat &Y)
GF(2) matrix multiplication.
Definition gf2mat.cpp:847
itpp::operator/
Mat< Num_T > operator/(const Mat< Num_T > &m, Num_T t)
Element-wise division by a scalar.
Definition mat.h:1670
itpp::operator+
GF2mat operator+(const GF2mat &X, const GF2mat &Y)
GF(2) matrix addition.
Definition gf2mat.cpp:948
vec.h
Templated Vector Class Definitions.

Generated on Mon Jun 10 2024 11:49:18 for IT++ by Doxygen 1.9.8