Changeset 247 for cpp/frams/genetics/f4


Ignore:
Timestamp:
11/07/14 17:51:01 (9 years ago)
Author:
Maciej Komosinski
Message:

Sources support both 32-bit and 64-bit, and more compilers

Location:
cpp/frams/genetics/f4
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • cpp/frams/genetics/f4/f4_general.cpp

    r197 r247  
    593593
    594594
    595 int f4_Cell::addlink(f4_Cell * nfrom, double nw, long nt)
     595int f4_Cell::addlink(f4_Cell * nfrom, double nw, int nt)
    596596{
    597597        if (nolink >= MAXINPUTS - 1) return -1; // full!
     
    675675
    676676
    677 f4_CellLink::f4_CellLink(f4_Cell * nfrom, double nw, long nt)
     677f4_CellLink::f4_CellLink(f4_Cell * nfrom, double nw, int nt)
    678678{
    679679        from = nfrom;
     
    12341234        int i, j, t, res;
    12351235        char tc1, tc2;
    1236         long relfrom;
     1236        int relfrom;
    12371237        double w;
    12381238        unsigned gpos, oldpos;
  • cpp/frams/genetics/f4/f4_general.h

    r197 r247  
    101101        int onestep();  // execute one simulation step (till a division)
    102102
    103         int   addlink(f4_Cell * nfrom, double nw, long nt);
     103        int   addlink(f4_Cell * nfrom, double nw, int nt);
    104104        void  adjustRec();
    105105
     
    129129        //f4_OrientMat OM;
    130130        double       mz;            // freedom in z
    131         long         p2_refno;   // number of last end part object, used in f0
    132         long         joint_refno;   // number of the joint object, used in f0
    133         long         neuro_refno;   // number of the neuro object, used in f0
    134 
    135         long         ctrl;  // neuron type
     131        int          p2_refno;   // number of last end part object, used in f0
     132        int          joint_refno;   // number of the joint object, used in f0
     133        int          neuro_refno;   // number of the neuro object, used in f0
     134
     135        int          ctrl;  // neuron type
    136136        double       state;
    137137        double       inertia;
     
    147147{
    148148public:
    149         f4_CellLink(f4_Cell * nfrom, double nw, long nt);
     149        f4_CellLink(f4_Cell * nfrom, double nw, int nt);
    150150        f4_Cell *    from;
    151151        // type: 0: input, 1 '*', 2 'G', 3 'T', 4 'S'
    152         long         t;
     152        int          t;
    153153        double       w;
    154154};
     
    205205        int       pos;        // original position in string
    206206        int       i1;           // internal int  parameter1
    207         long      l1;           // internal long parameter1
     207        int       l1;           // internal long parameter1
    208208        double    f1;           // internal double parameter1
    209209
  • cpp/frams/genetics/f4/oper_f4.cpp

    r199 r247  
    606606
    607607
    608 unsigned long Geno_f4::style(const char *g, int pos)
     608uint32_t Geno_f4::style(const char *g, int pos)
    609609{
    610610        char ch = g[pos];
     
    616616        if (!strchr(STYL4CAT_MODIFIC STYL4CAT_NEUMOD STYL4CAT_DIGIT STYL4CAT_REST, ch))
    617617                return GENSTYLE_CS(0, GENSTYLE_INVALID);
    618         unsigned long style = GENSTYLE_CS(0, GENSTYLE_STRIKEOUT); //default, should be changed below
     618        uint32_t style = GENSTYLE_CS(0, GENSTYLE_STRIKEOUT); //default, should be changed below
    619619        if (strchr("X ", ch))              style = GENSTYLE_CS(0, GENSTYLE_NONE);
    620620        if (strchr("N", ch))               style = GENSTYLE_RGBS(0, 200, 0, GENSTYLE_NONE);
  • cpp/frams/genetics/f4/oper_f4.h

    r197 r247  
    3838        int crossOver(char *&g1, char *&g2, float& chg1, float& chg2);
    3939        const char* getSimplest() { return "X"; }
    40         unsigned long style(const char *g, int pos);
     40        uint32_t style(const char *g, int pos);
    4141
    4242        // mutation probabilities
Note: See TracChangeset for help on using the changeset viewer.