started work to redo algorithm

branch out to redo algorithm
This commit is contained in:
Tanguy MAZE
2019-04-15 18:05:25 +02:00
parent 4a5c798b25
commit dd255666f1
8 changed files with 136 additions and 91 deletions

View File

@@ -6,7 +6,7 @@
/* By: tmaze <tmaze@student.42.fr> +#+ +:+ +#+ */
/* +#+#+#+#+#+ +#+ */
/* Created: 2019/03/23 17:31:19 by tmaze #+# #+# */
/* Updated: 2019/04/14 12:18:02 by tmaze ### ########.fr */
/* Updated: 2019/04/15 17:44:39 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
@@ -32,6 +32,13 @@ typedef struct s_ind
struct s_ind *next;
} t_ind;
typedef struct s_path
{
int nb_ants;
int score;
t_ind *nodes;
} t_path;
typedef struct s_lmdata
{
int nbants;
@@ -126,18 +133,18 @@ t_ind **lst_indinit(t_lmdata *data);
int lst_indadd_link(t_lmdata *data, int n1, int n2);
t_ind *lst_indadd(t_ind **lst, int ind);
void lst_inddel(t_ind **lst);
void tablst_inddel(t_ind **tab);
void clean_path(t_path *tab);
t_ants *add_ant(t_ants **ants, int nb_ant, int nb_path
, t_ind **paths);
, t_path *paths);
void del_ants(t_ants **ants);
t_node *get_node(t_lmdata *data, int index);
t_ind *get_node_path(t_ind *lst, int index);
int get_score(t_lmdata *data, t_path *ret);
void bfs(t_lmdata *data, t_bfs *tab, int start_ind
, int end_ind);
t_ind **edmunds_karp(t_lmdata *data, int start_ind, int end_ind);
int push_ants(t_lmdata *data, t_ind **paths
, int nb_paths);
t_path *edmunds_karp(t_lmdata *data, int start_ind, int end_ind);
int push_ants(t_lmdata *data, t_path *paths);
#endif