Row-major sparse-matrix class. More...
#include <Matrix_ArrayComplexSparse.hxx>
Public Types | |
typedef Allocator::value_type | value_type |
typedef Prop | property |
typedef ArrayRowComplexSparse | storage |
typedef Allocator | allocator |
typedef Allocator::pointer | pointer |
typedef Allocator::const_pointer | const_pointer |
typedef Allocator::reference | reference |
typedef Allocator::const_reference | const_reference |
typedef complex< T > | entry_type |
typedef complex< T > | access_type |
typedef complex< T > | const_access_type |
Public Member Functions | |
Matrix () | |
Default constructor. | |
Matrix (int i, int j) | |
Constructor. | |
void | ClearRealRow (int i) |
Clears a row. | |
void | ClearImagRow (int i) |
Clears a row. | |
void | ReallocateRealRow (int i, int j) |
Changes the size of a row. | |
void | ReallocateImagRow (int i, int j) |
Changes the size of a row. | |
void | ResizeRealRow (int i, int j) |
Changes the size of a row. | |
void | ResizeImagRow (int i, int j) |
Changes the size of a row. | |
void | SwapRealRow (int i, int i_) |
Swaps two rows. | |
void | SwapImagRow (int i, int i_) |
Swaps two rows. | |
void | ReplaceRealIndexRow (int i, IVect &new_index) |
Sets column numbers of non-zero entries of a row. | |
void | ReplaceImagIndexRow (int i, IVect &new_index) |
Sets column numbers of non-zero entries of a row. | |
int | GetRealRowSize (int i) const |
Returns the number of non-zero entries of a row. | |
int | GetImagRowSize (int i) const |
Returns the number of non-zero entries of a row. | |
void | PrintRealRow (int i) const |
Displays non-zero values of a row. | |
void | PrintImagRow (int i) const |
Displays non-zero values of a row. | |
void | AssembleRealRow (int i) |
Assembles a row. | |
void | AssembleImagRow (int i) |
Assembles a row. | |
void | AddInteraction (int i, int j, const complex< T > &val) |
Adds a coefficient in the matrix. | |
template<class Alloc1 > | |
void | AddInteractionRow (int i, int nb, const IVect &col, const Vector< complex< T >, VectFull, Alloc1 > &val) |
Adds coefficients in a row. | |
template<class Alloc1 > | |
void | AddInteractionColumn (int i, int nb, const IVect &row, const Vector< complex< T >, VectFull, Alloc1 > &val) |
Adds coefficients in a column. | |
void | Clear () |
void | Reallocate (int i, int j) |
void | Resize (int i, int j) |
int | GetM () const |
int | GetM (const SeldonTranspose &status) const |
int | GetN () const |
int | GetN (const SeldonTranspose &status) const |
int | GetRealNonZeros () const |
int | GetImagNonZeros () const |
int | GetRealDataSize () const |
int | GetImagDataSize () const |
int | GetDataSize () const |
int * | GetRealInd (int i) const |
int * | GetImagInd (int i) const |
T * | GetRealData (int i) const |
Vector< T, VectSparse, Allocator > * | GetRealData () const |
T * | GetImagData (int i) const |
Vector< T, VectSparse, Allocator > * | GetImagData () const |
complex< T > | operator() (int i, int j) const |
complex< T > & | Val (int i, int j) |
const complex< T > & | Val (int i, int j) const |
complex< T > & | Get (int i, int j) |
const complex< T > & | Get (int i, int j) const |
T & | ValReal (int i, int j) |
const T & | ValReal (int i, int j) const |
T & | ValImag (int i, int j) |
const T & | ValImag (int i, int j) const |
T & | GetReal (int i, int j) |
const T & | GetReal (int i, int j) const |
T & | GetImag (int i, int j) |
const T & | GetImag (int i, int j) const |
void | Set (int i, int j, const complex< T > &x) |
const T & | ValueReal (int num_row, int i) const |
T & | ValueReal (int num_row, int i) |
int | IndexReal (int num_row, int i) const |
int & | IndexReal (int num_row, int i) |
const T & | ValueImag (int num_row, int i) const |
T & | ValueImag (int num_row, int i) |
int | IndexImag (int num_row, int i) const |
int & | IndexImag (int num_row, int i) |
void | SetRealData (int, int, Vector< T, VectSparse, Allocator > *) |
void | SetRealData (int, int, T *, int *) |
void | SetImagData (int, int, Vector< T, VectSparse, Allocator > *) |
void | SetImagData (int, int, T *, int *) |
void | NullifyReal (int i) |
void | NullifyReal () |
void | NullifyImag (int i) |
void | NullifyImag () |
void | Print () const |
void | Write (string FileName) const |
void | Write (ostream &FileStream) const |
void | WriteText (string FileName) const |
void | WriteText (ostream &FileStream) const |
void | Read (string FileName) |
void | Read (istream &FileStream) |
void | ReadText (string FileName) |
void | ReadText (istream &FileStream) |
void | Assemble () |
void | RemoveSmallEntry (const T0 &epsilon) |
void | SetIdentity () |
void | Zero () |
void | Fill () |
void | Fill (const complex< T0 > &x) |
void | FillRand () |
Protected Attributes | |
int | m_ |
Number of rows. | |
int | n_ |
Number of columns. | |
Vector< Vector< T, VectSparse, Allocator >, VectFull, NewAlloc< Vector< T, VectSparse, Allocator > > > | val_real_ |
real part rows or columns | |
Vector< Vector< T, VectSparse, Allocator >, VectFull, NewAlloc< Vector< T, VectSparse, Allocator > > > | val_imag_ |
imaginary part rows or columns |
Row-major sparse-matrix class.
Definition at line 207 of file Matrix_ArrayComplexSparse.hxx.
Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::Matrix | ( | ) | [inline] |
Default constructor.
Builds an empty matrix.
Definition at line 1637 of file Matrix_ArrayComplexSparse.cxx.
Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::Matrix | ( | int | i, | |
int | j | |||
) | [inline] |
Constructor.
Builds a i by j matrix
i | number of rows. | |
j | number of columns. |
Definition at line 1651 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AddInteraction | ( | int | i, | |
int | j, | |||
const complex< T > & | val | |||
) | [inline] |
Adds a coefficient in the matrix.
[in] | i | row number. |
[in] | j | column number. |
[in] | val | coefficient to add. |
Definition at line 1865 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AddInteractionColumn | ( | int | i, | |
int | nb, | |||
const IVect & | row, | |||
const Vector< complex< T >, VectFull, Alloc1 > & | val | |||
) | [inline] |
Adds coefficients in a column.
[in] | i | column number. |
[in] | nb | number of coefficients to add. |
[in] | row | row numbers of coefficients. |
[in] | val | values of coefficients. |
Definition at line 1925 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AddInteractionRow | ( | int | i, | |
int | nb, | |||
const IVect & | col, | |||
const Vector< complex< T >, VectFull, Alloc1 > & | val | |||
) | [inline] |
Adds coefficients in a row.
[in] | i | row number. |
[in] | nb | number of coefficients to add. |
[in] | col | column numbers of coefficients. |
[in] | val | values of coefficients. |
Definition at line 1884 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AssembleImagRow | ( | int | i | ) | [inline] |
Assembles a row.
[in] | i | row number. |
Definition at line 1851 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AssembleRealRow | ( | int | i | ) | [inline] |
Assembles a row.
[in] | i | row number. |
Definition at line 1837 of file Matrix_ArrayComplexSparse.cxx.
int Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::GetImagRowSize | ( | int | i | ) | const [inline] |
Returns the number of non-zero entries of a row.
[in] | i | row number. |
Definition at line 1805 of file Matrix_ArrayComplexSparse.cxx.
int Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::GetRealRowSize | ( | int | i | ) | const [inline] |
Returns the number of non-zero entries of a row.
[in] | i | row number. |
Definition at line 1792 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ReallocateImagRow | ( | int | i, | |
int | j | |||
) | [inline] |
Changes the size of a row.
[in] | i | row number. |
[in] | j | new number of non-zero entries of the row. |
Definition at line 1697 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ReallocateRealRow | ( | int | i, | |
int | j | |||
) | [inline] |
Changes the size of a row.
[in] | i | row number. |
[in] | j | new number of non-zero entries of the row. |
Definition at line 1683 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ReplaceImagIndexRow | ( | int | i, | |
IVect & | new_index | |||
) | [inline] |
Sets column numbers of non-zero entries of a row.
[in] | i | column number. |
[in] | new_index | new column numbers. |
Definition at line 1778 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ReplaceRealIndexRow | ( | int | i, | |
IVect & | new_index | |||
) | [inline] |
Sets column numbers of non-zero entries of a row.
[in] | i | column number. |
[in] | new_index | new column numbers. |
Definition at line 1764 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ResizeImagRow | ( | int | i, | |
int | j | |||
) | [inline] |
Changes the size of a row.
[in] | i | row number. |
[in] | j | new number of non-zero entries of the row. |
Definition at line 1725 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ResizeRealRow | ( | int | i, | |
int | j | |||
) | [inline] |
Changes the size of a row.
[in] | i | row number. |
[in] | j | new number of non-zero entries of the row. |
Definition at line 1711 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::SwapImagRow | ( | int | i, | |
int | j | |||
) | [inline] |
Swaps two rows.
[in] | i | first row number. |
[in] | j | second row number. |
Definition at line 1751 of file Matrix_ArrayComplexSparse.cxx.
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::SwapRealRow | ( | int | i, | |
int | j | |||
) | [inline] |
Swaps two rows.
[in] | i | first row number. |
[in] | j | second row number. |
Definition at line 1738 of file Matrix_ArrayComplexSparse.cxx.