Daisuke Maki > Data-Average > Data::Average

Download:
Data-Average-0.03000.tar.gz

Dependencies

Annotate this POD (1)

CPAN RT

Open  0
Report a bug
Module Version: 0.03000   Source  

NAME ^

Data::Average - Hold Data Set To Calculate Average

SYNOPSIS ^

  use Data::Average;

  my $data = Data::Average->new;
  $data->add($_) for (1..100);

  print $data->avg; # 55

DESCRIPTION ^

Data::Average is a very simple module: You add values to it, and then you compute the average using the avg() function.

METHODS ^

new()

Creates a new Data::Average object

add($value)

Adds a value to the Data::Average set.

length()

Returns the current data set

avg()

Returns the average of the entire set

AUTHOR ^

Copyright (c) 2006-2007 Daisuke Maki <daisuke@endeworks.jp<gt>

LICENSE ^

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself.

See http://www.perl.com/perl/misc/Artistic.html