diff --git a/bnb/bnb.cpp b/bnb/bnb.cpp index 2bad4ef9dfa6841044b18b27c635267622b094b5..54673de26488c73619e0274e06248f91b819f641 100644 --- a/bnb/bnb.cpp +++ b/bnb/bnb.cpp @@ -53,7 +53,9 @@ unsigned int solver::get_lower(){ return i_bfs.get_max_flow(); } else if(lb_algorithm_ == lb::pr){ - + auto pr = push_relabel(graph_, sources, sinks); + pr.run(); + return pr.get_max_flow(); } else if(lb_algorithm_ == lb::gp){ diff --git a/include/gp-bnb/bnb.hpp b/include/gp-bnb/bnb.hpp index 61f47e207e310c1c4a422ec09368f4b8986cfad8..12d970669b6f735537c21a9555b5aa6f4bd0f121 100644 --- a/include/gp-bnb/bnb.hpp +++ b/include/gp-bnb/bnb.hpp @@ -8,6 +8,7 @@ #include <gp-bnb/partition.hpp> #include <gp-bnb/edmonds_karp.hpp> #include <gp-bnb/incremental_bfs.hpp> +#include <gp-bnb/push_relabel.hpp> namespace gp_bnb { diff --git a/meson.build b/meson.build index f4edb2a394ddec26611f360f1ffce05d4a9fce7e..6459df6398b8e5ca1810a5a076a0dee62af54272 100755 --- a/meson.build +++ b/meson.build @@ -15,6 +15,7 @@ executable('gp-bnb', 'bnb/edmonds_karp.cpp', 'bnb/incremental_bfs.cpp', 'bnb/ibfs_subtree.cpp', + 'bnb/push_relabel.cpp', 'bnb/bnb.cpp', include_directories: inc) diff --git a/test/meson.build b/test/meson.build index f7c8829f4d667c08331fcb1c8acdd7303ea454fa..54f78707d2f14495fd05e55d6f0c730831d7da8e 100644 --- a/test/meson.build +++ b/test/meson.build @@ -11,6 +11,7 @@ testexe = executable( '../bnb/edmonds_karp.cpp', '../bnb/incremental_bfs.cpp', '../bnb/ibfs_subtree.cpp', + '../bnb/push_relabel.cpp', '../bnb/bnb.cpp', include_directories : inc) # declared include directories in root :code:`meson.build`