concepts::SubVector< F > Class Template Reference
A sub vector, defined by another vector and an index set. More...
#include <subVector.hh>
Public Member Functions | |
virtual Function< F > & | add (const Function< F > &fnc, F sc) |
Adds a times fnc to this function. More... | |
uint | dim () const |
Returns the dimension of the function. More... | |
uint | n () const |
Elements in the vector. More... | |
virtual F & | operator() (uint i) |
Index operator. More... | |
virtual F | operator() (uint i) const |
Index operator. More... | |
virtual Function< F > & | operator*= (F sc) |
Scaling operator. More... | |
virtual Function< F > & | operator+= (const Function< F > &fnc) |
Addition operator. More... | |
virtual Function< F > & | operator+= (F c) |
Addition operator. More... | |
virtual Function< F > & | operator-= (const Function< F > &fnc) |
Subtraction operator. More... | |
virtual Function< F > & | operator-= (F c) |
Subtraction operator. More... | |
virtual Function< F > & | operator= (const Function< F > &fnc) |
Assignment operator. More... | |
template<class H > | |
Function< F > & | operator= (const Function< H > &fnc) |
SubVector< F > & | operator= (F c) |
Assignement operator. More... | |
SubVector (const Vector< F > &f, const Set< IndexRange > &indices) | |
SubVector (Vector< F > &f, const Set< IndexRange > &indices) | |
Constructor. More... | |
virtual | ~SubVector () |
Protected Member Functions | |
virtual std::ostream & | info (std::ostream &os) const |
Returns information in an output stream. More... | |
Protected Attributes | |
uint | dim_ |
Dimension of the function (or of the space the function is defined) More... | |
Private Attributes | |
const Set< IndexRange > | indices_ |
Index sets of sub vector. More... | |
Vector< F > * | v_ |
Vector. More... | |
const Vector< F > * | vc_ |
Constant vector. More... | |
Detailed Description
template<class F>
class concepts::SubVector< F >
A sub vector, defined by another vector and an index set.
The class SubVector
is not a Vector
itself, as the data may be not together as in a C array (data structure behind Vector
).
For a connected index set you use instead
Vector(uint dim, F* data)
.
Definition at line 28 of file subVector.hh.
Constructor & Destructor Documentation
◆ SubVector() [1/2]
concepts::SubVector< F >::SubVector | ( | Vector< F > & | f, |
const Set< IndexRange > & | indices | ||
) |
Constructor.
◆ SubVector() [2/2]
concepts::SubVector< F >::SubVector | ( | const Vector< F > & | f, |
const Set< IndexRange > & | indices | ||
) |
◆ ~SubVector()
|
inlinevirtual |
Definition at line 34 of file subVector.hh.
Member Function Documentation
◆ add()
|
virtual |
Adds a
times fnc
to this function.
Reimplemented from concepts::Function< F >.
◆ dim()
|
inlineinherited |
◆ info()
|
protectedvirtual |
Returns information in an output stream.
Reimplemented from concepts::Function< F >.
◆ n()
|
inline |
Elements in the vector.
Definition at line 76 of file subVector.hh.
◆ operator()() [1/2]
|
inlinevirtual |
◆ operator()() [2/2]
|
inlinevirtual |
◆ operator*=()
|
virtual |
Scaling operator.
Reimplemented from concepts::Function< F >.
◆ operator+=() [1/2]
|
virtual |
Addition operator.
Reimplemented from concepts::Function< F >.
◆ operator+=() [2/2]
|
virtual |
Addition operator.
Reimplemented from concepts::Function< F >.
◆ operator-=() [1/2]
|
virtual |
Subtraction operator.
Reimplemented from concepts::Function< F >.
◆ operator-=() [2/2]
|
virtual |
Subtraction operator.
Reimplemented from concepts::Function< F >.
◆ operator=() [1/3]
|
virtual |
Assignment operator.
Implements concepts::Function< F >.
◆ operator=() [2/3]
Function< F > & concepts::SubVector< F >::operator= | ( | const Function< H > & | fnc | ) |
Definition at line 90 of file subVector.hh.
◆ operator=() [3/3]
SubVector<F>& concepts::SubVector< F >::operator= | ( | F | c | ) |
Assignement operator.
Member Data Documentation
◆ dim_
|
protectedinherited |
◆ indices_
|
private |
Index sets of sub vector.
Definition at line 85 of file subVector.hh.
◆ v_
|
private |
Definition at line 81 of file subVector.hh.
◆ vc_
|
private |
Constant vector.
Definition at line 83 of file subVector.hh.
The documentation for this class was generated from the following file:
- function/subVector.hh