PARTONS/NumA++  
Numerical Analysis C++ routines
Public Types | Public Member Functions | Private Member Functions | Private Attributes | Friends | List of all members
NumA::MatrixComplexD Class Reference

Matrix of complex numbers of undefined size. More...

Inheritance diagram for NumA::MatrixComplexD:
NumA::MatrixComplex2D NumA::MatrixComplex3D NumA::MatrixComplex4D

Public Types

enum  Dim { X = 1 , Y = 2 }
 Dimension index. More...
 

Public Member Functions

 MatrixComplexD ()
 Default constructor. More...
 
 MatrixComplexD (const unsigned int n, const unsigned int m)
 Assignemnt constructor. More...
 
 MatrixComplexD (const MatrixComplexD &v)
 Copy constructor. More...
 
virtual ~MatrixComplexD ()
 Destructor. More...
 
MatrixComplexD Conjunct () const
 Get conjunction of matrix. More...
 
MatrixComplexD Mult (const MatrixComplexD &v) const
 Multiply this with other matrix. More...
 
void Clear ()
 Clear vector (set std::complex<double>(0., 0.) to all elements). More...
 
void MakeUnit ()
 Make unit (set std::complex<double>(1., 0.) to diagonal elements). More...
 
void operator= (const MatrixComplexD &rhs)
 Operator =. More...
 
MatrixComplexD operator+ (const MatrixComplexD &rhs)
 Operator +. More...
 
MatrixComplexD operator- (const MatrixComplexD &rhs)
 Operator -. More...
 
MatrixComplexD operator* (const double &rhs)
 Operator * by real number (rhs). More...
 
MatrixComplexD operator* (const std::complex< double > &rhs)
 Operator * by complex number (rhs). More...
 
unsigned int GetNElements (const Dim v) const
 Get dim. More...
 
void SetElement (const unsigned int i, const unsigned int j, const std::complex< double > value)
 Set element. More...
 
std::complex< double > GetElement (const unsigned int i, const unsigned int j) const
 Get element. More...
 

Private Member Functions

void CompareNElements (const MatrixComplexD &v) const
 Compare number of elements of this and other vector. More...
 

Private Attributes

unsigned int m_n
 Size of x dim. More...
 
unsigned int m_m
 Size of y dim. More...
 
std::vector< std::vector< std::complex< double > > > m_elements
 Elements. More...
 

Friends

MatrixComplexD operator* (const double &lhs, MatrixComplexD &rhs)
 Operator * by real number (lhs). More...
 
MatrixComplexD operator* (const std::complex< double > &lhs, MatrixComplexD &rhs)
 Operator * by complex number (lhs). More...
 

Detailed Description

Matrix of complex numbers of undefined size.

This class represents a matrix of complex double precision numbers. The size of this matrix should be defined by the user.

Member Enumeration Documentation

◆ Dim

Dimension index.

Enumerator

Dim. x.

Dim. y.

Constructor & Destructor Documentation

◆ MatrixComplexD() [1/3]

NumA::MatrixComplexD::MatrixComplexD ( )

Default constructor.

◆ MatrixComplexD() [2/3]

NumA::MatrixComplexD::MatrixComplexD ( const unsigned int  n,
const unsigned int  m 
)

Assignemnt constructor.

Elements will be initialized with std::complex<double>(0., 0.).

Parameters
nSize of x dim. to be set.
mSize of y dim. to be set.

◆ MatrixComplexD() [3/3]

NumA::MatrixComplexD::MatrixComplexD ( const MatrixComplexD v)

Copy constructor.

Parameters
vObject to be copied.

◆ ~MatrixComplexD()

NumA::MatrixComplexD::~MatrixComplexD ( )
virtual

Destructor.

Member Function Documentation

◆ Clear()

void NumA::MatrixComplexD::Clear ( )

Clear vector (set std::complex<double>(0., 0.) to all elements).

◆ CompareNElements()

void NumA::MatrixComplexD::CompareNElements ( const MatrixComplexD v) const
private

Compare number of elements of this and other vector.

Parameters
vOther matrix.

◆ Conjunct()

MatrixComplexD NumA::MatrixComplexD::Conjunct ( ) const

Get conjunction of matrix.

Return: \(M^{*}\).

◆ GetElement()

std::complex< double > NumA::MatrixComplexD::GetElement ( const unsigned int  i,
const unsigned int  j 
) const

Get element.

Parameters
iIndex of x element to be retrieved.
jIndex of y element to be retrieved.

◆ GetNElements()

unsigned int NumA::MatrixComplexD::GetNElements ( const Dim  v) const

Get dim.

size for given dimension.

Parameters
vDimension.

◆ MakeUnit()

void NumA::MatrixComplexD::MakeUnit ( )

Make unit (set std::complex<double>(1., 0.) to diagonal elements).

◆ Mult()

MatrixComplexD NumA::MatrixComplexD::Mult ( const MatrixComplexD v) const

Multiply this with other matrix.

Return: \(M N\).

Parameters
vOther matrix,

◆ operator*() [1/2]

MatrixComplexD NumA::MatrixComplexD::operator* ( const double &  rhs)

Operator * by real number (rhs).

◆ operator*() [2/2]

MatrixComplexD NumA::MatrixComplexD::operator* ( const std::complex< double > &  rhs)

Operator * by complex number (rhs).

◆ operator+()

MatrixComplexD NumA::MatrixComplexD::operator+ ( const MatrixComplexD rhs)

Operator +.

◆ operator-()

MatrixComplexD NumA::MatrixComplexD::operator- ( const MatrixComplexD rhs)

Operator -.

◆ operator=()

void NumA::MatrixComplexD::operator= ( const MatrixComplexD rhs)

Operator =.

◆ SetElement()

void NumA::MatrixComplexD::SetElement ( const unsigned int  i,
const unsigned int  j,
const std::complex< double >  value 
)

Set element.

Parameters
iIndex of x element to be set.
jIndex of y element to be set.
valueValue to be set.

Friends And Related Function Documentation

◆ operator* [1/2]

MatrixComplexD operator* ( const double &  lhs,
MatrixComplexD rhs 
)
friend

Operator * by real number (lhs).

◆ operator* [2/2]

MatrixComplexD operator* ( const std::complex< double > &  lhs,
MatrixComplexD rhs 
)
friend

Operator * by complex number (lhs).

Member Data Documentation

◆ m_elements

std::vector<std::vector<std::complex<double> > > NumA::MatrixComplexD::m_elements
private

Elements.

◆ m_m

unsigned int NumA::MatrixComplexD::m_m
private

Size of y dim.

◆ m_n

unsigned int NumA::MatrixComplexD::m_n
private

Size of x dim.


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