Math-Random-AcceptReject
view release on metacpan or search on metacpan
lib/Math/Random/AcceptReject.pm view on Meta::CPAN
136137138139140141142143144145146147148149150151152153154155156
=>
$args
{pdf},
cache
=> [],
};
if
(
$self
->{xmin} >=
$self
->{xmax}) {
croak(
"'xmin' must be smaller than 'xmax'"
);
}
$self
->{xdiff} =
$self
->{xmax} -
$self
->{xmin};
bless
$self
=>
$class
;
return
$self
;
}
=head2 rand
Returns the next random number of PDF C<f(x)> as specified by the C<pdf>
parameter to C<new()>.
=cut
( run in 0.377 second using v1.01-cache-2.11-cpan-87723dcf8b7 )