Sampling algorithms for D
bearophile
bearophileHUGS at lycos.com
Fri Apr 13 04:10:04 PDT 2012
Joseph Rushton Wakeling:
> > final size_t select(ref UniformRNG urng)
> > in {
> > assert(_recordsRemaining> 0);
> > assert(_sampleRemaining> 0);
> > } body {
> > ...
> > }
>
> OK. I'm confused by these asserts,
What's confusing? I don't understand. It's contract-based programming, the code is essentially the same as before:
http://dlang.org/dbc.html
Bye,
bearophile
More information about the Digitalmars-d-learn
mailing list