Main > Programming > Libraries >

Algorithm::Numerical::Sample 1.3

Algorithm::Numerical::Sample 1.3

Sponsored Links

Algorithm::Numerical::Sample 1.3 Ranking & Summary

RankingClick at the star to rank
Ranking Level
User Review: 0 (0 times)
File size: 0.004 MB
Platform: Any Platform
License: Perl Artistic License
Price:
Downloads: 898
Date added: 2007-05-17
Publisher: Abigail

Algorithm::Numerical::Sample 1.3 description

Algorithm::Numerical::Sample is a Perl module that can draw samples from a set.

SYNOPSIS

use Algorithm::Numerical::Sample qw /sample/;

@sample = sample (-set => [1 .. 10000],
-sample_size => 100);

$sampler = Algorithm::Numerical::Sample::Stream -> new;
while (<>) {$sampler -> data ($_)}
$random_line = $sampler -> extract;

This package gives two methods to draw fair, random samples from a set. There is a procedural interface for the case the entire set is known, and an object oriented interface when the a set with unknown size has to be processed.
A: sample (set => ARRAYREF [,sample_size => EXPR])

The sample function takes a set and a sample size as arguments. If the sample size is omitted, a sample of 1 is taken. The keywords set and sample_size may be preceeded with an optional -. The function returns the sample list, or a reference to the sample list, depending on the context.

B: Algorithm::Numerical::Sample::Stream

The class Algorithm::Numerical::Sample::Stream has the following methods:

new

This function returns an object of the Algorithm::Numerical::Sample::Stream class. It will take an optional argument of the form sample_size => EXPR, where EXPR evaluates to the sample size to be taken. If this argument is missing, a sample of size 1 will be taken. The keyword sample_size may be preceeded by an optional dash.

data (LIST)

The method data takes a list of parameters which are elements of the set we are sampling. Any number of arguments can be given.

extract

This method will extract the sample from the object, and reset it to a fresh state, such that a sample of the same size but from a different set, can be taken. extract will return a list in list context, or the first element of the sample in scalar context.

Algorithm::Numerical::Sample 1.3 Screenshot

Advertisements

Algorithm::Numerical::Sample 1.3 Keywords

Bookmark Algorithm::Numerical::Sample 1.3

Hyperlink code:
Link for forum:

Algorithm::Numerical::Sample 1.3 Copyright

WareSeeker periodically updates pricing and software information of Algorithm::Numerical::Sample 1.3 full version from the publisher, so some information may be slightly out-of-date. You should confirm all information before relying on it. Software piracy is theft, Using crack, password, serial numbers, registration codes, key generators is illegal and prevent future development of Algorithm::Numerical::Sample 1.3 Edition. Download links are directly from our publisher sites, torrent files or links from rapidshare.com, yousendit.com or megaupload.com are not allowed

Allok Video Splitter 2.2.0 Review:

Name (Required)
Email(Required)
Captcha
Featured Software

Want to place your software product here?
Please contact us for consideration.

Contact WareSeeker.com
Related Software
Algorithm::Numerical::Shuffle is a Perl module to shuffle a list. Free Download
Algorithm::Merge is a Perl module package that provides three-way merge and diff. Free Download
Algorithm::Loops is a Perl module with looping constructs: NestedLoops, MapCar*, Filter, and NextPermute*. Free Download
Algorithm::Permute is a Perl module with handy and fast permutation with object oriented interface. Free Download
Algorithm::Diff::Apply is a Perl module to apply one or more Algorithm::Diff diffs. Free Download
Algorithm::Combinatorics Perl module is an efficient generator of combinatorial sequences. Free Download
Algorithm::DiffOld is a Perl module to compute `intelligent differences between two files / lists but use the old interface. Free Download
Algorithm::LUHN is a Perl module to calculate the modulus 10 double add double checksum. Free Download