Skip to content

Commit

Permalink
Merge pull request #1451 from phcerdan/faster_testVoxelComplex2
Browse files Browse the repository at this point in the history
Make testVoxelComplex faster
  • Loading branch information
dcoeurjo authored Jan 19, 2020
2 parents 5b538fb + cda6c29 commit 0af689c
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
2 changes: 2 additions & 0 deletions ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,8 @@
- Provides partial flip, split and merge operations for half-edge data structures
and triangulated surfaces (Jacques-Olivier Lachaud,
[#1428](https:/DGtal-team/DGtal/pull/1428))
- Makes testVoxelComplex faster, reducing the size of the test fixture
(Pablo Hernandez-Cerdan, [#1451](https:/DGtal-team/DGtal/pull/1451))

- *Shapes package*
- Fix Lemniscate definition following Bernoulli's definition
Expand Down
10 changes: 5 additions & 5 deletions tests/topology/testVoxelComplex.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,7 @@ TEST_CASE_METHOD(Fixture_isthmus, "Persistence thin",
}

///////////////////////////////////////////////////////////////////////////
// Fixture for a thick X
// Fixture for an X
struct Fixture_X {
///////////////////////////////////////////////////////////
// type aliases
Expand Down Expand Up @@ -916,8 +916,8 @@ struct Fixture_X {
FixtureDigitalSet create_set() {
using namespace DGtal;

Point p1(-30, -30, -30);
Point p2(30, 30, 30);
Point p1(-16, -16, -16);
Point p2(16, 16, 16);
Domain domain(p1, p2);

FixtureDigitalSet a_set(domain);
Expand Down Expand Up @@ -945,7 +945,7 @@ struct Fixture_X {
center_set.push_back(c20y);

Point z_pos(0, 0, 1);
int branch_length(10);
int branch_length(4);
std::vector<Point> diagonals;
diagonals.reserve(6);
for (const auto &p : center_set) {
Expand All @@ -955,7 +955,7 @@ struct Fixture_X {
diagonals.push_back({l, -l, 0});
diagonals.push_back({-l, l, 0});
diagonals.push_back({-l, -l, 0});
for (int z = -2; z <= 2; ++z)
for (int z = -1; z <= 1; ++z)
for (const auto &d : diagonals)
a_set.insert(p + d + (z * z_pos));
}
Expand Down

0 comments on commit 0af689c

Please sign in to comment.