qp.cluster.spheres_bad.get_grid_coord_idx¶
- qp.cluster.spheres_bad.get_grid_coord_idx(coord, coord_min, mean_distance)[source]¶
Compute a point’s position in a 1D grid
- Parameters:
coord (float) – One coordinate of a point
coord_min (float) – The minimum coordinate of the grid
mean_distance (float) – The distance between neighbors in the grid
- Returns:
idx – The idx of the point in the grid
- Return type:
int