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

Helper class for slices of sparse vectors. More...

#include <scivector.hpp>

List of all members.

Public Member Functions

real density () const
 Returns the density of the vector slice (the number of non zero elements divided by the number of elements)
int get_nnz () const
 Returns the number of non zero elements of this vector slice (note that this includes explicitly stored zeros)
scivector_sliceoperator&= (const ivector &v)
 Operator for element-wise intersection with a vector, result is assigned to the vector slice.
scivector_sliceoperator&= (const civector &v)
 Operator for element-wise intersection with a vector, result is assigned to the vector slice.
scivector_sliceoperator&= (const ivector_slice &v)
 Operator for element-wise intersection with a vector, result is assigned to the vector slice.
scivector_sliceoperator&= (const civector_slice &v)
 Operator for element-wise intersection with a vector, result is assigned to the vector slice.
scivector_sliceoperator&= (const sivector &v)
 Operator for element-wise intersection with a vector, result is assigned to the vector slice.
scivector_sliceoperator&= (const scivector &v)
 Operator for element-wise intersection with a vector, result is assigned to the vector slice.
scivector_sliceoperator&= (const sivector_slice &v)
 Operator for element-wise intersection with a vector, result is assigned to the vector slice.
scivector_sliceoperator&= (const scivector_slice &v)
 Operator for element-wise intersection with a vector, result is assigned to the vector slice.
const cinterval operator() (const int i) const
 Returns a copy of the i-th (according to the currently used indexing) element of the vector slice.
scivector_sliceoperator*= (const real &s)
 Operator for multiplication with a scalar, result is assigned to the vector slice.
scivector_sliceoperator*= (const complex &s)
 Operator for multiplication with a scalar, result is assigned to the vector slice.
scivector_sliceoperator*= (const interval &s)
 Operator for multiplication with an interval, result is assigned to the vector slice.
scivector_sliceoperator*= (const cinterval &s)
 Operator for multiplication with a complex interval, result is assigned to the vector slice.
scivector_sliceoperator+= (const rvector &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const ivector &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const cvector &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const civector &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const rvector_slice &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const cvector_slice &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const ivector_slice &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const civector_slice &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const srvector &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const scvector &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const sivector &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const scivector &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const srvector_slice &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const scvector_slice &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const sivector_slice &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator+= (const scivector_slice &v)
 Operator for element-wise addition with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const rvector &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const ivector &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const cvector &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const civector &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const rvector_slice &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const cvector_slice &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const ivector_slice &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const civector_slice &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const srvector &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const scvector &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const sivector &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const scivector &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const srvector_slice &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const scvector_slice &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const sivector_slice &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator-= (const scivector_slice &v)
 Operator for element-wise subtraction with a vector, result is assigned to the vector slice.
scivector_sliceoperator/= (const real &s)
 Operator for division of each element of the vector slice with a scalar, result is assigned to the vector slice.
scivector_sliceoperator/= (const complex &s)
 Operator for division of each element of the vector slice with a scalar, result is assigned to the vector slice.
scivector_sliceoperator/= (const interval &s)
 Operator for division of each element of the vector slice with an interval, result is assigned to the vector slice.
scivector_sliceoperator/= (const cinterval &s)
 Operator for division of each element of the vector slice with a complex interval, result is assigned to the vector slice.
scivector_sliceoperator= (const real &v)
 Assigns v to all elements of the vector slice.
scivector_sliceoperator= (const complex &v)
 Assigns v to all elements of the vector slice.
scivector_sliceoperator= (const interval &v)
 Assigns v to all elements of the vector slice.
scivector_sliceoperator= (const cinterval &v)
 Assigns v to all elements of the vector slice.
scivector_sliceoperator= (const srvector_slice &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const scvector_slice &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const sivector_slice &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const scivector_slice &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const srvector &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const scvector &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const sivector &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const scivector &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const rvector &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const cvector &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const ivector &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const civector &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const rvector_slice &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const cvector_slice &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const ivector_slice &v)
 Overwrite the vector slice with the elements of v.
scivector_sliceoperator= (const civector_slice &v)
 Overwrite the vector slice with the elements of v.
cintervaloperator[] (const int i)
 Returns a reference to the i-th (according to the currently used indexing) element of the vector slice.
cinterval operator[] (const int i) const
 Returns a copy of the i-th (according to the currently used indexing) element of the vector slice.
scivector_sliceoperator|= (const rvector &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const ivector &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const cvector &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const civector &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const rvector_slice &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const cvector_slice &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const ivector_slice &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const civector_slice &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const srvector &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const scvector &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const sivector &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const scivector &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const srvector_slice &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const scvector_slice &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const sivector_slice &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.
scivector_sliceoperator|= (const scivector_slice &v)
 Operator for element-wise convex hull with a vector, result is assigned to the vector slice.

Friends

sivector abs (const scivector_slice &)
 Computes the component-wise absolute values as the interval hull of $ \{ |v| \mid v \in [v] \} $ for a vector v.
scivector conj (const scivector_slice &)
 Returns the conjugate complex of v.
scvector diam (const scivector_slice &)
 Computes the diameter of v.
sivector Im (const scivector_slice &)
 Returns the imaginary part of v.
scvector Inf (const scivector_slice &)
 Returns the infimum vector slice v.
srvector InfIm (const scivector_slice &)
 Returns the imaginary part of the infimum of the vector slice v.
srvector InfRe (const scivector_slice &)
 Returns the real part of the infimum of the vector slice v.
int Lb (const scivector_slice &)
 Returns the lower index bound of the vector slice v.
scvector mid (const scivector_slice &)
 Computes the midpoint vector of v.
sivector Re (const scivector_slice &)
 Returns the real part of v.
scvector Sup (const scivector_slice &)
 Returns the supremum of the vector slice v.
srvector SupIm (const scivector_slice &)
 Returns the imaginary part of the supremum of the vector slice v.
srvector SupRe (const scivector_slice &)
 Returns the real part of the supremum of the vector slice v.
int Ub (const scivector_slice &)
 Returns the upper index bound of the vector slice v.
int VecLen (const scivector_slice &)
 Returns the length of the vector slice.

Detailed Description

Helper class for slices of sparse vectors.

This class stores a reference to a sparse vector and operates on a slice of it. This class is used internally by C-XSC, it should normally not be necessary for the user to use it explicitly.

Definition at line 4063 of file scivector.hpp.


Member Function Documentation

const cinterval cxsc::scivector_slice::operator() ( const int  i) const [inline]

Returns a copy of the i-th (according to the currently used indexing) element of the vector slice.

If the i-th element is explicitly stored, a copy of this value is returned. Otherwise, 0.0 will be returned. Unlike with the []-operator, the data structure remains unchanged either way. Thus this operator should always be used for read-only access to the elements of a sparse vector slice.

Definition at line 4147 of file scivector.hpp.

cinterval& cxsc::scivector_slice::operator[] ( const int  i) [inline]

Returns a reference to the i-th (according to the currently used indexing) element of the vector slice.

If the i-th element is explicitly stored, a reference to the value is returned. If is not explicitly stored, it will be added to the data structure as a zero element. The returned reference then points to this new element. Hence the []-operator should only be used for write access to the elements of a sparse vector. Use the ()-operator for read access.

Definition at line 4112 of file scivector.hpp.

cinterval cxsc::scivector_slice::operator[] ( const int  i) const [inline]

Returns a copy of the i-th (according to the currently used indexing) element of the vector slice.

If the i-th element is explicitly stored, a copy to the value is returned. If is not explicitly stored, zero will be returned. This is the const-version of this operator, added for convenience. It is suggested to use the ()-operator for read access.

Definition at line 4135 of file scivector.hpp.


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