![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Vector expression that exposes a vector V as its homogeneous-coordinate extension by appending an implicit 1 at the end.
More...
#include <VectorAdapter.hpp>
Inheritance diagram for CDPL::Math::HomogenousCoordsAdapter< V >:Public Types | |
| typedef V | VectorType |
| The wrapped vector type. More... | |
| typedef V::SizeType | SizeType |
| The size type used by the wrapped vector. More... | |
| typedef V::DifferenceType | DifferenceType |
| The signed difference type used by the wrapped vector. More... | |
| typedef V::ValueType | ValueType |
| The element value type of the wrapped vector. More... | |
| typedef V::ConstReference | ConstReference |
| Constant reference type to an element. More... | |
| typedef std::conditional< std::is_const< V >::value, typename V::ConstReference, typename V::Reference >::type | Reference |
Mutable reference type (degrades to ConstReference when the wrapped vector is const). More... | |
| typedef std::conditional< std::is_const< V >::value, typename V::ConstClosureType, typename V::ClosureType >::type | VectorClosureType |
| Closure type used to store the wrapped vector internally (mutable or const flavor). More... | |
| typedef const SelfType | ConstClosureType |
| Constant closure type used when this adapter appears inside another expression. More... | |
| typedef SelfType | ClosureType |
| Closure type used when this adapter appears inside another expression. More... | |
Public Types inherited from CDPL::Math::VectorExpression< HomogenousCoordsAdapter< V > > | |
| typedef HomogenousCoordsAdapter< V > | ExpressionType |
| The derived vector expression type. More... | |
Public Types inherited from CDPL::Math::Expression< E > | |
| typedef E | ExpressionType |
| The derived expression type (made available to expression-template machinery). More... | |
Public Member Functions | |
| HomogenousCoordsAdapter (VectorType &v) | |
| Constructs the adapter wrapping v. More... | |
| Reference | operator() (SizeType i) |
| Returns a mutable reference to the element at index i of the view. More... | |
| ConstReference | operator() (SizeType i) const |
Returns a const reference to the element at index i of the view. More... | |
| Reference | operator[] (SizeType i) |
| Returns a mutable reference to the element at index i of the view (alias for operator()). More... | |
| ConstReference | operator[] (SizeType i) const |
Returns a const reference to the element at index i of the view (alias for operator()). More... | |
| SizeType | getSize () const |
| Returns the dimensionality of the view (wrapped vector size + 1). More... | |
| bool | isEmpty () const |
Tells whether the view is empty (always false; the view always has at least the extension element). More... | |
| VectorClosureType & | getData () |
| Returns a reference to the wrapped vector (via its stored closure). More... | |
| const VectorClosureType & | getData () const |
Returns a const reference to the wrapped vector (via its stored closure). More... | |
| HomogenousCoordsAdapter & | operator= (const HomogenousCoordsAdapter &va) |
| Copies the elements of va into this view (writing through to the wrapped vector and to the extension element). More... | |
| template<typename E > | |
| HomogenousCoordsAdapter & | operator= (const VectorExpression< E > &e) |
| Assigns the vector expression e to this view (writing through to the wrapped vector). More... | |
| template<typename E > | |
| HomogenousCoordsAdapter & | operator+= (const VectorExpression< E > &e) |
| Adds the vector expression e componentwise to this view. More... | |
| template<typename E > | |
| HomogenousCoordsAdapter & | operator-= (const VectorExpression< E > &e) |
| Subtracts the vector expression e componentwise from this view. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, HomogenousCoordsAdapter >::type & | operator*= (const T &t) |
| Multiplies every element of this view by the scalar t. More... | |
| template<typename T > | |
| std::enable_if< IsScalar< T >::value, HomogenousCoordsAdapter >::type & | operator/= (const T &t) |
| Divides every element of this view by the scalar t. More... | |
| template<typename E > | |
| HomogenousCoordsAdapter & | assign (const VectorExpression< E > &e) |
| Assigns the vector expression e to this view without intermediate temporary. More... | |
| template<typename E > | |
| HomogenousCoordsAdapter & | plusAssign (const VectorExpression< E > &e) |
| Adds the vector expression e to this view without intermediate temporary. More... | |
| template<typename E > | |
| HomogenousCoordsAdapter & | minusAssign (const VectorExpression< E > &e) |
| Subtracts the vector expression e from this view without intermediate temporary. More... | |
| void | swap (HomogenousCoordsAdapter &va) |
| Swaps the contents of this view with those of va. More... | |
Public Member Functions inherited from CDPL::Math::VectorExpression< HomogenousCoordsAdapter< V > > | |
| const ExpressionType & | operator() () const |
Returns a const reference to the derived vector expression. More... | |
| ExpressionType & | operator() () |
| Returns a reference to the derived vector expression. More... | |
Friends | |
| void | swap (HomogenousCoordsAdapter &va1, HomogenousCoordsAdapter &va2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::VectorExpression< HomogenousCoordsAdapter< V > > | |
| VectorExpression () | |
| ~VectorExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
Vector expression that exposes a vector V as its homogeneous-coordinate extension by appending an implicit 1 at the end.
| V | The wrapped vector type. |
| typedef V CDPL::Math::HomogenousCoordsAdapter< V >::VectorType |
The wrapped vector type.
| typedef V::SizeType CDPL::Math::HomogenousCoordsAdapter< V >::SizeType |
The size type used by the wrapped vector.
| typedef V::DifferenceType CDPL::Math::HomogenousCoordsAdapter< V >::DifferenceType |
The signed difference type used by the wrapped vector.
| typedef V::ValueType CDPL::Math::HomogenousCoordsAdapter< V >::ValueType |
The element value type of the wrapped vector.
| typedef V::ConstReference CDPL::Math::HomogenousCoordsAdapter< V >::ConstReference |
Constant reference type to an element.
| typedef std::conditional<std::is_const<V>::value, typename V::ConstReference, typename V::Reference>::type CDPL::Math::HomogenousCoordsAdapter< V >::Reference |
Mutable reference type (degrades to ConstReference when the wrapped vector is const).
| typedef std::conditional<std::is_const<V>::value, typename V::ConstClosureType, typename V::ClosureType>::type CDPL::Math::HomogenousCoordsAdapter< V >::VectorClosureType |
Closure type used to store the wrapped vector internally (mutable or const flavor).
| typedef const SelfType CDPL::Math::HomogenousCoordsAdapter< V >::ConstClosureType |
Constant closure type used when this adapter appears inside another expression.
| typedef SelfType CDPL::Math::HomogenousCoordsAdapter< V >::ClosureType |
Closure type used when this adapter appears inside another expression.
|
inline |
Constructs the adapter wrapping v.
| v | The vector to be viewed as its homogeneous-coordinate extension. |
|
inline |
Returns a mutable reference to the element at index i of the view.
Index getSize() - 1 returns the extension element (initialized to 1); all lower indices return the corresponding element of the wrapped vector.
| i | The zero-based index within the view. |
|
inline |
Returns a const reference to the element at index i of the view.
| i | The zero-based index within the view. |
const reference to the element.
|
inline |
Returns a mutable reference to the element at index i of the view (alias for operator()).
| i | The zero-based index within the view. |
|
inline |
Returns a const reference to the element at index i of the view (alias for operator()).
| i | The zero-based index within the view. |
const reference to the element.
|
inline |
Returns the dimensionality of the view (wrapped vector size + 1).
|
inline |
Tells whether the view is empty (always false; the view always has at least the extension element).
false.
|
inline |
Returns a reference to the wrapped vector (via its stored closure).
|
inline |
Returns a const reference to the wrapped vector (via its stored closure).
const reference to the wrapped vector closure.
|
inline |
Copies the elements of va into this view (writing through to the wrapped vector and to the extension element).
| va | The source adapter. |
|
inline |
Assigns the vector expression e to this view (writing through to the wrapped vector).
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Adds the vector expression e componentwise to this view.
| E | The source vector expression type. |
| e | The vector expression to add. |
|
inline |
Subtracts the vector expression e componentwise from this view.
| E | The source vector expression type. |
| e | The vector expression to subtract. |
|
inline |
Multiplies every element of this view by the scalar t.
| T | The scalar type. |
| t | The scalar multiplier. |
|
inline |
Divides every element of this view by the scalar t.
| T | The scalar type. |
| t | The scalar divisor. |
|
inline |
Assigns the vector expression e to this view without intermediate temporary.
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Adds the vector expression e to this view without intermediate temporary.
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Subtracts the vector expression e from this view without intermediate temporary.
| E | The source vector expression type. |
| e | The source vector expression. |
|
inline |
Swaps the contents of this view with those of va.
| va | The view to swap with. |
|
friend |
ADL-enabled free-function form of swap().
| va1 | The first adapter. |
| va2 | The second adapter. |