Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions cmake/fast_arrangement.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ include(FetchContent)
FetchContent_Declare(
indirect_predicates
GIT_REPOSITORY https://github.com/qnzhou/Indirect_Predicates.git
GIT_TAG master
GIT_TAG c7c9d0b0ce8563b368f032083ecda0854e4feb12
)

FetchContent_MakeAvailable(indirect_predicates)
Expand All @@ -19,7 +19,7 @@ add_library(indirect_predicates::indirect_predicates ALIAS indirectPredicates)
FetchContent_Declare(
cinolib
GIT_REPOSITORY https://github.com/mlivesu/cinolib.git
GIT_TAG v1.0
GIT_TAG a0cb8ee0345c2515711a48a088c3305283fa49d3
)
if(NOT cinolib_POPULATED)
FetchContent_Populate(cinolib)
Expand All @@ -29,7 +29,7 @@ endif()
FetchContent_Declare(
fast_arrangement
GIT_REPOSITORY https://github.com/qnzhou/FastAndRobustMeshArrangements.git
GIT_TAG master
GIT_TAG 44580b5136adc7acff76e2f6f0ad4556340dd073
)
if(NOT fast_arrangement_POPULATED)
FetchContent_Populate(fast_arrangement)
Expand Down
17 changes: 11 additions & 6 deletions src/BSH.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -505,15 +505,20 @@ void BSH::simple_graph_cut(
e_reverse = get(boost::edge_reverse,g);

// add edges between blocks
std::set<std::array<int, 2>> added_edges;
for (int p = 0; p < nPatch; ++p) {
int b1 = P_block[p][0];
int b2 = P_block[p][1];
auto e = add_edge(b1,b2,g).first;
e_weights[e] = hPair[Edge(b1,b2)];
auto re = add_edge(b2,b1,g).first;
e_weights[re] = hPair[Edge(b2,b1)];
e_reverse[e] = re;
e_reverse[re] = e;
if (added_edges.find({b1, b2}) == added_edges.end()) {
auto e = add_edge(b1,b2,g).first;
e_weights[e] = hPair[Edge(b1,b2)];
added_edges.insert({b1, b2});
auto re = add_edge(b2,b1,g).first;
e_weights[re] = hPair[Edge(b2,b1)];
added_edges.insert({b2, b1});
e_reverse[e] = re;
e_reverse[re] = e;
}
}

// add edges between blocks and terminals (s,t)
Expand Down