Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make testVoxelComplex faster #1451

Merged
merged 1 commit into from
Jan 19, 2020
Merged
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
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