pub fn clark_evans_index<T: Float>(
coordinates: &ArrayView2<'_, T>,
study_area: T,
) -> SpatialResult<T>Expand description
Calculate Clark-Evans nearest neighbor index
The Clark-Evans index compares the average nearest neighbor distance to the expected distance in a random point pattern. Values < 1 indicate clustering, values > 1 indicate regularity, and values ≈ 1 indicate randomness.
§Arguments
coordinates- Array of coordinate pairs [x, y] for each pointstudy_area- Area of the study region
§Returns
- Clark-Evans index (R)
§Examples
use ndarray::array;
use scirs2_spatial::spatial_stats::clark_evans_index;
let coords = array![
[0.0, 0.0],
[1.0, 0.0],
[0.0, 1.0],
[1.0, 1.0],
];
let ce_index = clark_evans_index(&coords.view(), 4.0).unwrap();
println!("Clark-Evans index: {:.3}", ce_index);