fixing template type

This commit is contained in:
gustavoromero 2000-11-13 12:12:14 +00:00
commit 5682f296cd

View file

@ -2,14 +2,12 @@
//----------------------------------------------------------------------------- //-----------------------------------------------------------------------------
typedef eoBin<float> Chrom;
/** Just a simple function that takes binary value of a chromosome and sets /** Just a simple function that takes binary value of a chromosome and sets
the fitnes. the fitnes.
@param _chrom A binary chromosome @param _chrom A binary chromosome
*/ */
float binary_value(const Chrom& _chrom) template <class Chrom> float binary_value(const Chrom& _chrom)
{ {
float sum = 0; float sum = 0;
for (unsigned i = 0; i < _chrom.size(); i++) for (unsigned i = 0; i < _chrom.size(); i++)