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 313 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 1988 of file cell.cc.
neighbor_track::~neighbor_track |
( |
|
) |
|
The destructor for the neighbor_track class deallocates the arrays for neighbor tracking.
Definition at line 1999 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 2014 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 2023 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 2008 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 2141 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 2165 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 2082 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 2099 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 2105 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 2117 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 2154 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 2033 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 2050 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 2064 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 2223 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 2195 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 2257 of file cell.cc.
void neighbor_track::print_edges |
( |
int |
i |
) |
[inline] |
This prints out the neighbor information for vertex i.
Definition at line 2132 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 2087 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 2094 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 2111 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 2077 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 2122 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 2159 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 2127 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 2147 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 319 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 326 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 332 of file cell.hh.
The documentation for this class was generated from the following files: