Function is_already_inserted_xy
Defined in File nn_search.hpp
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 toleranceeps_L2_squared
. Fills both theX_near
vector with the points that within a ball of radiussqrt(delta_R_squared)
centered atcoord
and theclosest_point
insamples
wrt tocoord
iffill_fn_params
is set totrue
.- 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 insamples
withindelta_R
centered atcoord
iffill_fn_params
is set totrue
; otherwise, it is undefined.closest_point – When the function returns
false
, it contains the closest point insamples
tocoord
iffill_fn_params
is set totrue
; 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
ifcoord
is too close to any point insamples
with a tolerance ofeps_L2_squared
; otherwise,false
.