use default typename for distrib, correct constructor superclass init

This commit is contained in:
nojhan 2011-09-15 17:44:55 +02:00
commit c1d49d7bd2
3 changed files with 9 additions and 9 deletions

View file

@ -39,13 +39,13 @@ Authors:
* This class uses the NormalMono distribution parameters (bounds) to return
* a random position used for population sampling.
*/
template < typename EOT >
class edoSamplerNormalMono : public edoSampler< edoNormalMono< EOT > >
template < typename EOT, typename D = edoNormalMono< EOT > >
class edoSamplerNormalMono : public edoSampler< D >
{
public:
typedef typename EOT::AtomType AtomType;
edoSamplerNormalMono( edoRepairer<EOT> & repairer ) : edoSampler( repairer) {}
edoSamplerNormalMono( edoRepairer<EOT> & repairer ) : edoSampler< D >( repairer) {}
EOT sample( edoNormalMono< EOT >& distrib )
{

View file

@ -34,13 +34,13 @@ Authors:
//! edoSamplerNormalMulti< EOT >
template< class EOT >
class edoSamplerNormalMulti : public edoSampler< edoNormalMulti< EOT > >
template< class EOT, typename D = edoNormalMulti< EOT > >
class edoSamplerNormalMulti : public edoSampler< D >
{
public:
typedef typename EOT::AtomType AtomType;
edoSamplerNormalMulti( edoRepairer<EOT> & repairer ) : edoSampler( repairer) {}
edoSamplerNormalMulti( edoRepairer<EOT> & repairer ) : edoSampler< D >( repairer) {}
class Cholesky
{

View file

@ -38,13 +38,13 @@ Authors:
* This class uses the Uniform distribution parameters (bounds) to return
* a random position used for population sampling.
*/
template < typename EOT, class D=edoUniform<EOT> > // FIXME: D template name is there really used ?!?
class edoSamplerUniform : public edoSampler< edoUniform< EOT > >
template < typename EOT, class D = edoUniform<EOT> >
class edoSamplerUniform : public edoSampler< D >
{
public:
typedef D Distrib;
edoSamplerUniform( edoRepairer<EOT> & repairer ) : edoSampler( repairer) {}
edoSamplerUniform( edoRepairer<EOT> & repairer ) : edoSampler< D >( repairer) {}
EOT sample( edoUniform< EOT >& distrib )
{