neighbor_track Class Reference
A class passed to the
voronoicell_base template to switch on the neighbor computation.
More...
#include <cell.hh>
|
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 () |
Data Fields |
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 317 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 2022 of file cell.cc.
neighbor_track::~neighbor_track |
( |
|
) |
|
The destructor for the neighbor_track class deallocates the arrays for neighbor tracking.
Definition at line 2033 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 2048 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 2057 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 2042 of file cell.cc.
void neighbor_track::allocate_aux1 |
( |
int |
i |
) |
[inline] |
This allocates a new array and sets the auxiliary pointer to it.
Definition at line 2175 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 2199 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 2116 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 2133 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 2139 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 2151 of file cell.cc.
void neighbor_track::copy_to_aux1 |
( |
int |
i, |
|
|
int |
m | |
|
) |
| | [inline] |
This routine copies neighbor information into the auxiliary pointer.
Definition at line 2188 of file cell.cc.
void neighbor_track::init |
( |
|
) |
[inline] |
This initializes the neighbor information for a rectangular box and is called during the initialization routine for the voronoicell class.
Definition at line 2067 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 2084 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 2098 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 2257 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 2229 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 2291 of file cell.cc.
void neighbor_track::print_edges |
( |
int |
i |
) |
[inline] |
This prints out the neighbor information for vertex i.
Definition at line 2166 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 2121 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 2128 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 2145 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 2111 of file cell.cc.
void neighbor_track::set_to_aux1 |
( |
int |
j |
) |
[inline] |
This sets ne[j] to the first auxiliary pointer.
Definition at line 2156 of file cell.cc.
void neighbor_track::set_to_aux1_offset |
( |
int |
k, |
|
|
int |
m | |
|
) |
| | [inline] |
This sets ne[k] to the auxiliary pointer with an offset.
Definition at line 2193 of file cell.cc.
void neighbor_track::set_to_aux2 |
( |
int |
j |
) |
[inline] |
This sets ne[j] to the second auxiliary pointer.
Definition at line 2161 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 auxiliary pointer.
Definition at line 2181 of file cell.cc.
Field 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 information for vertices of order p.
Definition at line 323 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 330 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 336 of file cell.hh.
The documentation for this class was generated from the following files: