Function graspi::compute_pos_2D¶
Defined in File graph_constructors.hpp
Function Documentation¶
-
int
graspi
::
compute_pos_2D
(int i_x, int i_y, const dim_a_t &d_a, bool if_per_on_sides = false)¶ This function computes the index in the array/vector storing the color/labels of vertices
- Return
the index in the array/vector of colors
- Parameters
i_x
: is the index in x-direction of the vertex under considerationi_y
: is the index in y-direction of the vertex under considerationd_a
: is the reference to the struct storing dimensions of the morphology represented as a arrayif_per_on_size
: is the flag on periodicity, if it is on, then periodicity is reinforcef when generating neigbors