in reply to XYZ Manipulation
use Math::Vector::Real; my @data = map V(split), grep /\S/, <IN>; for my $i (0 .. $#data) { my $u = $data[$i] for my $j (0 .. $#data) { next if $i == $j; my $v = $data[$j]; my $dist = $u->dist($v); print OUT "%s to %s Distance-%.5f\n", $u, $v, $dist; } }
PDL is another interesting tool for numeric intensive computations. It has a somewhat steep learning curve, but in the end it is quite productive.
|
|---|