Algorithm-RandomPointGenerator
view release on metacpan or search on metacpan
examples/genRand2D view on Meta::CPAN
#!/usr/bin/perl -w
use lib '../blib/lib', '../blib/arch';
### genRand2D
use strict;
use Algorithm::RandomPointGenerator;
my $help_msg = "\nThe file supplied with the option '--histfile' should contain\n" .
"a 2D histogram that is to be used for generating the random\n" .
"points. Each line of this file should show the bins of the\n" .
"histogram along the x-axis and the different rows should correspond\n" .
examples/generate_random_points.pl view on Meta::CPAN
#!/usr/bin/perl -w
#use lib '../blib/lib', '../blib/arch';
### generate_random_points.pl
use strict;
use Algorithm::RandomPointGenerator;
my $input_histogram_file = "hist1.csv";
#my $input_histogram_file = "hist2.csv";
use Test::Simple tests => 1;
use lib '../blib/lib','../blib/arch';
use Algorithm::RandomPointGenerator;
# Test 1 (Data Generation):
open HISTFILE, ">__temphist.csv";
foreach my $i (0..9) {
print HISTFILE "1,1,1,0,0,0,0,0,0,0\n";
}
close HISTFILE;
( run in 0.285 second using v1.01-cache-2.11-cpan-87723dcf8b7 )