fixing template type
This commit is contained in:
parent
34be1fd174
commit
5682f296cd
1 changed files with 1 additions and 3 deletions
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
//-----------------------------------------------------------------------------
|
||||
|
||||
typedef eoBin<float> Chrom;
|
||||
|
||||
/** Just a simple function that takes binary value of a chromosome and sets
|
||||
the fitnes.
|
||||
@param _chrom A binary chromosome
|
||||
*/
|
||||
|
||||
float binary_value(const Chrom& _chrom)
|
||||
template <class Chrom> float binary_value(const Chrom& _chrom)
|
||||
{
|
||||
float sum = 0;
|
||||
for (unsigned i = 0; i < _chrom.size(); i++)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue