![]() |
Chemical Data Processing Library C++ API - Version 1.4.0
|
Constant vector expression in which every element equals the same scalar value. More...
#include <Vector.hpp>
Inheritance diagram for CDPL::Math::ScalarVector< T >:Public Types | |
| typedef T | ValueType |
| The scalar value type. More... | |
| typedef const T & | Reference |
Reference type (always a const reference — elements are immutable). More... | |
| typedef const T & | ConstReference |
| Constant reference type to an element. More... | |
| typedef std::size_t | SizeType |
| The unsigned size type. More... | |
| typedef std::ptrdiff_t | DifferenceType |
| The signed difference type. More... | |
| typedef VectorReference< SelfType > | ClosureType |
| Closure type used when this vector appears inside another expression. More... | |
| typedef const VectorReference< const SelfType > | ConstClosureType |
| Constant closure type used when this vector appears inside another expression. More... | |
| typedef Vector< T > | VectorTemporaryType |
| Concrete temporary vector type used by expression-template machinery. More... | |
Public Types inherited from CDPL::Math::VectorContainer< ScalarVector< T > > | |
| typedef ScalarVector< T > | ContainerType |
| The derived vector container type. More... | |
Public Types inherited from CDPL::Math::VectorExpression< E > | |
| typedef E | 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 | |
| ScalarVector () | |
| Constructs an empty scalar vector. More... | |
| ScalarVector (SizeType n, const ValueType &v=ValueType()) | |
| Constructs a scalar vector of size n in which every element equals v. More... | |
| ScalarVector (const ScalarVector &v) | |
| Constructs a copy of the scalar vector v. More... | |
| ConstReference | operator[] (SizeType i) const |
Returns a const reference to the common element value (alias for operator()). More... | |
| ConstReference | operator() (SizeType i) const |
Returns a const reference to the common element value. More... | |
| bool | isEmpty () const |
| Tells whether the vector has zero logical size. More... | |
| SizeType | getSize () const |
| Returns the logical element count. More... | |
| SizeType | getMaxSize () const |
| Returns the maximum representable element count. More... | |
| ScalarVector & | operator= (const ScalarVector &v) |
| Copy-assigns the size and common value from v. More... | |
| void | resize (SizeType n) |
| Resizes the logical element count to n. More... | |
| void | swap (ScalarVector &v) |
| Swaps the size and common value with v. More... | |
Public Member Functions inherited from CDPL::Math::VectorContainer< ScalarVector< T > > | |
| const ContainerType & | operator() () const |
Returns a const reference to the derived vector container. More... | |
| ContainerType & | operator() () |
| Returns a reference to the derived vector container. More... | |
Public Member Functions inherited from CDPL::Math::VectorExpression< E > | |
| 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 (ScalarVector &v1, ScalarVector &v2) |
| ADL-enabled free-function form of swap(). More... | |
Additional Inherited Members | |
Protected Member Functions inherited from CDPL::Math::VectorContainer< ScalarVector< T > > | |
| VectorContainer () | |
| ~VectorContainer () | |
Protected Member Functions inherited from CDPL::Math::VectorExpression< E > | |
| VectorExpression () | |
| ~VectorExpression () | |
Protected Member Functions inherited from CDPL::Math::Expression< E > | |
| Expression () | |
| ~Expression () | |
Constant vector expression in which every element equals the same scalar value.
| T | The scalar value type. |
| typedef T CDPL::Math::ScalarVector< T >::ValueType |
The scalar value type.
| typedef const T& CDPL::Math::ScalarVector< T >::Reference |
Reference type (always a const reference — elements are immutable).
| typedef const T& CDPL::Math::ScalarVector< T >::ConstReference |
Constant reference type to an element.
| typedef std::size_t CDPL::Math::ScalarVector< T >::SizeType |
The unsigned size type.
| typedef std::ptrdiff_t CDPL::Math::ScalarVector< T >::DifferenceType |
The signed difference type.
| typedef VectorReference<SelfType> CDPL::Math::ScalarVector< T >::ClosureType |
Closure type used when this vector appears inside another expression.
| typedef const VectorReference<const SelfType> CDPL::Math::ScalarVector< T >::ConstClosureType |
Constant closure type used when this vector appears inside another expression.
| typedef Vector<T> CDPL::Math::ScalarVector< T >::VectorTemporaryType |
Concrete temporary vector type used by expression-template machinery.
|
inline |
Constructs an empty scalar vector.
|
inline |
Constructs a scalar vector of size n in which every element equals v.
| n | The element count. |
| v | The common element value. |
|
inline |
Constructs a copy of the scalar vector v.
| v | The scalar vector to copy. |
|
inline |
Returns a const reference to the common element value (alias for operator()).
| i | The zero-based element index. |
const reference to the common element value. | Base::IndexError | if i is out of range. |
|
inline |
Returns a const reference to the common element value.
| i | The zero-based element index. |
const reference to the common element value. | Base::IndexError | if i is out of range. |
|
inline |
Tells whether the vector has zero logical size.
true if the logical size is zero, and false otherwise.
|
inline |
Returns the logical element count.
|
inline |
Returns the maximum representable element count.
|
inline |
Copy-assigns the size and common value from v.
| v | The source scalar vector. |
|
inline |
Resizes the logical element count to n.
| n | The new element count. |
|
inline |
Swaps the size and common value with v.
| v | The scalar vector to swap with. |
|
friend |
ADL-enabled free-function form of swap().
| v1 | The first scalar vector. |
| v2 | The second scalar vector. |