From c8d9acd0a5f7d28ff93960685b87d4837425b46a Mon Sep 17 00:00:00 2001 From: Johann Dreo Date: Mon, 6 Sep 2010 10:43:07 +0200 Subject: [PATCH] constructors for passing the bounder to super class --- src/doSamplerUniform.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/doSamplerUniform.h b/src/doSamplerUniform.h index e407360d..1d62b903 100644 --- a/src/doSamplerUniform.h +++ b/src/doSamplerUniform.h @@ -18,10 +18,23 @@ * This class uses the Uniform distribution parameters (bounds) to return * a random position used for population sampling. */ -template < typename EOT > +template < typename EOT, class D=doUniform > class doSamplerUniform : public doSampler< doUniform< EOT > > { public: + + typedef D Distrib; + + doSamplerUniform(doBounder< EOT > & bounder) + : doSampler< doUniform >(bounder) + {} + + /* + doSamplerUniform() + : doSampler< doUniform >() + {} + */ + EOT sample( doUniform< EOT >& distrib ) { unsigned int size = distrib.size();