C-XSC - A C++ Class Library for Extended Scientific Computing
2.5.4
|
A slice of a sparse complex matrix. More...
#include <scmatrix.hpp>
Public Member Functions | |
complex & | element (const int i, const int j) |
Returns a reference to the element (i,j) of the matrix. | |
const complex | operator() (const int i, const int j) const |
Returns a copy of the element (i,j) of the matrix. | |
scmatrix_slice & | operator*= (const srmatrix_slice &M) |
Assigns the product of the sparse slice and M to the slice. | |
scmatrix_slice & | operator*= (const scmatrix_slice &M) |
Assigns the product of the sparse slice and M to the slice. | |
scmatrix_slice & | operator*= (const srmatrix &M) |
Assigns the product of the sparse slice and M to the slice. | |
scmatrix_slice & | operator*= (const scmatrix &M) |
Assigns the product of the sparse slice and M to the slice. | |
scmatrix_slice & | operator*= (const rmatrix &M) |
Assigns the product of the sparse slice and M to the slice. | |
scmatrix_slice & | operator*= (const cmatrix &M) |
Assigns the product of the sparse slice and M to the slice. | |
scmatrix_slice & | operator*= (const rmatrix_slice &M) |
Assigns the product of the sparse slice and M to the slice. | |
scmatrix_slice & | operator*= (const cmatrix_slice &M) |
Assigns the product of the sparse slice and M to the slice. | |
scmatrix_slice & | operator*= (const real &r) |
Assigns the component wise product of the sparse slice and r to the slice. | |
scmatrix_slice & | operator*= (const complex &r) |
Assigns the component wise product of the sparse slice and r to the slice. | |
scmatrix_slice & | operator+= (const srmatrix_slice &M) |
Assigns the element wise sum of the sparse slice and M to the slice. | |
scmatrix_slice & | operator+= (const scmatrix_slice &M) |
Assigns the element wise sum of the sparse slice and M to the slice. | |
scmatrix_slice & | operator+= (const srmatrix &M) |
Assigns the element wise sum of the sparse slice and M to the slice. | |
scmatrix_slice & | operator+= (const scmatrix &M) |
Assigns the element wise sum of the sparse slice and M to the slice. | |
scmatrix_slice & | operator+= (const rmatrix &M) |
Assigns the element wise sum of the sparse slice and M to the slice. | |
scmatrix_slice & | operator+= (const cmatrix &M) |
Assigns the element wise sum of the sparse slice and M to the slice. | |
scmatrix_slice & | operator+= (const rmatrix_slice &M) |
Assigns the element wise sum of the sparse slice and M to the slice. | |
scmatrix_slice & | operator+= (const cmatrix_slice &M) |
Assigns the element wise sum of the sparse slice and M to the slice. | |
scmatrix_slice & | operator-= (const srmatrix_slice &M) |
Assigns the element wise difference of the sparse slice and M to the slice. | |
scmatrix_slice & | operator-= (const scmatrix_slice &M) |
Assigns the element wise difference of the sparse slice and M to the slice. | |
scmatrix_slice & | operator-= (const srmatrix &M) |
Assigns the element wise difference of the sparse slice and M to the slice. | |
scmatrix_slice & | operator-= (const scmatrix &M) |
Assigns the element wise difference of the sparse slice and M to the slice. | |
scmatrix_slice & | operator-= (const rmatrix &M) |
Assigns the element wise difference of the sparse slice and M to the slice. | |
scmatrix_slice & | operator-= (const cmatrix &M) |
Assigns the element wise difference of the sparse slice and M to the slice. | |
scmatrix_slice & | operator-= (const rmatrix_slice &M) |
Assigns the element wise difference of the sparse slice and M to the slice. | |
scmatrix_slice & | operator-= (const cmatrix_slice &M) |
Assigns the element wise difference of the sparse slice and M to the slice. | |
scmatrix_slice & | operator/= (const real &r) |
Assigns the component wise division of the sparse slice and M to the slice. | |
scmatrix_slice & | operator/= (const complex &r) |
Assigns the component wise division of the sparse slice and M to the slice. | |
scmatrix_slice & | operator= (const real &C) |
Assing C to all elements of the slice. | |
scmatrix_slice & | operator= (const complex &C) |
Assing C to all elements of the slice. | |
scmatrix_slice & | operator= (const srmatrix &C) |
Assing C to the slice. | |
scmatrix_slice & | operator= (const scmatrix &C) |
Assing C to the slice. | |
scmatrix_slice & | operator= (const rmatrix &C) |
Assing C to the slice. | |
scmatrix_slice & | operator= (const cmatrix &C) |
Assing C to the slice. | |
scmatrix_slice & | operator= (const rmatrix_slice &C) |
Assing C to the slice. | |
scmatrix_slice & | operator= (const cmatrix_slice &C) |
Assing C to the slice. | |
scmatrix_slice & | operator= (const srmatrix_slice &C) |
Assing C to the slice. | |
scmatrix_slice & | operator= (const scmatrix_slice &C) |
Assing C to the slice. | |
scmatrix_subv | operator[] (const int) |
Returns a row of the matrix. | |
scmatrix_subv | operator[] (const cxscmatrix_column &) |
Returns a column of the matrix. | |
const scmatrix_subv | operator[] (const int) const |
Returns a row of the matrix. | |
const scmatrix_subv | operator[] (const cxscmatrix_column &) const |
Returns a column of the matrix. | |
Friends | |
int | ColLen (const scmatrix_slice &) |
Returns the number of rows of the matrix slice. | |
srmatrix | Im (const scmatrix_slice &) |
Returns the imaginary part of the slice. | |
int | Lb (const scmatrix_slice &, const int) |
Returns the lower index bound of the rows (if i==ROW) or columns (if i==COL) of the slice. | |
std::ostream & | operator<< (std::ostream &, const scmatrix_slice &) |
Standard output operator for sparse matrix slice. | |
srmatrix | Re (const scmatrix_slice &) |
Return the real part of the slice. | |
int | RowLen (const scmatrix_slice &) |
Returns the number columns of the matrix slice. | |
int | Ub (const scmatrix_slice &, const int) |
Returns the upper index bound of the rows (if i==ROW) or columns (if i==COL) of the slice. |
A slice of a sparse complex 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 1956 of file scmatrix.hpp.
complex& cxsc::scmatrix_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 2258 of file scmatrix.hpp.
Referenced by cxsc::scmatrix_subv::operator[]().
const complex cxsc::scmatrix_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 2244 of file scmatrix.hpp.
std::ostream& operator<< | ( | std::ostream & | os, |
const scmatrix_slice & | M | ||
) | [friend] |
Standard output operator for sparse matrix slice.
The output format is set by global flags, default is dense output. Use cout << SparseInOut; for sparse output or cout << MatrixMarketInOut; for output in matrix market format.
Definition at line 3322 of file scmatrix.hpp.