Algorithm-ClusterPoints

 view release on metacpan or  search on metacpan

Changes  view on Meta::CPAN

Revision history for Perl extension Algorithm::ClusterPoints.

0.08  Jul 10, 2008
        - bug in hypercylinder calculation corrected.

0.07  Jul 8, 2008
        - bug corrected on scales method
        - better error messages for scales and add_point

0.06  Jul 7, 2008
        - add support for hypercylindrical distances

0.04  Jul 7, 2008
        - first version released to CPAN

0.01  Wed Jul  2 12:06:45 2008
	- original version; created by h2xs 1.23 with options
		-AXn Algorithm::ClusterPoints

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

    # print STDERR Dumper $self;
    _hypercylinder_id($self->dimensional_groups) eq '0,1'
        ? $self->_make_clusters_ix_2
        : $self->_make_clusters_ix_any;
}

sub _make_clusters_ix_2 {
    my $self = shift;

    $self->{dimension} == 2
        or croak 'internal error: _make_clusters_ix_2 called but dimension is not 2';

    my ($ax, $ay) = $self->_scaled_coords;
    @$ax or croak "points have not been added";

    my $xmin = min @$ax;
    my $ymin = min @$ay;
    # my $xmax = max @$ax;
    # my $ymax = max @$ay;

    my $istep = 1.00001*sqr2;



( run in 0.638 second using v1.01-cache-2.11-cpan-65fba6d93b7 )