[−][src]Trait geo::algorithm::frechet_distance::FrechetDistance
Determine the similarity between two LineStrings
using the Frechet distance.
Based on Computing Discrete Frechet Distance by T. Eiter and H. Mannila.
Required methods
fn frechet_distance(&self, rhs: &Rhs) -> T
Determine the similarity between two LineStrings
using the Frechet distance.
Examples
use geo::algorithm::frechet_distance::FrechetDistance; use geo::line_string; let line_string_a = line_string![ (x: 1., y: 1.), (x: 2., y: 1.), (x: 2., y: 2.), (x: 3., y: 3.) ]; let line_string_b = line_string![ (x: 2., y: 2.), (x: 0., y: 1.), (x: 2., y: 4.), (x: 3., y: 4.) ]; let distance = line_string_a.frechet_distance(&line_string_b); assert_eq!(2., distance);
Implementors
impl<T> FrechetDistance<T, LineString<T>> for LineString<T> where
T: Float + FromPrimitive,
[src]
T: Float + FromPrimitive,