#include <VectorND.h>
Public Member Functions | |
double | DotProduct (const VectorND &) const |
Dot-product with other vector. | |
double | Length () const |
Compute length of vector. | |
void | Normalize () |
Normalize vector to length one. | |
operator const T * () const | |
Cast to C array pointer. | |
operator T* () | |
Cast to C array pointer. | |
bool | operator!= (int) const |
Element-wise inequality comparison with inegral-valued scalar. | |
bool | operator!= (double) const |
Element-wise inequality comparison with real-valued scalar. | |
template<typename T2 > | |
bool | operator!= (const VectorND< N, T2 > &) const |
Operator for testing non-equality of two vector. | |
T & | operator() (int) |
Set/get vector component at index. | |
T | operator() (int) const |
Get vector component at index. | |
VectorND | operator* (int) const |
Multiply vector by integral valued scalar. | |
VectorND | operator* (double) const |
Multiply vector by real valued scalar. | |
template<typename T2 > | |
VectorND | operator* (const VectorND< N, T2 > &) const |
Element-wise multiplication of two vectors. | |
VectorND & | operator*= (int) |
Multiply by integral valued scalar. | |
VectorND & | operator*= (double) |
Multiply by real valued scalar. | |
template<typename T2 > | |
VectorND & | operator*= (const VectorND< N, T2 > &) |
Element-wise multiplication with other vector. | |
VectorND | operator+ (int) const |
Add integral valued scalar to vector. | |
VectorND | operator+ (double) const |
Add real valued scalar to vector. | |
template<typename T2 > | |
VectorND | operator+ (const VectorND< N, T2 > &) const |
Addition of two vectors. | |
VectorND & | operator+= (int) |
Add integral valued scalar. | |
VectorND & | operator+= (double) |
Add real valued scalar. | |
template<typename T2 > | |
VectorND & | operator+= (const VectorND< N, T2 > &) |
Addition of other vector. | |
VectorND | operator- (int) const |
Subtract integral valued scalar to vector. | |
VectorND | operator- (double) const |
Subtract real valued scalar to vector. | |
VectorND | operator- () const |
Unary negation operator. | |
template<typename T2 > | |
VectorND | operator- (const VectorND< N, T2 > &) const |
Subtraction of two vectors. | |
VectorND & | operator-= (int) |
Subtract integral valued scalar. | |
VectorND & | operator-= (double) |
Subtract real valued scalar. | |
template<typename T2 > | |
VectorND & | operator-= (const VectorND< N, T2 > &) |
Subtraction of other vector. | |
VectorND | operator/ (int) const |
Divide vector by integral valued scalar. | |
VectorND | operator/ (double) const |
Divide vector by real valued scalar. | |
template<typename T2 > | |
VectorND | operator/ (const VectorND< N, T2 > &) const |
Element-wise division of two vectors. | |
VectorND & | operator/= (int) |
Divide by integral valued scalar. | |
VectorND & | operator/= (double) |
Divide by real valued scalar. | |
template<typename T2 > | |
VectorND & | operator/= (const VectorND< N, T2 > &) |
Element-wise division by other vector. | |
bool | operator< (int) const |
Element-wise less than comparison to inegral-valued scalar. | |
bool | operator< (double) const |
Element-wise less than comparison to real-valued scalar. | |
template<typename T2 > | |
bool | operator< (const VectorND< N, T2 > &) const |
Operator for ordering vectors. | |
bool | operator<= (int) const |
Element-wise less or equal than comparison to inegral-valued scalar. | |
bool | operator<= (double) const |
Element-wise less or equal than comparison to real-valued scalar. | |
template<typename T2 > | |
bool | operator<= (const VectorND< N, T2 > &) const |
Operator for ordering vectors. | |
VectorND & | operator= (int) |
Assign integral valued scalar. | |
VectorND & | operator= (double) |
Assign real valued scalar. | |
template<typename T2 > | |
VectorND & | operator= (const VectorND< N, T2 > &) |
Assignment from other vector. | |
bool | operator== (int) const |
Element-wise equality comparison with inegral-valued scalar. | |
bool | operator== (double) const |
Element-wise equality comparison with real-valued scalar. | |
template<typename T2 > | |
bool | operator== (const VectorND< N, T2 > &) const |
Operator for testing equality of two vectors. | |
bool | operator> (int) const |
Element-wise greater than comparison to inegral-valued scalar. | |
bool | operator> (double) const |
Element-wise greater than comparison to real-valued scalar. | |
template<typename T2 > | |
bool | operator> (const VectorND< N, T2 > &) const |
Operator for ordering vectors. | |
bool | operator>= (int) const |
Element-wise greater or equal than comparison to inegral-valued scalar. | |
bool | operator>= (double) const |
Element-wise greater or equal than comparison to real-valued scalar. | |
template<typename T2 > | |
bool | operator>= (const VectorND< N, T2 > &) const |
Operator for ordering vectors. | |
double | SquaredLength () const |
Compute squared length of vector. | |
VectorND (T=T(0)) | |
Construct from scalar. | |
VectorND (const T[N]) | |
Construct from C array. | |
VectorND (const Vector &) | |
Construct from variable size vector type. | |
template<typename T2 > | |
VectorND (const VectorND< N, T2 > &) | |
Copy constructor. | |
Static Public Member Functions | |
static int | Rows () |
Number of vector components. | |
Public Attributes | |
T | _v [N] |
Vector components. | |
Represents a n-D vector of fixed dimensions
Must be a primitive type which can be treated as an array of n values of type T such that sizeof(VectorND<n, T>) == n * sizeof(T). Thus, this primitive vector type may not have any other data members besides the n vector components. This is required especially when VectorND is used as voxel type of an image and further an externally allocated continuous block of n * sizeof(T) bytes used internally by the image instance which only reinterprets the memory as consecutive VectorND<n, T> instances, i.e.,
Definition at line 52 of file VectorND.h.