Changeset 139 for cpp/frams/genetics/f9
 Timestamp:
 02/20/14 17:49:28 (10 years ago)
 Location:
 cpp/frams/genetics/f9
 Files:

 3 edited
Legend:
 Unmodified
 Added
 Removed

cpp/frams/genetics/f9/conv_f9.cpp
r125 r139 10 10 #define APPLY_DETERMINISTIC_BODY_NOISE //this representation easily produces perfectly vertical sticks that would stay upright forever. In most cases such infinite perfection is not desired, so we make the construct less perfect by perturbing its coordinates. 11 11 12 GenoConv_ F90::GenoConv_F90()12 GenoConv_f90::GenoConv_f90() 13 13 { 14 14 name = "Turtle3Dortho encoding"; … … 25 25 //const char* turtle_commandsZ_f9="0000+"; 26 26 27 SString GenoConv_ F90::convert(SString &in, MultiMap *map)27 SString GenoConv_f90::convert(SString &in, MultiMap *map) 28 28 { 29 29 vector<XYZ_LOC> vertices; … … 55 55 } 56 56 57 int GenoConv_ F90::addSegment(Model &m,vector<XYZ_LOC> &vertices,const XYZ_LOC &new_vertex,int recently_added)57 int GenoConv_f90::addSegment(Model &m,vector<XYZ_LOC> &vertices,const XYZ_LOC &new_vertex,int recently_added) 58 58 { 59 59 if (vertices.size()<1) … … 77 77 } 78 78 79 int GenoConv_ F90::findVertexAt(vector<XYZ_LOC> &vertices,const XYZ_LOC &vertex)79 int GenoConv_f90::findVertexAt(vector<XYZ_LOC> &vertices,const XYZ_LOC &vertex) 80 80 { 81 81 for(int i=0;i<vertices.size();i++) … … 85 85 86 86 87 int GenoConv_ F90::addNewVertex(Model &m,vector<XYZ_LOC> &vertices,const XYZ_LOC &new_vertex)87 int GenoConv_f90::addNewVertex(Model &m,vector<XYZ_LOC> &vertices,const XYZ_LOC &new_vertex) 88 88 { 89 89 Part *p=new Part; … … 110 110 } 111 111 112 void GenoConv_ F90::setColors(Model &m) //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes112 void GenoConv_f90::setColors(Model &m) //sets fixed (independent from genes) colors and widths on a model, purely for aesthetic purposes 113 113 { 114 114 //a rainbow on Joints: from the first one red, through middle green, to blue or violet  last … … 145 145 } 146 146 147 void GenoConv_ F90::perturbPartLocations(Model &m) //deterministic "body noise", see APPLY_DETERMINISTIC_BODY_NOISE147 void GenoConv_f90::perturbPartLocations(Model &m) //deterministic "body noise", see APPLY_DETERMINISTIC_BODY_NOISE 148 148 { 149 149 for(int i=0;i<m.getPartCount();i++) 
cpp/frams/genetics/f9/conv_f9.h
r125 r139 29 29 30 30 // The f9>f0 converter 31 class GenoConv_ F90: public GenoConverter31 class GenoConv_f90: public GenoConverter 32 32 { 33 33 public: 34 GenoConv_ F90();34 GenoConv_f90(); 35 35 36 //implementation GenoConverter method36 //implementation of the GenoConverter method 37 37 SString convert(SString &in, MultiMap *map); 38 38 
cpp/frams/genetics/f9/oper_f9.h
r120 r139 18 18 int crossOver(char *&g1,char *&g2,float& chg1,float& chg2); 19 19 unsigned long style(const char *g, int pos); 20 c har* getSimplest() {return "R";}20 const char* getSimplest() {return "R";} 21 21 22 22 double mut_prob; //mutation probability
Note: See TracChangeset
for help on using the changeset viewer.