Zenautics::Matrix::Element Class Reference

#include <Matrix.h>


Detailed Description

This is a nested class that is an element of the matrix. i.e. Matrix M; M(i,j) is the element. It is used for operator(,) access by the Matrix.

Definition at line 3064 of file Matrix.h.


Public Member Functions

 Element (MTX &mtx)
 The only constructor binds the reference to the deep level matrix. The row and column members are set later.
virtual ~Element ()
 The destructor.
const double real ()
 Get the real part.
const double imag ()
 Get the imaginary part.
const Elementoperator= (double v)
 The operator overload for setting the matrix element from a double.
const Elementoperator= (std::complex< double > v)
 The operator overload for setting the matrix element from a std::complex.
const Elementoperator= (Element v)
 The operator overload for setting the matrix element from another the matrix element.
 operator const std::complex< double > () const
 This operator allows explict conversion to a std::complex.
void operator+= (const double scalar)
 Add a scalar inplace.
void operator+= (const std::complex< double > &v)
 Add a complex value inplace.
void operator+= (const Element &v)
 Add a Element inplace.
void operator-= (const double scalar)
 Subtract a scalar inplace.
void operator-= (const std::complex< double > &v)
 Subtract a complex value inplace.
void operator-= (const Element &v)
 Subtract a Element inplace.
void operator *= (const double scalar)
 Multiply a scalar inplace.
void operator *= (const std::complex< double > &v)
 Multiply a complex value inplace.
void operator *= (const Element &v)
 Multiply a Element inplace.
void operator/= (const double scalar)
 Divide a scalar inplace.
void operator/= (const std::complex< double > &v)
 Divide a complex value inplace.
void operator/= (const Element &v)
 Divide a Element inplace.

Friends

class Matrix
 The matrix class is a friend.
const std::complex< double > operator+ (const Element &m, double scalar)
 The operator overload for adding a double to an element.
const std::complex< double > operator+ (const Element &a, const Element &b)
 The operator overload for adding an element to an element.
const std::complex< double > operator+ (const Element &a, const std::complex< double > &b)
 The operator overload for adding an element to an complex.
const std::complex< double > operator+ (double scalar, const Element &m)
 The operator overload for adding an element and a double.
const std::complex< double > operator+ (const std::complex< double > &b, const Element &a)
 The operator overload for adding a complex and an element.
const std::complex< double > operator- (const Element &m, double scalar)
 The operator overload for subtracting a double from an element.
const std::complex< double > operator- (const Element &a, const Element &b)
 The operator overload for subtracting an element from an element.
const std::complex< double > operator- (const Element &a, const std::complex< double > &b)
 The operator overload for subtracting an complex from an element.
const std::complex< double > operator- (double scalar, const Element &m)
 The operator overload for subtracting an element from a double.
const std::complex< double > operator- (const std::complex< double > &b, const Element &a)
 The operator overload for subtracting an element from a complex.
const std::complex< double > operator * (const Element &m, double scalar)
 The operator overload for multiplying an element and a double.
const std::complex< double > operator * (const Element &a, const Element &b)
 The operator overload for multiplying an element and an element.
const std::complex< double > operator * (const Element &a, const std::complex< double > &b)
 The operator overload for multiplying an element and a complex.
const std::complex< double > operator * (double scalar, const Element &m)
 The operator overload for multiplying a double and an element.
const std::complex< double > operator * (const std::complex< double > &b, const Element &a)
 The operator overload for multiplying a complex and an element.
const std::complex< double > operator/ (const Element &m, double scalar)
 The operator overload for dividing an element by a double.
const std::complex< double > operator/ (const Element &a, const Element &b)
 The operator overload for dividing an element by an element.
const std::complex< double > operator/ (const Element &a, const std::complex< double > &b)
 The operator overload for dividing an element by an complex.
const std::complex< double > operator/ (double scalar, const Element &m)
 The operator overload for dividing a double by an element.
const std::complex< double > operator/ (const std::complex< double > &b, const Element &a)
 The operator overload for dividing a complex by an element.
const bool operator== (const Element &m, double scalar)
 The operator overload for testing equality between an element and a double.
const bool operator== (const Element &a, const Element &b)
 The operator overload for testing equality between an element and an element.
const bool operator== (const Element &a, const std::complex< double > &b)
 The operator overload for testing equality between an element and a complex.
const bool operator== (double scalar, const Element &m)
 The operator overload for testing equality between a double and an element.
const bool operator== (const std::complex< double > &b, const Element &a)
 The operator overload for testing equality between a complex and an element.

Constructor & Destructor Documentation

Zenautics::Matrix::Element::Element ( MTX mtx  ) 

The only constructor binds the reference to the deep level matrix. The row and column members are set later.

Definition at line 2412 of file Matrix.cpp.

Zenautics::Matrix::Element::~Element (  )  [virtual]

The destructor.

Definition at line 2419 of file Matrix.cpp.


Member Function Documentation

const double Zenautics::Matrix::Element::real (  ) 

Get the real part.

Definition at line 2422 of file Matrix.cpp.

const double Zenautics::Matrix::Element::imag (  ) 

Get the imaginary part.

Definition at line 2434 of file Matrix.cpp.

const Matrix::Element & Zenautics::Matrix::Element::operator= ( double  v  ) 

The operator overload for setting the matrix element from a double.

Definition at line 2446 of file Matrix.cpp.

const Matrix::Element & Zenautics::Matrix::Element::operator= ( std::complex< double >  v  ) 

The operator overload for setting the matrix element from a std::complex.

Definition at line 2460 of file Matrix.cpp.

const Matrix::Element & Zenautics::Matrix::Element::operator= ( Element  v  ) 

The operator overload for setting the matrix element from another the matrix element.

Definition at line 2485 of file Matrix.cpp.

Zenautics::Matrix::Element::operator const std::complex< double > (  )  const

This operator allows explict conversion to a std::complex.

Definition at line 2519 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator+= ( const double  scalar  ) 

Add a scalar inplace.

Definition at line 2534 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator+= ( const std::complex< double > &  v  ) 

Add a complex value inplace.

Definition at line 2546 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator+= ( const Element v  ) 

Add a Element inplace.

Definition at line 2571 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator-= ( const double  scalar  ) 

Subtract a scalar inplace.

Definition at line 2578 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator-= ( const std::complex< double > &  v  ) 

Subtract a complex value inplace.

Definition at line 2590 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator-= ( const Element v  ) 

Subtract a Element inplace.

Definition at line 2615 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator *= ( const double  scalar  ) 

Multiply a scalar inplace.

Definition at line 2622 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator *= ( const std::complex< double > &  v  ) 

Multiply a complex value inplace.

Definition at line 2635 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator *= ( const Element v  ) 

Multiply a Element inplace.

Definition at line 2663 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator/= ( const double  scalar  ) 

Divide a scalar inplace.

Definition at line 2670 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator/= ( const std::complex< double > &  v  ) 

Divide a complex value inplace.

Definition at line 2691 of file Matrix.cpp.

void Zenautics::Matrix::Element::operator/= ( const Element v  ) 

Divide a Element inplace.

Definition at line 2736 of file Matrix.cpp.


Friends And Related Function Documentation

friend class Matrix [friend]

The matrix class is a friend.

Definition at line 3076 of file Matrix.h.

const std::complex<double> operator+ ( const Element m,
double  scalar 
) [friend]

The operator overload for adding a double to an element.

Definition at line 2748 of file Matrix.cpp.

const std::complex<double> operator+ ( const Element a,
const Element b 
) [friend]

The operator overload for adding an element to an element.

Definition at line 2757 of file Matrix.cpp.

const std::complex<double> operator+ ( const Element a,
const std::complex< double > &  b 
) [friend]

The operator overload for adding an element to an complex.

Definition at line 2768 of file Matrix.cpp.

const std::complex<double> operator+ ( double  scalar,
const Element m 
) [friend]

The operator overload for adding an element and a double.

Definition at line 2777 of file Matrix.cpp.

const std::complex<double> operator+ ( const std::complex< double > &  b,
const Element a 
) [friend]

The operator overload for adding a complex and an element.

Definition at line 2784 of file Matrix.cpp.

const std::complex<double> operator- ( const Element m,
double  scalar 
) [friend]

The operator overload for subtracting a double from an element.

Definition at line 2791 of file Matrix.cpp.

const std::complex<double> operator- ( const Element a,
const Element b 
) [friend]

The operator overload for subtracting an element from an element.

Definition at line 2800 of file Matrix.cpp.

const std::complex<double> operator- ( const Element a,
const std::complex< double > &  b 
) [friend]

The operator overload for subtracting an complex from an element.

Definition at line 2811 of file Matrix.cpp.

const std::complex<double> operator- ( double  scalar,
const Element m 
) [friend]

The operator overload for subtracting an element from a double.

Definition at line 2820 of file Matrix.cpp.

const std::complex<double> operator- ( const std::complex< double > &  b,
const Element a 
) [friend]

The operator overload for subtracting an element from a complex.

Definition at line 2827 of file Matrix.cpp.

const std::complex<double> operator * ( const Element m,
double  scalar 
) [friend]

The operator overload for multiplying an element and a double.

Definition at line 2836 of file Matrix.cpp.

const std::complex<double> operator * ( const Element a,
const Element b 
) [friend]

The operator overload for multiplying an element and an element.

Definition at line 2845 of file Matrix.cpp.

const std::complex<double> operator * ( const Element a,
const std::complex< double > &  b 
) [friend]

The operator overload for multiplying an element and a complex.

Definition at line 2856 of file Matrix.cpp.

const std::complex<double> operator * ( double  scalar,
const Element m 
) [friend]

The operator overload for multiplying a double and an element.

Definition at line 2865 of file Matrix.cpp.

const std::complex<double> operator * ( const std::complex< double > &  b,
const Element a 
) [friend]

The operator overload for multiplying a complex and an element.

Definition at line 2871 of file Matrix.cpp.

const std::complex<double> operator/ ( const Element m,
double  scalar 
) [friend]

The operator overload for dividing an element by a double.

Definition at line 2878 of file Matrix.cpp.

const std::complex<double> operator/ ( const Element a,
const Element b 
) [friend]

The operator overload for dividing an element by an element.

Definition at line 2887 of file Matrix.cpp.

const std::complex<double> operator/ ( const Element a,
const std::complex< double > &  b 
) [friend]

The operator overload for dividing an element by an complex.

Definition at line 2898 of file Matrix.cpp.

const std::complex<double> operator/ ( double  scalar,
const Element m 
) [friend]

The operator overload for dividing a double by an element.

Definition at line 2907 of file Matrix.cpp.

const std::complex<double> operator/ ( const std::complex< double > &  b,
const Element a 
) [friend]

The operator overload for dividing a complex by an element.

Definition at line 2915 of file Matrix.cpp.

const bool operator== ( const Element m,
double  scalar 
) [friend]

The operator overload for testing equality between an element and a double.

Definition at line 2924 of file Matrix.cpp.

const bool operator== ( const Element a,
const Element b 
) [friend]

The operator overload for testing equality between an element and an element.

Definition at line 2945 of file Matrix.cpp.

const bool operator== ( const Element a,
const std::complex< double > &  b 
) [friend]

The operator overload for testing equality between an element and a complex.

Definition at line 2989 of file Matrix.cpp.

const bool operator== ( double  scalar,
const Element m 
) [friend]

The operator overload for testing equality between a double and an element.

Definition at line 3010 of file Matrix.cpp.

const bool operator== ( const std::complex< double > &  b,
const Element a 
) [friend]

The operator overload for testing equality between a complex and an element.

Definition at line 3016 of file Matrix.cpp.


The documentation for this class was generated from the following files: