#include <vec.h>
Definition at line 43 of file vec.h.
Public Types | |
enum | THE_DIM { DIM = V_DIM } |
Public Member Functions | |
vec () | |
vec (const vec &vee) | |
vec (T v1) | |
the last value in a constructor gets replicated to the end of the vec if there are more values in the vector than specified by the constructor. | |
vec (T v1, T v2) | |
vec (T v1, T v2, T v3) | |
vec (T v1, T v2, T v3, T v4) | |
vec (T v1, T v2, T v3, T v4, T v5) | |
vec (T v1, T v2, T v3, T v4, T v5, T v6) | |
vec (T v1, T v2, T v3, T v4, T v5, T v6, T v7) | |
vec (T v1, T v2, T v3, T v4, T v5, T v6, T v7, T v8) | |
vec (T v1, T v2, T v3, T v4, T v5, T v6, T v7, T v8, T v9) | |
vec (T v1, T v2, T v3, T v4, T v5, T v6, T v7, T v8, T v9, T v10) | |
vec (T *vee, int numVals=-1) | |
copy data array, will depend on AllocPolicy used... | |
virtual | ~vec () |
T & | operator[] (int i) |
element accessor | |
const T | operator[] (int i) const |
int | len () |
int | dim () |
int | size () |
vec & | operator= (const vec &v) |
assignment = | |
vec & | operator+= (const T &v) |
+= | |
vec & | operator+= (const vec &v) |
vec & | operator-= (const T &v) |
-= | |
vec & | operator-= (const vec &v) |
vec & | operator *= (const T &v) |
*= | |
vec & | operator *= (const vec &v) |
vec & | operator/= (const T &v) |
/= | |
vec & | operator/= (const vec &v) |
vec | operator- () const |
negate - | |
vec | operator- (const T &v) const |
subtract | |
vec | operator- (const vec &v) const |
vec | operator+ (const T &v) const |
add | |
vec | operator+ (const vec &v) const |
vec | operator * (const T &v) const |
multiply | |
vec | operator * (const vec &v) const |
vec | operator/ (const T &v) const |
divide | |
vec | operator/ (const vec &v) const |
bool | operator== (const vec &v) const |
comparison ops =================== equal | |
bool | operator== (T val) const |
bool | operator!= (const vec &v) const |
not equal | |
bool | operator< (const vec &v) const |
less | |
bool | operator<= (const vec &v) const |
less equal | |
bool | operator> (const vec &v) const |
greater | |
bool | operator>= (const vec &v) const |
greater equal | |
T | normL1 () const |
other ops =========================== L1 norm | |
T | norm2 () const |
L2 norm squared. | |
T | norm () const |
L2 norm. | |
T | normalize () |
Normalize, side-effect op, normalizes this vector! | |
T | dot (const vec &v) |
dot product | |
vec | abs () |
abs of all elements | |
Public Attributes | |
T * | v |
Public data Member. | |
Protected Member Functions | |
vec (T *vee, bool noCpy) | |
do not copy data, just pointer (always shallow copy) the "vee" array MUST be at least as long as this array and created using NEW. |
|
|
|
Definition at line 51 of file vec.h. Referenced by gutz::vec< int, TF_MAX_R >::abs(), gutz::vec< int, TF_MAX_R >::operator *(), gutz::vec< int, TF_MAX_R >::operator+(), gutz::vec< int, TF_MAX_R >::operator-(), and gutz::vec< int, TF_MAX_R >::operator/(). |
|
|
|
the last value in a constructor gets replicated to the end of the vec if there are more values in the vector than specified by the constructor.
Definition at line 413 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 422 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 432 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 442 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 452 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 462 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 472 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 483 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 494 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
Definition at line 505 of file vec.h. References gutz::vec< T, V_DIM >::v, and v. |
|
copy data array, will depend on AllocPolicy used... when numVals == -1 you indicate that the "vee" array is at least as big as the dimension of this vec Definition at line 386 of file vec.h. References gutz::g_min(), gutz::vec< T, V_DIM >::v, and v. |
|
|
|
do not copy data, just pointer (always shallow copy) the "vee" array MUST be at least as long as this array and created using NEW. The array will be deleted with this class. Not public cuz it's a little confusing. Definition at line 406 of file vec.h. References v. |
|
abs of all elements
|
|
|
|
dot product
|
|
|
|
L2 norm.
Definition at line 229 of file vec.h. Referenced by gutz::vec< int, TF_MAX_R >::normalize(). |
|
L2 norm squared.
Definition at line 221 of file vec.h. Referenced by gutz::vec< int, TF_MAX_R >::norm(). |
|
Normalize, side-effect op, normalizes this vector!
|
|
other ops =========================== L1 norm
|
|
|
|
multiply
|
|
|
|
*=
|
|
not equal
|
|
|
|
add
|
|
|
|
+=
|
|
|
|
subtract
|
|
negate -
|
|
|
|
-=
|
|
|
|
divide
|
|
|
|
/=
|
|
less
Definition at line 191 of file vec.h. Referenced by gutz::vec< int, TF_MAX_R >::operator>=(). |
|
less equal
Definition at line 198 of file vec.h. Referenced by gutz::vec< int, TF_MAX_R >::operator>(). |
|
assignment =
|
|
|
|
comparison ops =================== equal
Definition at line 175 of file vec.h. Referenced by gutz::vec< int, TF_MAX_R >::operator!=(). |
|
greater
|
|
greater equal
|
|
|
|
element accessor
|
|
|
|
Public data Member.
Definition at line 75 of file vec.h. Referenced by TFImage::clear(), gutz::vec< int, TF_MAX_R >::norm2(), gutz::vec< int, TF_MAX_R >::normL1(), gutz::vec< int, TF_MAX_R >::operator-(), gutz::vec< int, TF_MAX_R >::operator==(), gutz::vec< int, TF_MAX_R >::operator[](), gutz::vec< T, V_DIM >::vec(), gutz::vec< int, TF_MAX_R >::vec(), and gutz::vec< int, TF_MAX_R >::~vec(). |