|
| Vector ()=default |
| Constructs an vector and allocates memory.
|
|
| Vector (T arg1) |
| Constructs an vector with initial values. More...
|
|
| Vector (T arg1, T arg2) |
| Constructs a vector with initial values. More...
|
|
| Vector (T arg1, T arg2, T arg3) |
| Constructs an vector with initial values. More...
|
|
| Vector (T arg1, T arg2, T arg3, T arg4) |
| Constructs an vector with initial values. More...
|
|
| Vector (T arg1, T arg2, T arg3, T arg4, T arg5) |
| Constructs an vector with initial values. More...
|
|
template<typename T2 > |
| Vector (const Vector< T2, N > &arg) |
| Constructs a vector with another vector of different type. More...
|
|
iter | begin () noexcept |
|
const_iter | begin () const noexcept |
|
iter | end () noexcept |
|
const_iter | end () const noexcept |
|
reverse_iter | rbegin () noexcept |
|
const_reverse_iter | rbegin () const noexcept |
|
reverse_iter | rend () noexcept |
|
const_reverse_iter | rend () const noexcept |
|
const_iter | cbegin () const noexcept |
|
const_iter | cend () const noexcept |
|
const_reverse_iter | crbegin () const noexcept |
|
const_reverse_iter | crend () const noexcept |
|
const T & | operator[] (const int n) const noexcept |
| const Index operator More...
|
|
T & | operator[] (const int n) noexcept |
| Index operator. More...
|
|
T | inner_product (const Vector< T, N > &arg) const noexcept |
| inner product More...
|
|
T | dot (const Vector< T, N > &arg) const noexcept |
| dot product More...
|
|
template<typename T2 > |
Vector< T2, N > | cast () const noexcept |
| change vector type More...
|
|
T | squaredNorm () const noexcept |
| squared norm More...
|
|
double | norm () const noexcept |
| 2-norm More...
|
|
T | inf_norm () const noexcept |
| inf-norm More...
|
|
template<typename EXP_T > |
Vector< T, N > | pow (const EXP_T exponent) const noexcept |
| element-wise pow function More...
|
|
void | normalize () noexcept |
| normalise vector so that its length (2-norm) equals one. More...
|
|
bool | all () const noexcept |
| collapse vector to bool using std::all_of More...
|
|
bool | any () const noexcept |
| collapse vector to bool using std::any_of More...
|
|
bool | none () const noexcept |
| collapse vector to bool using std::none_of More...
|
|
T | minCoeff () const noexcept |
| find the minimum element of the vector More...
|
|
T | maxCoeff () const noexcept |
| find the maximum element of the vector More...
|
|
T | prod () const noexcept |
| returns the product of every element in the vector
|
|
T | sum () const noexcept |
| returns the sum of every element in the vector
|
|
T * | data () noexcept |
| returns the raw memory array containing the data for the vector
|
|
const T * | data () const noexcept |
|
Vector< T, N > & | operator+= (const Vector< T, N > &a) |
| this-Vector compound plus operator
|
|
Vector< T, N > & | operator-= (const Vector< T, N > &a) |
| this-Vector compound minus operator
|
|
Vector< T, N > & | operator*= (const Vector< T, N > &a) |
| this-Vector compound multiples operator
|
|
Vector< T, N > & | operator/= (const Vector< T, N > &a) |
| this-Vector compound divides operator
|
|
Vector< T, N > & | operator+= (const T &k) |
| this-scalar compound plus operator
|
|
Vector< T, N > & | operator-= (const T &k) |
| this-scalar compound minus operator
|
|
Vector< T, N > & | operator*= (const T &k) |
| this-scalar compound multiples operator
|
|
Vector< T, N > & | operator/= (const T &k) |
| this-scalar compound divides operator
|
|
template<typename T, int N>
class trase::Vector< T, N >
An N-dimensional vector class.
Normal C++ operators ('*','/','<' etc.) operate on this vector class in an element-wise fashion.
- Parameters
-
T | the base type of each element of the vector |
N | the dimension of the vector (i.e. how many elements) |