|
My Project
|
a 2D vector More...
#include <mia/2d/vector.hh>
Public Types | |
| typedef T | value_type |
| typedef for generic access to the element type More... | |
Public Member Functions | |
| void | fill (T v) |
| fill all the elements with the given value More... | |
| T | norm () const |
| T | norm2 () const |
| bool | operator!= (const T2DVector &a) const |
| not equal operator More... | |
| T2DVector & | operator*= (const T2DVector &a) |
| in place element wise multiplication of two 2D vectors More... | |
| T2DVector & | operator*= (double a) |
| in place multiplication with a scalar More... | |
| T2DVector & | operator+= (const T2DVector &a) |
| in place addition More... | |
| T2DVector | operator- () const |
| T2DVector & | operator-= (const T2DVector &a) |
| in place subtraction More... | |
| T2DVector & | operator/= (const T2DVector &a) |
| in place element wise division of two 2D vectors More... | |
| T2DVector & | operator/= (double a) |
| in place division by a scalar More... | |
| bool | operator== (const T2DVector &a) const |
| Equal operator. More... | |
| T & | operator[] (int i) |
| const T & | operator[] (int i) const |
| void | print (std::ostream &os) const |
| print the vector to a stream with special formatting More... | |
| double | product () const |
| void | read (std::istream &is) |
| read the properly formatted 2D vector from a stream More... | |
| size_t | size () const |
| returns the size of this vector, always 2 More... | |
| T2DVector () | |
| template<typename In > | |
| T2DVector (const T2DVector< In > &in) | |
| T2DVector (int dim) | |
| T2DVector (T _x, T _y) | |
Data Fields | |
| T | x |
| first element More... | |
| T | y |
| second element More... | |
Static Public Attributes | |
| static const T2DVector< T > | _0 = T2DVector<T>(0, 0) |
| a static for the value <0,0>. More... | |
| static const T2DVector< T > | _1 = T2DVector<T>(1, 1) |
| a static for the value <1,1>. More... | |
a 2D vector
A 2D vector that provides the usual set of operations required to handle such objects.
| type | of the elements |
Definition at line 46 of file 2d/vector.hh.
| typedef T T2DVector< T >::value_type |
typedef for generic access to the element type
Definition at line 51 of file 2d/vector.hh.
|
inline |
Definition at line 65 of file 2d/vector.hh.
|
inlineexplicit |
this constructor is required for some generic code It is explicit to avoid some problems with automatic assigment
Definition at line 70 of file 2d/vector.hh.
|
inline |
Contruct the vector with the according elements
| _x | |
| _y |
Definition at line 80 of file 2d/vector.hh.
|
inline |
Automatically convert a 2D vector from another element type
Definition at line 87 of file 2d/vector.hh.
|
inline |
fill all the elements with the given value
Definition at line 218 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
|
inline |
Definition at line 103 of file 2d/vector.hh.
References T2DVector< T >::norm2().
|
inline |
Definition at line 97 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
Referenced by T2DVector< T >::norm().
not equal operator
Definition at line 230 of file 2d/vector.hh.
in place element wise multiplication of two 2D vectors
Definition at line 141 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
in place multiplication with a scalar
Definition at line 133 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
in place addition
Definition at line 117 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
Definition at line 170 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
in place subtraction
Definition at line 125 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
in place element wise division of two 2D vectors
Definition at line 149 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
in place division by a scalar
Definition at line 160 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
Equal operator.
Definition at line 224 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
|
inline |
Array access operator for some generic code One should have a look how expensive this function is
Definition at line 184 of file 2d/vector.hh.
References DEBUG_ASSERT_RELEASE_THROW, T2DVector< T >::x, and T2DVector< T >::y.
|
inline |
Array access operator for some generic code One should have a look how expensive this function is
Definition at line 202 of file 2d/vector.hh.
References DEBUG_ASSERT_RELEASE_THROW, T2DVector< T >::x, and T2DVector< T >::y.
|
inline |
print the vector to a stream with special formatting
Definition at line 236 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
Referenced by operator<<().
|
inline |
Definition at line 109 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
|
inline |
read the properly formatted 2D vector from a stream
Definition at line 242 of file 2d/vector.hh.
References T2DVector< T >::x, and T2DVector< T >::y.
Referenced by operator>>().
|
inline |
returns the size of this vector, always 2
Definition at line 176 of file 2d/vector.hh.
a static for the value <0,0>.
Definition at line 63 of file 2d/vector.hh.
a static for the value <1,1>.
Definition at line 60 of file 2d/vector.hh.
| T T2DVector< T >::x |
first element
Definition at line 54 of file 2d/vector.hh.
Referenced by multiply< T2DImage< T > >::apply(), dot(), T2DVector< T >::fill(), T2DVector< T >::norm2(), T2DImage< T >::operator()(), less_then< T2DVector< T > >::operator()(), operator*(), T2DVector< T >::operator*=(), operator+(), T2DVector< T >::operator+=(), T2DVector< T >::operator-(), T2DMatrix< T >::operator-=(), T2DVector< T >::operator-=(), T2DVector< T >::operator/=(), operator<(), T2DMatrix< T >::operator=(), T2DVector< T >::operator==(), T2DVector< T >::operator[](), fifof_Fixture::prepare(), T2DVector< T >::print(), T2DVector< T >::product(), and T2DVector< T >::read().
| T T2DVector< T >::y |
second element
Definition at line 57 of file 2d/vector.hh.
Referenced by multiply< T2DImage< T > >::apply(), dot(), T2DVector< T >::fill(), T2DVector< T >::norm2(), T2DImage< T >::operator()(), less_then< T2DVector< T > >::operator()(), operator*(), T2DVector< T >::operator*=(), operator+(), T2DVector< T >::operator+=(), T2DVector< T >::operator-(), T2DMatrix< T >::operator-=(), T2DVector< T >::operator-=(), T2DVector< T >::operator/=(), operator<(), T2DMatrix< T >::operator=(), T2DVector< T >::operator==(), T2DVector< T >::operator[](), fifof_Fixture::prepare(), T2DVector< T >::print(), T2DVector< T >::product(), and T2DVector< T >::read().