Math::VecStat - Some basic numeric stats on vectors
use Math::VecStat qw(max min maxabs minabs sum average); $max=max(@vector); $max=max(\@vector); ($max,$imax)=max(@vector); ($max,$imax)=max(\@vector); $min=min(@vector); $min=min(\@vector); ($max,$imin)=min(@vector); ($max,$imin)=min(\@vector); $max=maxabs(@vector); $max=maxabs(\@vector); ($max,$imax)=maxabs(@vector); ($max,$imax)=maxabs(\@vector); $min=minabs(@vector); $min=minabs(\@vector); ($max,$imin)=minabs(@vector); ($max,$imin)=minabs(\@vector); $sum=sum($v1,$v2,...); $sum=sum(@vector); $sum=sum(\@vector); $average=average($v1,$v2,...); $av=average(@vector); $av=average(\@vector);
This package procides some basic statistics on numerical vectors. All the subroutines can take a copy of the vector, or, preferably for efficiency, a reference to the vector to be operated on.
return the maximum value of given values or vector. In an array context returns the value and the index in the array where it occurs.
return the minimum value of given values or vector, In an array context returns the value and the index in the array where it occurs.
return the maximum value of absolute of the given values or vector. In an array context returns the value and the index in the array where it occurs.
return the minimum value of the absolute of the given values or vector, In an array context returns the value and the index in the array where it occurs.
return the sum of the given values or vector
return the average of the given values or vector
$Log: VecStat.pm,v $ Revision 1.5 1997/02/26 17:20:37 willijar Added line before pod header so pod2man installs man page correctly Revision 1.4 1996/02/20 07:53:10 willijar Added ability to return index in array contex to max and min functions. Added minabs and maxabs functions. Thanks to Mark Borges <mdb@cdc.noaa.gov> for these suggestions. Revision 1.3 1996/01/06 11:03:30 willijar Fixed stupid bug that crept into looping in min and max functions Revision 1.2 1995/12/26 09:56:38 willijar Oops - removed xy data functions. Revision 1.1 1995/12/26 09:39:07 willijar Initial revision
Let me know. I welcome any appropriate additions for this package.
John A.R. Williams <J.A.R.Williams@aston.ac.uk>
1 POD Error
The following errors were encountered while parsing the POD:
You forgot a '=back' before '=head1'
To install Math::VecStat, copy and paste the appropriate command in to your terminal.
cpanm
cpanm Math::VecStat
CPAN shell
perl -MCPAN -e shell install Math::VecStat
For more information on module installation, please visit the detailed CPAN module installation guide.