Home  |  About Us  |  Link To Us  |  FAQ  |  Contact

Algorithm::Points::MinimumDistance 0.01

Company: Kake L Pugh
Date Added: June 09, 2013  |  Visits: 222

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.<br /><br />SYNOPSIS<br /><br /> use Algorithm::Points::MinimumDistance;<br /><br /> my @points = ( [1, 4], [3, 1], [5, 7] );<br /> my \$dists = Algorithm::Points::MinimumDistance->new( points => \@points );<br /><br /> foreach my \$point (@points) {<br /> print "(\$point->[0], \$point->[1]: Nearest neighbour distance is "<br /> . \$dists->distance( point => \$point ) . "\n";<br /> }<br /><br /> print "Smallest distance between any two points is "<br /> . \$dists->min_distance . "\n";

 Requirements: No special requirements Platforms: *nix, Linux Keyword: Algorithmpointsminimumdistance,  Algorithmpointsminimumdistancegtnew,  Distance,  Dists,  Distsgtdistance,  Distsgtmin Distance,  Foreach,  Minimumdistance,  Nearest,  Neighbour,  Point,  Pointgt,  Points,  Print,  Quotpointgt,  Quotquot,  Quotsmallest,  Subclass,  Works Users rating: 0/10