C-XSC - A C++ Class Library for Extended Scientific Computing  2.5.4
cxsc::srmatrix_slice Class Reference

A slice of a sparse real matrix. More...

#include <srmatrix.hpp>

Collaboration diagram for cxsc::srmatrix_slice:

List of all members.

Public Member Functions

realelement (const int i, const int j)
 Returns a reference to the element (i,j) of the matrix.
const real operator() (const int i, const int j) const
 Returns a copy of the element (i,j) of the matrix.
srmatrix_sliceoperator*= (const srmatrix_slice &M)
 Assigns the product of the sparse slice and M to the slice.
srmatrix_sliceoperator*= (const srmatrix &M)
 Assigns the product of the sparse slice and M to the slice.
srmatrix_sliceoperator*= (const rmatrix &M)
 Assigns the product of the sparse slice and M to the slice.
srmatrix_sliceoperator*= (const rmatrix_slice &M)
 Assigns the product of the sparse slice and M to the slice.
srmatrix_sliceoperator*= (const real &r)
 Assigns the component wise product of the sparse slice and r to the slice.
srmatrix_sliceoperator+= (const srmatrix_slice &M)
 Assigns the element wise sum of the sparse slice and M to the slice.
srmatrix_sliceoperator+= (const srmatrix &M)
 Assigns the element wise sum of the sparse slice and M to the slice.
srmatrix_sliceoperator+= (const rmatrix &M)
 Assigns the element wise sum of the sparse slice and M to the slice.
srmatrix_sliceoperator+= (const rmatrix_slice &M)
 Assigns the element wise sum of the sparse slice and M to the slice.
srmatrix_sliceoperator-= (const srmatrix_slice &M)
 Assigns the element wise difference of the sparse slice and M to the slice.
srmatrix_sliceoperator-= (const srmatrix &M)
 Assigns the element wise difference of the sparse slice and M to the slice.
srmatrix_sliceoperator-= (const rmatrix &M)
 Assigns the element wise difference of the sparse slice and M to the slice.
srmatrix_sliceoperator-= (const rmatrix_slice &M)
 Assigns the element wise difference of the sparse slice and M to the slice.
srmatrix_sliceoperator/= (const real &r)
 Assigns the component wise division of the sparse slice and M to the slice.
srmatrix_sliceoperator= (const real &C)
 Assing C to all elements of the slice.
srmatrix_sliceoperator= (const srmatrix &C)
 Assing C to the slice.
srmatrix_sliceoperator= (const rmatrix &C)
 Assing C to the slice.
srmatrix_sliceoperator= (const rmatrix_slice &C)
 Assing C to the slice.
srmatrix_sliceoperator= (const srmatrix_slice &C)
 Assing C to the slice.
srmatrix_subv operator[] (const int)
 Returns a row of the matrix.
srmatrix_subv operator[] (const cxscmatrix_column &)
 Returns a column of the matrix.
const srmatrix_subv operator[] (const int) const
 Returns a row of the matrix.
const srmatrix_subv operator[] (const cxscmatrix_column &) const
 Returns a column of the matrix.

Friends

int ColLen (const srmatrix_slice &)
 Returns the number of rows of the matrix slice.
int Lb (const srmatrix_slice &, const int)
 Returns the lower index bound of the rows (if i==ROW) or columns (if i==COL) of the slice.
int RowLen (const srmatrix_slice &)
 Returns the number columns of the matrix slice.
int Ub (const srmatrix_slice &, const int)
 Returns the upper index bound of the rows (if i==ROW) or columns (if i==COL) of the slice.

Detailed Description

A slice of a sparse real matrix.

Represents a slice of a sparse real matrix. This helper class provides read and write access to such a slice using the standard operators. It should normally not be necessary for the user to explicitly work with this data type, which is why the constructors are private.

Definition at line 1360 of file srmatrix.hpp.


Member Function Documentation

real& cxsc::srmatrix_slice::element ( const int  i,
const int  j 
) [inline]

Returns a reference to the element (i,j) of the matrix.

Returns a reference to the (i,j)-th element. If the element is not explicitly stored, it is added as an explicit zero entry to the data structure. Using this function is faster than using A[i][j], since no temporary subvecto object must be created.

Definition at line 1552 of file srmatrix.hpp.

Referenced by cxsc::srmatrix_subv::operator[]().

const real cxsc::srmatrix_slice::operator() ( const int  i,
const int  j 
) const [inline]

Returns a copy of the element (i,j) of the matrix.

This operators can only be usd for read access. Note that accessing single elements of a sparse matrix is more expensive than for dense matrices and should in general be avoided.

Definition at line 1538 of file srmatrix.hpp.


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