Ignore:
Timestamp:
04/11/18 01:16:08 (6 years ago)
Author:
Maciej Komosinski
Message:

Removed unused "state" field (issue number 19), improved docs (issues number 20,21,23), code formatting (issue number 24) [closes #62]

File:
1 edited

Legend:

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

    r767 r774  
    2121 * @param v pointer to the decremented value
    2222 */
    23 void rolling_dec(double * v);
     23void rolling_dec(double *v);
    2424
    2525/**
     
    2727 * @param v pointer to the incremented value
    2828 */
    29 void rolling_inc(double * v);
     29void rolling_inc(double *v);
    3030
    3131class f4_node;   // later
     
    5151 * @return 1 if end of string was reached, or position of found character in sequence
    5252 */
    53 int scanrec(const char * s, unsigned int slen, char stopchar);
     53int scanrec(const char* s, unsigned int slen, char stopchar);
    5454
    5555
     
    221221
    222222        int          ctrl;             ///<neuron type
    223         double       state;            ///<state of neuron
    224223        double       inertia;          ///<inertia of neuron
    225224        double       force;            ///<force of neuron
     
    253252
    254253
    255 // a collection of cells, like Organism, for developmental encoding
    256254/**
    257255 * A class representing a collection of cells. It is equivalent to an organism.
     
    295293         * Performs a single step of organism development. It runs each active cell
    296294         * in the organism.
    297          * @return 0 if all cells are developed, 1 otherwise
     295         * @return 0 if all cells are developed, or 1 otherwise
    298296         */
    299297        int  onestep();
     
    336334         * @param parent the parent of a new element
    337335         * @param insert the element to be inserted
    338          * @return 0 if repair can be performed, -1 otherwise (the repair flag wasn't set in constructor)
     336         * @return 0 if repair can be performed, or -1 otherwise because the repair flag wasn't set in the constructor
    339337         */
    340338        int  setRepairInsert(int nerrpos, f4_node *parent, f4_node *insert);
     
    432430         * @return pointer to the nth subnode or NULL if not found
    433431         */
    434         f4_node * ordNode(int n);
     432        f4_node* ordNode(int n);
    435433
    436434        /**
     
    438436         * @return random subnode
    439437         */
    440         f4_node * randomNode();
     438        f4_node* randomNode();
    441439
    442440        /**
     
    446444         * @return a random subnode with a given size or NULL
    447445         */
    448         f4_node * randomNodeWithSize(int min, int max);
     446        f4_node* randomNodeWithSize(int min, int max);
    449447
    450448        /**
     
    458456         * @return pointer to a tree copy
    459457         */
    460         f4_node * duplicate();
     458        f4_node* duplicate();
    461459
    462460        /**
     
    468466};
    469467
    470 // convert f4 geno string to tree structure (internal)
    471 
    472468/**
    473469 * The main function for converting a string of f4 encoding to a tree structure. Prepares
     
    476472 * @return a pointer to the f4_node object representing the f4 tree root
    477473 */
    478 f4_node * f4_processtree(const char *geno);
     474f4_node* f4_processtree(const char *geno);
    479475
    480476/**
     
    488484 * @param genot the string holding all the genotype
    489485 * @param pos0 the current position of processing in string
    490  * @param current parent of the analysed branch of the genotype
     486 * @param parent current parent of the analysed branch of the genotype
    491487 * @return 0 if processing was successful, otherwise returns the position of an error in the genotype
    492488 */
     
    504500 * @return the pointer to the first character in string after connection definition
    505501 */
    506 const char * parseConnection(const char *fragm, int &relfrom, double &weight);
     502const char *parseConnection(const char *fragm, int &relfrom, double &weight);
    507503
    508504/**
     
    518514 * @return the pointer to the first character in string after the connection definition
    519515 */
    520 const char * parseConnectionWithNeuron(const char *fragm, string &neutype, double &weight);
     516const char *parseConnectionWithNeuron(const char *fragm, string &neutype, double &weight);
    521517
    522518#endif
Note: See TracChangeset for help on using the changeset viewer.