RNG.pm (PDL-2.082) | : | RNG.pm (PDL-2.083) | ||
---|---|---|---|---|
skipping to change at line 1275 | skipping to change at line 1275 | |||
This file copyright (C) 1999 Christian Pellegrin <chri@infis.univ.trieste.it> | This file copyright (C) 1999 Christian Pellegrin <chri@infis.univ.trieste.it> | |||
Docs mangled by C. Soeller. All rights reserved. There | Docs mangled by C. Soeller. All rights reserved. There | |||
is no warranty. You are allowed to redistribute this software / | is no warranty. You are allowed to redistribute this software / | |||
documentation under certain conditions. For details, see the file | documentation under certain conditions. For details, see the file | |||
COPYING in the PDL distribution. If this file is separated from the | COPYING in the PDL distribution. If this file is separated from the | |||
PDL distribution, the copyright notice should be included in the file. | PDL distribution, the copyright notice should be included in the file. | |||
The GSL RNG and randist modules were written by James Theiler. | The GSL RNG and randist modules were written by James Theiler. | |||
=cut | =cut | |||
#line 1283 "RNG.pm" | ||||
#line 1309 "gsl_random.pd" | #line 1309 "gsl_random.pd" | |||
use strict; | use strict; | |||
# PDL::GSL::RNG::nullcreate just creates a null PDL. Used | # PDL::GSL::RNG::nullcreate just creates a null PDL. Used | |||
# for the GSL functions that create PDLs | # for the GSL functions that create PDLs | |||
sub nullcreate{ | sub nullcreate{ | |||
my ($type,$arg) = @_; | my ($type,$arg) = @_; | |||
PDL->nullcreate($arg); | PDL->nullcreate($arg); | |||
} | } | |||
#line 1304 "RNG.pm" | ||||
#line 1323 "gsl_random.pd" | #line 1323 "gsl_random.pd" | |||
sub get_uniform { | sub get_uniform { | |||
my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') { | my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') { | |||
gsl_get_uniform_meat($var[0],$$obj); | gsl_get_uniform_meat($var[0],$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
gsl_get_uniform_meat($p,$$obj); | gsl_get_uniform_meat($p,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1324 "RNG.pm" | ||||
#line 1324 "gsl_random.pd" | #line 1324 "gsl_random.pd" | |||
sub get_uniform_pos { | sub get_uniform_pos { | |||
my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') { | my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') { | |||
gsl_get_uniform_pos_meat($var[0],$$obj); | gsl_get_uniform_pos_meat($var[0],$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
gsl_get_uniform_pos_meat($p,$$obj); | gsl_get_uniform_pos_meat($p,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1344 "RNG.pm" | ||||
#line 1325 "gsl_random.pd" | #line 1325 "gsl_random.pd" | |||
sub get { | sub get { | |||
my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') { | my ($obj,@var) = @_;if (ref($var[0]) eq 'PDL') { | |||
gsl_get_meat($var[0],$$obj); | gsl_get_meat($var[0],$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
gsl_get_meat($p,$$obj); | gsl_get_meat($p,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1364 "RNG.pm" | ||||
#line 1326 "gsl_random.pd" | #line 1326 "gsl_random.pd" | |||
sub get_int { | sub get_int { | |||
my ($obj,$n,@var) = @_;if (!($n>0)) {barf("first parameter must be an int >0")}; if (ref($var[0]) eq 'PDL') { | my ($obj,$n,@var) = @_;if (!($n>0)) {barf("first parameter must be an int >0")}; if (ref($var[0]) eq 'PDL') { | |||
gsl_get_int_meat($var[0],$n,$$obj); | gsl_get_int_meat($var[0],$n,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
gsl_get_int_meat($p,$n,$$obj); | gsl_get_int_meat($p,$n,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1384 "RNG.pm" | #line 1356 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*gsl_get_uniform_meat = \&PDL::GSL::RNG::gsl_get_uniform_meat; | *gsl_get_uniform_meat = \&PDL::GSL::RNG::gsl_get_uniform_meat; | |||
#line 1391 "RNG.pm" | ||||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*gsl_get_uniform_pos_meat = \&PDL::GSL::RNG::gsl_get_uniform_pos_meat; | *gsl_get_uniform_pos_meat = \&PDL::GSL::RNG::gsl_get_uniform_pos_meat; | |||
#line 1398 "RNG.pm" | ||||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*gsl_get_meat = \&PDL::GSL::RNG::gsl_get_meat; | *gsl_get_meat = \&PDL::GSL::RNG::gsl_get_meat; | |||
#line 1405 "RNG.pm" | ||||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*gsl_get_int_meat = \&PDL::GSL::RNG::gsl_get_int_meat; | *gsl_get_int_meat = \&PDL::GSL::RNG::gsl_get_int_meat; | |||
#line 1412 "RNG.pm" | ||||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_gaussian_meat = \&PDL::GSL::RNG::ran_gaussian_meat; | *ran_gaussian_meat = \&PDL::GSL::RNG::ran_gaussian_meat; | |||
#line 1419 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_gaussian { | sub ran_gaussian { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_gaussian_meat($var[0],$a,$$obj); | ran_gaussian_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_gaussian_meat($p,$a,$$obj); | ran_gaussian_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1440 "RNG.pm" | #line 1400 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_gaussian_var_meat = \&PDL::GSL::RNG::ran_gaussian_var_meat; | *ran_gaussian_var_meat = \&PDL::GSL::RNG::ran_gaussian_var_meat; | |||
#line 1447 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_gaussian_var { | sub ran_gaussian_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_gaussian_var_meat(@var,$$obj); | return ran_gaussian_var_meat(@var,$$obj); | |||
} | } | |||
#line 1459 "RNG.pm" | #line 1415 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_ugaussian_tail_meat = \&PDL::GSL::RNG::ran_ugaussian_tail_meat; | *ran_ugaussian_tail_meat = \&PDL::GSL::RNG::ran_ugaussian_tail_meat; | |||
#line 1466 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_ugaussian_tail { | sub ran_ugaussian_tail { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_ugaussian_tail_meat($var[0],$a,$$obj); | ran_ugaussian_tail_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_ugaussian_tail_meat($p,$a,$$obj); | ran_ugaussian_tail_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1487 "RNG.pm" | #line 1439 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_ugaussian_tail_var_meat = \&PDL::GSL::RNG::ran_ugaussian_tail_var_meat; | *ran_ugaussian_tail_var_meat = \&PDL::GSL::RNG::ran_ugaussian_tail_var_meat; | |||
#line 1494 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_ugaussian_tail_var { | sub ran_ugaussian_tail_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_ugaussian_tail_var_meat(@var,$$obj); | return ran_ugaussian_tail_var_meat(@var,$$obj); | |||
} | } | |||
#line 1506 "RNG.pm" | #line 1454 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_exponential_meat = \&PDL::GSL::RNG::ran_exponential_meat; | *ran_exponential_meat = \&PDL::GSL::RNG::ran_exponential_meat; | |||
#line 1513 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_exponential { | sub ran_exponential { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_exponential_meat($var[0],$a,$$obj); | ran_exponential_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_exponential_meat($p,$a,$$obj); | ran_exponential_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1534 "RNG.pm" | #line 1478 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_exponential_var_meat = \&PDL::GSL::RNG::ran_exponential_var_meat; | *ran_exponential_var_meat = \&PDL::GSL::RNG::ran_exponential_var_meat; | |||
#line 1541 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_exponential_var { | sub ran_exponential_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_exponential_var_meat(@var,$$obj); | return ran_exponential_var_meat(@var,$$obj); | |||
} | } | |||
#line 1553 "RNG.pm" | #line 1493 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_laplace_meat = \&PDL::GSL::RNG::ran_laplace_meat; | *ran_laplace_meat = \&PDL::GSL::RNG::ran_laplace_meat; | |||
#line 1560 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_laplace { | sub ran_laplace { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_laplace_meat($var[0],$a,$$obj); | ran_laplace_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_laplace_meat($p,$a,$$obj); | ran_laplace_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1581 "RNG.pm" | #line 1517 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_laplace_var_meat = \&PDL::GSL::RNG::ran_laplace_var_meat; | *ran_laplace_var_meat = \&PDL::GSL::RNG::ran_laplace_var_meat; | |||
#line 1588 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_laplace_var { | sub ran_laplace_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_laplace_var_meat(@var,$$obj); | return ran_laplace_var_meat(@var,$$obj); | |||
} | } | |||
#line 1600 "RNG.pm" | #line 1532 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_exppow_meat = \&PDL::GSL::RNG::ran_exppow_meat; | *ran_exppow_meat = \&PDL::GSL::RNG::ran_exppow_meat; | |||
#line 1607 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_exppow { | sub ran_exppow { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_exppow_meat($var[0],$a,$b,$$obj); | ran_exppow_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_exppow_meat($p,$a,$b,$$obj); | ran_exppow_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1628 "RNG.pm" | #line 1556 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_exppow_var_meat = \&PDL::GSL::RNG::ran_exppow_var_meat; | *ran_exppow_var_meat = \&PDL::GSL::RNG::ran_exppow_var_meat; | |||
#line 1635 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_exppow_var { | sub ran_exppow_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_exppow_var_meat(@var,$$obj); | return ran_exppow_var_meat(@var,$$obj); | |||
} | } | |||
#line 1647 "RNG.pm" | #line 1571 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_cauchy_meat = \&PDL::GSL::RNG::ran_cauchy_meat; | *ran_cauchy_meat = \&PDL::GSL::RNG::ran_cauchy_meat; | |||
#line 1654 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_cauchy { | sub ran_cauchy { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_cauchy_meat($var[0],$a,$$obj); | ran_cauchy_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_cauchy_meat($p,$a,$$obj); | ran_cauchy_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1675 "RNG.pm" | #line 1595 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_cauchy_var_meat = \&PDL::GSL::RNG::ran_cauchy_var_meat; | *ran_cauchy_var_meat = \&PDL::GSL::RNG::ran_cauchy_var_meat; | |||
#line 1682 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_cauchy_var { | sub ran_cauchy_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_cauchy_var_meat(@var,$$obj); | return ran_cauchy_var_meat(@var,$$obj); | |||
} | } | |||
#line 1694 "RNG.pm" | #line 1610 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_rayleigh_meat = \&PDL::GSL::RNG::ran_rayleigh_meat; | *ran_rayleigh_meat = \&PDL::GSL::RNG::ran_rayleigh_meat; | |||
#line 1701 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_rayleigh { | sub ran_rayleigh { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_rayleigh_meat($var[0],$a,$$obj); | ran_rayleigh_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_rayleigh_meat($p,$a,$$obj); | ran_rayleigh_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1722 "RNG.pm" | #line 1634 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_rayleigh_var_meat = \&PDL::GSL::RNG::ran_rayleigh_var_meat; | *ran_rayleigh_var_meat = \&PDL::GSL::RNG::ran_rayleigh_var_meat; | |||
#line 1729 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_rayleigh_var { | sub ran_rayleigh_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_rayleigh_var_meat(@var,$$obj); | return ran_rayleigh_var_meat(@var,$$obj); | |||
} | } | |||
#line 1741 "RNG.pm" | #line 1649 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_rayleigh_tail_meat = \&PDL::GSL::RNG::ran_rayleigh_tail_meat; | *ran_rayleigh_tail_meat = \&PDL::GSL::RNG::ran_rayleigh_tail_meat; | |||
#line 1748 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_rayleigh_tail { | sub ran_rayleigh_tail { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_rayleigh_tail_meat($var[0],$a,$b,$$obj); | ran_rayleigh_tail_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_rayleigh_tail_meat($p,$a,$b,$$obj); | ran_rayleigh_tail_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1769 "RNG.pm" | #line 1673 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_rayleigh_tail_var_meat = \&PDL::GSL::RNG::ran_rayleigh_tail_var_meat; | *ran_rayleigh_tail_var_meat = \&PDL::GSL::RNG::ran_rayleigh_tail_var_meat; | |||
#line 1776 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_rayleigh_tail_var { | sub ran_rayleigh_tail_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_rayleigh_tail_var_meat(@var,$$obj); | return ran_rayleigh_tail_var_meat(@var,$$obj); | |||
} | } | |||
#line 1788 "RNG.pm" | #line 1688 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_levy_meat = \&PDL::GSL::RNG::ran_levy_meat; | *ran_levy_meat = \&PDL::GSL::RNG::ran_levy_meat; | |||
#line 1795 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_levy { | sub ran_levy { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_levy_meat($var[0],$a,$b,$$obj); | ran_levy_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_levy_meat($p,$a,$b,$$obj); | ran_levy_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1816 "RNG.pm" | #line 1712 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_levy_var_meat = \&PDL::GSL::RNG::ran_levy_var_meat; | *ran_levy_var_meat = \&PDL::GSL::RNG::ran_levy_var_meat; | |||
#line 1823 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_levy_var { | sub ran_levy_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_levy_var_meat(@var,$$obj); | return ran_levy_var_meat(@var,$$obj); | |||
} | } | |||
#line 1835 "RNG.pm" | #line 1727 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_gamma_meat = \&PDL::GSL::RNG::ran_gamma_meat; | *ran_gamma_meat = \&PDL::GSL::RNG::ran_gamma_meat; | |||
#line 1842 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_gamma { | sub ran_gamma { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_gamma_meat($var[0],$a,$b,$$obj); | ran_gamma_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_gamma_meat($p,$a,$b,$$obj); | ran_gamma_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1863 "RNG.pm" | #line 1751 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_gamma_var_meat = \&PDL::GSL::RNG::ran_gamma_var_meat; | *ran_gamma_var_meat = \&PDL::GSL::RNG::ran_gamma_var_meat; | |||
#line 1870 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_gamma_var { | sub ran_gamma_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_gamma_var_meat(@var,$$obj); | return ran_gamma_var_meat(@var,$$obj); | |||
} | } | |||
#line 1882 "RNG.pm" | #line 1766 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_flat_meat = \&PDL::GSL::RNG::ran_flat_meat; | *ran_flat_meat = \&PDL::GSL::RNG::ran_flat_meat; | |||
#line 1889 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_flat { | sub ran_flat { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_flat_meat($var[0],$a,$b,$$obj); | ran_flat_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_flat_meat($p,$a,$b,$$obj); | ran_flat_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1910 "RNG.pm" | #line 1790 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_flat_var_meat = \&PDL::GSL::RNG::ran_flat_var_meat; | *ran_flat_var_meat = \&PDL::GSL::RNG::ran_flat_var_meat; | |||
#line 1917 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_flat_var { | sub ran_flat_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_flat_var_meat(@var,$$obj); | return ran_flat_var_meat(@var,$$obj); | |||
} | } | |||
#line 1929 "RNG.pm" | #line 1805 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_lognormal_meat = \&PDL::GSL::RNG::ran_lognormal_meat; | *ran_lognormal_meat = \&PDL::GSL::RNG::ran_lognormal_meat; | |||
#line 1936 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_lognormal { | sub ran_lognormal { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_lognormal_meat($var[0],$a,$b,$$obj); | ran_lognormal_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_lognormal_meat($p,$a,$b,$$obj); | ran_lognormal_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 1957 "RNG.pm" | #line 1829 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_lognormal_var_meat = \&PDL::GSL::RNG::ran_lognormal_var_meat; | *ran_lognormal_var_meat = \&PDL::GSL::RNG::ran_lognormal_var_meat; | |||
#line 1964 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_lognormal_var { | sub ran_lognormal_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_lognormal_var_meat(@var,$$obj); | return ran_lognormal_var_meat(@var,$$obj); | |||
} | } | |||
#line 1976 "RNG.pm" | #line 1844 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_chisq_meat = \&PDL::GSL::RNG::ran_chisq_meat; | *ran_chisq_meat = \&PDL::GSL::RNG::ran_chisq_meat; | |||
#line 1983 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_chisq { | sub ran_chisq { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_chisq_meat($var[0],$a,$$obj); | ran_chisq_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_chisq_meat($p,$a,$$obj); | ran_chisq_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2004 "RNG.pm" | #line 1868 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_chisq_var_meat = \&PDL::GSL::RNG::ran_chisq_var_meat; | *ran_chisq_var_meat = \&PDL::GSL::RNG::ran_chisq_var_meat; | |||
#line 2011 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_chisq_var { | sub ran_chisq_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_chisq_var_meat(@var,$$obj); | return ran_chisq_var_meat(@var,$$obj); | |||
} | } | |||
#line 2023 "RNG.pm" | #line 1883 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_fdist_meat = \&PDL::GSL::RNG::ran_fdist_meat; | *ran_fdist_meat = \&PDL::GSL::RNG::ran_fdist_meat; | |||
#line 2030 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_fdist { | sub ran_fdist { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_fdist_meat($var[0],$a,$b,$$obj); | ran_fdist_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_fdist_meat($p,$a,$b,$$obj); | ran_fdist_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2051 "RNG.pm" | #line 1907 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_fdist_var_meat = \&PDL::GSL::RNG::ran_fdist_var_meat; | *ran_fdist_var_meat = \&PDL::GSL::RNG::ran_fdist_var_meat; | |||
#line 2058 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_fdist_var { | sub ran_fdist_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_fdist_var_meat(@var,$$obj); | return ran_fdist_var_meat(@var,$$obj); | |||
} | } | |||
#line 2070 "RNG.pm" | #line 1922 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_tdist_meat = \&PDL::GSL::RNG::ran_tdist_meat; | *ran_tdist_meat = \&PDL::GSL::RNG::ran_tdist_meat; | |||
#line 2077 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_tdist { | sub ran_tdist { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_tdist_meat($var[0],$a,$$obj); | ran_tdist_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_tdist_meat($p,$a,$$obj); | ran_tdist_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2098 "RNG.pm" | #line 1946 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_tdist_var_meat = \&PDL::GSL::RNG::ran_tdist_var_meat; | *ran_tdist_var_meat = \&PDL::GSL::RNG::ran_tdist_var_meat; | |||
#line 2105 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_tdist_var { | sub ran_tdist_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_tdist_var_meat(@var,$$obj); | return ran_tdist_var_meat(@var,$$obj); | |||
} | } | |||
#line 2117 "RNG.pm" | #line 1961 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_beta_meat = \&PDL::GSL::RNG::ran_beta_meat; | *ran_beta_meat = \&PDL::GSL::RNG::ran_beta_meat; | |||
#line 2124 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_beta { | sub ran_beta { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_beta_meat($var[0],$a,$b,$$obj); | ran_beta_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_beta_meat($p,$a,$b,$$obj); | ran_beta_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2145 "RNG.pm" | #line 1985 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_beta_var_meat = \&PDL::GSL::RNG::ran_beta_var_meat; | *ran_beta_var_meat = \&PDL::GSL::RNG::ran_beta_var_meat; | |||
#line 2152 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_beta_var { | sub ran_beta_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_beta_var_meat(@var,$$obj); | return ran_beta_var_meat(@var,$$obj); | |||
} | } | |||
#line 2164 "RNG.pm" | #line 2000 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_logistic_meat = \&PDL::GSL::RNG::ran_logistic_meat; | *ran_logistic_meat = \&PDL::GSL::RNG::ran_logistic_meat; | |||
#line 2171 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_logistic { | sub ran_logistic { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_logistic_meat($var[0],$a,$$obj); | ran_logistic_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_logistic_meat($p,$a,$$obj); | ran_logistic_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2192 "RNG.pm" | #line 2024 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_logistic_var_meat = \&PDL::GSL::RNG::ran_logistic_var_meat; | *ran_logistic_var_meat = \&PDL::GSL::RNG::ran_logistic_var_meat; | |||
#line 2199 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_logistic_var { | sub ran_logistic_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_logistic_var_meat(@var,$$obj); | return ran_logistic_var_meat(@var,$$obj); | |||
} | } | |||
#line 2211 "RNG.pm" | #line 2039 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_pareto_meat = \&PDL::GSL::RNG::ran_pareto_meat; | *ran_pareto_meat = \&PDL::GSL::RNG::ran_pareto_meat; | |||
#line 2218 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_pareto { | sub ran_pareto { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_pareto_meat($var[0],$a,$b,$$obj); | ran_pareto_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_pareto_meat($p,$a,$b,$$obj); | ran_pareto_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2239 "RNG.pm" | #line 2063 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_pareto_var_meat = \&PDL::GSL::RNG::ran_pareto_var_meat; | *ran_pareto_var_meat = \&PDL::GSL::RNG::ran_pareto_var_meat; | |||
#line 2246 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_pareto_var { | sub ran_pareto_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_pareto_var_meat(@var,$$obj); | return ran_pareto_var_meat(@var,$$obj); | |||
} | } | |||
#line 2258 "RNG.pm" | #line 2078 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_weibull_meat = \&PDL::GSL::RNG::ran_weibull_meat; | *ran_weibull_meat = \&PDL::GSL::RNG::ran_weibull_meat; | |||
#line 2265 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_weibull { | sub ran_weibull { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_weibull_meat($var[0],$a,$b,$$obj); | ran_weibull_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_weibull_meat($p,$a,$b,$$obj); | ran_weibull_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2286 "RNG.pm" | #line 2102 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_weibull_var_meat = \&PDL::GSL::RNG::ran_weibull_var_meat; | *ran_weibull_var_meat = \&PDL::GSL::RNG::ran_weibull_var_meat; | |||
#line 2293 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_weibull_var { | sub ran_weibull_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_weibull_var_meat(@var,$$obj); | return ran_weibull_var_meat(@var,$$obj); | |||
} | } | |||
#line 2305 "RNG.pm" | #line 2117 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_gumbel1_meat = \&PDL::GSL::RNG::ran_gumbel1_meat; | *ran_gumbel1_meat = \&PDL::GSL::RNG::ran_gumbel1_meat; | |||
#line 2312 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_gumbel1 { | sub ran_gumbel1 { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_gumbel1_meat($var[0],$a,$b,$$obj); | ran_gumbel1_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_gumbel1_meat($p,$a,$b,$$obj); | ran_gumbel1_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2333 "RNG.pm" | #line 2141 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_gumbel1_var_meat = \&PDL::GSL::RNG::ran_gumbel1_var_meat; | *ran_gumbel1_var_meat = \&PDL::GSL::RNG::ran_gumbel1_var_meat; | |||
#line 2340 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_gumbel1_var { | sub ran_gumbel1_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_gumbel1_var_meat(@var,$$obj); | return ran_gumbel1_var_meat(@var,$$obj); | |||
} | } | |||
#line 2352 "RNG.pm" | #line 2156 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_gumbel2_meat = \&PDL::GSL::RNG::ran_gumbel2_meat; | *ran_gumbel2_meat = \&PDL::GSL::RNG::ran_gumbel2_meat; | |||
#line 2359 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_gumbel2 { | sub ran_gumbel2 { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_gumbel2_meat($var[0],$a,$b,$$obj); | ran_gumbel2_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_gumbel2_meat($p,$a,$b,$$obj); | ran_gumbel2_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2380 "RNG.pm" | #line 2180 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_gumbel2_var_meat = \&PDL::GSL::RNG::ran_gumbel2_var_meat; | *ran_gumbel2_var_meat = \&PDL::GSL::RNG::ran_gumbel2_var_meat; | |||
#line 2387 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_gumbel2_var { | sub ran_gumbel2_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_gumbel2_var_meat(@var,$$obj); | return ran_gumbel2_var_meat(@var,$$obj); | |||
} | } | |||
#line 2399 "RNG.pm" | #line 2195 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_poisson_meat = \&PDL::GSL::RNG::ran_poisson_meat; | *ran_poisson_meat = \&PDL::GSL::RNG::ran_poisson_meat; | |||
#line 2406 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_poisson { | sub ran_poisson { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_poisson_meat($var[0],$a,$$obj); | ran_poisson_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_poisson_meat($p,$a,$$obj); | ran_poisson_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2427 "RNG.pm" | #line 2219 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_poisson_var_meat = \&PDL::GSL::RNG::ran_poisson_var_meat; | *ran_poisson_var_meat = \&PDL::GSL::RNG::ran_poisson_var_meat; | |||
#line 2434 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_poisson_var { | sub ran_poisson_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_poisson_var_meat(@var,$$obj); | return ran_poisson_var_meat(@var,$$obj); | |||
} | } | |||
#line 2446 "RNG.pm" | #line 2234 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_bernoulli_meat = \&PDL::GSL::RNG::ran_bernoulli_meat; | *ran_bernoulli_meat = \&PDL::GSL::RNG::ran_bernoulli_meat; | |||
#line 2453 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_bernoulli { | sub ran_bernoulli { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_bernoulli_meat($var[0],$a,$$obj); | ran_bernoulli_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_bernoulli_meat($p,$a,$$obj); | ran_bernoulli_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2474 "RNG.pm" | #line 2258 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_bernoulli_var_meat = \&PDL::GSL::RNG::ran_bernoulli_var_meat; | *ran_bernoulli_var_meat = \&PDL::GSL::RNG::ran_bernoulli_var_meat; | |||
#line 2481 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_bernoulli_var { | sub ran_bernoulli_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_bernoulli_var_meat(@var,$$obj); | return ran_bernoulli_var_meat(@var,$$obj); | |||
} | } | |||
#line 2493 "RNG.pm" | #line 2273 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_binomial_meat = \&PDL::GSL::RNG::ran_binomial_meat; | *ran_binomial_meat = \&PDL::GSL::RNG::ran_binomial_meat; | |||
#line 2500 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_binomial { | sub ran_binomial { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_binomial_meat($var[0],$a,$b,$$obj); | ran_binomial_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_binomial_meat($p,$a,$b,$$obj); | ran_binomial_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2521 "RNG.pm" | #line 2297 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_binomial_var_meat = \&PDL::GSL::RNG::ran_binomial_var_meat; | *ran_binomial_var_meat = \&PDL::GSL::RNG::ran_binomial_var_meat; | |||
#line 2528 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_binomial_var { | sub ran_binomial_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_binomial_var_meat(@var,$$obj); | return ran_binomial_var_meat(@var,$$obj); | |||
} | } | |||
#line 2540 "RNG.pm" | #line 2312 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_negative_binomial_meat = \&PDL::GSL::RNG::ran_negative_binomial_meat; | *ran_negative_binomial_meat = \&PDL::GSL::RNG::ran_negative_binomial_meat; | |||
#line 2547 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_negative_binomial { | sub ran_negative_binomial { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_negative_binomial_meat($var[0],$a,$b,$$obj); | ran_negative_binomial_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_negative_binomial_meat($p,$a,$b,$$obj); | ran_negative_binomial_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2568 "RNG.pm" | #line 2336 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_negative_binomial_var_meat = \&PDL::GSL::RNG::ran_negative_binomial_var_mea t; | *ran_negative_binomial_var_meat = \&PDL::GSL::RNG::ran_negative_binomial_var_mea t; | |||
#line 2575 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_negative_binomial_var { | sub ran_negative_binomial_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_negative_binomial_var_meat(@var,$$obj); | return ran_negative_binomial_var_meat(@var,$$obj); | |||
} | } | |||
#line 2587 "RNG.pm" | #line 2351 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_pascal_meat = \&PDL::GSL::RNG::ran_pascal_meat; | *ran_pascal_meat = \&PDL::GSL::RNG::ran_pascal_meat; | |||
#line 2594 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_pascal { | sub ran_pascal { | |||
my ($obj,$a,$b,@var) = @_; | my ($obj,$a,$b,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_pascal_meat($var[0],$a,$b,$$obj); | ran_pascal_meat($var[0],$a,$b,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_pascal_meat($p,$a,$b,$$obj); | ran_pascal_meat($p,$a,$b,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2615 "RNG.pm" | #line 2375 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_pascal_var_meat = \&PDL::GSL::RNG::ran_pascal_var_meat; | *ran_pascal_var_meat = \&PDL::GSL::RNG::ran_pascal_var_meat; | |||
#line 2622 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_pascal_var { | sub ran_pascal_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 2) {barf("Bad number of parameters!");} | if (scalar(@var) != 2) {barf("Bad number of parameters!");} | |||
return ran_pascal_var_meat(@var,$$obj); | return ran_pascal_var_meat(@var,$$obj); | |||
} | } | |||
#line 2634 "RNG.pm" | #line 2390 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_geometric_meat = \&PDL::GSL::RNG::ran_geometric_meat; | *ran_geometric_meat = \&PDL::GSL::RNG::ran_geometric_meat; | |||
#line 2641 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_geometric { | sub ran_geometric { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_geometric_meat($var[0],$a,$$obj); | ran_geometric_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_geometric_meat($p,$a,$$obj); | ran_geometric_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2662 "RNG.pm" | #line 2414 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_geometric_var_meat = \&PDL::GSL::RNG::ran_geometric_var_meat; | *ran_geometric_var_meat = \&PDL::GSL::RNG::ran_geometric_var_meat; | |||
#line 2669 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_geometric_var { | sub ran_geometric_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_geometric_var_meat(@var,$$obj); | return ran_geometric_var_meat(@var,$$obj); | |||
} | } | |||
#line 2681 "RNG.pm" | #line 2429 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_hypergeometric_meat = \&PDL::GSL::RNG::ran_hypergeometric_meat; | *ran_hypergeometric_meat = \&PDL::GSL::RNG::ran_hypergeometric_meat; | |||
#line 2688 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_hypergeometric { | sub ran_hypergeometric { | |||
my ($obj,$a,$b,$c,@var) = @_; | my ($obj,$a,$b,$c,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_hypergeometric_meat($var[0],$a,$b,$c,$$obj); | ran_hypergeometric_meat($var[0],$a,$b,$c,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_hypergeometric_meat($p,$a,$b,$c,$$obj); | ran_hypergeometric_meat($p,$a,$b,$c,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2709 "RNG.pm" | #line 2453 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_hypergeometric_var_meat = \&PDL::GSL::RNG::ran_hypergeometric_var_meat; | *ran_hypergeometric_var_meat = \&PDL::GSL::RNG::ran_hypergeometric_var_meat; | |||
#line 2716 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_hypergeometric_var { | sub ran_hypergeometric_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 3) {barf("Bad number of parameters!");} | if (scalar(@var) != 3) {barf("Bad number of parameters!");} | |||
return ran_hypergeometric_var_meat(@var,$$obj); | return ran_hypergeometric_var_meat(@var,$$obj); | |||
} | } | |||
#line 2728 "RNG.pm" | #line 2468 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_logarithmic_meat = \&PDL::GSL::RNG::ran_logarithmic_meat; | *ran_logarithmic_meat = \&PDL::GSL::RNG::ran_logarithmic_meat; | |||
#line 2735 "RNG.pm" | ||||
#line 1407 "gsl_random.pd" | #line 1407 "gsl_random.pd" | |||
sub ran_logarithmic { | sub ran_logarithmic { | |||
my ($obj,$a,@var) = @_; | my ($obj,$a,@var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_logarithmic_meat($var[0],$a,$$obj); | ran_logarithmic_meat($var[0],$a,$$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_logarithmic_meat($p,$a,$$obj); | ran_logarithmic_meat($p,$a,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2756 "RNG.pm" | #line 2492 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_logarithmic_var_meat = \&PDL::GSL::RNG::ran_logarithmic_var_meat; | *ran_logarithmic_var_meat = \&PDL::GSL::RNG::ran_logarithmic_var_meat; | |||
#line 2763 "RNG.pm" | ||||
#line 1431 "gsl_random.pd" | #line 1431 "gsl_random.pd" | |||
sub ran_logarithmic_var { | sub ran_logarithmic_var { | |||
my ($obj,@var) = @_; | my ($obj,@var) = @_; | |||
if (scalar(@var) != 1) {barf("Bad number of parameters!");} | if (scalar(@var) != 1) {barf("Bad number of parameters!");} | |||
return ran_logarithmic_var_meat(@var,$$obj); | return ran_logarithmic_var_meat(@var,$$obj); | |||
} | } | |||
#line 2775 "RNG.pm" | #line 2507 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_additive_gaussian_meat = \&PDL::GSL::RNG::ran_additive_gaussian_meat; | *ran_additive_gaussian_meat = \&PDL::GSL::RNG::ran_additive_gaussian_meat; | |||
#line 2782 "RNG.pm" | ||||
#line 1521 "gsl_random.pd" | #line 1521 "gsl_random.pd" | |||
sub ran_additive_gaussian { | sub ran_additive_gaussian { | |||
my ($obj,$sigma,$var) = @_; | my ($obj,$sigma,$var) = @_; | |||
barf("In additive gaussian mode you must specify an ndarray!") | barf("In additive gaussian mode you must specify an ndarray!") | |||
if ref($var) ne 'PDL'; | if ref($var) ne 'PDL'; | |||
ran_additive_gaussian_meat($var,$sigma,$$obj); | ran_additive_gaussian_meat($var,$sigma,$$obj); | |||
return $var; | return $var; | |||
} | } | |||
#line 2797 "RNG.pm" | #line 2525 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_additive_poisson_meat = \&PDL::GSL::RNG::ran_additive_poisson_meat; | *ran_additive_poisson_meat = \&PDL::GSL::RNG::ran_additive_poisson_meat; | |||
#line 2804 "RNG.pm" | ||||
#line 1537 "gsl_random.pd" | #line 1537 "gsl_random.pd" | |||
sub ran_additive_poisson { | sub ran_additive_poisson { | |||
my ($obj,$sigma,$var) = @_; | my ($obj,$sigma,$var) = @_; | |||
barf("In additive poisson mode you must specify an ndarray!") | barf("In additive poisson mode you must specify an ndarray!") | |||
if ref($var) ne 'PDL'; | if ref($var) ne 'PDL'; | |||
ran_additive_poisson_meat($var,$sigma,$$obj); | ran_additive_poisson_meat($var,$sigma,$$obj); | |||
return $var; | return $var; | |||
} | } | |||
#line 2819 "RNG.pm" | #line 2543 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_feed_poisson_meat = \&PDL::GSL::RNG::ran_feed_poisson_meat; | *ran_feed_poisson_meat = \&PDL::GSL::RNG::ran_feed_poisson_meat; | |||
#line 2826 "RNG.pm" | ||||
#line 1553 "gsl_random.pd" | #line 1553 "gsl_random.pd" | |||
sub ran_feed_poisson { | sub ran_feed_poisson { | |||
my ($obj,$var) = @_; | my ($obj,$var) = @_; | |||
barf("In poisson mode you must specify an ndarray!") | barf("In poisson mode you must specify an ndarray!") | |||
if ref($var) ne 'PDL'; | if ref($var) ne 'PDL'; | |||
ran_feed_poisson_meat($var,$$obj); | ran_feed_poisson_meat($var,$$obj); | |||
return $var; | return $var; | |||
} | } | |||
#line 2841 "RNG.pm" | #line 2561 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_bivariate_gaussian_meat = \&PDL::GSL::RNG::ran_bivariate_gaussian_meat; | *ran_bivariate_gaussian_meat = \&PDL::GSL::RNG::ran_bivariate_gaussian_meat; | |||
#line 2848 "RNG.pm" | ||||
#line 1574 "gsl_random.pd" | #line 1574 "gsl_random.pd" | |||
sub ran_bivariate_gaussian { | sub ran_bivariate_gaussian { | |||
my ($obj,$sigma_x,$sigma_y,$rho,$n) = @_; | my ($obj,$sigma_x,$sigma_y,$rho,$n) = @_; | |||
barf("Not enough parameters for gaussian bivariate!") if $n<=0; | barf("Not enough parameters for gaussian bivariate!") if $n<=0; | |||
my $p = zeroes(2,$n); | my $p = zeroes(2,$n); | |||
ran_bivariate_gaussian_meat($p,$sigma_x,$sigma_y,$rho,$$obj); | ran_bivariate_gaussian_meat($p,$sigma_x,$sigma_y,$rho,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
#line 2863 "RNG.pm" | #line 2579 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_dir_2d_meat = \&PDL::GSL::RNG::ran_dir_2d_meat; | *ran_dir_2d_meat = \&PDL::GSL::RNG::ran_dir_2d_meat; | |||
#line 2870 "RNG.pm" | ||||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_dir_3d_meat = \&PDL::GSL::RNG::ran_dir_3d_meat; | *ran_dir_3d_meat = \&PDL::GSL::RNG::ran_dir_3d_meat; | |||
#line 2877 "RNG.pm" | ||||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_dir_nd_meat = \&PDL::GSL::RNG::ran_dir_nd_meat; | *ran_dir_nd_meat = \&PDL::GSL::RNG::ran_dir_nd_meat; | |||
#line 2884 "RNG.pm" | ||||
#line 1618 "gsl_random.pd" | #line 1618 "gsl_random.pd" | |||
sub ran_dir { | sub ran_dir { | |||
my ($obj,$ndim,$n) = @_; | my ($obj,$ndim,$n) = @_; | |||
barf("Not enough parameters for random vectors!") if $n<=0; | barf("Not enough parameters for random vectors!") if $n<=0; | |||
my $p = zeroes($ndim,$n); | my $p = zeroes($ndim,$n); | |||
if ($ndim==2) { ran_dir_2d_meat($p,$$obj); } | if ($ndim==2) { ran_dir_2d_meat($p,$$obj); } | |||
elsif ($ndim==3) { ran_dir_3d_meat($p,$$obj); } | elsif ($ndim==3) { ran_dir_3d_meat($p,$$obj); } | |||
elsif ($ndim>=4 && $ndim<=100) { ran_dir_nd_meat($p,$ndim,$$obj); } | elsif ($ndim>=4 && $ndim<=100) { ran_dir_nd_meat($p,$ndim,$$obj); } | |||
else { barf("Bad number of dimensions!"); } | else { barf("Bad number of dimensions!"); } | |||
return $p; | return $p; | |||
} | } | |||
#line 2902 "RNG.pm" | #line 2610 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_discrete_meat = \&PDL::GSL::RNG::ran_discrete_meat; | *ran_discrete_meat = \&PDL::GSL::RNG::ran_discrete_meat; | |||
#line 2909 "RNG.pm" | ||||
#line 1638 "gsl_random.pd" | #line 1638 "gsl_random.pd" | |||
sub ran_discrete { | sub ran_discrete { | |||
my ($obj, $rdt, @var) = @_; | my ($obj, $rdt, @var) = @_; | |||
if (ref($var[0]) eq 'PDL') { | if (ref($var[0]) eq 'PDL') { | |||
ran_discrete_meat($var[0], $$rdt, $$obj); | ran_discrete_meat($var[0], $$rdt, $$obj); | |||
return $var[0]; | return $var[0]; | |||
} | } | |||
else { | else { | |||
my $p; | my $p; | |||
$p = zeroes @var; | $p = zeroes @var; | |||
ran_discrete_meat($p, $$rdt, $$obj); | ran_discrete_meat($p, $$rdt, $$obj); | |||
return $p; | return $p; | |||
} | } | |||
} | } | |||
#line 2930 "RNG.pm" | ||||
#line 1655 "gsl_random.pd" | #line 1655 "gsl_random.pd" | |||
sub ran_shuffle_vec { | sub ran_shuffle_vec { | |||
my ($obj,@in) = @_; | my ($obj,@in) = @_; | |||
my (@out,$i,$p); | my (@out,$i,$p); | |||
$p = long [0..$#in]; | $p = long [0..$#in]; | |||
$obj->ran_shuffle($p); | $obj->ran_shuffle($p); | |||
for($i=0;$i<scalar(@in);$i++) { | for($i=0;$i<scalar(@in);$i++) { | |||
$out[$p->at($i)]=$in[$i]; | $out[$p->at($i)]=$in[$i]; | |||
} | } | |||
return @out; | return @out; | |||
} | } | |||
#line 2948 "RNG.pm" | ||||
#line 1669 "gsl_random.pd" | #line 1669 "gsl_random.pd" | |||
sub ran_choose_vec { | sub ran_choose_vec { | |||
my ($obj,$nout,@in) = @_; | my ($obj,$nout,@in) = @_; | |||
my (@out,$i,$pin,$pout); | my (@out,$i,$pin,$pout); | |||
$pin = long [0..$#in]; | $pin = long [0..$#in]; | |||
$pout = long [0..($nout-1)]; | $pout = long [0..($nout-1)]; | |||
$obj->ran_choose($pin,$pout); | $obj->ran_choose($pin,$pout); | |||
for($i=0;$i<$nout;$i++) { | for($i=0;$i<$nout;$i++) { | |||
$out[$i]=$in[$pout->at($i)]; | $out[$i]=$in[$pout->at($i)]; | |||
} | } | |||
return @out; | return @out; | |||
} | } | |||
#line 2967 "RNG.pm" | #line 2661 "RNG.pm" | |||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_ver_meat = \&PDL::GSL::RNG::ran_ver_meat; | *ran_ver_meat = \&PDL::GSL::RNG::ran_ver_meat; | |||
#line 2974 "RNG.pm" | ||||
#line 960 "/home/osboxes/pdl-code/blib/lib/PDL/PP.pm" | ||||
*ran_caos_meat = \&PDL::GSL::RNG::ran_caos_meat; | *ran_caos_meat = \&PDL::GSL::RNG::ran_caos_meat; | |||
#line 2981 "RNG.pm" | ||||
#line 1703 "gsl_random.pd" | #line 1703 "gsl_random.pd" | |||
sub ran_ver { | sub ran_ver { | |||
my ($obj,$x0,$r,$n) = @_; | my ($obj,$x0,$r,$n) = @_; | |||
barf("Not enough parameters for ran_ver!") if $n<=0; | barf("Not enough parameters for ran_ver!") if $n<=0; | |||
my $p = zeroes($n); | my $p = zeroes($n); | |||
ran_ver_meat($p,$x0,$r,$n,$$obj); | ran_ver_meat($p,$x0,$r,$n,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
#line 2996 "RNG.pm" | ||||
#line 1713 "gsl_random.pd" | #line 1713 "gsl_random.pd" | |||
sub ran_caos { | sub ran_caos { | |||
my ($obj,$m,$n) = @_; | my ($obj,$m,$n) = @_; | |||
barf("Not enough parameters for ran_caos!") if $n<=0; | barf("Not enough parameters for ran_caos!") if $n<=0; | |||
my $p = zeroes($n); | my $p = zeroes($n); | |||
ran_caos_meat($p,$m,$n,$$obj); | ran_caos_meat($p,$m,$n,$$obj); | |||
return $p; | return $p; | |||
} | } | |||
#line 3011 "RNG.pm" | #line 2694 "RNG.pm" | |||
# Exit with OK status | # Exit with OK status | |||
1; | 1; | |||
End of changes. 154 change blocks. | ||||
299 lines changed or deleted | 66 lines changed or added |