neighbor_track Class Reference
A class passed to the
voronoicell_base template to switch on the neighbor computation.
More...
#include <cell.hh>
List of all members.
|
Public Member Functions |
| neighbor_track (voronoicell_base< neighbor_track > *ivc) |
| ~neighbor_track () |
void | allocate (int i, int m) |
void | add_memory_vertices (int i) |
void | add_memory_vorder (int i) |
void | init () |
void | init_octahedron () |
void | init_tetrahedron () |
void | set_pointer (int p, int n) |
void | copy (int a, int b, int c, int d) |
void | set (int a, int b, int c) |
void | set_aux1 (int k) |
void | copy_aux1 (int a, int b) |
void | copy_aux1_shift (int a, int b) |
void | set_aux2_copy (int a, int b) |
void | copy_pointer (int a, int b) |
void | set_to_aux1 (int j) |
void | set_to_aux2 (int j) |
void | print_edges (int i) |
void | allocate_aux1 (int i) |
void | switch_to_aux1 (int i) |
void | copy_to_aux1 (int i, int m) |
void | set_to_aux1_offset (int k, int m) |
void | print (ostream &os, int i, int j) |
void | label_facets () |
void | neighbors (ostream &os) |
void | check_facets () |
Public Attributes |
int ** | mne |
int ** | ne |
voronoicell_base
< neighbor_track > * | vc |
Detailed Description
A class passed to the
voronoicell_base template to switch on the neighbor computation.
This class encapsulates all the routines which are required to carry out the neighbor tracking. If the voronoicell_base template is instantiated with this class, then the neighbor computation is enabled. All these routines are simple and declared inline, so they should be directly integrated into the functions in the voronoicell class during compilation, without zero function call overhead.
Definition at line 314 of file cell.hh.
Constructor & Destructor Documentation
This constructs the neighbor_track class, within a current voronoicell_neighbor class. It allocates memory for neighbor storage in a similar way to the voronoicell constructor.
Definition at line 2018 of file cell.cc.
neighbor_track::~neighbor_track |
( |
|
) |
|
The destructor for the neighbor_track class deallocates the arrays for neighbor tracking.
Definition at line 2029 of file cell.cc.
Member Function Documentation
void neighbor_track::add_memory_vertices |
( |
int |
i |
) |
[inline] |
This increases the size of the ne[] array.
- Parameters:
-
[in] | i | the new size of the array. |
Definition at line 2044 of file cell.cc.
void neighbor_track::add_memory_vorder |
( |
int |
i |
) |
[inline] |
This increases the size of the maximum allowable vertex order in the neighbor tracking.
Definition at line 2053 of file cell.cc.
void neighbor_track::allocate |
( |
int |
i, |
|
|
int |
m | |
|
) |
| | [inline] |
This allocates a single array for neighbor tracking.
- Parameters:
-
[in] | i | the vertex order of the array to be extended. |
[in] | m | the size of the array to be extended. |
Definition at line 2038 of file cell.cc.
void neighbor_track::allocate_aux1 |
( |
int |
i |
) |
[inline] |
This allocates a new array and sets the auxilliary pointer to it.
Definition at line 2171 of file cell.cc.
void neighbor_track::check_facets |
( |
|
) |
[inline] |
This routine checks to make sure the neighbor information of each facets is consistent.
Definition at line 2195 of file cell.cc.
void neighbor_track::copy |
( |
int |
a, |
|
|
int |
b, |
|
|
int |
c, |
|
|
int |
d | |
|
) |
| | [inline] |
This is a basic operation to copy ne[c][d] to ne[a][b].
Definition at line 2112 of file cell.cc.
void neighbor_track::copy_aux1 |
( |
int |
a, |
|
|
int |
b | |
|
) |
| | [inline] |
This is a basic operation to copy a neighbor into paux1.
Definition at line 2129 of file cell.cc.
void neighbor_track::copy_aux1_shift |
( |
int |
a, |
|
|
int |
b | |
|
) |
| | [inline] |
This is a basic operation to copy a neighbor into paux1 with a shift. It is used in the delete_connection() routine of the voronoicell class.
Definition at line 2135 of file cell.cc.
void neighbor_track::copy_pointer |
( |
int |
a, |
|
|
int |
b | |
|
) |
| | [inline] |
This is a basic routine to copy ne[b] into ne[a].
Definition at line 2147 of file cell.cc.
void neighbor_track::copy_to_aux1 |
( |
int |
i, |
|
|
int |
m | |
|
) |
| | [inline] |
This routine copies neighbor information into the auxilliary pointer.
Definition at line 2184 of file cell.cc.
void neighbor_track::init |
( |
|
) |
[inline] |
This initializes the neighbor information for a rectangular box and is called during the initiailization routine for the voronoicell class.
Definition at line 2063 of file cell.cc.
void neighbor_track::init_octahedron |
( |
|
) |
[inline] |
This initializes the neighbor information for an octahedron. The eight initial faces are assigned ID numbers from -1 to -8.
Definition at line 2080 of file cell.cc.
void neighbor_track::init_tetrahedron |
( |
|
) |
[inline] |
This initializes the neighbor information for an tetrahedron. The four initial faces are assigned ID numbers from -1 to -4.
Definition at line 2094 of file cell.cc.
void neighbor_track::label_facets |
( |
|
) |
[inline] |
This routine labels the facets in an arbitrary order, starting from one.
Definition at line 2253 of file cell.cc.
void neighbor_track::neighbors |
( |
ostream & |
os |
) |
[inline] |
This routine provides a list of plane IDs.
- Parameters:
-
[in] | &os | An output stream to write to. |
Definition at line 2225 of file cell.cc.
void neighbor_track::print |
( |
ostream & |
os, |
|
|
int |
i, |
|
|
int |
j | |
|
) |
| | [inline] |
This routine prints out a bracketed pair showing a vertex number, and the corresponding neighbor information.
- Parameters:
-
[in] | os | The output stream to write to. |
[in] | i | The vertex number to print. |
[in] | j | The index of the neighbor information to print. |
Definition at line 2287 of file cell.cc.
void neighbor_track::print_edges |
( |
int |
i |
) |
[inline] |
This prints out the neighbor information for vertex i.
Definition at line 2162 of file cell.cc.
void neighbor_track::set |
( |
int |
a, |
|
|
int |
b, |
|
|
int |
c | |
|
) |
| | [inline] |
This is a basic operation to carry out ne[a][b]=c.
Definition at line 2117 of file cell.cc.
void neighbor_track::set_aux1 |
( |
int |
k |
) |
[inline] |
This is a basic operation to set the auxiliary pointer paux1.
- Parameters:
-
[in] | k | the order of the vertex to point to. |
Definition at line 2124 of file cell.cc.
void neighbor_track::set_aux2_copy |
( |
int |
a, |
|
|
int |
b | |
|
) |
| | [inline] |
This routine sets the second auxiliary pointer to a new section of memory, and then copies existing neighbor information into it.
Definition at line 2141 of file cell.cc.
void neighbor_track::set_pointer |
( |
int |
p, |
|
|
int |
n | |
|
) |
| | [inline] |
This is a basic operation to set a new pointer in the ne[] array.
- Parameters:
-
[in] | p | the index in the ne[] array to set. |
[in] | n | the order of the vertex. |
Definition at line 2107 of file cell.cc.
void neighbor_track::set_to_aux1 |
( |
int |
j |
) |
[inline] |
This sets ne[j] to the first auxilliary pointer.
Definition at line 2152 of file cell.cc.
void neighbor_track::set_to_aux1_offset |
( |
int |
k, |
|
|
int |
m | |
|
) |
| | [inline] |
This sets ne[k] to the auxillary pointer with an offset.
Definition at line 2189 of file cell.cc.
void neighbor_track::set_to_aux2 |
( |
int |
j |
) |
[inline] |
This sets ne[j] to the second auxilliary pointer.
Definition at line 2157 of file cell.cc.
void neighbor_track::switch_to_aux1 |
( |
int |
i |
) |
[inline] |
This deletes a particular neighbor array and switches the pointer to the auxilliary pointer.
Definition at line 2177 of file cell.cc.
Member Data Documentation
This two dimensional array holds the neighbor information associated with each vertex. mne[p] is a one dimensional array which holds all of the neighbor informations for vertices of order p.
Definition at line 320 of file cell.hh.
This is a two dimensional array that holds the neighbor information associated with each vertex. ne[i] points to a one-dimensional array in mne[nu[i]]. ne[i][j] holds the neighbor information associated with the jth edge of vertex i. It is set to the ID number of the plane that made the face that is clockwise from the jth edge.
Definition at line 327 of file cell.hh.
This is a pointer back to the voronoicell class which created this class. It is used to reference the members of that class in computations.
Definition at line 333 of file cell.hh.
The documentation for this class was generated from the following files: