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

The Data Type rvector. More...

#include <rvector.hpp>

Collaboration diagram for cxsc::rvector:
Collaboration graph

Public Member Functions

rvectoroperator() () noexcept
 Operator for accessing the whole vector.
 
rvector_slice operator() (const int &i) noexcept
 Operator for accessing a part of the vector.
 
rvector_slice operator() (const int &i1, const int &i2) noexcept
 Operator for accessing a part of the vector.
 
rvector operator() (const intmatrix &P)
 Computes permutation of vector according to permutation matrix, C=Px.
 
rvector operator() (const intvector &p)
 Computes permutation of vector according to permutation vector, C=Px.
 
rvectoroperator+= (const srvector &rv)
 Implementation of addition and allocation operation.
 
rvectoroperator+= (const srvector_slice &rv)
 Implementation of addition and allocation operation.
 
rvectoroperator-= (const srvector &rv)
 Implementation of addition and allocation operation.
 
rvectoroperator-= (const srvector_slice &rv)
 Implementation of addition and allocation operation.
 
rvectoroperator= (const real &r) noexcept
 Implementation of standard assigning operator.
 
rvectoroperator= (const rmatrix &) noexcept
 Implementation of standard assigning operator.
 
rvectoroperator= (const rmatrix_slice &) noexcept
 Implementation of standard assigning operator.
 
rvectoroperator= (const rmatrix_subv &) noexcept
 Implementation of standard assigning operator.
 
rvectoroperator= (const rvector &rv) noexcept
 Implementation of standard assigning operator.
 
rvectoroperator= (const rvector_slice &sl) noexcept
 Implementation of standard assigning operator.
 
rvectoroperator= (const srvector &rv)
 Implementation of standard assigning operator.
 
rvectoroperator= (const srvector_slice &sl)
 Implementation of standard assigning operator.
 
realoperator[] (const int &i) const noexcept
 Operator for accessing the single elements of the vector (read-only)
 
realoperator[] (const int &i) noexcept
 Operator for accessing the single elements of the vector.
 
 rvector () noexcept
 Constructor of class rvector.
 
 rvector (const int &i) noexcept
 Constructor of class rvector.
 
 rvector (const int &i1, const int &i2) noexcept
 Constructor of class rvector.
 
 rvector (const intvector &)
 Constructor of class rvector.
 
 rvector (const real &) noexcept
 Constructor of class rvector.
 
 rvector (const rmatrix &) noexcept
 Constructor of class rvector.
 
 rvector (const rmatrix_slice &sl) noexcept
 Constructor of class rvector.
 
 rvector (const rmatrix_subv &) noexcept
 Constructor of class rvector.
 
 rvector (const rvector &v) noexcept
 Constructor of class rvector.
 
 rvector (const rvector_slice &rs) noexcept
 Constructor of class rvector.
 
 rvector (const srvector &v)
 Constructor of class rvector.
 
 rvector (const srvector_slice &v)
 Constructor of class rvector.
 

Friends

rvector InfIm (const civector &v)
 Returns componentwise the infimum of the imaginary part.
 
rvector InfIm (const civector_slice &v)
 Returns componentwise the infimum of the imaginary part.
 
rvector InfRe (const civector &v)
 Returns componentwise the infimum of the real part.
 
rvector InfRe (const civector_slice &v)
 Returns componentwise the infimum of the real part.
 
int Lb (const rvector &rv) noexcept
 Returns the lower bound of the vector.
 
rvectorSetLb (rvector &rv, const int &l) noexcept
 Sets the lower bound of the vector.
 
rvectorSetUb (rvector &rv, const int &u) noexcept
 Sets the upper bound of the vector.
 
rvector SupIm (const civector &v)
 Returns componentwise the supremum of the imaginary part.
 
rvector SupIm (const civector_slice &v)
 Returns componentwise the supremum of the imaginary part.
 
rvector SupRe (const civector &v)
 Returns componentwise the supremum of the real part.
 
rvector SupRe (const civector_slice &v)
 Returns componentwise the supremum of the real part.
 
int Ub (const rvector &rv) noexcept
 Returns the upper bound of the vector.
 
int VecLen (const rvector &rv) noexcept
 Returns the dimension of the vector.
 

Detailed Description

The Data Type rvector.

The vectors of C-XSC are one dimensional arrays of the corresponding scalar base type. Every vector has a lower index bound $ lb $ and an upper index bound $ ub $ of type int. Hence, the number $ n $ of components actually stored in a vector is

\[
n = ub - lb + 1
\]

All matrix and vector operators which require dot product computations use higher precision dot products provided by the dotprecision classes. The precision to be used for these implicit dot products can be choosen by setting the global variable opdotprec accordingly. A value of 0 means maximum accuracy (the default, always used by all older C-XSC versions), a value of 1 means double accuracy, a value of 2 or higher means k-fold double accuracy. Lower accuracy leads to (significantly) faster computing times, but also to less exact results. For all dot products with an interval result, error bounds are computed to guarantee a correct enclosure. For all other dot products approximations without error bounds are computed.

See also
cxsc::dotprecision

Definition at line 57 of file rvector.hpp.

Constructor & Destructor Documentation

◆ rvector() [1/3]

cxsc::rvector::rvector ( )
inlinenoexcept

Constructor of class rvector.

Creation of a variable of type rvector with length $ n = 1 $ and index bounds $ lb = ub = 1 $. The value of the element is undefined.

Definition at line 37 of file rvector.inl.

◆ rvector() [2/3]

cxsc::rvector::rvector ( const int & i)
inlineexplicitnoexcept

Constructor of class rvector.

Parameters
iDimension of vector

Creation of a variable of type rvector with length $ n = i $ and index bounds $ lb = 1 $, and $ ub = i $. The values of the elements are undefined.

Definition at line 46 of file rvector.inl.

◆ rvector() [3/3]

cxsc::rvector::rvector ( const int & i1,
const int & i2 )
inlineexplicitnoexcept

Constructor of class rvector.

Parameters
i1Starting dimension of vector
i2Ending dimension of vector

Creation of a variable of type rvector with length $ n = i2 - i1 + 1 $ and index bounds $ lb = i1 $, and $ ub = i2 $. The values of the elements are undefined.

Definition at line 63 of file rvector.inl.

Member Function Documentation

◆ operator()() [1/2]

rvector_slice cxsc::rvector::operator() ( const int & i)
inlinenoexcept

Operator for accessing a part of the vector.

Parameters
iThe maximum dimension of the wanted part of the vector
Returns
The wanted part of the vector

Example:

You have the vector $ a = \left( \begin {array} {c} x_1 \\ x_2 \\ x_3 \\ x_4 \\ x_5 \end {array} \right) 
$ and then use the operation $ b = a(3) $ which results in $ b = \left( \begin {array} {c} x_1 \\ x_2 \\ x_3 \end {array} \right) $

Definition at line 164 of file rvector.inl.

◆ operator()() [2/2]

rvector_slice cxsc::rvector::operator() ( const int & i1,
const int & i2 )
inlinenoexcept

Operator for accessing a part of the vector.

Parameters
i1The starting dimension of the wanted part of the vector
i2The ending dimension of the wanted part of the vector
Returns
The wanted part of the vector

Example:

You have the vector $ a = \left( \begin {array} {c} x_1 \\ x_2 \\ x_3 \\ x_4 \\ x_5 \end {array} \right) 
$ and then use the operation $ b = a(2,4) $ which results in $ b = \left( \begin {array} {c} x_2 \\ x_3 \\ x_4 \end {array} \right) $

Definition at line 187 of file rvector.inl.


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