|
| vec () |
| Default constructor.
|
|
template<class Y > |
| vec (const Y *v) |
| Copy constructor. More...
|
|
template<class Y > |
| vec (const vec< Y, D > &v) |
| Copy constructor. More...
|
|
| vec (T v) |
| Constructor. More...
|
|
| vec (T x, T y) |
| Constructor for two dimensional vector. More...
|
|
| vec (T x, T y, T z) |
| Constructor for three dimensional vector. More...
|
|
const T & | operator[] (unsigned idx) const |
| Get the value at a specified dimension. More...
|
|
T & | operator[] (unsigned idx) |
| Get the reference to the value at a specified dimension. More...
|
|
bool | empty () const |
| Get if all the elements in the vector is empty. More...
|
|
bool | operator== (const vec &v) const |
| Get if the vector is equal to the input vector. More...
|
|
bool | operator!= (const vec &v) const |
| Get if the vector is not equal to the input vector. More...
|
|
template<class Y > |
vec< T, D > | operator+ (const vec< Y, D > &v) const |
| Add a vector. More...
|
|
template<class Y > |
vec< T, D > | operator- (const vec< Y, D > &v) const |
| Subtract a vector. More...
|
|
template<class Y > |
void | operator+= (const vec< Y, D > &v) |
| Add a vector. More...
|
|
template<class Y > |
void | operator-= (const vec< Y, D > &v) |
| Subtract a vector. More...
|
|
template<class Y > |
vec | operator* (Y s) const |
| Multiply a value. More...
|
|
template<class Y > |
vec | operator/ (Y s) const |
| Divide by a value. More...
|
|
template<class Y > |
void | operator*= (Y s) |
| Multiply a value. More...
|
|
template<class Y > |
void | operator/= (Y s) |
| Divide by a value. More...
|
|
template<class Y > |
T | operator* (vec< Y, D > v) const |
| Compute the dot product. More...
|
|
double | norm2 () const |
| Compute L2 norm. More...
|
|
double | norm_inf () const |
| Compute L-inf norm. More...
|
|
double | len () const |
| Compute L1 norm. More...
|
|
vec | normal () const |
| Compute normalized vector. More...
|
|
bool | normalize () |
| Normaliz vector.
|
|
vec | rotate90 () const |
| Rotate vector 90 degrees counterclockwise. More...
|
|
template<class Y = double> |
T | cross2 (const vec< Y, 2 > &r) const |
| Compute the cross product for two dimensions. More...
|
|
template<class Y = double> |
vec< T, 3 > | cross (const vec< Y, 3 > &r) const |
| Compute the cross product for three dimensions. More...
|
|
template<class Y = double> |
vec< Y, D > | cell () const |
| Compute the position of the center of a cell from the index space. More...
|
|
template<class Y = double> |
vec< Y, D > | nodal () const |
| Compute the position of the nodal position from the index space. More...
|
|
template<class Y = double> |
vec< Y, D > | face (int dim) const |
| Compute the position of the center of face position from the index space. More...
|
|
template<class Y = double> |
vec< Y, D > | edge (int dim) const |
| Compute the position of the center of edge position from the index space. More...
|
|
template<class T, unsigned D>
struct vec< T, D >
Fixed sized vector structure.