ASL 0.1.7
Advanced Simulation Library
Loading...
Searching...
No Matches
acl::MatrixOfElements Class Reference

The class represents a matrix elements of ::Element. More...

#include <aclMatrixOfElements.h>

Public Member Functions

 MatrixOfElements (unsigned int nR=0, unsigned int nC=0)
void setElement (unsigned int r, unsigned int c, Element a)
void setRow (unsigned int r, const VectorOfElements &a)
void setColumn (unsigned int c, const VectorOfElements &a)
const Element getElement (unsigned int r, unsigned int c) const
const VectorOfElements getVE (unsigned int r, unsigned int c) const
const unsigned int getNColumns () const
const unsigned int getNRows () const
VectorOfElementsgetInternalVector ()
const VectorOfElementsgetInternalVector () const
void resize (unsigned int nr, unsigned int nc)
MatrixOfElements operator= (const MatrixOfElements &m)
 MatrixOfElements (unsigned int nR=0, unsigned int nC=0)
void setElement (unsigned int r, unsigned int c, Element a)
void setRow (unsigned int r, const VectorOfElements &a)
void setColumn (unsigned int c, const VectorOfElements &a)
const Element getElement (unsigned int r, unsigned int c) const
const VectorOfElements getVE (unsigned int r, unsigned int c) const
const unsigned int getNColumns () const
const unsigned int getNRows () const
VectorOfElementsgetInternalVector ()
const VectorOfElementsgetInternalVector () const
void resize (unsigned int nr, unsigned int nc)
MatrixOfElements operator= (const MatrixOfElements &m)

(Note that these are not member symbols.)

void copy (const MatrixOfElements &source, MatrixOfElements &destination)
 function copies the MatrixOfElements class.
MatrixOfElements operator+ (const MatrixOfElements &a, const MatrixOfElements &b)
 summ of two matrices
MatrixOfElements operator- (const MatrixOfElements &a, const MatrixOfElements &b)
 difference of two matrices
MatrixOfElements operator* (const MatrixOfElements &a, const MatrixOfElements &b)
 product of two matrices
VectorOfElements operator* (const VectorOfElements &a, const MatrixOfElements &b)
 product of vector and matrix
VectorOfElements operator* (const MatrixOfElements &a, const VectorOfElements &b)
 product of vector and matrix
MatrixOfElements operator/ (const MatrixOfElements &a, const VectorOfElements &b)
 division of a matrix on a VectorOfElements with 1 element
MatrixOfElements transpose (MatrixOfElements &source)
 transposed matrix
MatrixOfElements elementProduct (const VectorOfElements &a, const VectorOfElements &b)
 element product of two vectors
VectorOfElements trace (const MatrixOfElements &a)
 Trace of a matrix \(Tr(A)\equiv A_{ii}\).
VectorOfElements trace (const MatrixOfElements &a, const MatrixOfElements &b)
 Trace of a matrix product \(Tr(A B)\equiv A_{ij}B_{ji}\).
MatrixOfElements generateME (const VectorOfElements &a)
 generates a matrix with a row
MatrixOfElements generateME (const VectorOfElements &a, VectorOfElements &b)
 generates a matrix with two rows
MatrixOfElements generateME (const VectorOfElements &a, const VectorOfElements &b, const VectorOfElements &c)
 generates a matrix with three rows
MatrixOfElements generateME (const VectorOfElements *a, unsigned int n)
 generates a matrix with n rows \( generateME(\{u_i\}_j) = A_{ji}\)
MatrixOfElements generateME (const vector< VectorOfElements > &a)
 generates a matrix with n rows \( generateME(\{u_i\}_j) = A_{ji}\)
VectorOfElements getDiagonal (const MatrixOfElements &a)
 returns VectorOfElements containing the diagonal elements
VectorOfElements getOffDiagonalUp (const MatrixOfElements &a)
 returns VectorOfElements containing the uper off diagonal elements
VectorOfElements det (const MatrixOfElements &m)
 computes determinant expression fo cases 2x2 and 3x3 only
MatrixOfElements replaceRow (const MatrixOfElements &a, const VectorOfElements &b, unsigned int r)
 generate matrix with content of the matrix a but with replaced row r by vector b
MatrixOfElements replaceColumn (const MatrixOfElements &a, const VectorOfElements &b, unsigned int c)
 generate matrix with content of the matrix a but with replaced column c by vector b
MatrixOfElements generateMatrixCofactors (const MatrixOfElements &a)
 returns the matrix of cofactors for cases 2x2 and 3x3
vector< ElementgcMatrixInversion (const MatrixOfElements &a, MatrixOfElements &inv)
 returns vector of elements for computing the inverse matrix for cases 2x2 and 3x3
void copy (const MatrixOfElements &source, MatrixOfElements &destination)
 function copies the MatrixOfElements class.
MatrixOfElements operator+ (const MatrixOfElements &a, const MatrixOfElements &b)
 summ of two matrices
MatrixOfElements operator- (const MatrixOfElements &a, const MatrixOfElements &b)
 difference of two matrices
MatrixOfElements operator* (const MatrixOfElements &a, const MatrixOfElements &b)
 product of two matrices
VectorOfElements operator* (const VectorOfElements &a, const MatrixOfElements &b)
 product of vector and matrix
VectorOfElements operator* (const MatrixOfElements &a, const VectorOfElements &b)
 product of vector and matrix
MatrixOfElements operator/ (const MatrixOfElements &a, const VectorOfElements &b)
 division of a matrix on a VectorOfElements with 1 element
MatrixOfElements transpose (MatrixOfElements &source)
 transposed matrix
MatrixOfElements elementProduct (const VectorOfElements &a, const VectorOfElements &b)
 element product of two vectors
VectorOfElements trace (const MatrixOfElements &a)
 Trace of a matrix \(Tr(A)\equiv A_{ii}\).
VectorOfElements trace (const MatrixOfElements &a, const MatrixOfElements &b)
 Trace of a matrix product \(Tr(A B)\equiv A_{ij}B_{ji}\).
MatrixOfElements generateME (const VectorOfElements &a)
 generates a matrix with a row
MatrixOfElements generateME (const VectorOfElements &a, VectorOfElements &b)
 generates a matrix with two rows
MatrixOfElements generateME (const VectorOfElements &a, const VectorOfElements &b, const VectorOfElements &c)
 generates a matrix with three rows
MatrixOfElements generateME (const VectorOfElements *a, unsigned int n)
 generates a matrix with n rows \( generateME(\{u_i\}_j) = A_{ji}\)
MatrixOfElements generateME (const vector< VectorOfElements > &a)
 generates a matrix with n rows \( generateME(\{u_i\}_j) = A_{ji}\)
VectorOfElements getDiagonal (const MatrixOfElements &a)
 returns VectorOfElements containing the diagonal elements
VectorOfElements getOffDiagonalUp (const MatrixOfElements &a)
 returns VectorOfElements containing the uper off diagonal elements
VectorOfElements det (const MatrixOfElements &m)
 computes determinant expression fo cases 2x2 and 3x3 only
MatrixOfElements replaceRow (const MatrixOfElements &a, const VectorOfElements &b, unsigned int r)
 generate matrix with content of the matrix a but with replaced row r by vector b
MatrixOfElements replaceColumn (const MatrixOfElements &a, const VectorOfElements &b, unsigned int c)
 generate matrix with content of the matrix a but with replaced column c by vector b
MatrixOfElements generateMatrixCofactors (const MatrixOfElements &a)
 returns the matrix of cofactors for cases 2x2 and 3x3
vector< ElementgcMatrixInversion (const MatrixOfElements &a, MatrixOfElements &inv)
 returns vector of elements for computing the inverse matrix for cases 2x2 and 3x3

Detailed Description

The class represents a matrix elements of ::Element.

Definition at line 35 of file aclMatrixOfElements.h.

Constructor & Destructor Documentation

◆ MatrixOfElements() [1/2]

acl::MatrixOfElements::MatrixOfElements ( unsigned int nR = 0,
unsigned int nC = 0 )
explicit

◆ MatrixOfElements() [2/2]

acl::MatrixOfElements::MatrixOfElements ( unsigned int nR = 0,
unsigned int nC = 0 )
explicit

Member Function Documentation

◆ getElement() [1/2]

const Element acl::MatrixOfElements::getElement ( unsigned int r,
unsigned int c ) const

◆ getElement() [2/2]

const Element acl::MatrixOfElements::getElement ( unsigned int r,
unsigned int c ) const

◆ getInternalVector() [1/4]

VectorOfElements & acl::MatrixOfElements::getInternalVector ( )

◆ getInternalVector() [2/4]

VectorOfElements & acl::MatrixOfElements::getInternalVector ( )

◆ getInternalVector() [3/4]

const VectorOfElements & acl::MatrixOfElements::getInternalVector ( ) const

◆ getInternalVector() [4/4]

const VectorOfElements & acl::MatrixOfElements::getInternalVector ( ) const

◆ getNColumns() [1/2]

const unsigned int acl::MatrixOfElements::getNColumns ( ) const

◆ getNColumns() [2/2]

const unsigned int acl::MatrixOfElements::getNColumns ( ) const

◆ getNRows() [1/2]

const unsigned int acl::MatrixOfElements::getNRows ( ) const

◆ getNRows() [2/2]

const unsigned int acl::MatrixOfElements::getNRows ( ) const

◆ getVE() [1/2]

const VectorOfElements acl::MatrixOfElements::getVE ( unsigned int r,
unsigned int c ) const

◆ getVE() [2/2]

const VectorOfElements acl::MatrixOfElements::getVE ( unsigned int r,
unsigned int c ) const

◆ operator=() [1/2]

MatrixOfElements acl::MatrixOfElements::operator= ( const MatrixOfElements & m)

◆ operator=() [2/2]

MatrixOfElements acl::MatrixOfElements::operator= ( const MatrixOfElements & m)

◆ resize() [1/2]

void acl::MatrixOfElements::resize ( unsigned int nr,
unsigned int nc )
inline

Definition at line 213 of file aclMatrixOfElements.h.

◆ resize() [2/2]

void acl::MatrixOfElements::resize ( unsigned int nr,
unsigned int nc )
inline

◆ setColumn() [1/2]

void acl::MatrixOfElements::setColumn ( unsigned int c,
const VectorOfElements & a )

◆ setColumn() [2/2]

void acl::MatrixOfElements::setColumn ( unsigned int c,
const VectorOfElements & a )

◆ setElement() [1/2]

void acl::MatrixOfElements::setElement ( unsigned int r,
unsigned int c,
Element a )

◆ setElement() [2/2]

void acl::MatrixOfElements::setElement ( unsigned int r,
unsigned int c,
Element a )

◆ setRow() [1/2]

void acl::MatrixOfElements::setRow ( unsigned int r,
const VectorOfElements & a )

◆ setRow() [2/2]

void acl::MatrixOfElements::setRow ( unsigned int r,
const VectorOfElements & a )

◆ copy() [1/2]

void copy ( const MatrixOfElements & source,
MatrixOfElements & destination )
related

function copies the MatrixOfElements class.

◆ copy() [2/2]

void copy ( const MatrixOfElements & source,
MatrixOfElements & destination )
related

function copies the MatrixOfElements class.

◆ det() [1/2]

VectorOfElements det ( const MatrixOfElements & m)
related

computes determinant expression fo cases 2x2 and 3x3 only

◆ det() [2/2]

VectorOfElements det ( const MatrixOfElements & m)
related

computes determinant expression fo cases 2x2 and 3x3 only

◆ elementProduct() [1/2]

MatrixOfElements elementProduct ( const VectorOfElements & a,
const VectorOfElements & b )
related

element product of two vectors

\( elementProduct\left( \left[\begin{array}{c} a_1\\ \vdots \\ a_n \end{array}\right], \left[\begin{array}{c} b_1\\ \vdots \\ b_n \end{array}\right]\right) = \left[\begin{array}{ccc} a_1b_1 & \cdots & a_1b_n\\ \vdots & \ddots & \vdots\\ a_nb_1 & \cdots & a_nb_n\\ \end{array}\right] \), \(A_{ij} = a_i b_j \)

◆ elementProduct() [2/2]

MatrixOfElements elementProduct ( const VectorOfElements & a,
const VectorOfElements & b )
related

element product of two vectors

\( elementProduct\left( \left[\begin{array}{c} a_1\\ \vdots \\ a_n \end{array}\right], \left[\begin{array}{c} b_1\\ \vdots \\ b_n \end{array}\right]\right) = \left[\begin{array}{ccc} a_1b_1 & \cdots & a_1b_n\\ \vdots & \ddots & \vdots\\ a_nb_1 & \cdots & a_nb_n\\ \end{array}\right] \), \(A_{ij} = a_i b_j \)

◆ gcMatrixInversion() [1/2]

vector< Element > gcMatrixInversion ( const MatrixOfElements & a,
MatrixOfElements & inv )
related

returns vector of elements for computing the inverse matrix for cases 2x2 and 3x3

◆ gcMatrixInversion() [2/2]

vector< Element > gcMatrixInversion ( const MatrixOfElements & a,
MatrixOfElements & inv )
related

returns vector of elements for computing the inverse matrix for cases 2x2 and 3x3

◆ generateMatrixCofactors() [1/2]

MatrixOfElements generateMatrixCofactors ( const MatrixOfElements & a)
related

returns the matrix of cofactors for cases 2x2 and 3x3

◆ generateMatrixCofactors() [2/2]

MatrixOfElements generateMatrixCofactors ( const MatrixOfElements & a)
related

returns the matrix of cofactors for cases 2x2 and 3x3

◆ generateME() [1/10]

MatrixOfElements generateME ( const vector< VectorOfElements > & a)
related

generates a matrix with n rows \( generateME(\{u_i\}_j) = A_{ji}\)

◆ generateME() [2/10]

MatrixOfElements generateME ( const vector< VectorOfElements > & a)
related

generates a matrix with n rows \( generateME(\{u_i\}_j) = A_{ji}\)

◆ generateME() [3/10]

MatrixOfElements generateME ( const VectorOfElements & a)
related

generates a matrix with a row

◆ generateME() [4/10]

MatrixOfElements generateME ( const VectorOfElements & a)
related

generates a matrix with a row

◆ generateME() [5/10]

MatrixOfElements generateME ( const VectorOfElements & a,
const VectorOfElements & b,
const VectorOfElements & c )
related

generates a matrix with three rows

◆ generateME() [6/10]

MatrixOfElements generateME ( const VectorOfElements & a,
const VectorOfElements & b,
const VectorOfElements & c )
related

generates a matrix with three rows

◆ generateME() [7/10]

MatrixOfElements generateME ( const VectorOfElements & a,
VectorOfElements & b )
related

generates a matrix with two rows

◆ generateME() [8/10]

MatrixOfElements generateME ( const VectorOfElements & a,
VectorOfElements & b )
related

generates a matrix with two rows

◆ generateME() [9/10]

MatrixOfElements generateME ( const VectorOfElements * a,
unsigned int n )
related

generates a matrix with n rows \( generateME(\{u_i\}_j) = A_{ji}\)

◆ generateME() [10/10]

MatrixOfElements generateME ( const VectorOfElements * a,
unsigned int n )
related

generates a matrix with n rows \( generateME(\{u_i\}_j) = A_{ji}\)

◆ getDiagonal() [1/2]

VectorOfElements getDiagonal ( const MatrixOfElements & a)
related

returns VectorOfElements containing the diagonal elements

the finction is valid only for square matrices

◆ getDiagonal() [2/2]

VectorOfElements getDiagonal ( const MatrixOfElements & a)
related

returns VectorOfElements containing the diagonal elements

the finction is valid only for square matrices

◆ getOffDiagonalUp() [1/2]

VectorOfElements getOffDiagonalUp ( const MatrixOfElements & a)
related

returns VectorOfElements containing the uper off diagonal elements

the finction is valid only for square matrices

◆ getOffDiagonalUp() [2/2]

VectorOfElements getOffDiagonalUp ( const MatrixOfElements & a)
related

returns VectorOfElements containing the uper off diagonal elements

the finction is valid only for square matrices

◆ operator*() [1/6]

MatrixOfElements operator* ( const MatrixOfElements & a,
const MatrixOfElements & b )
related

product of two matrices

◆ operator*() [2/6]

MatrixOfElements operator* ( const MatrixOfElements & a,
const MatrixOfElements & b )
related

product of two matrices

◆ operator*() [3/6]

VectorOfElements operator* ( const MatrixOfElements & a,
const VectorOfElements & b )
related

product of vector and matrix

◆ operator*() [4/6]

VectorOfElements operator* ( const MatrixOfElements & a,
const VectorOfElements & b )
related

product of vector and matrix

◆ operator*() [5/6]

VectorOfElements operator* ( const VectorOfElements & a,
const MatrixOfElements & b )
related

product of vector and matrix

◆ operator*() [6/6]

VectorOfElements operator* ( const VectorOfElements & a,
const MatrixOfElements & b )
related

product of vector and matrix

◆ operator+() [1/2]

MatrixOfElements operator+ ( const MatrixOfElements & a,
const MatrixOfElements & b )
related

summ of two matrices

◆ operator+() [2/2]

MatrixOfElements operator+ ( const MatrixOfElements & a,
const MatrixOfElements & b )
related

summ of two matrices

◆ operator-() [1/2]

MatrixOfElements operator- ( const MatrixOfElements & a,
const MatrixOfElements & b )
related

difference of two matrices

◆ operator-() [2/2]

MatrixOfElements operator- ( const MatrixOfElements & a,
const MatrixOfElements & b )
related

difference of two matrices

◆ operator/() [1/2]

MatrixOfElements operator/ ( const MatrixOfElements & a,
const VectorOfElements & b )
related

division of a matrix on a VectorOfElements with 1 element

◆ operator/() [2/2]

MatrixOfElements operator/ ( const MatrixOfElements & a,
const VectorOfElements & b )
related

division of a matrix on a VectorOfElements with 1 element

◆ replaceColumn() [1/2]

MatrixOfElements replaceColumn ( const MatrixOfElements & a,
const VectorOfElements & b,
unsigned int c )
related

generate matrix with content of the matrix a but with replaced column c by vector b

◆ replaceColumn() [2/2]

MatrixOfElements replaceColumn ( const MatrixOfElements & a,
const VectorOfElements & b,
unsigned int c )
related

generate matrix with content of the matrix a but with replaced column c by vector b

◆ replaceRow() [1/2]

MatrixOfElements replaceRow ( const MatrixOfElements & a,
const VectorOfElements & b,
unsigned int r )
related

generate matrix with content of the matrix a but with replaced row r by vector b

◆ replaceRow() [2/2]

MatrixOfElements replaceRow ( const MatrixOfElements & a,
const VectorOfElements & b,
unsigned int r )
related

generate matrix with content of the matrix a but with replaced row r by vector b

◆ trace() [1/4]

VectorOfElements trace ( const MatrixOfElements & a)
related

Trace of a matrix \(Tr(A)\equiv A_{ii}\).

◆ trace() [2/4]

VectorOfElements trace ( const MatrixOfElements & a)
related

Trace of a matrix \(Tr(A)\equiv A_{ii}\).

◆ trace() [3/4]

VectorOfElements trace ( const MatrixOfElements & a,
const MatrixOfElements & b )
related

Trace of a matrix product \(Tr(A B)\equiv A_{ij}B_{ji}\).

◆ trace() [4/4]

VectorOfElements trace ( const MatrixOfElements & a,
const MatrixOfElements & b )
related

Trace of a matrix product \(Tr(A B)\equiv A_{ij}B_{ji}\).

◆ transpose() [1/2]

MatrixOfElements transpose ( MatrixOfElements & source)
related

transposed matrix

◆ transpose() [2/2]

MatrixOfElements transpose ( MatrixOfElements & source)
related

transposed matrix


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