Class with optmization function?

Edmanuel Eduardo Torres Amaris edmanuel.torres at ecopetrol.com.co
Fri Jun 7 14:35:29 EDT 2002


Hi boys

I was treat to put my ga program into n FLTK GUI what I have the following
problem:
I have one derivate class
//----------------- crga.h ------------------//
class CRga : public GASimpleGA{
public:
	CRga(const GAGenome&);
};
//---------------- crga.cpp -----------------//
CRga::CRga(const GAGenome& c) : GASimpleGA(c){
  oldPop = pop->clone();

  el = gaTrue;
  params.add(gaNelitism, gaSNelitism, GAParameter::BOOLEAN, &el);
}
//------------------------------------------------//

//--------------- main.cpp ------------------//
#include "CRga.h"

int main()
{
  GABin2DecPhenotype map;
  for(int j=0; j<NumGen; j++)
	  map.add(31, -10, 10);
  GABin2DecGenome genome(map, objective);
  CRga ga(genome) ;
}

My question is ?How I can to put the "objective" function into the class
CRga?
I will be very grateful with all suggestions.

TIA,
>_________________________________________
>Edmanuel E. Torres Amaris
edmanuel.torres at ecopetrol.com.co <mailto:edmanuel.torres at ecopetrol.com.co> 
eetorres at lycos.com <mailto:eetorres at lycos.com> 
>Tel 6356765 - of. 6740406
OSTG - Optics and Signals Treatment Group
>Universidad Industrial de Santander
>UIS - www.uis.edu.co <http://www.uis.edu.co>  
>Oilfields - ICP - ECOPETROL
www.ecopetrol.com.com <http://www.ecopetrol.com.com> 
>Bucaramanga
Colombia



More information about the galib mailing list