Algorithm-DistanceMatrix

 view release on metacpan or  search on metacpan

lib/Algorithm/DistanceMatrix.pm  view on Meta::CPAN

You may use any metric, and may return any number or object. Note that if you 
plan to use this with L<Algorithm::Cluster> this needs to be a distance metric.
So, if you're measure how similar two things are, on a scale of 1-10, then you
should return C<10-$similarity> to get a distance.

Default is the absolute values of the scalar difference (i.e. C<abs(X-Y)>)

=head2 objects

Array reference. Doesn't matter what kind of objects are in the array, as long
as your C<metric> can process them.

=head2 distancematrix

2D array of distances (or similarities, or whatever) between your objects.

(An ArrayRef of ArrayRefs.)

=head1 AUTHOR

Chad A. Davis <chad.a.davis@gmail.com>



( run in 0.240 second using v1.01-cache-2.11-cpan-8d75d55dd25 )