Particle Identification and Tracking
|
Base class for particles. More...
#include <particle_base.h>
Public Member Functions | |
particle_base (int i_ind, int frame=0) | |
Default constructor. More... | |
particle_base (int ind, utilities::Tuplef pos, int frame=0) | |
Constructor that takes the position of the particle. More... | |
particle_base (const particle_base &p) | |
Copy constructor. More... | |
~particle_base () | |
default Destructor, made virtual More... | |
void | print () const |
Pring out a rasonable representation of the partile. More... | |
float | get_value (utilities::D_TYPE type, float &val) const |
Returns the float value of type given. More... | |
int | get_value (utilities::D_TYPE type, int &val) const |
Returns the int value of type given. More... | |
std::complex< float > | get_value (utilities::D_TYPE type, std::complex< float > &val) const |
Returns the complex value of type given. More... | |
template<class T > | |
T | get_wrapper_value (utilities::D_TYPE type, T &val) const |
Returns the a value associated with the particle directly from the wrapper, by passing all logic in the particle object. More... | |
const utilities::Tuplef & | get_position () const |
returns a tuple of the particle's position More... | |
int | get_ind () const |
returns the index of the current particle More... | |
int | get_frame () const |
returns the frame of the current particle More... | |
float | distancesq (const particle_base *part_in) const |
Retruns the distance from this particle to part_in. More... | |
const utilities::Tuplef | get_disp (const particle_base *part_in) const |
Returns the uncorrected forward displacement. More... | |
float | get_r (const utilities::Tuplef &origin) const |
Returns the distance of the particle from the specified origin. More... | |
float | get_theta (const utilities::Tuplef &origin) const |
Returns the angle in the plane from the Y-axis. More... | |
void | sort_neighborhood () |
Sorts the neighborhood vector in ascending order. More... | |
bool | no_neighborhood_repeats () const |
checks to make sure the neighborhood does not include any repeats, returns true if the neighborhood is repeat free. More... | |
bool | add_to_neighborhood (const particle *in) |
adds a particle to the neighborhood if it is close enough returns true if the particle is added, false otherwise More... | |
void | fill_phi_6 () |
Fills the order parameter with . More... | |
std::complex< float > | compute_phi_6 () const |
computes and returns the order parameter . More... | |
std::complex< float > | get_scaler_order_pram () const |
returns the scaler order parameter More... | |
unsigned int | get_neighborhood_size () const |
returns the number of particles with in max_neighborhood_range_ of the particle (assuming that these have been initialized More... | |
const std::vector< const particle * > | get_neighborhood () const |
returns the neighborhood vector More... | |
Static Public Member Functions | |
static float | get_max_range () |
returns the maximum neighborhood range More... | |
static void | intialize_wrapper_in (const utilities::Wrapper_in *in) |
Intialize the static input wrapper for all particles. More... | |
static void | clear_wrapper_in () |
Cleans up the set wrapper_in. More... | |
static void | set_neighborhood_range (float in) |
Sets the maximum neighborhood range, there needs to be something to make sure that this doesn't get changed with out updating the. More... | |
static float | get_neighborhood_range () |
returns the range of the neighborhood More... | |
Protected Attributes | |
int | ind_ |
Identifier that comes from the wrapper. More... | |
utilities::Tuplef | position_ |
New attempt at storing the position data, this has the problem of taking more memory, but it might help the time. More... | |
int | frame_ |
The frame of the particle. More... | |
std::vector< const particle * > | neighborhood_ |
Vector of the particles with in max_range_ in the Hash_shelf_ of the particle. More... | |
std::complex< float > | s_order_parameter_ |
Scaler order parameter, ex phi_6 in 2D. More... | |
Static Protected Attributes | |
static const utilities::Wrapper_in * | wrapper_in_ = NULL |
object that takes care of all the underling data structures. More... | |
static float | max_neighborhood_range_ = 0 |
Maximum distance to be part of the neighborhood. More... | |
Private Member Functions | |
void | fill_position () |
Fills the position members from the wrapper. More... | |
void | priv_init () |
Private initialization function. More... | |
bool | lthan (const particle_base *a, const particle_base *b) const |
function for sorting the vectors in ascending order, returns true if the first argument goes before the second argument in the specific strict weak ordering it defines, and false otherwise. More... | |
Base class for particles.
Defines the basic functions a particle must have. The reason that the wrapper_i class has been split off from this class has been to seperate the implemntation of copeing with data structures coming in from the derived classes of the particles (to carry extra information about the particles for tracking pruposes). Need to roll my own dll class
particle_base::particle_base | ( | int | i_ind, |
int | frame = 0 |
||
) |
Default constructor.
move to this being the primary constructor, get rid of the other one
References fill_position(), and priv_init().
tracking::particle_base::particle_base | ( | int | ind, |
utilities::Tuplef | pos, | ||
int | frame = 0 |
||
) |
Constructor that takes the position of the particle.
tracking::particle_base::particle_base | ( | const particle_base & | p) |
Copy constructor.
|
inline |
default Destructor, made virtual
bool particle_base::add_to_neighborhood | ( | const particle * | in) |
adds a particle to the neighborhood if it is close enough returns true if the particle is added, false otherwise
References distancesq(), frame_, max_neighborhood_range_, and neighborhood_.
Referenced by tracking::Hash_shelf::fill_in_neighborhood().
|
static |
Cleans up the set wrapper_in.
References wrapper_in_.
Referenced by tracking::hash_case::~hash_case(), and tracking::Master_box::~Master_box().
complex< float > particle_base::compute_phi_6 | ( | ) | const |
computes and returns the order parameter .
Defined by
References neighborhood_, and position_.
Referenced by fill_phi_6().
float particle_base::distancesq | ( | const particle_base * | part_in) | const |
Retruns the distance from this particle to part_in.
References utilities::Tuple< T, length >::dist_sqr(), and position_.
Referenced by add_to_neighborhood(), tracking::Corr_gofr::compute(), tracking::Corr_pair_diffusion::compute(), tracking::hash_case::fill_pos_link_next(), lthan(), tracking::Track_shelf::msd(), and tracking::Corr_goftheta::trim_nhood().
void particle_base::fill_phi_6 | ( | ) |
Fills the order parameter with .
See compute_phi_6()
References compute_phi_6(), print(), and s_order_parameter_.
|
private |
Fills the position members from the wrapper.
This is done because the position is referenced a lot.
References utilities::D_XPOS, utilities::D_YPOS, utilities::D_ZPOS, frame_, utilities::Wrapper_in::get_value(), ind_, position_, and wrapper_in_.
Referenced by particle_base().
const utilities::Tuplef particle_base::get_disp | ( | const particle_base * | part_in) | const |
Returns the uncorrected forward displacement.
References position_.
Referenced by tracking::Corr_theta_2pt::compute(), tracking::Hash_shelf::compute_mean_forward_disp(), and tracking::Track_box::extract_raw_disp().
|
inline |
returns the frame of the current particle
References frame_.
Referenced by tracking::Track_box::output_to_wrapper(), and tracking::Track_shelf::output_to_wrapper().
|
inline |
returns the index of the current particle
References ind_.
Referenced by tracking::particle_track::get_value(), tracking::Track_shelf::output_to_wrapper(), and tracking::Hash_shelf::push().
|
inlinestatic |
returns the maximum neighborhood range
References max_neighborhood_range_.
Referenced by tracking::Hash_shelf::fill_in_neighborhood().
|
inline |
returns the neighborhood vector
References neighborhood_.
|
inlinestatic |
returns the range of the neighborhood
References max_neighborhood_range_.
Referenced by tracking::hash_box::compute_corr().
|
inline |
returns the number of particles with in max_neighborhood_range_ of the particle (assuming that these have been initialized
References neighborhood_.
Referenced by tracking::Track_shelf::compute_corrected_TA_ncuts().
|
inline |
returns a tuple of the particle's position
References position_.
Referenced by tracking::Accum_sofq_ND::add_particle(), tracking::Accum_sofq::add_particle(), tracking::Corr_goftheta::compute(), tracking::Corr_pair_diffusion::compute(), tracking::Track_box::extract_raw_pos(), and tracking::Hash_shelf::hash_function().
float particle_base::get_r | ( | const utilities::Tuplef & | origin) | const |
Returns the distance of the particle from the specified origin.
origin | the cordinates of the new origin |
References position_.
|
inline |
returns the scaler order parameter
References s_order_parameter_.
float particle_base::get_theta | ( | const utilities::Tuplef & | origin) | const |
Returns the angle in the plane from the Y-axis.
origin | the cordinates of the new origin |
References position_.
float particle_base::get_value | ( | utilities::D_TYPE | type, |
float & | val | ||
) | const |
Returns the float value of type given.
The value is passed out by reference and returned
type | the value to be extracted |
val | reference to the variable to be set. Also sets type of function call |
References frame_, utilities::Wrapper_in::get_value(), ind_, utilities::V_FLOAT, utilities::v_type(), and wrapper_in_.
Referenced by tracking::particle_track::get_value().
int particle_base::get_value | ( | utilities::D_TYPE | type, |
int & | val | ||
) | const |
Returns the int value of type given.
The value is passed out by reference and returned
type | the value to be extracted |
val | reference to the variable to be set. Also sets type of function call |
References utilities::D_FRAME, utilities::D_INDEX, utilities::D_N_SIZE, frame_, utilities::Wrapper_in::get_value(), ind_, neighborhood_, utilities::V_INT, utilities::v_type(), and wrapper_in_.
complex< float > particle_base::get_value | ( | utilities::D_TYPE | type, |
std::complex< float > & | val | ||
) | const |
Returns the complex value of type given.
The value is passed out by reference and returned
type | the value to be extracted |
val | reference to the variable to be set. Also sets type of function call |
References utilities::D_S_ORDER_PARAMETER, frame_, utilities::Wrapper_in::get_value(), ind_, s_order_parameter_, utilities::V_COMPLEX, utilities::v_type(), and wrapper_in_.
template int particle_base::get_wrapper_value | ( | utilities::D_TYPE | type, |
T & | val | ||
) | const |
Returns the a value associated with the particle directly from the wrapper, by passing all logic in the particle object.
References frame_, utilities::Wrapper_in::get_value(), ind_, and wrapper_in_.
Referenced by tracking::Track_shelf::init().
|
static |
Intialize the static input wrapper for all particles.
References wrapper_in_.
Referenced by tracking::hash_case::init(), and tracking::Master_box::priv_init().
|
private |
function for sorting the vectors in ascending order, returns true if the first argument goes before the second argument in the specific strict weak ordering it defines, and false otherwise.
References distancesq().
bool particle_base::no_neighborhood_repeats | ( | ) | const |
checks to make sure the neighborhood does not include any repeats, returns true if the neighborhood is repeat free.
Mostly for debugging
References neighborhood_.
void particle_base::print | ( | ) | const |
Pring out a rasonable representation of the partile.
References frame_, ind_, and position_.
Referenced by fill_phi_6(), tracking::particle_track::print_t(), and tracking::Hash_shelf::push().
|
private |
|
inlinestatic |
Sets the maximum neighborhood range, there needs to be something to make sure that this doesn't get changed with out updating the.
References max_neighborhood_range_.
void particle_base::sort_neighborhood | ( | ) |
Sorts the neighborhood vector in ascending order.
References neighborhood_.
Referenced by tracking::Hash_shelf::fill_in_neighborhood().
|
protected |
The frame of the particle.
Referenced by add_to_neighborhood(), fill_position(), get_frame(), get_value(), get_wrapper_value(), and print().
|
protected |
Identifier that comes from the wrapper.
Referenced by fill_position(), get_ind(), get_value(), get_wrapper_value(), and print().
|
staticprotected |
Maximum distance to be part of the neighborhood.
Referenced by add_to_neighborhood(), get_max_range(), get_neighborhood_range(), and set_neighborhood_range().
|
protected |
Vector of the particles with in max_range_ in the Hash_shelf_ of the particle.
Referenced by add_to_neighborhood(), compute_phi_6(), get_neighborhood(), get_neighborhood_size(), get_value(), no_neighborhood_repeats(), and sort_neighborhood().
|
protected |
New attempt at storing the position data, this has the problem of taking more memory, but it might help the time.
This will also make keeping track of the displacements.
Referenced by compute_phi_6(), distancesq(), tracking::particle_track::distancesq_corrected(), fill_position(), tracking::particle_track::get_corrected_disp(), tracking::particle_track::get_corrected_pos(), get_disp(), get_position(), get_r(), get_theta(), and print().
|
protected |
Scaler order parameter, ex phi_6 in 2D.
Referenced by fill_phi_6(), get_scaler_order_pram(), and get_value().
|
staticprotected |
object that takes care of all the underling data structures.
Referenced by clear_wrapper_in(), fill_position(), get_value(), get_wrapper_value(), intialize_wrapper_in(), and priv_init().