Public Types | Public Member Functions | Protected Attributes | List of all members
Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator > Class Template Reference

Row-major sparse-matrix class. More...

#include <Matrix_ArrayComplexSparse.hxx>

Inheritance diagram for Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >:
Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse, Allocator > Seldon::VirtualMatrix< T >

Public Types

typedef Allocator::value_type value_type
 
typedef Prop property
 
typedef ArrayRowComplexSparse storage
 
typedef Allocator allocator
 
typedef complex< value_type > entry_type
 
typedef Allocator::pointer pointer
 
typedef Allocator::const_pointer const_pointer
 
typedef Allocator::reference reference
 
typedef Allocator::const_reference const_reference
 
typedef complex< value_type > access_type
 
typedef complex< value_type > const_access_type
 

Public Member Functions

 Matrix ()
 Default constructor. More...
 
 Matrix (int i, int j)
 Constructor. More...
 
void ClearRealRow (int i)
 Clears a row.
 
void ClearImagRow (int i)
 Clears a row.
 
void ClearRow (int i)
 Clears a row.
 
void ReallocateRealRow (int i, int j)
 Changes the size of a row. More...
 
void ReallocateImagRow (int i, int j)
 Changes the size of a row. More...
 
void ResizeRealRow (int i, int j)
 Changes the size of a row. More...
 
void ResizeImagRow (int i, int j)
 Changes the size of a row. More...
 
void SwapRealRow (int i, int i_)
 Swaps two rows. More...
 
void SwapImagRow (int i, int i_)
 Swaps two rows. More...
 
void ReplaceRealIndexRow (int i, IVect &new_index)
 Sets column numbers of non-zero entries of a row. More...
 
void ReplaceImagIndexRow (int i, IVect &new_index)
 Sets column numbers of non-zero entries of a row. More...
 
int GetRealRowSize (int i) const
 Returns the number of non-zero entries of a row. More...
 
int GetImagRowSize (int i) const
 Returns the number of non-zero entries of a row. More...
 
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. More...
 
void AssembleImagRow (int i)
 Assembles a row. More...
 
void AddInteraction (int i, int j, const entry_type &val)
 Adds a coefficient in the matrix. More...
 
void AddInteractionRow (int i, int nb, const IVect &col, const Vector< entry_type > &val, bool sorted=false)
 Adds coefficients in a row. More...
 
void AddInteractionColumn (int i, int nb, const IVect &row, const Vector< entry_type > &val, bool sorted=false)
 Adds coefficients in a column. More...
 
void Clear ()
 Clears the matrix. More...
 
void Reallocate (int i, int j)
 Reallocates memory to resize the matrix. More...
 
void Resize (int i, int j)
 Reallocates additional memory to resize the matrix. More...
 
long GetRealNonZeros () const
 Returns the number of non-zero elements (real part). More...
 
long GetImagNonZeros () const
 Returns the number of non-zero elements (imaginary part). More...
 
long GetNonZeros () const
 Returns the number of elements stored in memory (real+imaginary part). More...
 
long GetRealDataSize () const
 Returns the number of elements stored in memory (real part). More...
 
long GetImagDataSize () const
 Returns the number of elements stored in memory (imaginary part). More...
 
long GetDataSize () const
 Returns the number of elements stored in memory (real+imaginary part). More...
 
size_t GetMemorySize () const
 returns size of matrix in bytes
 
int * GetRealInd (int i) const
 Returns column indices of non-zero entries in row (real part). More...
 
int * GetImagInd (int i) const
 Returns column indices of non-zero entries in row (imaginary part). More...
 
value_type * GetRealData (int i) const
 Returns values of non-zero entries of a row (real part). More...
 
Vector< value_type, VectSparse, Allocator > * GetRealData () const
 
value_type * GetImagData (int i) const
 Returns values of non-zero entries of a row (imaginary part). More...
 
Vector< value_type, VectSparse, Allocator > * GetImagData () const
 
const entry_type operator() (int i, int j) const
 Access operator. More...
 
entry_type & Val (int i, int j)
 Unavailable access method. More...
 
const entry_type & Val (int i, int j) const
 Unavailable access method. More...
 
entry_type & Get (int i, int j)
 Unavailable access method. More...
 
const entry_type & Get (int i, int j) const
 Unavailable access method. More...
 
value_type & ValReal (int i, int j)
 Returns acces to real part of A(i, j) More...
 
const value_type & ValReal (int i, int j) const
 Returns acces to real part of A(i, j) More...
 
value_type & ValImag (int i, int j)
 Returns acces to imaginary part of A(i, j) More...
 
const value_type & ValImag (int i, int j) const
 Returns acces to imaginary part of A(i, j) More...
 
value_type & GetReal (int i, int j)
 Returns acces to real part of A(i, j) More...
 
const value_type & GetReal (int i, int j) const
 Returns acces to real part of A(i, j) More...
 
value_type & GetImag (int i, int j)
 Returns acces to imaginary part of A(i, j) More...
 
const value_type & GetImag (int i, int j) const
 Returns acces to imaginary part of A(i, j) More...
 
void Set (int i, int j, const entry_type &x)
 Sets element (i, j) of matrix. More...
 
const value_type & ValueReal (int num_row, int i) const
 Returns j-th non-zero value of row i (real part). More...
 
value_type & ValueReal (int num_row, int i)
 Returns j-th non-zero value of row i (real part). More...
 
int IndexReal (int num_row, int i) const
 Returns column number of j-th non-zero value of row i (real part). More...
 
int & IndexReal (int num_row, int i)
 Returns column number of j-th non-zero value of row i (real part). More...
 
const value_type & ValueImag (int num_row, int i) const
 Returns j-th non-zero value of row i (imaginary part). More...
 
value_type & ValueImag (int num_row, int i)
 Returns j-th non-zero value of row i (imaginary part). More...
 
int IndexImag (int num_row, int i) const
 Returns column number of j-th non-zero value of row i (imaginary part). More...
 
int & IndexImag (int num_row, int i)
 Returns column number of j-th non-zero value of row i (imaginary part). More...
 
void SetRealData (int, int, Vector< value_type, VectSparse, Allocator > *)
 Redefines the real part of the matrix. More...
 
void SetRealData (int, int, value_type *, int *)
 Redefines a row/column of the matrix. More...
 
void SetImagData (int, int, Vector< value_type, VectSparse, Allocator > *)
 Redefines the imaginary part of the matrix. More...
 
void SetImagData (int, int, value_type *, int *)
 Redefines a row/column of the matrix. More...
 
void NullifyReal (int i)
 Clears a row without releasing memory. More...
 
void NullifyReal ()
 Clears the matrix without releasing memory. More...
 
void NullifyImag (int i)
 Clears a row without releasing memory. More...
 
void NullifyImag ()
 Clears the matrix without releasing memory. 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...
 
void Assemble ()
 Assembles the matrix. More...
 
void RemoveSmallEntry (const T0 &epsilon)
 removes small entries
 
void SetIdentity ()
 Matrix is initialized to the identity matrix.
 
void Zero ()
 Non-zero entries are set to 0 (but not removed).
 
void Fill ()
 Non-zero entries are filled with values 0, 1, 2, 3 ...
 
void Fill (const complex< T0 > &x)
 Non-zero entries are set to a given value x. More...
 
void FillRand ()
 Non-zero entries take a random value.
 
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

Vector< Vector< value_type, VectSparse, Allocator >, VectFull, NewAlloc< Vector< value_type, VectSparse, Allocator > > > val_real_
 real part rows or columns
 
Vector< Vector< value_type, VectSparse, Allocator >, VectFull, NewAlloc< Vector< value_type, VectSparse, Allocator > > > val_imag_
 imaginary part rows or columns
 
int m_
 
int n_
 

Detailed Description

template<class T, class Prop, class Allocator>
class Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >

Row-major sparse-matrix class.

Definition at line 380 of file Matrix_ArrayComplexSparse.hxx.

Constructor & Destructor Documentation

◆ Matrix() [1/2]

template<class T , class Prop , class Allocator >
Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::Matrix
inline

Default constructor.

Builds an empty matrix.

Definition at line 1060 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Matrix() [2/2]

template<class T , class Prop , class Allocator >
Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::Matrix ( int  i,
int  j 
)
inlineexplicit

Constructor.

Builds a i by j matrix

Parameters
inumber of rows.
jnumber of columns.
Note
Matrix values are not initialized.

Definition at line 1074 of file Matrix_ArrayComplexSparseInline.cxx.

Member Function Documentation

◆ AddInteraction()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AddInteraction ( int  i,
int  j,
const entry_type &  val 
)
inline

Adds a coefficient in the matrix.

Parameters
[in]irow number.
[in]jcolumn number.
[in]valcoefficient to add.

Definition at line 1298 of file Matrix_ArrayComplexSparseInline.cxx.

◆ AddInteractionColumn()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AddInteractionColumn ( int  i,
int  nb,
const IVect row,
const Vector< entry_type > &  val,
bool  sorted = false 
)

Adds coefficients in a column.

Parameters
[in]icolumn number.
[in]nbnumber of coefficients to add.
[in]rowrow numbers of coefficients.
[in]valvalues of coefficients.

Definition at line 682 of file Matrix_ArrayComplexSparse.cxx.

◆ AddInteractionRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AddInteractionRow ( int  i,
int  nb,
const IVect col,
const Vector< entry_type > &  val,
bool  sorted = false 
)

Adds coefficients in a row.

Parameters
[in]irow number.
[in]nbnumber of coefficients to add.
[in]colcolumn numbers of coefficients.
[in]valvalues of coefficients.

Definition at line 641 of file Matrix_ArrayComplexSparse.cxx.

◆ Assemble()

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Assemble
inherited

Assembles the matrix.

All the row numbers are sorted. If same row numbers exist, values are added.

Warning
If you are using the methods AddInteraction/AddInteractions, you don't need to call that method.

Definition at line 457 of file Matrix_ArrayComplexSparse.cxx.

◆ AssembleImagRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AssembleImagRow ( int  i)
inline

Assembles a row.

Parameters
[in]irow number.
Warning
If you are using the methods AddInteraction, you don't need to call that method.

Definition at line 1284 of file Matrix_ArrayComplexSparseInline.cxx.

◆ AssembleRealRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::AssembleRealRow ( int  i)
inline

Assembles a row.

Parameters
[in]irow number.
Warning
If you are using the methods AddInteraction, you don't need to call that method.

Definition at line 1270 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Clear()

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Clear
inlineinherited

Clears the matrix.

This methods is equivalent to the destructor. On exit, the matrix is empty (0 by 0).

Definition at line 79 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Fill()

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allo >::Fill ( const complex< T0 > &  x)
inherited

Non-zero entries are set to a given value x.

real non-zero entries are set to real(x) whereas imaginary non-zero entries are set to imag(x)

Definition at line 531 of file Matrix_ArrayComplexSparse.cxx.

◆ Get() [1/2]

Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::entry_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Get ( int  i,
int  j 
)
inlineinherited

Unavailable access method.

This method is declared for consistency with other classes, but it is not defined because no reference can possibly be returned.

Parameters
[in]irow index.
[in]jcolumn index.
Returns
Raises an exception.

Definition at line 280 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Get() [2/2]

const Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::entry_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Get ( int  i,
int  j 
) const
inlineinherited

Unavailable access method.

This method is declared for consistency with other classes, but it is not defined because no reference can possibly be returned.

Parameters
[in]irow index.
[in]jcolumn index.
Returns
Raises an exception.

Definition at line 297 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetDataSize()

long Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetDataSize
inlineinherited

Returns the number of elements stored in memory (real+imaginary part).

Returns the number of elements stored in memory, i.e. the number of non-zero entries.

Returns
The number of elements stored in memory.

Definition at line 143 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetImag() [1/2]

Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetImag ( int  i,
int  j 
)
inlineinherited

Returns acces to imaginary part of A(i, j)

Parameters
[in]irow index.
[in]jcolumn index.
Returns
imaginary part of A(i, j)

Definition at line 402 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetImag() [2/2]

const Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetImag ( int  i,
int  j 
) const
inlineinherited

Returns acces to imaginary part of A(i, j)

Parameters
[in]irow index.
[in]jcolumn index.
Returns
imaginary part of A(i, j)

Definition at line 417 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetImagData()

Allocator::value_type * Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetImagData ( int  i) const
inlineinherited

Returns values of non-zero entries of a row (imaginary part).

Parameters
[in]irow number.
Returns
The array of values of non-zero entries of row i.

Definition at line 198 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetImagDataSize()

long Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetImagDataSize
inlineinherited

Returns the number of elements stored in memory (imaginary part).

Returns the number of elements stored in memory, i.e. the number of non-zero entries.

Returns
The number of elements stored in memory.

Definition at line 129 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetImagInd()

int * Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetImagInd ( int  i) const
inlineinherited

Returns column indices of non-zero entries in row (imaginary part).

Parameters
[in]irow number.
Returns
the array of column indices of non-zero entries of row i.

Definition at line 185 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetImagNonZeros()

long Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetImagNonZeros
inherited

Returns the number of non-zero elements (imaginary part).

Returns
The number of non-zero elements for imaginary part of matrix.

Definition at line 51 of file Matrix_ArrayComplexSparse.cxx.

◆ GetImagRowSize()

template<class T , class Prop , class Allocator >
int Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::GetImagRowSize ( int  i) const
inline

Returns the number of non-zero entries of a row.

Parameters
[in]irow number.
Returns
The number of non-zero entries of the row i.

Definition at line 1238 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetM() [1/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetM
inlineinherited

Returns the number of rows.

Returns
The number of rows.

Definition at line 69 of file Matrix_BaseInline.cxx.

◆ GetM() [2/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetM ( const CBLAS_TRANSPOSE &  status) const
inlineinherited

Returns the number of rows of the matrix possibly transposed.

Parameters
statusassumed status about the transposition of the matrix.
Returns
The number of rows of the possibly-transposed matrix.

Definition at line 122 of file Matrix_BaseInline.cxx.

◆ GetM() [3/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetM ( const Seldon::SeldonTranspose status) const
inlineinherited

Returns the number of rows of the matrix possibly transposed.

Parameters
statusassumed status about the transposition of the matrix.
Returns
The number of rows of the possibly-transposed matrix.

Definition at line 92 of file Matrix_BaseInline.cxx.

◆ GetN() [1/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetN
inlineinherited

Returns the number of columns.

Returns
The number of columns.

Definition at line 80 of file Matrix_BaseInline.cxx.

◆ GetN() [2/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetN ( const CBLAS_TRANSPOSE &  status) const
inlineinherited

Returns the number of columns of the matrix possibly transposed.

Parameters
statusassumed status about the transposition of the matrix.
Returns
The number of columns of the possibly-transposed matrix.

Definition at line 137 of file Matrix_BaseInline.cxx.

◆ GetN() [3/3]

template<class T >
int Seldon::VirtualMatrix< T >::GetN ( const Seldon::SeldonTranspose status) const
inlineinherited

Returns the number of columns of the matrix possibly transposed.

Parameters
statusassumed status about the transposition of the matrix.
Returns
The number of columns of the possibly-transposed matrix.

Definition at line 107 of file Matrix_BaseInline.cxx.

◆ GetNonZeros()

long Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetNonZeros
inlineinherited

Returns the number of elements stored in memory (real+imaginary part).

Returns the number of elements stored in memory, i.e. the number of non-zero entries.

Returns
The number of elements stored in memory.

Definition at line 101 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetReal() [1/2]

Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetReal ( int  i,
int  j 
)
inlineinherited

Returns acces to real part of A(i, j)

Parameters
[in]irow index.
[in]jcolumn index.
Returns
real part of A(i, j)

Definition at line 372 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetReal() [2/2]

const Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetReal ( int  i,
int  j 
) const
inlineinherited

Returns acces to real part of A(i, j)

Parameters
[in]irow index.
[in]jcolumn index.
Returns
real part of A(i, j)

Definition at line 387 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetRealData()

Allocator::value_type * Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetRealData ( int  i) const
inlineinherited

Returns values of non-zero entries of a row (real part).

Parameters
[in]irow number.
Returns
The array of values of non-zero entries of row i.

Definition at line 170 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetRealDataSize()

long Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetRealDataSize
inlineinherited

Returns the number of elements stored in memory (real part).

Returns the number of elements stored in memory, i.e. the number of non-zero entries.

Returns
The number of elements stored in memory.

Definition at line 115 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetRealInd()

int * Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetRealInd ( int  i) const
inlineinherited

Returns column indices of non-zero entries in row (real part).

Parameters
[in]irow number.
Returns
The array of column indices of non-zero entries of row i.

Definition at line 157 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetRealNonZeros()

long Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::GetRealNonZeros
inherited

Returns the number of non-zero elements (real part).

Returns
The number of non-zero elements for real part of matrix.

Definition at line 35 of file Matrix_ArrayComplexSparse.cxx.

◆ GetRealRowSize()

template<class T , class Prop , class Allocator >
int Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::GetRealRowSize ( int  i) const
inline

Returns the number of non-zero entries of a row.

Parameters
[in]irow number.
Returns
The number of non-zero entries of the row i.

Definition at line 1225 of file Matrix_ArrayComplexSparseInline.cxx.

◆ GetSize()

template<class T >
long Seldon::VirtualMatrix< T >::GetSize
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.

Returns
The number of elements in the matrix.

Definition at line 153 of file Matrix_BaseInline.cxx.

◆ IndexImag() [1/2]

int & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::IndexImag ( int  i,
int  j 
)
inlineinherited

Returns column number of j-th non-zero value of row i (imaginary part).

Parameters
[in]irow number.
[in]jlocal number.
Returns
column number of j-th non-zero entry of row i.

Definition at line 575 of file Matrix_ArrayComplexSparseInline.cxx.

◆ IndexImag() [2/2]

int Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::IndexImag ( int  i,
int  j 
) const
inlineinherited

Returns column number of j-th non-zero value of row i (imaginary part).

Parameters
[in]irow number.
[in]jlocal number.
Returns
Column number of j-th non-zero entry of row i.

Definition at line 555 of file Matrix_ArrayComplexSparseInline.cxx.

◆ IndexReal() [1/2]

int & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::IndexReal ( int  i,
int  j 
)
inlineinherited

Returns column number of j-th non-zero value of row i (real part).

Parameters
[in]irow number.
[in]jlocal number.
Returns
column number of j-th non-zero entry of row i.

Definition at line 493 of file Matrix_ArrayComplexSparseInline.cxx.

◆ IndexReal() [2/2]

int Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::IndexReal ( int  i,
int  j 
) const
inlineinherited

Returns column number of j-th non-zero value of row i (real part).

Parameters
[in]irow number.
[in]jlocal number.
Returns
Column number of j-th non-zero entry of row i.

Definition at line 473 of file Matrix_ArrayComplexSparseInline.cxx.

◆ NullifyImag() [1/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::NullifyImag
inlineinherited

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 693 of file Matrix_ArrayComplexSparseInline.cxx.

◆ NullifyImag() [2/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::NullifyImag ( int  i)
inlineinherited

Clears a row without releasing memory.

On exit, the row is empty and the memory has not been released. It is useful for low level manipulations on a Matrix instance.

Definition at line 635 of file Matrix_ArrayComplexSparseInline.cxx.

◆ NullifyReal() [1/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::NullifyReal
inlineinherited

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 679 of file Matrix_ArrayComplexSparseInline.cxx.

◆ NullifyReal() [2/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::NullifyReal ( int  i)
inlineinherited

Clears a row without releasing memory.

On exit, the row is empty and the memory has not been released. It is useful for low level manipulations on a Matrix instance.

Definition at line 623 of file Matrix_ArrayComplexSparseInline.cxx.

◆ operator()()

const Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::entry_type Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::operator() ( int  i,
int  j 
) const
inlineinherited

Access operator.

Returns the value of element (i, j).

Parameters
irow index.
jcolumn index.
Returns
Element (i, j) of the matrix.

Definition at line 221 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Print()

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Print
inherited

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 195 of file Matrix_ArrayComplexSparse.cxx.

◆ Read() [1/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Read ( istream &  FileStream)
inherited

Reads the matrix from an input stream.

Reads a matrix in binary format from an input stream.

Parameters
FileStreaminput stream

Definition at line 371 of file Matrix_ArrayComplexSparse.cxx.

◆ Read() [2/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Read ( string  FileName)
inherited

Reads the matrix from a file.

Reads a matrix stored in binary format in a file.

Parameters
FileNameinput file name.

Definition at line 346 of file Matrix_ArrayComplexSparse.cxx.

◆ ReadText() [1/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ReadText ( istream &  FileStream,
bool  cplx = false 
)
inherited

Reads the matrix from an input stream.

Reads a matrix from a stream in text format.

Parameters
FileStreaminput stream.

Definition at line 439 of file Matrix_ArrayComplexSparse.cxx.

◆ ReadText() [2/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ReadText ( string  FileName,
bool  cplx = false 
)
inherited

Reads the matrix from a file.

Reads the matrix from a file in text format.

Parameters
FileNameinput file name.

Definition at line 414 of file Matrix_ArrayComplexSparse.cxx.

◆ Reallocate()

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Reallocate ( int  i,
int  j 
)
inherited

Reallocates memory to resize the matrix.

On exit, the matrix is a i x j matrix.

Parameters
inumber of rows.
jnumber of columns.
Warning
Data is lost.

Definition at line 92 of file Matrix_ArrayComplexSparse.cxx.

◆ ReallocateImagRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ReallocateImagRow ( int  i,
int  j 
)
inline

Changes the size of a row.

Parameters
[in]irow number.
[in]jnew number of non-zero entries of the row.
Warning
Data may be lost.

Definition at line 1130 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ReallocateRealRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ReallocateRealRow ( int  i,
int  j 
)
inline

Changes the size of a row.

Parameters
[in]irow number.
[in]jnew number of non-zero entries of the row.
Warning
Data may be lost.

Definition at line 1116 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ReplaceImagIndexRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ReplaceImagIndexRow ( int  i,
IVect new_index 
)
inline

Sets column numbers of non-zero entries of a row.

Parameters
[in]icolumn number.
[in]new_indexnew column numbers.

Definition at line 1211 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ReplaceRealIndexRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ReplaceRealIndexRow ( int  i,
IVect new_index 
)
inline

Sets column numbers of non-zero entries of a row.

Parameters
[in]icolumn number.
[in]new_indexnew column numbers.

Definition at line 1197 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Resize()

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Resize ( int  i,
int  j 
)
inherited

Reallocates additional memory to resize the matrix.

On exit, the matrix is a i x j matrix.

Parameters
inumber of rows.
jnumber of columns.
Note
Data is kept.

Definition at line 115 of file Matrix_ArrayComplexSparse.cxx.

◆ ResizeImagRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ResizeImagRow ( int  i,
int  j 
)
inline

Changes the size of a row.

Parameters
[in]irow number.
[in]jnew number of non-zero entries of the row.
Note
Data is kept.

Definition at line 1158 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ResizeRealRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::ResizeRealRow ( int  i,
int  j 
)
inline

Changes the size of a row.

Parameters
[in]irow number.
[in]jnew number of non-zero entries of the row.
Note
Data is kept.

Definition at line 1144 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Set()

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Set ( int  i,
int  j,
const entry_type &  x 
)
inherited

Sets element (i, j) of matrix.

Parameters
[in]irow index.
[in]jcolumn index.
[in]xA(i, j) = x

Definition at line 162 of file Matrix_ArrayComplexSparse.cxx.

◆ SetImagData() [1/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::SetImagData ( int  i,
int  n,
value_type *  val,
int *  ind 
)
inlineinherited

Redefines a row/column of the matrix.

Parameters
[in]irow/col number
[in]nnumber of non-zero entries in the row
[in]valvalues
[in]indcolumn numbers

Definition at line 611 of file Matrix_ArrayComplexSparseInline.cxx.

◆ SetImagData() [2/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::SetImagData ( int  m,
int  n,
Vector< value_type, VectSparse, Allocator > *  val 
)
inlineinherited

Redefines the imaginary part of the matrix.

Parameters
[in]mnew number of rows.
[in]nnew number of columns.
[in]valarray of sparse rows/columns.

Definition at line 665 of file Matrix_ArrayComplexSparseInline.cxx.

◆ SetRealData() [1/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::SetRealData ( int  i,
int  n,
value_type *  val,
int *  ind 
)
inlineinherited

Redefines a row/column of the matrix.

Parameters
[in]irow/col number
[in]nnumber of non-zero entries in the row
[in]valvalues
[in]indcolumn numbers

Definition at line 596 of file Matrix_ArrayComplexSparseInline.cxx.

◆ SetRealData() [2/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::SetRealData ( int  m,
int  n,
Vector< value_type, VectSparse, Allocator > *  val 
)
inlineinherited

Redefines the real part of the matrix.

Parameters
[in]mnew number of rows.
[in]nnew number of columns.
[in]valarray of sparse rows/columns.

Definition at line 649 of file Matrix_ArrayComplexSparseInline.cxx.

◆ SwapImagRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::SwapImagRow ( int  i,
int  j 
)
inline

Swaps two rows.

Parameters
[in]ifirst row number.
[in]jsecond row number.

Definition at line 1184 of file Matrix_ArrayComplexSparseInline.cxx.

◆ SwapRealRow()

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayRowComplexSparse, Allocator >::SwapRealRow ( int  i,
int  j 
)
inline

Swaps two rows.

Parameters
[in]ifirst row number.
[in]jsecond row number.

Definition at line 1171 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Val() [1/2]

Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::entry_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Val ( int  i,
int  j 
)
inlineinherited

Unavailable access method.

This method is declared for consistency with other classes, but it is not defined because no reference can possibly be returned.

Parameters
[in]irow index.
[in]jcolumn index.
Returns
Raises an exception.

Definition at line 246 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Val() [2/2]

const Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::entry_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Val ( int  i,
int  j 
) const
inlineinherited

Unavailable access method.

This method is declared for consistency with other classes, but it is not defined because no reference can possibly be returned.

Parameters
[in]irow index.
[in]jcolumn index.
Returns
Raises an exception.

Definition at line 263 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ValImag() [1/2]

Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ValImag ( int  i,
int  j 
)
inlineinherited

Returns acces to imaginary part of A(i, j)

Parameters
[in]irow index.
[in]jcolumn index.
Returns
imaginary part of A(i, j)

Definition at line 342 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ValImag() [2/2]

const Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ValImag ( int  i,
int  j 
) const
inlineinherited

Returns acces to imaginary part of A(i, j)

Parameters
[in]irow index.
[in]jcolumn index.
Returns
imaginary part of A(i, j)

Definition at line 357 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ValReal() [1/2]

Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ValReal ( int  i,
int  j 
)
inlineinherited

Returns acces to real part of A(i, j)

Parameters
[in]irow index.
[in]jcolumn index.
Returns
real part of A(i, j)

Definition at line 312 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ValReal() [2/2]

const Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ValReal ( int  i,
int  j 
) const
inlineinherited

Returns acces to real part of A(i, j)

Parameters
[in]irow index.
[in]jcolumn index.
Returns
real part of A(i, j)

Definition at line 327 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ValueImag() [1/2]

Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ValueImag ( int  i,
int  j 
)
inlineinherited

Returns j-th non-zero value of row i (imaginary part).

Parameters
[in]irow number.
[in]jlocal number.
Returns
j-th non-zero entry of row i.

Definition at line 535 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ValueImag() [2/2]

const Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ValueImag ( int  i,
int  j 
) const
inlineinherited

Returns j-th non-zero value of row i (imaginary part).

Parameters
[in]irow number.
[in]jlocal number.
Returns
j-th non-zero entry of row i.

Definition at line 514 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ValueReal() [1/2]

Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ValueReal ( int  i,
int  j 
)
inlineinherited

Returns j-th non-zero value of row i (real part).

Parameters
[in]irow number.
[in]jlocal number.
Returns
j-th non-zero entry of row i.

Definition at line 453 of file Matrix_ArrayComplexSparseInline.cxx.

◆ ValueReal() [2/2]

const Allocator::value_type & Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::ValueReal ( int  i,
int  j 
) const
inlineinherited

Returns j-th non-zero value of row i (real part).

Parameters
[in]irow number.
[in]jlocal number.
Returns
j-th non-zero entry of row i.

Definition at line 432 of file Matrix_ArrayComplexSparseInline.cxx.

◆ Write() [1/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Write ( ostream &  FileStream) const
inherited

Writes the matrix to an output stream.

Stores the matrix in a file in binary format. The number of rows (integer) and the number of columns (integer) are written and matrix elements are then written in the same order as in memory (e.g. row-major storage).

Parameters
FileStreamoutput file name.

Definition at line 260 of file Matrix_ArrayComplexSparse.cxx.

◆ Write() [2/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::Write ( string  FileName) const
inherited

Writes the matrix in a file.

Stores the matrix in a file in binary format. The number of rows (integer) and the number of columns (integer) are written and matrix elements are then written in the same order as in memory (e.g. row-major storage).

Parameters
FileNameoutput file name.

Definition at line 232 of file Matrix_ArrayComplexSparse.cxx.

◆ WriteText() [1/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::WriteText ( ostream &  FileStream,
bool  cplx = false 
) const
inherited

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.

Parameters
FileStreamoutput file name.

Definition at line 319 of file Matrix_ArrayComplexSparse.cxx.

◆ WriteText() [2/2]

void Seldon::Matrix_ArrayComplexSparse< T, Prop, ArrayRowComplexSparse , Allocator >::WriteText ( string  FileName,
bool  cplx = false 
) const
inherited

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.

Parameters
FileNameoutput file name.

Definition at line 291 of file Matrix_ArrayComplexSparse.cxx.


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