|
Boost Users : |
Subject: Re: [Boost-users] Random library, discrete distribution
From: Steven Watanabe (watanabesj_at_[hidden])
Date: 2009-08-17 22:55:41
AMDG
er wrote:
> er wrote:
>> discrete does not sort the weights, so this step has to be carried out
> I meant categorical does not sort the weights
discrete doesn't sort the weights either if you notice.
The initialization for discrete is more complex and
is almost certainly slower, although it is still O(n) where
n is the number of elements in the sequence of weights.
I didn't try to optimize the initialization much, so it
is quite likely to be several times slower than it could be.
In Christ,
Steven Watanabe
Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net