* indentations + whitespace cleanup
This commit is contained in:
parent
8457e39efe
commit
56c6edab04
285 changed files with 6068 additions and 6223 deletions
|
|
@ -1,11 +1,10 @@
|
|||
|
||||
/*
|
||||
|
||||
(c) 2010 Thales group
|
||||
|
||||
This library is free software; you can redistribute it and/or
|
||||
modify it under the terms of the GNU Lesser General Public
|
||||
License as published by the Free Software Foundation; version 2
|
||||
License as published by the Free Software Foundation; version 2
|
||||
of the License.
|
||||
|
||||
This library is distributed in the hope that it will be useful,
|
||||
|
|
@ -46,11 +45,11 @@ public:
|
|||
|
||||
eoFeasibleRatioStat( std::string description = "FeasibleRatio" ) : eoStat<EOT,double>( 0.0, description ) {}
|
||||
|
||||
virtual void operator()( const eoPop<EOT> & pop )
|
||||
virtual void operator()( const eoPop<EOT> & pop )
|
||||
{
|
||||
#ifndef NDEBUG
|
||||
assert( pop.size() > 0 );
|
||||
|
||||
|
||||
double count = static_cast<double>( std::count_if( pop.begin(), pop.end(), eoIsFeasible<EOT> ) );
|
||||
double size = static_cast<double>( pop.size() );
|
||||
double ratio = count/size;
|
||||
|
|
@ -60,9 +59,8 @@ public:
|
|||
value() = static_cast<double>( std::count_if( pop.begin(), pop.end(), eoIsFeasible<EOT> ) ) / static_cast<double>( pop.size() );
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
virtual std::string className(void) const { return "eoFeasibleRatioStat"; }
|
||||
};
|
||||
|
||||
#endif // _eoFeasibleRatioStat_h_
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue