class documentation
class DequeCDF(_collections.deque):
a queue of vectors with element-wise cdf computation.
The deque
is here used like a list
with maximum length functionality,
the (inherited) constructor takes maxlen
as keyword argument (since Python 2.6).
>>> import cma >>> d = cma.constraints_handler.DequeCDF(maxlen=22) >>> for i in range(5): ... d.append([i]) >>> ' '.join(['{0:.2}'.format(x) for x in ... [d.cdf(0, 0), d.cdf(0, 2), d.cdf(0, 2.1), d.cdf(0, 22.1), d.cdf(0, 4, 2)]]) '0.1 0.5 0.6 1.0 0.75'
Method | cdf |
return ecdf(val ) from the i -th element of the last len_ values in self, |
Method | cdf1 |
return ECDF at val in case this is a deque of scalars |