Algorithm::Points::MinimumDistance

Works out the distance from each point to its nearest neighbour
Download

Algorithm::Points::MinimumDistance Ranking & Summary

Advertisement

  • Rating:
  • License:
  • Perl Artistic License
  • Price:
  • FREE
  • Publisher Name:
  • Kake L Pugh
  • Publisher web site:
  • http://search.cpan.org/~kake/

Algorithm::Points::MinimumDistance Tags


Algorithm::Points::MinimumDistance Description

Works out the distance from each point to its nearest neighbour Given a set of points in N-dimensional Euclidean space, works out for each point the distance to its nearest neighbour (unless its nearest neighbour isn't very close). The distance metric is a method; subclass and override it for non-Euclidean space.SYNOPSIS use Algorithm::Points::MinimumDistance; my @points = ( , , ); my $dists = Algorithm::Points::MinimumDistance->new( points => \@points ); foreach my $point (@points) { print "($point->, $point->: Nearest neighbour distance is " . $dists->distance( point => $point ) . "\n"; } print "Smallest distance between any two points is " . $dists->min_distance . "\n"; Requirements: · Perl


Algorithm::Points::MinimumDistance Related Software