space-ification of the tab indents
This commit is contained in:
parent
7f6c591a6b
commit
0a04059f10
3 changed files with 35 additions and 35 deletions
|
|
@ -39,27 +39,27 @@ class edoBounderBound : public edoBounder< EOT >
|
|||
{
|
||||
public:
|
||||
edoBounderBound( EOT min, EOT max )
|
||||
: edoBounder< EOT >( min, max )
|
||||
: edoBounder< EOT >( min, max )
|
||||
{}
|
||||
|
||||
void operator()( EOT& x )
|
||||
{
|
||||
unsigned int size = x.size();
|
||||
assert(size > 0);
|
||||
unsigned int size = x.size();
|
||||
assert(size > 0);
|
||||
|
||||
for (unsigned int d = 0; d < size; ++d) // browse all dimensions
|
||||
{
|
||||
if (x[d] < this->min()[d])
|
||||
{
|
||||
x[d] = this->min()[d];
|
||||
continue;
|
||||
}
|
||||
for (unsigned int d = 0; d < size; ++d) // browse all dimensions
|
||||
{
|
||||
if (x[d] < this->min()[d])
|
||||
{
|
||||
x[d] = this->min()[d];
|
||||
continue;
|
||||
}
|
||||
|
||||
if (x[d] > this->max()[d])
|
||||
{
|
||||
x[d] = this->max()[d];
|
||||
}
|
||||
}
|
||||
if (x[d] > this->max()[d])
|
||||
{
|
||||
x[d] = this->max()[d];
|
||||
}
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -40,24 +40,24 @@ class edoBounderRng : public edoBounder< EOT >
|
|||
{
|
||||
public:
|
||||
edoBounderRng( EOT min, EOT max, eoRndGenerator< double > & rng )
|
||||
: edoBounder< EOT >( min, max ), _rng(rng)
|
||||
: edoBounder< EOT >( min, max ), _rng(rng)
|
||||
{}
|
||||
|
||||
void operator()( EOT& x )
|
||||
{
|
||||
unsigned int size = x.size();
|
||||
assert(size > 0);
|
||||
unsigned int size = x.size();
|
||||
assert(size > 0);
|
||||
|
||||
for (unsigned int d = 0; d < size; ++d) // browse all dimensions
|
||||
{
|
||||
for (unsigned int d = 0; d < size; ++d) // browse all dimensions
|
||||
{
|
||||
|
||||
// FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions.
|
||||
// FIXME: attention: les bornes RNG ont les memes bornes quelque soit les dimensions idealement on voudrait avoir des bornes differentes pour chaque dimensions.
|
||||
|
||||
if (x[d] < this->min()[d] || x[d] > this->max()[d])
|
||||
{
|
||||
x[d] = _rng();
|
||||
}
|
||||
}
|
||||
if (x[d] < this->min()[d] || x[d] > this->max()[d])
|
||||
{
|
||||
x[d] = _rng();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private:
|
||||
|
|
|
|||
|
|
@ -39,21 +39,21 @@ class edoBounderUniform : public edoBounder< EOT >
|
|||
{
|
||||
public:
|
||||
edoBounderUniform( EOT min, EOT max )
|
||||
: edoBounder< EOT >( min, max )
|
||||
: edoBounder< EOT >( min, max )
|
||||
{}
|
||||
|
||||
void operator()( EOT& sol )
|
||||
{
|
||||
unsigned int size = sol.size();
|
||||
assert(size > 0);
|
||||
unsigned int size = sol.size();
|
||||
assert(size > 0);
|
||||
|
||||
for (unsigned int d = 0; d < size; ++d) {
|
||||
for (unsigned int d = 0; d < size; ++d) {
|
||||
|
||||
if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) {
|
||||
// use EO's global "rng"
|
||||
sol[d] = rng.uniform( this->min()[d], this->max()[d] );
|
||||
}
|
||||
} // for d in size
|
||||
if ( sol[d] < this->min()[d] || sol[d] > this->max()[d]) {
|
||||
// use EO's global "rng"
|
||||
sol[d] = rng.uniform( this->min()[d], this->max()[d] );
|
||||
}
|
||||
} // for d in size
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
|||
Reference in a new issue