MSpin-JCoupling
2.1
|
monodimensional array More...
#include <mathtools.h>
Public Member Functions | |
D2Array () | |
D2Array (size_t i, size_t j) | |
D2Array (size_t i, size_t j, const X &x) | |
D2Array (const D2Array &x) | |
D2Array & | operator= (const D2Array &x) |
void | operator+= (const D2Array &x) |
void | operator-= (const D2Array &x) |
void | operator*= (const X &x) |
void | operator/= (const X &x) |
void | Initialize (size_t i, size_t j) |
bool | Empty () const |
void | Initialize (size_t i, size_t j, const X &x) |
~D2Array () | |
void | Clear () |
X & | operator() (size_t i, size_t j) |
const X & | operator() (size_t i, size_t j) const |
operator X* () | |
operator const X * () const | |
size_t | NRows () const |
size_t | NColumns () const |
void | SwapRows (size_t i, size_t j) |
void | SwapColumns (size_t i, size_t j) |
D2Array< X > | RemoveRow (size_t row) |
D2Array< X > | RemoveColumn (size_t column) |
D1Array< X > | GetRow (size_t row) const |
D1Array< X > | GetColumn (size_t column) const |
D2Array< X > | SymmetricPart () const |
D2Array< X > | AntiSymmetricPart () const |
void | Transpose () |
X | Trace () const |
monodimensional array
abstraction of memory-contiguous bidimensional arrays
|
inline |
Build an empty N-dimensional array
|
inlineexplicit |
Build an array with i rows and j columns
magnes::D2Array< X >::D2Array | ( | size_t | i, |
size_t | j, | ||
const X & | x | ||
) |
Build an array with i rows and j columns*, with values x
magnes::D2Array< X >::D2Array | ( | const D2Array< X > & | x | ) |
copy constructor
References magnes::D2Array< X >::NColumns(), and magnes::D2Array< X >::NRows().
|
inline |
destructor, erase all elements from the heap
D2Array< X > magnes::D2Array< X >::AntiSymmetricPart | ( | ) | const |
return the antisymmetric component of a square matrix
References magnes::D2Array< X >::NColumns(), and magnes::D2Array< X >::NRows().
|
inline |
return true if array is empty
D1Array< X > magnes::D2Array< X >::GetColumn | ( | size_t | column | ) | const |
Get a column as a new monodimensional array
D1Array< X > magnes::D2Array< X >::GetRow | ( | size_t | row | ) | const |
Get a row as a new monodimensional array
|
inline |
resize an existing array to i rows and j columns, erase all previous data
void magnes::D2Array< X >::Initialize | ( | size_t | i, |
size_t | j, | ||
const X & | x | ||
) |
resize an existing array to i rows and j columns, erase all previous data and set all values to x
|
inline |
Referenced by magnes::D2Array< X >::AntiSymmetricPart(), magnes::D2Array< X >::D2Array(), magnes::Eigen(), magnes::operator*(), magnes::D2Array< X >::operator*=(), magnes::D2Array< X >::operator/=(), magnes::D2Array< X >::operator=(), magnes::D2Array< X >::SymmetricPart(), magnes::D2Array< X >::Trace(), and magnes::D2Array< X >::Transpose().
|
inline |
Referenced by magnes::D2Array< X >::AntiSymmetricPart(), magnes::D2Array< X >::D2Array(), magnes::Eigen(), magnes::operator*(), magnes::D2Array< X >::operator*=(), magnes::D2Array< X >::operator/=(), magnes::D2Array< X >::operator=(), magnes::D2Array< X >::SymmetricPart(), magnes::D2Array< X >::Trace(), and magnes::D2Array< X >::Transpose().
|
inline |
casting operator to X
|
inline |
casting operator to X
X & magnes::D2Array< X >::operator() | ( | size_t | i, |
size_t | j | ||
) |
const X & magnes::D2Array< X >::operator() | ( | size_t | i, |
size_t | j | ||
) | const |
void magnes::D2Array< X >::operator*= | ( | const X & | x | ) |
multiply by scalar x
References magnes::D2Array< X >::NColumns(), and magnes::D2Array< X >::NRows().
void magnes::D2Array< X >::operator+= | ( | const D2Array< X > & | x | ) |
sum operator
void magnes::D2Array< X >::operator-= | ( | const D2Array< X > & | x | ) |
difference operator
void magnes::D2Array< X >::operator/= | ( | const X & | x | ) |
divide by scalar x
References magnes::D2Array< X >::NColumns(), and magnes::D2Array< X >::NRows().
D2Array< X > & magnes::D2Array< X >::operator= | ( | const D2Array< X > & | x | ) |
assignment operator
References magnes::D2Array< X >::NColumns(), and magnes::D2Array< X >::NRows().
D2Array< X > magnes::D2Array< X >::RemoveColumn | ( | size_t | column | ) |
remove a column
D2Array< X > magnes::D2Array< X >::RemoveRow | ( | size_t | row | ) |
remove a row
void magnes::D2Array< X >::SwapColumns | ( | size_t | i, |
size_t | j | ||
) |
swap tow columns
void magnes::D2Array< X >::SwapRows | ( | size_t | i, |
size_t | j | ||
) |
swap two rows
D2Array< X > magnes::D2Array< X >::SymmetricPart | ( | ) | const |
return the symmetric component of a square matrix
References magnes::D2Array< X >::NColumns(), and magnes::D2Array< X >::NRows().
X magnes::D2Array< X >::Trace | ( | ) | const |
Get the trace of a square matrix
References magnes::D2Array< X >::NColumns(), magnes::D2Array< X >::NRows(), magnes::operator*(), and magnes::D1Array< X >::size().
void magnes::D2Array< X >::Transpose | ( | ) |
transpose the matrix
References magnes::D2Array< X >::NColumns(), and magnes::D2Array< X >::NRows().