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

Column-major sparse-matrix class. More...

#include <Matrix_ArraySparse.hxx>

Inheritance diagram for Seldon::Matrix< T, Prop, ArrayColSparse, Allocator >:
Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse, Allocator > Seldon::VirtualMatrix< T >

Public Types

typedef Allocator::value_type value_type
 
typedef Prop property
 
typedef ArrayColSparse 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 T entry_type
 
typedef T & access_type
 
typedef T const_access_type
 

Public Member Functions

 Matrix ()
 Default constructor. More...
 
 Matrix (int i, int j)
 Constructor. More...
 
void ClearColumn (int i)
 Clears column i.
 
void ReallocateColumn (int i, int j)
 
void ResizeColumn (int i, int j)
 Reallocates column i. More...
 
void SwapColumn (int i, int i_)
 Swaps two columns. More...
 
void ReplaceIndexColumn (int i, IVect &new_index)
 Sets row numbers of non-zero entries of a column. More...
 
int GetColumnSize (int i) const
 Returns the number of non-zero entries of a column. More...
 
void PrintColumn (int i) const
 Displays non-zero values of a column.
 
void AssembleColumn (int i)
 Assembles a column. More...
 
void AddInteraction (int i, int j, const T &val)
 Adds a coefficient in the matrix. More...
 
void AddInteractionRow (int, int, int *, T *, bool already_sorted=false)
 Adds coefficients in a row. More...
 
void AddInteractionColumn (int, int, int *, T *, bool already_sorted=false)
 Adds coefficients in a column. More...
 
void AddInteractionRow (int i, int nb, const Vector< int > &col, const Vector< T > &val, bool already_sorted=false)
 Adds coefficients in a row. More...
 
void AddInteractionColumn (int i, int nb, const Vector< int > &row, const Vector< T > &val, bool already_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 GetNonZeros () const
 Returns the number of non-zero entries. More...
 
size_t GetMemorySize () const
 returns size of matrix in bytes
 
long GetDataSize () const
 Returns the number of elements stored in memory. More...
 
int * GetIndex (int i) const
 Returns (row or column) indices of non-zero entries in row. More...
 
T * GetData (int i) const
 Returns values of non-zero entries of a row/column. More...
 
Vector< T, VectSparse, Allocator > * GetData () const
 Returns values of non-zero entries. More...
 
const T operator() (int i, int j) const
 Access operator. More...
 
T & Get (int i, int j)
 Access to element (i, j). More...
 
const T & Get (int i, int j) const
 Access to element (i, j). More...
 
T & Val (int i, int j)
 Access method. More...
 
const T & Val (int i, int j) const
 Access operator. More...
 
void Set (int i, int j, const T &x)
 Sets an element of the matrix. More...
 
void SetEntry (int i, int j, const T &x)
 Sets an element of the matrix. More...
 
const T & Value (int num_row, int i) const
 Returns j-th non-zero value of row/column i. More...
 
T & Value (int num_row, int i)
 Returns j-th non-zero value of row/column i. More...
 
int Index (int num_row, int i) const
 Returns column/row number of j-th non-zero value of row/column i. More...
 
int & Index (int num_row, int i)
 Returns column/row number of j-th non-zero value of row/column i. More...
 
void SetData (int, int, Vector< T, VectSparse, Allocator > *)
 Redefines the matrix. More...
 
void SetData (int, int, T *, int *)
 Redefines a row/column of the matrix. More...
 
void Nullify (int i)
 Clears a row without releasing memory. More...
 
void Nullify ()
 Clears the matrix without releasing memory. More...
 
void Print () const
 Displays the matrix on the standard output. More...
 
void Assemble ()
 Assembles the matrix. More...
 
void RemoveSmallEntry (const T0 &epsilon)
 Removes small coefficients from entries. More...
 
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 T0 &x)
 Non-zero entries are set to a given value x.
 
void FillRand ()
 Non-zero entries take a random value.
 
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...
 
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< T, VectSparse, Allocator >, VectFull, NewAlloc< Vector< T, VectSparse, Allocator > > > val_
 rows or columns
 
int m_
 
int n_
 

Detailed Description

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

Column-major sparse-matrix class.

Definition at line 172 of file Matrix_ArraySparse.hxx.

Constructor & Destructor Documentation

◆ Matrix() [1/2]

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

Default constructor.

Builds an empty matrix.

Definition at line 530 of file Matrix_ArraySparseInline.cxx.

◆ Matrix() [2/2]

template<class T , class Prop , class Allocator >
Seldon::Matrix< T, Prop, ArrayColSparse, 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 543 of file Matrix_ArraySparseInline.cxx.

Member Function Documentation

◆ AddInteraction()

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

Adds a coefficient in the matrix.

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

Definition at line 649 of file Matrix_ArraySparseInline.cxx.

◆ AddInteractionColumn() [1/2]

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayColSparse, Allocator >::AddInteractionColumn ( int  i,
int  nb,
const Vector< int > &  row,
const Vector< T > &  val,
bool  already_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 547 of file Matrix_ArraySparse.cxx.

◆ AddInteractionColumn() [2/2]

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayColSparse, Allocator >::AddInteractionColumn ( int  i,
int  nb,
int *  row_,
T *  value_,
bool  already_sorted = false 
)

Adds coefficients in a column.

Parameters
[in]icolumn number.
[in]nbnumber of coefficients to add.
[in]row_row numbers of coefficients.
[in]value_values of coefficients.

Definition at line 508 of file Matrix_ArraySparse.cxx.

◆ AddInteractionRow() [1/2]

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayColSparse, Allocator >::AddInteractionRow ( int  i,
int  nb,
const Vector< int > &  col,
const Vector< T > &  val,
bool  already_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 530 of file Matrix_ArraySparse.cxx.

◆ AddInteractionRow() [2/2]

template<class T , class Prop , class Allocator >
void Seldon::Matrix< T, Prop, ArrayColSparse, Allocator >::AddInteractionRow ( int  i,
int  nb,
int *  col_,
T *  value_,
bool  already_sorted = false 
)

Adds coefficients in a row.

Parameters
[in]irow number.
[in]nbnumber of coefficients to add.
[in]col_column numbers of coefficients.
[in]value_values of coefficients.

Definition at line 486 of file Matrix_ArraySparse.cxx.

◆ Assemble()

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Assemble
inherited

Assembles the matrix.

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

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

Definition at line 159 of file Matrix_ArraySparse.cxx.

◆ AssembleColumn()

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

Assembles a column.

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

Definition at line 635 of file Matrix_ArraySparseInline.cxx.

◆ Clear()

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 66 of file Matrix_ArraySparseInline.cxx.

◆ Get() [1/2]

T & Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Get ( int  i,
int  j 
)
inlineinherited

Access to element (i, j).

Returns the value of element (i, j).

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

Definition at line 178 of file Matrix_ArraySparseInline.cxx.

◆ Get() [2/2]

const T & Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Get ( int  i,
int  j 
) const
inlineinherited

Access to element (i, j).

Returns the value of element (i, j).

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

Definition at line 198 of file Matrix_ArraySparseInline.cxx.

◆ GetColumnSize()

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

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

Parameters
[in]icolumn number.
Returns
The number of non-zero entries of the column i.

Definition at line 614 of file Matrix_ArraySparseInline.cxx.

◆ GetData() [1/2]

Vector< T, VectSparse, Allocat > * Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocat >::GetData
inlineinherited

Returns values of non-zero entries.

Returns
Array of sparse rows There is a different array for each row/column.

Definition at line 127 of file Matrix_ArraySparseInline.cxx.

◆ GetData() [2/2]

T * Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::GetData ( int  i) const
inlineinherited

Returns values of non-zero entries of a row/column.

Parameters
[in]irow (or column) number.
Returns
The array of values of non-zero entries of row/column i.

Definition at line 114 of file Matrix_ArraySparseInline.cxx.

◆ GetDataSize()

long Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::GetDataSize
inlineinherited

Returns the number of elements stored in memory.

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 86 of file Matrix_ArraySparseInline.cxx.

◆ GetIndex()

int * Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::GetIndex ( int  i) const
inlineinherited

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

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

Definition at line 100 of file Matrix_ArraySparseInline.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_ArraySparse< T, Prop, ArrayColSparse , Allocator >::GetNonZeros
inherited

Returns the number of non-zero entries.

Returns
The number of non-zero entries.

Definition at line 97 of file Matrix_ArraySparse.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.

◆ Index() [1/2]

int & Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Index ( int  i,
int  j 
)
inlineinherited

Returns column/row number of j-th non-zero value of row/column i.

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

Definition at line 345 of file Matrix_ArraySparseInline.cxx.

◆ Index() [2/2]

int Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Index ( int  i,
int  j 
) const
inlineinherited

Returns column/row number of j-th non-zero value of row/column i.

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

Definition at line 325 of file Matrix_ArraySparseInline.cxx.

◆ Nullify() [1/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Nullify
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 406 of file Matrix_ArraySparseInline.cxx.

◆ Nullify() [2/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Nullify ( 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 378 of file Matrix_ArraySparseInline.cxx.

◆ operator()()

const T Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::operator() ( int  i,
int  j 
) const
inlineinherited

Access operator.

Returns the value of element (i, j).

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

Definition at line 157 of file Matrix_ArraySparseInline.cxx.

◆ Print()

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 132 of file Matrix_ArraySparse.cxx.

◆ Read() [1/2]

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

Reads the matrix from an input stream.

Reads a matrix in binary format from an input stream. The number of rows (integer) and the number of columns (integer) are read and matrix elements are then read in the same order as it should be in memory (e.g. row-major storage).

Parameters
FileStreamoutput file name.

Definition at line 399 of file Matrix_ArraySparse.cxx.

◆ Read() [2/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Read ( string  FileName)
inherited

Reads the matrix from a file.

Reads a matrix stored in binary format in a file. The number of rows (integer) and the number of columns (integer) are read and matrix elements are then read in the same order as it should be in memory (e.g. row-major storage).

Parameters
FileNameoutput file name.

Definition at line 371 of file Matrix_ArraySparse.cxx.

◆ ReadText() [1/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 462 of file Matrix_ArraySparse.cxx.

◆ ReadText() [2/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 437 of file Matrix_ArraySparse.cxx.

◆ Reallocate()

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 42 of file Matrix_ArraySparse.cxx.

◆ RemoveSmallEntry()

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::RemoveSmallEntry ( const T0 &  epsilon)
inherited

Removes small coefficients from entries.

Parameters
[in]epsilonentries whose values are below epsilon are removed.

Definition at line 173 of file Matrix_ArraySparse.cxx.

◆ ReplaceIndexColumn()

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

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

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

Definition at line 600 of file Matrix_ArraySparseInline.cxx.

◆ Resize()

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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. Data is kept

Definition at line 63 of file Matrix_ArraySparse.cxx.

◆ ResizeColumn()

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

Reallocates column i.

Parameters
[in]icolumn number.
[in]jnew number of non-zero entries in the column.

Definition at line 575 of file Matrix_ArraySparseInline.cxx.

◆ Set()

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Set ( int  i,
int  j,
const T &  x 
)
inlineinherited

Sets an element of the matrix.

Parameters
irow index.
jcolumn index.
xnew value for the matrix element (i, j).

Definition at line 258 of file Matrix_ArraySparseInline.cxx.

◆ SetData() [1/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::SetData ( int  i,
int  n,
T *  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 366 of file Matrix_ArraySparseInline.cxx.

◆ SetData() [2/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::SetData ( int  m,
int  n,
Vector< T, VectSparse, Allocator > *  val 
)
inlineinherited

Redefines the matrix.

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

Definition at line 392 of file Matrix_ArraySparseInline.cxx.

◆ SetEntry()

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::SetEntry ( int  i,
int  j,
const T &  x 
)
inlineinherited

Sets an element of the matrix.

Parameters
irow index.
jcolumn index.
xnew value for the matrix element (i, j).

Definition at line 272 of file Matrix_ArraySparseInline.cxx.

◆ SwapColumn()

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

Swaps two columns.

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

Definition at line 587 of file Matrix_ArraySparseInline.cxx.

◆ Val() [1/2]

T & Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Val ( int  i,
int  j 
)
inlineinherited

Access method.

Returns the value of element (i, j).

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

Definition at line 217 of file Matrix_ArraySparseInline.cxx.

◆ Val() [2/2]

const T & Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Val ( 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 238 of file Matrix_ArraySparseInline.cxx.

◆ Value() [1/2]

T & Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Value ( int  i,
int  j 
)
inlineinherited

Returns j-th non-zero value of row/column i.

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

Definition at line 306 of file Matrix_ArraySparseInline.cxx.

◆ Value() [2/2]

const T & Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , Allocator >::Value ( int  i,
int  j 
) const
inlineinherited

Returns j-th non-zero value of row/column i.

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

Definition at line 286 of file Matrix_ArraySparseInline.cxx.

◆ Write() [1/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 287 of file Matrix_ArraySparse.cxx.

◆ Write() [2/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 259 of file Matrix_ArraySparse.cxx.

◆ WriteText() [1/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 342 of file Matrix_ArraySparse.cxx.

◆ WriteText() [2/2]

void Seldon::Matrix_ArraySparse< T, Prop, ArrayColSparse , 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 314 of file Matrix_ArraySparse.cxx.


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