Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

# Tools/Math/Vector_n.h File Reference

Contains class Vector_n. More...

`#include <math.h>`
`#include "MVTools.h"`

Include dependency graph for Vector_n.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

## Classes
class | Vector_n
| Represents a n-dimensional vector of type T. More...
## Defines
#define | VECTOR_N_STACK
## Functions
template<class T, size_t N> Vector_n< T, N > | operator+ (const Vector_n< T, N > &v1, const Vector_n< T, N > &v2)
| Operator +.
template<class T, size_t N> Vector_n< T, N > | operator- (const Vector_n< T, N > &v1, const Vector_n< T, N > &v2)
| Operator -.
template<class T, size_t N> Vector_n< T, N > | operator * (const T &s, const Vector_n< T, N > &v)
| Operator *.
template<class T, size_t N> Vector_n< T, N > | operator * (const Vector_n< T, N > &v, const T &s)
| Operator *.
template<class T, size_t N> T | operator * (const Vector_n< T, N > &v1, const Vector_n< T, N > &v2)
| Operator *.
template<class T, size_t N> Vector_n< T, N > | operator/ (const Vector_n< T, N > &v, const T &s)
| Operator /.
template<class T, size_t N> T | length (const Vector_n< T, N > &v)
| Get length of vector.

## Detailed Description

Contains class Vector_n.

Author:
  Stefan Uhrig

Definition in file Vector_n.h.

## Define Documentation

#define VECTOR_N_STACK

| Definition at line 11 of file Vector_n.h.

## Function Documentation

template<class T, size_t N>
Vector_n<T, N> operator+ | ( | const Vector_n< T, N > & | v1,
|  | const Vector_n< T, N > & | v2
| ) |

  | Operator +. Parameters:
  v1 | First vector
  v2 | Second vector
Returns: v1+v2 Complexity: n Definition at line 270 of file Vector_n.h.

template<class T, size_t N>
Vector_n<T, N> operator- | ( | const Vector_n< T, N > & | v1,
|  | const Vector_n< T, N > & | v2
| ) |

  | Operator -. Parameters:
  v1 | First vector
  v2 | Second vector
Returns: v1-v2 Complexity: n Definition at line 287 of file Vector_n.h.

template<class T, size_t N>
Vector_n<T, N> operator * | ( | const T & | s,
|  | const Vector_n< T, N > & | v
| ) |

  | Operator *. Parameters:
  s | Scalar the vector is to multiplied with
  v | Vector
Returns: s*v Complexity: n Definition at line 304 of file Vector_n.h.

template<class T, size_t N>
Vector_n<T, N> operator * | ( | const Vector_n< T, N > & | v,
|  | const T & | s
| ) |

  | Operator *. Parameters:
  v | Vector
  s | Scalar the vector is to multiplied with
Returns: v*s Complexity: n Definition at line 321 of file Vector_n.h.

template<class T, size_t N>
T operator * | ( | const Vector_n< T, N > & | v1,
|  | const Vector_n< T, N > & | v2
| ) |

  | Operator *. Parameters:
  v1 | First Vector
  v2 | Second Vector
Returns: Scalar product <v1,v2> Complexity: n Definition at line 338 of file Vector_n.h. References MVTools::isNearInf(), and MVTools::isNearPosInf().

Here is the call graph for this function:

template<class T, size_t N>
Vector_n<T, N> operator/ | ( | const Vector_n< T, N > & | v,
|  | const T & | s
| ) |

  | Operator /. Parameters:
  v | Vector
  s | Scalar the vector is to be divided by
Returns: v/s Complexity: n Definition at line 364 of file Vector_n.h.

template<class T, size_t N>
T length | ( | const Vector_n< T, N > & | v | ) |

  | Get length of vector. Parameters:
  v | Vector to retrieve length of
Returns: Length of vector Complexity: n Definition at line 380 of file Vector_n.h.