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

Represents a row or column vector of a sparse matrix. More...

#include <srmatrix.hpp>

List of all members.

Public Member Functions

srmatrix_subvoperator*= (const real &)
 Assign the componentwise product of the subvector with a scalar to the subvector.
srmatrix_subvoperator+= (const srvector &)
 Assign the sum of the subvector with a vector to the subvector.
srmatrix_subvoperator+= (const srvector_slice &)
 Assign the sum of the subvector with a vector to the subvector.
srmatrix_subvoperator+= (const rvector &)
 Assign the sum of the subvector with a vector to the subvector.
srmatrix_subvoperator+= (const rvector_slice &)
 Assign the sum of the subvector with a vector to the subvector.
srmatrix_subvoperator-= (const srvector &)
 Assign the difference of the subvector with a vector to the subvector.
srmatrix_subvoperator-= (const srvector_slice &)
 Assign the difference of the subvector with a vector to the subvector.
srmatrix_subvoperator-= (const rvector &)
 Assign the difference of the subvector with a vector to the subvector.
srmatrix_subvoperator-= (const rvector_slice &)
 Assign the difference of the subvector with a vector to the subvector.
srmatrix_subvoperator/= (const real &)
 Assign the componentwise division of the subvector with a scalar to the subvector.
srmatrix_subvoperator= (const srmatrix_subv &v)
 Assigns a vector to a subvector.
srmatrix_subvoperator= (const real &v)
 Assigns v to all elements of the subvector.
srmatrix_subvoperator= (const srvector &v)
 Assigns a vector to a subvector.
srmatrix_subvoperator= (const srvector_slice &v)
 Assigns a vector to a subvector.
srmatrix_subvoperator= (const rvector &v)
 Assigns a vector to a subvector.
srmatrix_subvoperator= (const rvector_slice &v)
 Assigns a vector to a subvector.
realoperator[] (const int i)
 Returns a reference to the i-th element of the subvector.
const real operator[] (const int i) const
 Returns a copy of the i-th element of the subvector.

Friends

int Lb (const srmatrix_subv &)
 Returns the lower index bound of the subvector.
srvector operator- (const srmatrix_subv &)
 Unary negation operator.
std::istream & operator>> (std::istream &, srmatrix_subv &)
 Standard input operator for subvectors.
int Ub (const srmatrix_subv &)
 Returns the upper index bound of the subvector.
int VecLen (const srmatrix_subv &)
 Returns the length of the subvector.

Detailed Description

Represents a row or column vector of a sparse matrix.

This is a helper class created by the [] operator to represent a row or column of a sparse matrix. This helper class provides read and write access to the subvector using the standard operators. It is normally not necessary for the user to use this class explicitly, which is why the constructors are private.

Definition at line 2157 of file srmatrix.hpp.


Member Function Documentation

real& cxsc::srmatrix_subv::operator[] ( const int  i) [inline]

Returns a reference to the i-th element of the subvector.

A refernce to the i-th element is returned. If this element is not explicitly stored, it is added as an explicit zero entry to the data structure.

Definition at line 2179 of file srmatrix.hpp.

const real cxsc::srmatrix_subv::operator[] ( const int  i) const [inline]

Returns a copy of the i-th element of the subvector.

A copy to the i-th element is returned. If this element is not explicitly stored, 0 is returned

Definition at line 2199 of file srmatrix.hpp.


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