• Main Page
  • Modules
  • Classes
  • Files
  • File List

D:/Projekt/ECF_trunk/examples/CEC/cec13ccode/CecFunctions.cpp

00001 #include "CecFunctions.h"
00002 #include "Function.h"
00003 #include <stdio.h>
00004 #include <stdlib.h>
00005 #include <math.h>
00006 #include <WINDOWS.H>    
00007 #include <malloc.h>
00008 
00009 extern void test_func(double *, double *,int,int,int);
00010 double *OShift,*M,*y,*z,*x_bound;
00011 int ini_flag=0,n_flag,func_flag;
00012 
00013 
00014 FitnessP evaluate(IndividualP individual){
00015 
00016     FitnessP fitness (new FitnessMin);
00017         FloatingPoint::FloatingPoint* gen = (FloatingPoint::FloatingPoint*) individual->getGenotype().get();
00018 
00020 
00021         int func_num;
00022         //isto input_data folder treba biti u folderu iz kojeg krece 
00023 
00025     
00026         
00027         double value;
00028         double *f = &value;
00029         
00030         double* x = &gen->realValue[0];
00031         int n = gen->realValue.size();
00032 
00033         test_func(x, f, n,1,func_num);
00034 
00035         fitness->setValue(value);
00036         return fitness;
00037 }

Generated on Thu Jul 10 2014 14:13:40 for ECF by  doxygen 1.7.1