Function is_already_inserted_xy

Function Documentation

bool is_already_inserted_xy(const CoordinateSequence &samples, const CoordinateXY &coord, std::vector<CoordinateXY> &X_near, CoordinateXY &closest_point, const bool &fill_fn_params = true, const geos_t &eps_L2_squared = GP::eps_L2_squared, const geos_t &delta_R_squared = GP::delta_R_squared)

Checks if a point is already inserted in the samples vector with a certain tolerance eps_L2_squared. Fills both the X_near vector with the points that within a ball of radius sqrt(delta_R_squared) centered at coord and the closest_point in samples wrt to coord if fill_fn_params is set to true.

Parameters:
  • samples

  • coord – The point to check if it is already inserted in samples.

  • X_near – When the function returns false, it contains the points in samples within delta_R centered at coord if fill_fn_params is set to true; otherwise, it is undefined.

  • closest_point – When the function returns false, it contains the closest point in samples to coord if fill_fn_params is set to true; otherwise, it is undefined.

  • fill_fn_params

  • eps_L2_squared – Squared Euclidean distance tolerance.

  • delta_R_squared – Squared radius of the ball centered at coord.

Returns:

true if coord is too close to any point in samples with a tolerance of eps_L2_squared; otherwise, false.