added finished algorithm

merged algorithm from other personnal repo
This commit is contained in:
Tanguy MAZE
2019-04-22 10:13:09 +02:00
parent c6339a00e9
commit a8b2e31701
128 changed files with 5020 additions and 86 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/20 13:18:46 by mndhlovu ### ########.fr */
/* Updated: 2019/04/22 10:01:33 by tmaze ### ########.fr */
/* */
/* ************************************************************************** */
@@ -45,6 +45,7 @@ typedef struct s_bfs
{
int parent;
char visited;
char old_visited;
int queue;
} t_bfs;
@@ -136,7 +137,9 @@ t_ind *get_node_path(t_ind *lst, int index);
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);
t_ind **edmonds_karp(t_lmdata *data, int s_ind, int e_ind);
int get_score(t_lmdata *data, t_ind **ret, int nb_paths);
void print_paths(t_lmdata *data, t_ind **ret);
int push_ants(t_lmdata *data, t_ind **paths
, int nb_paths);