RTOp Package Browser (Single Doxygen Collection)
Version of the Day
|
Class for a non-changeable sub-vector. More...
#include <RTOpPack_Types.hpp>
Public Member Functions | |
ConstSubVectorView () | |
ConstSubVectorView (const ArrayRCP< const Scalar > &values_in) | |
ConstSubVectorView (Ordinal globalOffset_in, Ordinal subDim_in, const ArrayRCP< const Scalar > &values_in, ptrdiff_t stride_in) | |
ConstSubVectorView (const ConstSubVectorView< Scalar > &sv) | |
void | initialize (Ordinal globalOffset_in, Ordinal subDim_in, const ArrayRCP< const Scalar > &values_in, ptrdiff_t stride_in) |
void | uninitialize () |
void | setGlobalOffset (Ordinal globalOffset_in) |
Ordinal | globalOffset () const |
Ordinal | subDim () const |
const ArrayRCP< const Scalar > | values () const |
ptrdiff_t | stride () const |
const Scalar & | operator[] (Ordinal i) const |
Zero-based indexing (Preconditions: values()!=NULL && (0 <= i < subDim()) ). More... | |
const Scalar & | operator() (Ordinal i) const |
Zero-based indexing (Preconditions: values()!=NULL && (0 <= i < subDim()) ). More... | |
Private Member Functions | |
const ArrayRCP< const Scalar > ::iterator | valuesBegin () const |
Private Attributes | |
Ordinal | globalOffset_ |
Ordinal | subDim_ |
ArrayRCP< const Scalar > | values_ |
ptrdiff_t | stride_ |
Related Functions | |
(Note that these are not member functions.) | |
template<class Scalar > | |
std::ostream & | operator<< (std::ostream &out, const ConstSubVectorView< Scalar > &sv) |
Class for a non-changeable sub-vector.
For a sub-vector vec
, the corresponding entries in the global vector x(j)
(one based) are as follows:
x( vec.globalOffset() + k ) = v(k), for k = 0...vec.subDim()-1
The stride vec.stride()
may be positive (>0) or negative (<0) but not zero (0). A negative stride vec.stride() < 0
allows a reverse traversal of the elements.
WARNING! the default copy constructor and assignment operators are allowed which results in only pointer copy, not deep copy! You have been warned!
Definition at line 112 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 115 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 117 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 121 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 126 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 131 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 153 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 156 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 164 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 166 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 168 of file RTOpPack_Types.hpp.
|
inline |
Definition at line 170 of file RTOpPack_Types.hpp.
|
inline |
Zero-based indexing (Preconditions: values()!=NULL && (0 <= i < subDim())
).
Definition at line 173 of file RTOpPack_Types.hpp.
|
inline |
Zero-based indexing (Preconditions: values()!=NULL && (0 <= i < subDim())
).
Definition at line 182 of file RTOpPack_Types.hpp.
|
inlineprivate |
Definition at line 188 of file RTOpPack_Types.hpp.
|
related |
Definition at line 273 of file RTOpPack_Types.hpp.
|
private |
Definition at line 184 of file RTOpPack_Types.hpp.
|
private |
Definition at line 185 of file RTOpPack_Types.hpp.
|
private |
Definition at line 186 of file RTOpPack_Types.hpp.
|
private |
Definition at line 187 of file RTOpPack_Types.hpp.