|
Particle Identification and Tracking
|
Class for carrying around the posistion and velocity vectors. More...
#include <tuple.h>
Inheritance diagram for utilities::Tuple< T, length >:
Collaboration diagram for utilities::Tuple< T, length >:Public Member Functions | |
| bool | operator== (const Tuple &b) const |
| Over loads for comparison. More... | |
| void | operator= (const Tuple &y) |
| Over loads for copying. More... | |
| Tuple | operator- () |
| Over loads for negation. More... | |
| T & | operator[] (int i) |
| Overides random access. More... | |
| const T & | operator[] (int i) const |
| Overides random access. More... | |
| Tuple | operator+ (const Tuple &y) const |
| Over loads for element-wise addition. More... | |
| Tuple | operator+ (const T y) const |
| Over loads for constant addition. More... | |
| void | operator+= (const Tuple &y) |
| adds Tuple to the current Tuple More... | |
| void | operator+= (const T y) |
| adds constant to the current Tuple More... | |
| Tuple | operator- (const Tuple &y) const |
| Over loads for element-wise subtraction. More... | |
| Tuple | operator- (const T y) const |
| Over loads for constant subtraction. More... | |
| void | operator-= (const Tuple &y) |
| subtracts Tuple to the current Tuple More... | |
| void | operator-= (const T y) |
| subtracts constant to the current Tuple More... | |
| Tuple | operator* (const T y) const |
| Over loads for constant multilplication. More... | |
| Tuple | operator* (const Tuple &y) const |
| Over loads for elementwise mustiplication. More... | |
| void | operator*= (const Tuple &y) |
| element wise multilication of the current Tuple More... | |
| void | operator*= (const T y) |
| multiplies current Tuple by a constant More... | |
| Tuple | operator/ (const Tuple &y) const |
| Over loads for element-wise division. More... | |
| void | operator/= (const Tuple &y) |
| element wise division of the current Tuple More... | |
| void | operator/= (const T y) |
| devides current Tuple by a constant More... | |
| T | magnitude_sqr () const |
| square of the magnitude of the Tuple assuming euclidian space More... | |
| T | magnitude () const |
| magnitude of the Tuple assuming euclidian space More... | |
| T | dot (const Tuple &y) const |
| take the dot product between two tuple More... | |
| T | prod () const |
| Ruturns the product of the elements. More... | |
| T | sum () const |
| Ruturns the sum of the elements. More... | |
| T | max () const |
| Returns the maximum element. More... | |
| T | min () const |
| Returns the minimum element. More... | |
| void | make_unit () |
| makes a tuple a unit vector More... | |
| Tuple | direction () const |
| makes a tuple a unit vector More... | |
| void | print () const |
| prints the data More... | |
| void | clear () |
| sets tuple to (0,0) More... | |
| Tuple () | |
| empty constructor More... | |
| Tuple (const Tuple &y) | |
| Copy constructor. More... | |
| T | dist_sqr (const Tuple &y) const |
| returns the distance squared between two points More... | |
| ~Tuple () | |
| Destructor. More... | |
| Tuple (T x) | |
| Uniform constructor. More... | |
| Tuple (T x, T y) | |
| hard coded 2-D constructor More... | |
| Tuple (T x, T y, T z) | |
| hard coded 3-D constructor More... | |
| Tuple (const T *) | |
| Takes in an array, assumes it is the correct length. More... | |
| const T * | get_ptr () const |
| returns a pointer to the internal data in a safe way. More... | |
| T * | get_ptr () |
| returns a pointer to the internal data in a unsafe way. More... | |
| template<class T2 > | |
| Tuple (const Tuple< T2, length > &) | |
| Template for converting data types. More... | |
| int | get_len () const |
| Returns the length. More... | |
Static Public Attributes | |
| static const int | length_ = length |
Protected Attributes | |
| T | data_ [length] |
| pointer to data More... | |
Class for carrying around the posistion and velocity vectors.
The logic for making this class is a memory concern that there will be millions of these objects. Also to make some specific matlab like functions simpler to implement
| utilities::Tuple< T, length >::Tuple | ( | ) |
empty constructor
| utilities::Tuple< T, length >::Tuple | ( | const Tuple< T, length > & | y) |
Copy constructor.
References utilities::Tuple< T, length >::data_.
| utilities::Tuple< T, length >::~Tuple | ( | ) |
Destructor.
| utilities::Tuple< T, length >::Tuple | ( | T | x) |
Uniform constructor.
| utilities::Tuple< T, length >::Tuple | ( | T | x, |
| T | y | ||
| ) |
hard coded 2-D constructor
| utilities::Tuple< T, length >::Tuple | ( | T | x, |
| T | y, | ||
| T | z | ||
| ) |
hard coded 3-D constructor
| utilities::Tuple< T, length >::Tuple | ( | const T * | in) |
Takes in an array, assumes it is the correct length.
| utilities::Tuple< T, length >::Tuple | ( | const Tuple< T2, length > & | y) |
Template for converting data types.
| void utilities::Tuple< T, length >::clear | ( | ) |
sets tuple to (0,0)
Referenced by tracking::Hash_shelf::compute_mean_forward_disp(), and main().
| Tuple< T, length > utilities::Tuple< T, length >::direction | ( | ) | const |
makes a tuple a unit vector
References utilities::Tuple< T, length >::make_unit().
| T utilities::Tuple< T, length >::dist_sqr | ( | const Tuple< T, length > & | y) | const |
returns the distance squared between two points
References utilities::Tuple< T, length >::data_.
Referenced by tracking::particle_base::distancesq().
| T utilities::Tuple< T, length >::dot | ( | const Tuple< T, length > & | y) | const |
take the dot product between two tuple
References utilities::Tuple< T, length >::data_.
|
inline |
Returns the length.
| const T * utilities::Tuple< T, length >::get_ptr | ( | ) | const |
returns a pointer to the internal data in a safe way.
mostly to make it simpler to write out to hdf wrappers
Referenced by utilities::Attr_list_hdf::get_value(), utilities::ND_Array< T, N >::ND_Array(), and utilities::Attr_list_hdf::set_value().
| T * utilities::Tuple< T, length >::get_ptr | ( | ) |
returns a pointer to the internal data in a unsafe way.
mostly to make it simpler to read out from hdf wrappers
| T utilities::Tuple< T, length >::magnitude | ( | ) | const |
magnitude of the Tuple assuming euclidian space
| T utilities::Tuple< T, length >::magnitude_sqr | ( | ) | const |
square of the magnitude of the Tuple assuming euclidian space
Referenced by tracking::Corr_theta_2pt::compute().
| void utilities::Tuple< T, length >::make_unit | ( | ) |
makes a tuple a unit vector
Referenced by tracking::Corr_goftheta::compute(), tracking::Corr_pair_diffusion::compute(), and utilities::Tuple< T, length >::direction().
| T utilities::Tuple< T, length >::max | ( | ) | const |
Returns the maximum element.
Referenced by main().
| T utilities::Tuple< T, length >::min | ( | ) | const |
Returns the minimum element.
| Tuple< T, length > utilities::Tuple< T, length >::operator* | ( | const T | y) | const |
Over loads for constant multilplication.
References utilities::Tuple< T, length >::data_.
| Tuple< T, length > utilities::Tuple< T, length >::operator* | ( | const Tuple< T, length > & | y) | const |
Over loads for elementwise mustiplication.
References utilities::Tuple< T, length >::data_.
| void utilities::Tuple< T, length >::operator*= | ( | const Tuple< T, length > & | y) |
element wise multilication of the current Tuple
References utilities::Tuple< T, length >::data_.
| void utilities::Tuple< T, length >::operator*= | ( | const T | y) |
multiplies current Tuple by a constant
| Tuple< T, length > utilities::Tuple< T, length >::operator+ | ( | const Tuple< T, length > & | y) | const |
Over loads for element-wise addition.
References utilities::Tuple< T, length >::data_.
| Tuple< T, length > utilities::Tuple< T, length >::operator+ | ( | const T | y) | const |
Over loads for constant addition.
References utilities::Tuple< T, length >::data_.
| void utilities::Tuple< T, length >::operator+= | ( | const Tuple< T, length > & | y) |
adds Tuple to the current Tuple
References utilities::Tuple< T, length >::data_.
| void utilities::Tuple< T, length >::operator+= | ( | const T | y) |
adds constant to the current Tuple
| Tuple< T, length > utilities::Tuple< T, length >::operator- | ( | ) |
Over loads for negation.
References utilities::Tuple< T, length >::data_.
| Tuple< T, length > utilities::Tuple< T, length >::operator- | ( | const Tuple< T, length > & | y) | const |
Over loads for element-wise subtraction.
References utilities::Tuple< T, length >::data_.
| Tuple< T, length > utilities::Tuple< T, length >::operator- | ( | const T | y) | const |
Over loads for constant subtraction.
References utilities::Tuple< T, length >::data_.
| void utilities::Tuple< T, length >::operator-= | ( | const Tuple< T, length > & | y) |
subtracts Tuple to the current Tuple
References utilities::Tuple< T, length >::data_.
| void utilities::Tuple< T, length >::operator-= | ( | const T | y) |
subtracts constant to the current Tuple
| Tuple< T, length > utilities::Tuple< T, length >::operator/ | ( | const Tuple< T, length > & | y) | const |
Over loads for element-wise division.
References utilities::Tuple< T, length >::data_.
| void utilities::Tuple< T, length >::operator/= | ( | const Tuple< T, length > & | y) |
element wise division of the current Tuple
References utilities::Tuple< T, length >::data_.
| void utilities::Tuple< T, length >::operator/= | ( | const T | y) |
devides current Tuple by a constant
| void utilities::Tuple< T, length >::operator= | ( | const Tuple< T, length > & | y) |
Over loads for copying.
References utilities::Tuple< T, length >::data_.
| bool utilities::Tuple< T, length >::operator== | ( | const Tuple< T, length > & | b) | const |
Over loads for comparison.
References utilities::Tuple< T, length >::data_.
| T & utilities::Tuple< T, length >::operator[] | ( | int | i) |
Overides random access.
| const T & utilities::Tuple< T, length >::operator[] | ( | int | i) | const |
Overides random access.
| void utilities::Tuple< T, length >::print | ( | ) | const |
prints the data
Referenced by main().
| T utilities::Tuple< T, length >::prod | ( | ) | const |
Ruturns the product of the elements.
Referenced by utilities::ND_Array< T, N >::ND_Array().
| T utilities::Tuple< T, length >::sum | ( | ) | const |
Ruturns the sum of the elements.
|
protected |
pointer to data
Referenced by utilities::Tuple< T, length >::dist_sqr(), utilities::Tuple< T, length >::dot(), utilities::Tuple< T, length >::operator*(), utilities::Tuple< T, length >::operator*=(), utilities::Tuple< T, length >::operator+(), utilities::Tuple< T, length >::operator+=(), utilities::Tuple< T, length >::operator-(), utilities::Tuple< T, length >::operator-=(), utilities::Tuple< T, length >::operator/(), utilities::Tuple< T, length >::operator/=(), utilities::Tuple< T, length >::operator=(), utilities::Tuple< T, length >::operator==(), and utilities::Tuple< T, length >::Tuple().
|
static |
1.8.4