Complex sparse-matrix class. More...
#include <Matrix_ComplexSparse.hxx>
Public Types | |
typedef Allocator::value_type | value_type |
typedef Allocator::pointer | pointer |
typedef Allocator::const_pointer | const_pointer |
typedef Allocator::reference | reference |
typedef Allocator::const_reference | const_reference |
typedef SeldonDefaultAllocator< VectFull, int >::allocator | AllocatorInt |
typedef SeldonDefaultAllocator< VectFull, long >::allocator | AllocatorLong |
typedef complex< value_type > | entry_type |
typedef complex< value_type > | access_type |
typedef complex< value_type > | const_access_type |
Public Member Functions | |
Matrix_ComplexSparse () | |
Default constructor. More... | |
Matrix_ComplexSparse (int i, int j) | |
Constructor. More... | |
Matrix_ComplexSparse (int i, int j, long real_nz, long imag_nz) | |
Constructor. More... | |
template<class Storage0 , class Allocator0 , class Storage1 , class Allocator1 , class Storage2 , class Allocator2 > | |
Matrix_ComplexSparse (int i, int j, Vector< value_type, Storage0, Allocator0 > &real_values, Vector< long, Storage1, Allocator1 > &real_ptr, Vector< int, Storage2, Allocator2 > &real_ind, Vector< value_type, Storage0, Allocator0 > &imag_values, Vector< long, Storage1, Allocator1 > &imag_ptr, Vector< int, Storage2, Allocator2 > &imag_ind) | |
Constructor. More... | |
Matrix_ComplexSparse (const Matrix_ComplexSparse< T, Prop, Storage, Allocator > &A) | |
Copy constructor. | |
~Matrix_ComplexSparse () | |
Destructor. | |
void | Clear () |
Clears the matrix. More... | |
template<class Storage0 , class Allocator0 , class Storage1 , class Allocator1 , class Storage2 , class Allocator2 > | |
void | SetData (int i, int j, Vector< value_type, Storage0, Allocator0 > &real_values, Vector< long, Storage1, Allocator1 > &real_ptr, Vector< int, Storage2, Allocator2 > &real_ind, Vector< value_type, Storage0, Allocator0 > &imag_values, Vector< long, Storage1, Allocator1 > &imag_ptr, Vector< int, Storage2, Allocator2 > &imag_ind) |
Redefines the matrix. More... | |
void | SetData (int i, int j, long real_nz, pointer real_values, long *real_ptr, int *real_ind, long imag_nz, pointer imag_values, long *imag_ptr, int *imag_ind) |
void | Nullify () |
Clears the matrix without releasing memory. More... | |
void | Reallocate (int i, int j) |
Initialization of an empty matrix i x j. | |
void | Reallocate (int i, int j, long real_nz, long imag_nz) |
Initialization of a matrix i x j with n non-zero entries. | |
void | Resize (int i, int j) |
Changing the number of rows and columns. More... | |
void | Resize (int i, int j, long real_nz, long imag_nz) |
Changing the number of rows, columns and non-zero entries. More... | |
void | Copy (const Matrix_ComplexSparse< T, Prop, Storage, Allocator > &A) |
Copies a matrix. | |
long | GetNonZeros () const |
Returns the number of elements stored in memory. More... | |
long | GetDataSize () const |
Returns the number of elements stored in memory. More... | |
size_t | GetMemorySize () const |
returns size of A in bytes used to store the matrix | |
long * | GetRealPtr () const |
Returns (row or column) start indices for the real part. More... | |
long * | GetImagPtr () const |
Returns (row or column) start indices for the imaginary part. More... | |
int * | GetRealInd () const |
Returns (row or column) indices of non-zero entries for the real part. More... | |
int * | GetImagInd () const |
Returns (row or column) indices of non-zero entries for the imaginary part. More... | |
int | GetRealPtrSize () const |
Returns the length of the array of start indices for the real part. More... | |
int | GetImagPtrSize () const |
Returns the length of the array of start indices for the imaginary part. More... | |
long | GetRealIndSize () const |
Returns the length of the array of (column or row) indices for the real part. More... | |
long | GetImagIndSize () const |
Returns the length of the array of (column or row) indices for the imaginary part. More... | |
long | GetRealDataSize () const |
Returns the length of the array of (column or row) indices for the real part. More... | |
long | GetImagDataSize () const |
Returns the length of the array of (column or row) indices for the imaginary part. More... | |
value_type * | GetRealData () const |
Returns the array of values of the real part. More... | |
value_type * | GetImagData () const |
Returns the array of values of the imaginary part. More... | |
const entry_type | operator() (int i, int j) const |
Access operator. More... | |
value_type & | ValReal (int i, int j) |
Access method. More... | |
const value_type & | ValReal (int i, int j) const |
Access method. More... | |
value_type & | ValImag (int i, int j) |
Access method. More... | |
const value_type & | ValImag (int i, int j) const |
Access method. More... | |
value_type & | GetReal (int i, int j) |
Access method. More... | |
const value_type & | GetReal (int i, int j) const |
Access method. More... | |
value_type & | GetImag (int i, int j) |
Access method. More... | |
const value_type & | GetImag (int i, int j) const |
Access method. More... | |
void | Set (int i, int j, const entry_type &x) |
Sets an element (i, j) to a value. More... | |
void | AddInteraction (int i, int j, const entry_type &x) |
Add a value to a non-zero entry. More... | |
void | AddInteractionRow (int i, int nb, const IVect &col, const Vector< entry_type > &val, bool sorted=false) |
Adds values to several non-zero entries on a given row. | |
Matrix_ComplexSparse< T, Prop, Storage, Allocator > & | operator= (const Matrix_ComplexSparse< T, Prop, Storage, Allocator > &A) |
Duplicates a matrix (assignment operator). More... | |
void | Zero () |
Resets all non-zero entries to 0-value. More... | |
void | SetIdentity () |
Sets the matrix to identity. More... | |
void | Fill () |
Fills the non-zero entries with 0, 1, 2, ... More... | |
void | Fill (const entry_type &x) |
Fills the non-zero entries with a given value. More... | |
void | FillRand () |
Fills the non-zero entries randomly. More... | |
void | Print () const |
Displays the matrix on the standard output. More... | |
void | Write (string FileName) const |
Writes the matrix in a file. More... | |
void | Write (ostream &FileStream) const |
Writes the matrix to an output stream. More... | |
void | WriteText (string FileName, bool cplx=false) const |
Writes the matrix in a file. More... | |
void | WriteText (ostream &FileStream, bool cplx=false) const |
Writes the matrix to an output stream. More... | |
void | Read (string FileName) |
Reads the matrix from a file. More... | |
void | Read (istream &FileStream) |
Reads the matrix from an input stream. More... | |
void | ReadText (string FileName, bool cplx=false) |
Reads the matrix from a file. More... | |
void | ReadText (istream &FileStream, bool cplx=false) |
Reads the matrix from an input stream. More... | |
template<class T , class Prop , class Storage , class Allocator > | |
void | SetData (int i, int j, long real_nz, typename Matrix_ComplexSparse< T, Prop, Storage, Allocator > ::pointer real_values, long *real_ptr, int *real_ind, long imag_nz, typename Matrix_ComplexSparse< T, Prop, Storage, Allocator > ::pointer imag_values, long *imag_ptr, int *imag_ind) |
Redefines the matrix. More... | |
pointer | GetData () const |
Returns a pointer to the data array. More... | |
const_pointer | GetDataConst () const |
Returns a const pointer to the data array. More... | |
void * | GetDataVoid () const |
Returns a pointer of type "void*" to the data array. More... | |
const void * | GetDataConstVoid () const |
Returns a pointer of type "const void*" to the data array. More... | |
int | GetM () const |
Returns the number of rows. More... | |
int | GetM (const Seldon::SeldonTranspose &status) const |
Returns the number of rows of the matrix possibly transposed. More... | |
int | GetM (const CBLAS_TRANSPOSE &status) const |
Returns the number of rows of the matrix possibly transposed. More... | |
int | GetN () const |
Returns the number of columns. More... | |
int | GetN (const Seldon::SeldonTranspose &status) const |
Returns the number of columns of the matrix possibly transposed. More... | |
int | GetN (const CBLAS_TRANSPOSE &status) const |
Returns the number of columns of the matrix possibly transposed. More... | |
long | GetSize () const |
Returns the number of elements in the matrix. More... | |
Protected Attributes | |
long | real_nz_ |
long | imag_nz_ |
long * | real_ptr_ |
long * | imag_ptr_ |
int * | real_ind_ |
int * | imag_ind_ |
value_type * | real_data_ |
value_type * | imag_data_ |
pointer | data_ |
int | m_ |
int | n_ |
Complex sparse-matrix class.
Sparse matrices are defined by: (1) the number of rows and columns; (2) the number of non-zero entries; (3) an array 'ptr_' of start indices (i.e. indices of the first element of each row or column, depending on the storage); (4) an array 'ind_' of column or row indices of each non-zero entry; (5) values of non-zero entries.
Definition at line 112 of file Matrix_ComplexSparse.hxx.
Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Matrix_ComplexSparse |
Default constructor.
Builds an empty 0x0 matrix.
Definition at line 40 of file Matrix_ComplexSparse.cxx.
|
explicit |
Constructor.
Builds a i by j sparse matrix.
i | number of rows. |
j | number of columns. |
Definition at line 61 of file Matrix_ComplexSparse.cxx.
Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Matrix_ComplexSparse | ( | int | i, |
int | j, | ||
long | real_nz, | ||
long | imag_nz | ||
) |
Constructor.
Builds a sparse matrix of size i by j , with real_nz non-zero elements in the real part of the matrix and imag_nz non-zero elements in the imaginary part of the matrix.
i | number of rows. |
j | number of columns. |
real_nz | number of non-zero elements in the real part. |
imag_nz | number of non-zero elements in the imaginary part. |
Definition at line 89 of file Matrix_ComplexSparse.cxx.
Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Matrix_ComplexSparse | ( | int | i, |
int | j, | ||
Vector< value_type, Storage0, Allocator0 > & | real_values, | ||
Vector< long, Storage1, Allocator1 > & | real_ptr, | ||
Vector< int, Storage2, Allocator2 > & | real_ind, | ||
Vector< value_type, Storage0, Allocator0 > & | imag_values, | ||
Vector< long, Storage1, Allocator1 > & | imag_ptr, | ||
Vector< int, Storage2, Allocator2 > & | imag_ind | ||
) |
Constructor.
Builds a i by j sparse matrix with non-zero values and indices provided by 'real_values' (values of the real part), 'real_ptr' (pointers for the real part), 'real_ind' (indices for the real part), 'imag_values' (values of the imaginary part), 'imag_ptr' (pointers for the imaginary part) and 'imag_ind' (indices for the imaginary part). Input vectors are released and are empty on exit.
i | number of rows. |
j | number of columns. |
real_values | values of non-zero entries for the real part. |
real_ptr | row or column start indices for the real part. |
real_ind | row or column indices for the real part. |
imag_values | values of non-zero entries for the imaginary part. |
imag_ptr | row or column start indices for the imaginary part. |
imag_ind | row or column indices for the imaginary part. |
Definition at line 129 of file Matrix_ComplexSparse.cxx.
|
inline |
Add a value to a non-zero entry.
This function adds val to the element (i, j), provided that this element is already a non-zero entry. Otherwise a non-zero entry is inserted equal to val.
[in] | i | row index. |
[in] | j | column index. |
[in] | val | value to be added to the element (i, j). |
Definition at line 303 of file Matrix_ComplexSparseInline.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Clear |
Clears the matrix.
This methods is equivalent to the destructor. On exit, the matrix is empty (0x0).
Definition at line 316 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Fill |
Fills the non-zero entries with 0, 1, 2, ...
On exit, the non-zero entries are 0, 1, 2, 3, ... The order of the numbers depends on the storage.
Definition at line 2370 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Fill | ( | const entry_type & | x | ) |
Fills the non-zero entries with a given value.
x | the value to set the non-zero entries to. |
Definition at line 2386 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::FillRand |
Fills the non-zero entries randomly.
Definition at line 2401 of file Matrix_ComplexSparse.cxx.
|
inlineinherited |
Returns a pointer to the data array.
Returns a pointer to data, i.e. the data array 'data_'.
Definition at line 241 of file Matrix_BaseInline.cxx.
|
inlineinherited |
Returns a const pointer to the data array.
Returns a const pointer to data, i.e. the data array 'data_'.
Definition at line 254 of file Matrix_BaseInline.cxx.
|
inlineinherited |
Returns a pointer of type "const void*" to the data array.
Returns a pointer of type "const void*" to data, i.e. the data array 'data_'.
Definition at line 280 of file Matrix_BaseInline.cxx.
|
inline |
Returns the number of elements stored in memory.
Returns the number of elements stored in memory, i.e. the cumulated number of non-zero entries of both the real and the imaginary part.
Definition at line 69 of file Matrix_ComplexSparseInline.cxx.
|
inlineinherited |
Returns a pointer of type "void*" to the data array.
Returns a pointer of type "void*" to data, i.e. the data array 'data_'.
Definition at line 267 of file Matrix_BaseInline.cxx.
Matrix_ComplexSparse< T, Prop, Storage, Allocator >::value_type & Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::GetImag | ( | int | i, |
int | j | ||
) |
Access method.
Returns the imaginary part of element (i, j) if it can be returned as a reference. If the non-zero entry does not exit, it is created
[in] | i | row index. |
[in] | j | column index. |
Definition at line 2255 of file Matrix_ComplexSparse.cxx.
|
inline |
Access method.
Returns the imaginary part of element (i, j) if it can be returned as a reference. If the non-zero entry does not exit, it is created
[in] | i | row index. |
[in] | j | column index. |
Definition at line 287 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns the array of values of the imaginary part.
Definition at line 248 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns the length of the array of (column or row) indices for the imaginary part.
Returns the length of the array ('ind_') of (row or column) indices of non-zero entries for the imaginary part. This array defines non-zero entries indices if coupled with (column or row) start indices.
Definition at line 224 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns (row or column) indices of non-zero entries for the imaginary part.
Returns the array ('ind_') of (row or column) indices of non-zero entries for the imaginary part. This array defines non-zero entries indices if coupled with (column or row) start indices.
Definition at line 124 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns the length of the array of (column or row) indices for the imaginary part.
Returns the length of the array ('ind_') of (row or column) indices of non-zero entries for the imaginary part. This array defines non-zero entries indices if coupled with (column or row) start indices.
Definition at line 186 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns (row or column) start indices for the imaginary part.
Returns the array ('ptr_') of start indices for the imaginary part.
Definition at line 93 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns the length of the array of start indices for the imaginary part.
Definition at line 148 of file Matrix_ComplexSparseInline.cxx.
|
inlineinherited |
Returns the number of rows.
Definition at line 69 of file Matrix_BaseInline.cxx.
|
inlineinherited |
Returns the number of rows of the matrix possibly transposed.
status | assumed status about the transposition of the matrix. |
Definition at line 122 of file Matrix_BaseInline.cxx.
|
inlineinherited |
Returns the number of rows of the matrix possibly transposed.
status | assumed status about the transposition of the matrix. |
Definition at line 92 of file Matrix_BaseInline.cxx.
|
inlineinherited |
Returns the number of columns.
Definition at line 80 of file Matrix_BaseInline.cxx.
|
inlineinherited |
Returns the number of columns of the matrix possibly transposed.
status | assumed status about the transposition of the matrix. |
Definition at line 137 of file Matrix_BaseInline.cxx.
|
inlineinherited |
Returns the number of columns of the matrix possibly transposed.
status | assumed status about the transposition of the matrix. |
Definition at line 107 of file Matrix_BaseInline.cxx.
|
inline |
Returns the number of elements stored in memory.
Returns the number of elements stored in memory, i.e. the cumulated number of non-zero entries of both the real and the imaginary part.
Definition at line 55 of file Matrix_ComplexSparseInline.cxx.
Matrix_ComplexSparse< T, Prop, Storage, Allocator >::value_type & Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::GetReal | ( | int | i, |
int | j | ||
) |
Access method.
Returns the real part of element (i, j) if it can be returned as a reference. If the non-zero entry does not exit, it is created
[in] | i | row index. |
[in] | j | column index. |
Definition at line 2190 of file Matrix_ComplexSparse.cxx.
|
inline |
Access method.
Returns the real part of element (i, j) if it can be returned as a reference. If the non-zero entry does not exit, it is created
[in] | i | row index. |
[in] | j | column index. |
Definition at line 270 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns the array of values of the real part.
Definition at line 236 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns the length of the array of (column or row) indices for the real part.
Returns the length of the array ('ind_') of (row or column) indices of non-zero entries for the real part. This array defines non-zero entries indices if coupled with (column or row) start indices.
Definition at line 205 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns (row or column) indices of non-zero entries for the real part.
Returns the array ('ind_') of (row or column) indices of non-zero entries for the real part. This array defines non-zero entries indices if coupled with (column or row) start indices.
Definition at line 108 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns the length of the array of (column or row) indices for the real part.
Returns the length of the array ('ind_') of (row or column) indices of non-zero entries for the real part. This array defines non-zero entries indices if coupled with (column or row) start indices.
Definition at line 167 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns (row or column) start indices for the real part.
Returns the array ('ptr_') of start indices for the real part.
Definition at line 81 of file Matrix_ComplexSparseInline.cxx.
|
inline |
Returns the length of the array of start indices for the real part.
Definition at line 136 of file Matrix_ComplexSparseInline.cxx.
|
inlineinherited |
Returns the number of elements in the matrix.
Returns the number of elements in the matrix, i.e. the number of rows multiplied by the number of columns.
Definition at line 153 of file Matrix_BaseInline.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Nullify |
Clears the matrix without releasing memory.
On exit, the matrix is empty and the memory has not been released. It is useful for low level manipulations on a Matrix instance.
Definition at line 698 of file Matrix_ComplexSparse.cxx.
const Matrix_ComplexSparse< T, Prop, Storage, Allocator >::entry_type Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::operator() | ( | int | i, |
int | j | ||
) | const |
Access operator.
Returns the value of element (i, j).
i | row index. |
j | column index. |
Definition at line 1896 of file Matrix_ComplexSparse.cxx.
|
inline |
Duplicates a matrix (assignment operator).
A | matrix to be copied. |
Definition at line 347 of file Matrix_ComplexSparseInline.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Print |
Displays the matrix on the standard output.
Displays elements on the standard output, in text format. Each row is displayed on a single line and elements of a row are delimited by tabulations.
Definition at line 2421 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Read | ( | istream & | FileStream | ) |
Reads the matrix from an input stream.
Reads a matrix in binary format from an input stream.
FileStream | input stream |
Definition at line 2588 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Read | ( | string | FileName | ) |
Reads the matrix from a file.
Reads a matrix stored in binary format in a file.
FileName | input file name. |
Definition at line 2563 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::ReadText | ( | istream & | FileStream, |
bool | cplx = false |
||
) |
Reads the matrix from an input stream.
Reads a matrix from a stream in text format.
FileStream | input stream. |
Definition at line 2662 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::ReadText | ( | string | FileName, |
bool | cplx = false |
||
) |
Reads the matrix from a file.
Reads the matrix from a file in text format.
FileName | input file name. |
Definition at line 2637 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Resize | ( | int | i, |
int | j | ||
) |
Changing the number of rows and columns.
i | number of rows |
j | number of columns |
Definition at line 1174 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Resize | ( | int | i, |
int | j, | ||
long | real_nz, | ||
long | imag_nz | ||
) |
Changing the number of rows, columns and non-zero entries.
i | number of rows |
j | number of columns Previous entries are kept during the operation |
Definition at line 1192 of file Matrix_ComplexSparse.cxx.
|
inline |
Sets an element (i, j) to a value.
This function sets val to the element (i, j)
[in] | i | row index. |
[in] | j | column index. |
[in] | val | A(i, j) = val |
Definition at line 331 of file Matrix_ComplexSparseInline.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::SetData | ( | int | i, |
int | j, | ||
long | real_nz, | ||
typename Matrix_ComplexSparse< T, Prop, Storage, Allocator > ::pointer | real_values, | ||
long * | real_ptr, | ||
int * | real_ind, | ||
long | imag_nz, | ||
typename Matrix_ComplexSparse< T, Prop, Storage, Allocator > ::pointer | imag_values, | ||
long * | imag_ptr, | ||
int * | imag_ind | ||
) |
Redefines the matrix.
It clears the matrix and sets it to a new matrix defined by arrays 'real_values' (values of the real part), 'real_ptr' (pointers for the real part), 'real_ind' (indices for the real part), 'imag_values' (values of the imaginary part), 'imag_ptr' (pointers for the imaginary part) and 'imag_ind' (indices for the imaginary part).
i | number of rows. |
j | number of columns. |
real_nz | number of non-zero entries (real part). |
real_values | values of non-zero entries for the real part. |
real_ptr | row or column start indices for the real part. |
real_ind | row or column indices for the real part. |
imag_nz | number of non-zero entries (imaginary part). |
imag_values | values of non-zero entries for the imaginary part. |
imag_ptr | row or column start indices for the imaginary part. |
imag_ind | row or column indices for the imaginary part. |
Definition at line 667 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::SetData | ( | int | i, |
int | j, | ||
Vector< value_type, Storage0, Allocator0 > & | real_values, | ||
Vector< long, Storage1, Allocator1 > & | real_ptr, | ||
Vector< int, Storage2, Allocator2 > & | real_ind, | ||
Vector< value_type, Storage0, Allocator0 > & | imag_values, | ||
Vector< long, Storage1, Allocator1 > & | imag_ptr, | ||
Vector< int, Storage2, Allocator2 > & | imag_ind | ||
) |
Redefines the matrix.
It clears the matrix and sets it to a new matrix defined by 'real_values' (values of the real part), 'real_ptr' (pointers for the real part), 'real_ind' (indices for the real part), 'imag_values' (values of the imaginary part), 'imag_ptr' (pointers for the imaginary part) and 'imag_ind' (indices for the imaginary part). Input vectors are released and are empty on exit.
i | number of rows. |
j | number of columns. |
real_values | values of non-zero entries for the real part. |
real_ptr | row or column start indices for the real part. |
real_ind | row or column indices for the real part. |
imag_values | values of non-zero entries for the imaginary part. |
imag_ptr | row or column start indices for the imaginary part. |
imag_ind | row or column indices for the imaginary part. |
Definition at line 487 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::SetIdentity |
Sets the matrix to identity.
This method fills the diagonal of the matrix with ones. It can be applied to non square matrix.
Definition at line 2331 of file Matrix_ComplexSparse.cxx.
Matrix_ComplexSparse< T, Prop, Storage, Allocator >::value_type & Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::ValImag | ( | int | i, |
int | j | ||
) |
Access method.
Returns the imaginary part of element (i, j) if it can be returned as a reference.
[in] | i | row index. |
[in] | j | column index. |
WrongArgument | No reference can be returned because the element is a zero entry (not stored in the matrix). |
Definition at line 2087 of file Matrix_ComplexSparse.cxx.
const Matrix_ComplexSparse< T, Prop, Storage, Allocator >::value_type & Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::ValImag | ( | int | i, |
int | j | ||
) | const |
Access method.
Returns the imaginary part of element (i, j) if it can be returned as a reference.
[in] | i | row index. |
[in] | j | column index. |
WrongArgument | No reference can be returned because the element is a zero entry (not stored in the matrix). |
Definition at line 2139 of file Matrix_ComplexSparse.cxx.
Matrix_ComplexSparse< T, Prop, Storage, Allocator >::value_type & Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::ValReal | ( | int | i, |
int | j | ||
) |
Access method.
Returns the real value of element (i, j) if it can be returned as a reference.
[in] | i | row index. |
[in] | j | column index. |
WrongArgument | No reference can be returned because the element is a zero entry (not stored in the matrix). |
Definition at line 1983 of file Matrix_ComplexSparse.cxx.
const Matrix_ComplexSparse< T, Prop, Storage, Allocator >::value_type & Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::ValReal | ( | int | i, |
int | j | ||
) | const |
Access method.
Returns the real value of element (i, j) if it can be returned as a reference.
[in] | i | row index. |
[in] | j | column index. |
WrongArgument | No reference can be returned because the element is a zero entry (not stored in the matrix). |
Definition at line 2035 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Write | ( | ostream & | FileStream | ) | const |
Writes the matrix to an output stream.
Stores the matrix in an output stream in binary format.
FileStream | output stream. |
Definition at line 2464 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Write | ( | string | FileName | ) | const |
Writes the matrix in a file.
Stores the matrix in a file in binary format.
FileName | output file name. |
Definition at line 2439 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::WriteText | ( | ostream & | FileStream, |
bool | cplx = false |
||
) | const |
Writes the matrix to an output stream.
Stores the matrix in a file in ascii format. The entries are written in coordinate format (row column value) 1-index convention is used
FileStream | output stream. |
Definition at line 2537 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::WriteText | ( | string | FileName, |
bool | cplx = false |
||
) | const |
Writes the matrix in a file.
Stores the matrix in a file in ascii format. The entries are written in coordinate format (row column value) 1-index convention is used
FileName | output file name. |
Definition at line 2507 of file Matrix_ComplexSparse.cxx.
void Seldon::Matrix_ComplexSparse< T, Prop, Storage, Allocator >::Zero |
Resets all non-zero entries to 0-value.
The sparsity pattern remains unchanged.
Definition at line 2316 of file Matrix_ComplexSparse.cxx.