Skip to content
This repository was archived by the owner on Aug 6, 2023. It is now read-only.

Commit 293d9a4

Browse files
committed
rename some objects and functions
1 parent e5b38d9 commit 293d9a4

File tree

5 files changed

+24
-24
lines changed

5 files changed

+24
-24
lines changed

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ option(INSTALL_ONLY "Enable for installation only" OFF)
1212
# Note: update this to your new project's name and version
1313
project(
1414
LmiSolver
15-
VERSION 1.3
15+
VERSION 1.3.1
1616
LANGUAGES CXX
1717
)
1818

bench/BM_lmi.cpp

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
#include <ellalgo/cutting_plane.hpp> // for cutting_plane_dc
2-
#include <ellalgo/ell.hpp> // for ell
1+
#include <ellalgo/cutting_plane.hpp> // for cutting_plane_optim
2+
#include <ellalgo/ell.hpp> // for Ell
33
#include <gsl/span> // for span
44
#include <lmisolver/lmi_old_oracle.hpp> // for lmi_old_oracle
55
#include <lmisolver/lmi_oracle.hpp> // for lmi_oracle
@@ -88,9 +88,9 @@ static void LMI_Lazy(benchmark::State &state) {
8888

8989
while (state.KeepRunning()) {
9090
auto P = my_oracle<lmi_oracle<Arr>>(F1, B1, F2, B2, Arr{1.0, -1.0, 1.0});
91-
auto E = ell(10.0, Arr{0.0, 0.0, 0.0});
91+
auto E = Ell(10.0, Arr{0.0, 0.0, 0.0});
9292
auto t = 1e100; // std::numeric_limits<double>::max()
93-
[[maybe_unused]] const auto rslt = cutting_plane_dc(P, E, t);
93+
[[maybe_unused]] const auto rslt = cutting_plane_optim(P, E, t);
9494
}
9595
}
9696

@@ -121,9 +121,9 @@ static void LMI_old(benchmark::State &state) {
121121
while (state.KeepRunning()) {
122122
auto P =
123123
my_oracle<lmi_old_oracle<Arr>>(F1, B1, F2, B2, Arr{1.0, -1.0, 1.0});
124-
auto E = ell(10.0, Arr{0.0, 0.0, 0.0});
124+
auto E = Ell(10.0, Arr{0.0, 0.0, 0.0});
125125
auto t = 1e100; // std::numeric_limits<double>::max()
126-
[[maybe_unused]] const auto rslt = cutting_plane_dc(P, E, t);
126+
[[maybe_unused]] const auto rslt = cutting_plane_optim(P, E, t);
127127
}
128128
}
129129
BENCHMARK(LMI_old);
@@ -149,10 +149,10 @@ static void LMI_No_Trick(benchmark::State &state) {
149149

150150
while (state.KeepRunning()) {
151151
auto P = my_oracle<lmi_oracle<Arr>>(F1, B1, F2, B2, Arr{1.0, -1.0, 1.0});
152-
auto E = ell(10.0, Arr{0.0, 0.0, 0.0});
152+
auto E = Ell(10.0, Arr{0.0, 0.0, 0.0});
153153
E.no_defer_trick = true;
154154
auto t = 1e100; // std::numeric_limits<double>::max()
155-
[[maybe_unused]] const auto rslt = cutting_plane_dc(P, E, t);
155+
[[maybe_unused]] const auto rslt = cutting_plane_optim(P, E, t);
156156
}
157157
}
158158

specific.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ endif(xtensor_ADDED)
1919

2020
CPMAddPackage(
2121
NAME EllAlgo
22-
GIT_TAG 1.3
22+
GIT_TAG 1.3.1
2323
GITHUB_REPOSITORY luk036/ellalgo-cpp
2424
OPTIONS "INSTALL_ONLY YES" # create an installable target
2525
)

test/source/test_lmi.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
*/
44
#include <doctest/doctest.h> // for ResultBuilder, CHECK, TestCase
55

6-
#include <ellalgo/cutting_plane.hpp> // for cutting_plane_dc
7-
#include <ellalgo/ell.hpp> // for ell
8-
#include <ellalgo/ell_stable.hpp> // for ell_stable
6+
#include <ellalgo/cutting_plane.hpp> // for cutting_plane_optim
7+
#include <ellalgo/ell.hpp> // for Ell
8+
#include <ellalgo/ell_stable.hpp> // for EllStable
99
#include <lmisolver/lmi_oracle.hpp> // for lmi_oracle
1010
#include <xtensor/xarray.hpp> // for xarray_container
1111
#include <xtensor/xlayout.hpp> // for layout_type, layout_type::row...
@@ -92,10 +92,10 @@ TEST_CASE("LMI test (stable)") {
9292
auto B2 = Arr{{14.0, 9.0, 40.0}, {9.0, 91.0, 10.0}, {40.0, 10.0, 15.0}};
9393

9494
auto P = my_oracle(F1, B1, F2, B2, std::move(c));
95-
auto E = ell(10.0, Arr{0.0, 0.0, 0.0});
95+
auto E = Ell(10.0, Arr{0.0, 0.0, 0.0});
9696

9797
auto t = 1e100; // std::numeric_limits<double>::max()
98-
const auto [x, ell_info] = cutting_plane_dc(P, E, t);
98+
const auto [x, ell_info] = cutting_plane_optim(P, E, t);
9999
// fmt::print("{:f} {} {} \n", t, ell_info.num_iters, ell_info.feasible);
100100
// std::cout << "LMI xbest: " << xb << "\n";
101101
// std::cout << "LMI result: " << fb << ", " << niter << ", " << feasible <<
@@ -128,10 +128,10 @@ TEST_CASE("LMI test ") {
128128
auto B2 = Arr{{14.0, 9.0, 40.0}, {9.0, 91.0, 10.0}, {40.0, 10.0, 15.0}};
129129

130130
auto P = my_oracle(F1, B1, F2, B2, std::move(c));
131-
auto E = ell_stable(10.0, Arr{0.0, 0.0, 0.0});
131+
auto E = EllStable(10.0, Arr{0.0, 0.0, 0.0});
132132

133133
auto t = 1e100; // std::numeric_limits<double>::max()
134-
const auto [x, ell_info] = cutting_plane_dc(P, E, t);
134+
const auto [x, ell_info] = cutting_plane_optim(P, E, t);
135135

136136
CHECK(ell_info.feasible);
137137
CHECK(ell_info.num_iters == 111);

test/source/test_lmi_old.cpp

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
*/
44
#include <doctest/doctest.h> // for ResultBuilder, CHECK, TestCase
55

6-
#include <ellalgo/cutting_plane.hpp> // for cutting_plane_dc
7-
#include <ellalgo/ell.hpp> // for ell
8-
#include <ellalgo/ell_stable.hpp> // for ell_stable
6+
#include <ellalgo/cutting_plane.hpp> // for cutting_plane_optim
7+
#include <ellalgo/ell.hpp> // for Ell
8+
#include <ellalgo/ell_stable.hpp> // for EllStable
99
#include <gsl/span> // for span
1010
#include <lmisolver/lmi_old_oracle.hpp> // for lmi_old_oracle
1111
#include <optional> // for optional
@@ -91,9 +91,9 @@ TEST_CASE("LMI (old) test") {
9191
auto B2 = Arr{{14.0, 9.0, 40.0}, {9.0, 91.0, 10.0}, {40.0, 10.0, 15.0}};
9292
auto c = Arr{1.0, -1.0, 1.0};
9393
auto P = my_old_oracle(F1, std::move(B1), F2, std::move(B2), std::move(c));
94-
auto E = ell(10.0, Arr{0.0, 0.0, 0.0});
94+
auto E = Ell(10.0, Arr{0.0, 0.0, 0.0});
9595
auto t = 1e100; // std::numeric_limits<double>::max()
96-
const auto [x, ell_info] = cutting_plane_dc(P, E, t);
96+
const auto [x, ell_info] = cutting_plane_optim(P, E, t);
9797

9898
CHECK(x[0] < -0.3);
9999
CHECK(ell_info.feasible);
@@ -116,9 +116,9 @@ TEST_CASE("LMI (old) test (stable)") {
116116
auto B2 = Arr{{14.0, 9.0, 40.0}, {9.0, 91.0, 10.0}, {40.0, 10.0, 15.0}};
117117
auto c = Arr{1.0, -1.0, 1.0};
118118
auto P = my_old_oracle(F1, std::move(B1), F2, std::move(B2), std::move(c));
119-
auto E = ell_stable(10.0, Arr{0.0, 0.0, 0.0});
119+
auto E = EllStable(10.0, Arr{0.0, 0.0, 0.0});
120120
auto t = 1e100; // std::numeric_limits<double>::max()
121-
const auto [x, ell_info] = cutting_plane_dc(P, E, t);
121+
const auto [x, ell_info] = cutting_plane_optim(P, E, t);
122122

123123
CHECK(ell_info.feasible);
124124
CHECK(ell_info.num_iters == 111);

0 commit comments

Comments
 (0)