#include <space.h>
Inheritance diagram for Space:
Public Member Functions | |
Space (const double length_x, const double length_y, const double length_z, const double diameter) | |
double | get_diameter () const |
double | get_length_x () const |
double | get_length_y () const |
double | get_length_z () const |
double | get_length (const int i) const |
void | insert_particle (const Particle::vector_t &p) |
void | reset () |
bool | next () |
bool | at_end () const |
const Particle & | get_particle () const |
void | reset_neighborhood () |
void | reset_neighborhood (double &r_sqr) |
void | reset_neighborhood (const Particle::vector_t &p, double &r_sqr) |
bool | next_neighbor () |
bool | next_neighbor (double &r_sqr) |
bool | at_end_of_neighborhood () const |
const Particle & | get_neighbor_particle () const |
void | reorder_particles () |
Protected Member Functions | |
Particle & | get_particle () |
Particle & | get_neighbor_particle () |
Iterate though particles and their neighborhood (i.e. neighboring particles) in an efficient manner.
|
Constructs a space of particles. The space has dimensions (length_x,length_y,length_z) and diameter of one cell is diameter. |
|
Last next() has returned false. |
|
Last next_neighborhood() has returned false. |
|
Returns the diameter of a cell. |
|
Returns the length in dimension i of the space. |
|
Returns the length in x-dimension of the space. |
|
Returns the length in y-dimension of the space. |
|
Returns the length in z-dimension of the space. |
|
Returns a reference to current particle in the neighborhood of the current particle. |
|
Returns a reference to current particle in the neighborhood of the current particle. |
|
Returns a reference to current particle. |
|
Returns a reference to current particle. |
|
Insert particle at postion p. Calls reset(). Invalidates all references to particles. |
|
Iterator set to next particle. Returns false if no next particle exists. |
|
Same as next_neighbor(), besides r_sqr is the square of the euclidian distance between the particle and its neighbor if the return value is true (undefined otherwise). |
|
Iterator of neighborhood set to next particle. Returns false if no next particle exists. |
|
Reorders the particles. Must be called when particles' positions have been changed. Resets all iterators (see reset()). |
|
Resets iterator through particles. |
|
Resets iterator through neighborhood of current position p. Invalidates current particle. |
|
Same as reset_neighborhood(), besides r_sqr is the square of the euclidian distance between the particle and its neighbor if !at_end_of_neighborhood() (undefined otherwise). |
|
Resets iterator through neighborhood of current particle. |