17 typedef std::list<Model*> MBin;
18 typedef const std::list<Model*> CMBin;
29 template<
class Iter>
inline unsigned int getWinners( Iter iter )
const;
42 operator bool()
const {
return (
bool)
m_EMap; }
50 inline int getBindex(
int bx,
int by,
bool &culled=*((
bool*)
NULL))
const;
54 void getQualityRange(
float &lqof,
float &hqof,
float shapeweight=-1)
const;
60 std::list<Model*>::iterator&
remove(std::list<Model*>::iterator &mi);
63 int distribute(
int n=-1,
float qth=0,
bool count=
false);
93 for(std::list<Model*>::const_iterator wi=
m_Population.begin();
96 if((*wi)->isWinner()) {
107 bool &cf = &culled !=
NULL ? culled : tb;
109 if(bx<0) { bx=0; cf =
true; }
111 if(by<0) { by=0; cf =
true; }
118 return getBindex((
int)prop[0], (
int)prop[1], culled);
144 float range = mq-lq;
if(range <= 0.f) range = 1.f;
145 return (qof-lq)/range;
152 std::ostream& write(std::ostream& os,
bool showcomment=
false)
const;
156 {
return rhs.
write(os); }
dword m_MutateSpawns
number of spawns when mutating a shape
float m_RelBinDist
distance of bins relative to representative radius
float m_MutatePropRate
rate of adaption of proportion
ExpectationMap & getExpectationMap()
float m_ClusterMeltDist
maximum Hausdorff distance in mm for melting two shapes
float m_ShapeWeight
influence of shape deformation on QOF
void startSearch(bool dostart=true)
std::vector< MBin > m_Bins
float getGeneration(const Model *model) const
bool buildBins(float bindist=0.f)
void setExpectationMap(const ExpectationMap &em)
std::map< dword, Winner > & getWinList()
float m_MutatePProp
probability of mutation of proportion
bool triggerTest(int mx, int my, int what)
void setShapeWeight(float shapeweight)
const Model & getRepresentative() const
float m_PCTH
threshold for principle components
void getQualityRange(float &lqof, float &hqof, float shapeweight=-1) const
const ExpectationMap & getExpectationMap() const
float m_MutateRate
initial mutation rate
float m_ScaleStd
scale stdev of link
float m_ClusterDScale
maximum relative difference in scale to cluster representative
float m_ClusterTH
least quality of cluster relative to the best
const std::map< dword, Winner > & getWinList() const
dword m_NSpawns
number of new spawned shapes at each cycle
float m_NSpawnsTHRed
threshold reduction factor for new spawns
static SearcherParams global
int m_PDist
type of probability distr. to represent structural relationships
dword m_NClusters
number of clusters (winners) determined at each cycle
const Point getCenter() const
int m_MaxShoot
maximum number of spawns from an exp map
std::ostream & write(std::ostream &os, bool showcomment=false) const
friend std::ostream & operator<<(std::ostream &os, const SearcherParams &rhs)
float relativeQOF(float qof) const
PropVec & setPropPos(PropVec &prop, const Point2D &p)
float m_MutateTHRed
threshold reduction factor for mutated spawns
std::map< dword, Winner > m_Winners
int getBindex(int bx, int by, bool &culled=*((bool *) NULL)) const
int distribute(int n=-1, float qth=0, bool count=false)
const Winner * getWinner(dword id) const
float getShapeWeight() const
float m_MutateHL
half-life of mutation rate in seconds
int m_ParaSolver
method for solving ODE, 0-gauss, 1-midpnt
float m_EvolveCycle
time in seconds for one evolution cycle
SearcherParams & getSearchPara()
std::list< Model * > m_Population
friend std::istream & operator>>(std::istream &is, SearcherParams &rhs)
float getLeastQOF() const
std::list< MBin > m_Clusters
float m_RatingTH
least allowed rating for a winner
unsigned int getWinners(Iter iter) const
float m_ClusterDDir
maximum difference in direction in $$
float m_ClusterDPos
maximum distance of shapes in a cluster (relative to shape radius)
Searcher & operator=(const Searcher &rhs)
dword m_MaxPop
maximum population count
Model & mutate(Model &model, float rate=1) const
float m_MutateNoiseRate
distortion ratio for node positions
float m_MutatePDir
probability of mutation of orientation
std::map< dword, Winner > & updateWinList()
float m_MutatePNoise
probability of mutation of node positions
float m_MutatePPos
probability of mutation of position