Skip to content

Commit

Permalink
Drop zero-length segments returned by Arbor
Browse files Browse the repository at this point in the history
- Sync to arbor master
- Really drop empty segments
- Account for floating point accuracy
  • Loading branch information
thorstenhater authored Sep 8, 2021
1 parent 289eabf commit 67e3f03
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/cell_builder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ void cell_builder::make_label_dict(std::vector<ls_def>& locsets, std::vector<rg_
std::vector<arb::msegment> cell_builder::make_segments(const arb::region& region) {
auto concrete = thingify(region, provider);
auto result = pwlin.all_segments(concrete);
std::remove_if(result.begin(), result.end(), [](const auto& s) { return s.dist == s.prox; });
std::erase_if(result, [](const auto& s) { return distance(s.dist, s.prox) <= std::numeric_limits<double>::epsilon(); });
return result;
}

Expand Down

0 comments on commit 67e3f03

Please sign in to comment.