|
| template<typename O > |
| | Vector (O const *values) |
| | Ctor taking a pointer from different type to initialize values.
|
| |
| | Vector (T const &v1, T const &v2) |
| | Ctor that initializes the first two elements.
|
| |
| | Vector (T const &v1, T const &v2, T const &v3) |
| | Ctor that initializes the first three elements.
|
| |
| | Vector (T const &v1, T const &v2, T const &v3, T const &v4) |
| | Ctor that initializes the first four elements.
|
| |
| | Vector (T const &value) |
| | Ctor that initializes ALL elements.
|
| |
| | Vector (T const *values) |
| | Ctor taking a pointer to initialize values.
|
| |
| template<typename O > |
| | Vector (Vector< O, N > const &other) |
| | Copy ctor from vector of different type.
|
| |
| | Vector (Vector< T, N > const &other) |
| | Copy ctor from vector of same type.
|
| |
| | Vector (Vector< T, N-1 > const &other, T const &v1) |
| | Ctor that takes a smaller vector and one element.
|
| |
| | Vector (void) |
| | Default ctor.
|
| |
| T | abs_sum (void) const |
| | Returns the sum of the absolute values of all elements.
|
| |
| Vector< T, N > & | abs_value (void) |
| | Component-wise absolute-value on self, returns self.
|
| |
| Vector< T, N > | abs_valued (void) const |
| | Returns a component-wise absolute-value copy of self.
|
| |
| template<typename F > |
| Vector< T, N > | applied_for_each (F functor) const |
| | Applies a for-each functor to a copy of the vector.
|
| |
| template<typename F > |
| Vector< T, N > & | apply_for_each (F functor) |
| | Applies a for-each functor to all values.
|
| |
| T * | begin (void) |
| |
| T const * | begin (void) const |
| |
| Vector< T, N > & | copy (T const *values, int num=N) |
| | Copies values from the given pointer.
|
| |
| Vector< T, N > | cross (Vector< T, N > const &other) const |
| | Cross product between this and another vector.
|
| |
| Vector< T, N > | cw_div (Vector< T, N > const &other) const |
| | Component-wise division with another vector.
|
| |
| Vector< T, N > | cw_mult (Vector< T, N > const &other) const |
| | Component-wise multiplication with another vector.
|
| |
| T | dot (Vector< T, N > const &other) const |
| | Dot (or scalar) product between self and another vector.
|
| |
| T * | end (void) |
| |
| T const * | end (void) const |
| |
| Vector< T, N > & | fill (T const &value) |
| | Fills all vector elements with the given value.
|
| |
| bool | is_similar (Vector< T, N > const &other, T const &epsilon) const |
| | Component-wise similarity using epsilon checks.
|
| |
| T | maximum (void) const |
| | Returns the largest element in the vector.
|
| |
| T | minimum (void) const |
| | Returns the smallest element in the vector.
|
| |
| Vector< T, N > & | negate (void) |
| | Component-wise negation on self, returns self.
|
| |
| Vector< T, N > | negated (void) const |
| | Returns a component-wise negation on copy of self.
|
| |
| T | norm (void) const |
| | Computes the norm (length) of the vector.
|
| |
| Vector< T, N > & | normalize (void) |
| | Normalizes self and returns reference to self.
|
| |
| Vector< T, N > | normalized (void) const |
| | Returns a normalized copy of self.
|
| |
| bool | operator!= (Vector< T, N > const &rhs) const |
| | Comparison operator.
|
| |
| T & | operator() (int index) |
| | Element access operator.
|
| |
| T const & | operator() (int index) const |
| | Const element access operator.
|
| |
| Vector< T, N > | operator* (T const &rhs) const |
| | Component-wise multiplication with scalar.
|
| |
| T * | operator* (void) |
| | Dereference operator to value array.
|
| |
| T const * | operator* (void) const |
| | Const dereference operator to value array.
|
| |
| Vector< T, N > & | operator*= (T const &rhs) |
| | Component-wise self-multiplication with scalar.
|
| |
| Vector< T, N > | operator+ (T const &rhs) const |
| | Component-wise addition with scalar.
|
| |
| Vector< T, N > | operator+ (Vector< T, N > const &rhs) const |
| | Addition with other vector.
|
| |
| Vector< T, N > & | operator+= (T const &rhs) |
| | Component-wise self-addition with scalar.
|
| |
| Vector< T, N > & | operator+= (Vector< T, N > const &rhs) |
| | Self-addition with other vector.
|
| |
| Vector< T, N > | operator- (T const &rhs) const |
| | Component-wise substraction with scalar.
|
| |
| Vector< T, N > | operator- (Vector< T, N > const &rhs) const |
| | Substraction with other vector.
|
| |
| Vector< T, N > | operator- (void) const |
| | Component-wise negation.
|
| |
| Vector< T, N > & | operator-= (T const &rhs) |
| | Component-wise self-substraction with scalar.
|
| |
| Vector< T, N > & | operator-= (Vector< T, N > const &rhs) |
| | Self-substraction with other vector.
|
| |
| Vector< T, N > | operator/ (T const &rhs) const |
| | Component-wise division by scalar.
|
| |
| Vector< T, N > & | operator/= (T const &rhs) |
| | Component-wise self-division by scalar.
|
| |
| template<typename O > |
| Vector< T, N > & | operator= (Vector< O, N > const &rhs) |
| | Assignment operator from different type.
|
| |
| Vector< T, N > & | operator= (Vector< T, N > const &rhs) |
| | Assignment operator.
|
| |
| bool | operator== (Vector< T, N > const &rhs) const |
| | Comparison operator.
|
| |
| T & | operator[] (int index) |
| | Element access operator.
|
| |
| T const & | operator[] (int index) const |
| | Const element access operator.
|
| |
| T | product (void) const |
| | Returns the product of all elements.
|
| |
| Vector< T, N > & | sort_asc (void) |
| | Sorts the elements of the vector into ascending order.
|
| |
| Vector< T, N > & | sort_desc (void) |
| | Sorts the elements of the vector into descending order.
|
| |
| Vector< T, N > | sorted_asc (void) const |
| | Returns a sorted vector into ascending order.
|
| |
| Vector< T, N > | sorted_desc (void) const |
| | Returns a sorted vector into descending order.
|
| |
| T | square_norm (void) const |
| | Computes the squared norm of the vector (much cheaper).
|
| |
| T | sum (void) const |
| | Returns the sum of all elements.
|
| |
template<typename T, int N>
class math::Vector< T, N >
Vector class for arbitrary dimensions and types.
Definition at line 86 of file vector.h.