int reinit_all(t_room *root, t_room *tmp) { tmp->previous = NULL; tmp->visited = 0; tmp->curr_node = 0; return (tmp != root ? reinit_all(root, tmp->next) : 0); }
int main() { int i; for(i=0; i<5; i++){ reinit_all(); /*returned with no vigour...*/ /*or*/ /*man, watch this! completed!*/ /*is no longer been problem.*/ if(!setjmp(jb)) crosschannel(0); sc_output(rcont, route); } return 0; }
int ant_colony_clustering(t_room *root, t_pos *pos) { static const ptrft exec_aco[2] = {get_aco, rev_get_aco}; t_room *beg_end[2]; int max; int i; i = -1; beg_end[0] = pos->start; beg_end[1] = pos->end; max = pos->nb_ant * pos->nb_ant; pos->opt = 5 - pos->opt; while (++i < 2) { if (exec_aco[i](root, beg_end[i], beg_end[(i + 1) % 2], max) == FAILURE) return (FAILURE); reinit_all(root, root->next); } return (SUCCESS); }