Logo Search packages:      
Sourcecode: tablix2 version File versions  Download package

void slist_update ( slist list,
table tab 
)

Update slist with new data from a timetable.

Parameters:
list Pointer to the slist structure to update.
tab Pointer to the table with the new data.

Definition at line 1214 of file data.c.

References table_t::chr, chromo_t::gen, chromo_t::gennum, slist_t::tupleid, slist_t::tuplenum, slist_t::var_typeid, and slist_t::varnum.

Referenced by table_fitness().

{
      chromo *var_chr;
      int tupleid;
      int var_resid;
      int n;

      assert(list!=NULL);
      assert(tab!=NULL);

      for(var_resid=0;var_resid<list->varnum;var_resid++) {
            list->tuplenum[var_resid]=0;
      }

      var_chr=&tab->chr[list->var_typeid];

        for(tupleid=0;tupleid<var_chr->gennum;tupleid++) {
            var_resid=var_chr->gen[tupleid];

            n=list->tuplenum[var_resid]++;
            list->tupleid[var_resid][n]=tupleid;
        }
}


Generated by  Doxygen 1.6.0   Back to index