|
Public Types |
typedef int | size_t |
Public Member Functions |
| array () |
| Default constructor.
|
| array (T v[S]) |
| A constructor.
|
| array (const array<T, S-1>& src, T t) |
| A constructor.
|
| array (const array<T, S>& src) |
| Copy constructor.
|
virtual | ~array () |
| Default destructor.
|
const T* | c_ptr () const |
| Get the pointer of the data.
|
T | norm2 () const |
| Get the squared norm of the vector.
|
T | norm () const |
| Get the norm of the vector.
|
array<T, S> | normalize () |
| Will throw divide_by_zero exception if norm() < EPSILON.
|
array<T, S> | normal () const |
| Will throw divide_by_zero exception if norm() < EPSILON.
|
array<T, S>& | operator= (const array<T, S>& src) |
| Assignment operator.
|
array<T, S> | operator* (double scale) const |
| The scalar multiplication operator.
|
array<T, S> | operator* (float scale) const |
| The scalar multiplication operator.
|
array<T, S> | operator* (int scale) const |
| The scalar multiplication operator.
|
array<T, S>& | operator*= (double scale) |
| The in place scalar multiplication operator.
|
array<T, S>& | operator*= (float scale) |
| The in place scalar multiplication operator.
|
array<T, S>& | operator*= (int scale) |
| The in place scalar multiplication operator.
|
array<T, S> | operator/ (double scale) const |
| The scalar division operator.
|
array<T, S> | operator/ (float scale) const |
| The scalar division operator.
|
array<T, S> | operator/ (int scale) const |
| The scalar division operator.
|
array<T, S>& | operator/= (double scale) |
| The in place scalar division operator.
|
array<T, S>& | operator/= (float scale) |
| The in place scalar division operator.
|
array<T, S>& | operator/= (int scale) |
| The in place scalar division operator.
|
array<T, S> | operator+ (const array<T, S>& rhs) const |
| The array addition operator.
|
array<T, S>& | operator+= (const array<T, S>& rhs) |
| The in place array addition operator.
|
array<T, S> | operator- (const array<T, S>& rhs) const |
| The array subtraction operator.
|
array<T, S>& | operator-= (const array<T, S>& rhs) |
| The in place array subtraction operator.
|
array<T, S> | operator- () const |
| The unary operator.
|
T& | operator[] (unsigned i) |
| Get the element of the array (lvalue).
|
const T& | operator[] (unsigned i) const |
| Get the element of the array (rvalue).
|
T& | operator() (unsigned i) |
| Get the element of the array (lvalue).
|
const T& | operator() (unsigned i) const |
| Get the element of the array (rvalue).
|
size_t | size () const |
| Get the size of the array.
|
Protected Attributes |
T | _v [S] |
Friends |
array<T, S> | operator* (double scale, const array<T, S>& v) |
| The scalar multiplication operator that allows the scalar value to preceed the array.
|
array<T, S> | operator* (float scale, const array<T, S>& v) |
| The scalar multiplication operator that allows the scalar value to preceed the array.
|
array<T, S> | operator* (int scale, const array<T, S>& v) |
| The scalar multiplication operator that allows the scalar value to preceed the array.
|
std::ostream& | operator<< (std::ostream& os, const array<T, S>& v) |
| The out stream operator.
|
std::istream& | operator>> (std::istream& is, array<T, S>& v) |
| The in stream operator.
|