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

Upgrade eigen to 3.4.0 #186

Merged
merged 6 commits into from
Oct 11, 2021
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
4 changes: 2 additions & 2 deletions examples/Eigen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function(GetEigen)
FetchContent_Declare(
eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG 3.3.9
GIT_TAG 3.4.0
)

FetchContent_GetProperties(eigen)
Expand All @@ -27,4 +27,4 @@ function(GetEigen)

include_directories(${EIGEN_DIR})

endfunction()
endfunction()
4 changes: 2 additions & 2 deletions test/Eigen.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ function(GetEigen)
FetchContent_Declare(
eigen
GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
GIT_TAG 3.3.9
GIT_TAG 3.4.0
)

FetchContent_GetProperties(eigen)
Expand All @@ -27,4 +27,4 @@ function(GetEigen)

include_directories(${EIGEN_DIR})

endfunction()
endfunction()
2 changes: 1 addition & 1 deletion test/new_rounding_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ void call_test_skinny_cubes() {
P = generate_skinny_cube<Hpolytope>(20);
rounding_test(P, 0,
8.26497 * std::pow(10,7),
8.94948e+07,
8.28811e+07,
1.09218e+08,
104857600.0);
}
Expand Down
2 changes: 1 addition & 1 deletion test/volume_cb_hpolytope.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ void call_test_birk()
test_volume(P,
7.84351e-13,
6.10783e-13,
5.05917e-13,
2.7408e-13,
6.62349e-13,
9.455459196 * std::pow(10,-13),
true);
Expand Down
13 changes: 7 additions & 6 deletions test/volume_cb_zonotopes.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,8 @@ void test_values(NT volume, NT expected, NT exact)
<< std::abs((volume-expected)/expected) << std::endl;
std::cout << "Relative error (exact) = "
<< std::abs((volume-exact)/exact) << std::endl;
CHECK(std::abs((volume - expected)/expected) < 0.2);
CHECK((std::abs((volume - exact)/exact) < 0.2 ||
std::abs((volume - expected)/expected) < 0.00001));
}

template <class Polytope>
Expand Down Expand Up @@ -137,15 +138,15 @@ void call_test_uniform_generator(){
exact_vol = exact_zonotope_vol<NT>(P);
test_volume_hpoly(P,
0,
5.7603e+20,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

any idea of what have changed in Eigen and there are those changes in test results ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not sure, my guess is that these are due to numerical instability for skinny objects.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but the process is deterministic (in the tests), they probably changed some algorithms in eigen that volesti uses

6.95342e+20,
7.27889 * std::pow(10,20),
5.98586 * std::pow(10,20),
7.18605 * std::pow(10,20),
exact_vol);
test_volume_balls(P,
0,
3.98317 * std::pow(10,20),
5.72727 * std::pow(10,20),
7.12503 * std::pow(10,20),
3.42945 * std::pow(10,20),
4.68065 * std::pow(10,20),
6.45698 * std::pow(10,20),
exact_vol);
}

Expand Down