00001
00020 #ifndef _UTIL_H
00021
00022 #define _UTIL_H 1
00023
00024 #include "define.h"
00025 #include "populationreal.h"
00026
00027 using realea::tChromosomeReal;
00028 using realea::PopulationReal;
00029
00030
00031
00032 double distreal(const realea::tChromosomeReal &x, const realea::tChromosomeReal &y, bool *checkGen=NULL);
00033
00034
00035 double distanceMin(const realea::tChromosomeReal &x, realea::PopulationReal *pop, unsigned *posmin);
00036 double distanceMax(const realea::tChromosomeReal &x, realea::PopulationReal *pop, unsigned *posmin);
00037
00038 unsigned getNeigh(const tChromosomeReal &x, PopulationReal *pop, double min);
00039
00047 void min_vector_distance(const tChromosomeReal &x, PopulationReal *pop, vector<tReal> &mindist);
00048
00057 void min_dim_distance(const tChromosomeReal &sol, PopulationReal *pop, vector<unsigned> &minind);
00058
00059 #endif