diff options
author | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2020-03-16 18:19:09 -0400 |
---|---|---|
committer | Jaron Kent-Dobias <jaron@kent-dobias.com> | 2020-03-16 18:19:09 -0400 |
commit | 2faf0e4598c7c046d58107d23145f95db334200c (patch) | |
tree | 149ed852adfabdf881042167c7eb1131ea3e53ea /lib/include | |
parent | 19d657b60b22159359f7a229f5a5b73e729cff79 (diff) | |
download | fuse_networks-2faf0e4598c7c046d58107d23145f95db334200c.tar.gz fuse_networks-2faf0e4598c7c046d58107d23145f95db334200c.tar.bz2 fuse_networks-2faf0e4598c7c046d58107d23145f95db334200c.zip |
Implemented new behavior when w=0 or w=1.
Diffstat (limited to 'lib/include')
-rw-r--r-- | lib/include/network.hpp | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/lib/include/network.hpp b/lib/include/network.hpp index d562530..37f1912 100644 --- a/lib/include/network.hpp +++ b/lib/include/network.hpp @@ -31,9 +31,10 @@ class network { private: problem px; problem py; - std::unordered_map<std::array<unsigned, 2>, bool> seen_pairs; + std::unordered_map<std::array<unsigned, 2>, bool> seen_pairs_x; + std::unordered_map<std::array<unsigned, 2>, bool> seen_pairs_y; - void update_backbone(const std::vector<double>& c); + void update_backbone(const std::vector<double>& c, const std::array<double, 2>& cond); void break_edge(unsigned, bool unbreak = false); void get_cycle_edges_helper(std::set<unsigned>&, std::set<unsigned>&, unsigned, unsigned) const; bool find_cycle_helper(std::array<unsigned, 2>&, const std::set<unsigned>&, unsigned, unsigned, @@ -47,6 +48,7 @@ private: std::list<std::set<unsigned>> get_tie_flaps(unsigned) const; public: + bool two_sides; const graph& G; ClusterTree C; @@ -55,7 +57,7 @@ public: std::vector<bool> backbone; std::vector<long double> thresholds; - network(const graph&, cholmod_common*); + network(const graph&, bool two_sides, cholmod_common*); void set_thresholds(double, std::mt19937&); void fracture(hooks&); @@ -76,7 +78,7 @@ private: double weight; public: - fuse_network(const graph&, cholmod_common*, double weight = 1.0); + fuse_network(const graph&, cholmod_common*); fuse_network(const fuse_network&); current_info get_current_info() override; |