Changeset 673 for cpp/frams/genetics/oper_fx.h
- Timestamp:
- 08/19/17 02:43:11 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
cpp/frams/genetics/oper_fx.h
r670 r673 87 87 88 88 /**Used to perform initializations of Param parameters that are not handled by the Param itself 89 (i.e. string parameters need tobe initialized here)*/89 (i.e. string parameters or fields that require some complex logic may be initialized here)*/ 90 90 virtual void setDefaults() {} 91 91 … … 192 192 static void linearMix(ParamInterface &p1, int i1, ParamInterface &p2, int i2, double proportion); ///<mixes i1'th and i2'th properties of p1 and p2; proportion should be within [0,1]; 0.5 causes both properties to become their average. For integer properties applies random "dithering" when necessary. 193 193 static NeuroClass* getRandomNeuroClass(); ///<returns random neuroclass or NULL when no active classes. 194 static int getRandomNeuroClassWithOutput(const vector<NeuroClass*>& NClist); //returns index of random neuroclass from the NClist or -1 (no neurons on the list that provide output) 195 static int getRandomNeuroClassWithInput(const vector<NeuroClass*>& NClist); //returns index of random neuroclass from the NClist or -1 (no neurons on the list that want input(s)) 196 static int getRandomChar(const char *choices, const char *excluded); ///<returns index of a random character from 'choices' excluding 'excluded', or -1 when everything is excluded or 'choices' is empty. 194 197 static NeuroClass* parseNeuroClass(char *&s); ///<returns longest matching neuroclass or NULL if the string does not begin with a valid neuroclass name. Advances \e s pointer. 195 198 static Neuro* findNeuro(const Model *m,const NeuroClass *nc); ///<returns pointer to first Neuro of class \e nc, or NULL if there is no such Neuro.
Note: See TracChangeset
for help on using the changeset viewer.