Math-Random-AcceptReject

 view release on metacpan or  search on metacpan

lib/Math/Random/AcceptReject.pm  view on Meta::CPAN

136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
        pdf => $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 )