This repository was archived by the owner on Aug 6, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 5 files changed +14
-4
lines changed
Expand file tree Collapse file tree 5 files changed +14
-4
lines changed Original file line number Diff line number Diff 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
1313project (
1414 LmiSolver
15- VERSION 1.3.3
15+ VERSION 1.3.4
1616 LANGUAGES CXX
1717)
1818
Original file line number Diff line number Diff line change @@ -120,6 +120,12 @@ template <typename Arr036> class ldlt_ext {
120120 */
121121 auto witness () -> double;
122122
123+ auto set_witness_vec (Arr036 &v) const -> void {
124+ for (auto i = 0U ; i != this ->_n ; ++i) {
125+ v[i] = this ->witness_vec [i];
126+ }
127+ }
128+
123129 /* *
124130 * @brief Calculate v'*{A}(p,p)*v
125131 *
Original file line number Diff line number Diff line change @@ -19,7 +19,7 @@ endif(xtensor_ADDED)
1919
2020CPMAddPackage(
2121 NAME EllAlgo
22- GIT_TAG 1.3.4
22+ GIT_TAG 1.3.5
2323 GITHUB_REPOSITORY luk036/ellalgo-cpp
2424 OPTIONS "INSTALL_ONLY YES" # create an installable target
2525)
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ set_target_properties(${PROJECT_NAME}Tests PROPERTIES CXX_STANDARD 17)
2424# enable compiler warnings
2525if (CMAKE_CXX_COMPILER_ID MATCHES "Clang" OR CMAKE_CXX_COMPILER_ID MATCHES "GNU" )
2626 # target_compile_options(${PROJECT_NAME} PUBLIC -Wall -Wpedantic -Wextra -Werror)
27- target_compile_options (${PROJECT_NAME} PUBLIC -Wall -Wextra)
27+ target_compile_options (${PROJECT_NAME} PUBLIC -Wall -Wextra -Wconversion )
2828elseif (MSVC )
2929 target_compile_options (${PROJECT_NAME} PUBLIC /W4 /WX /wd4819 /wd4146 /wd4127)
3030 target_compile_definitions (${PROJECT_NAME} Tests PUBLIC DOCTEST_CONFIG_USE_STD_HEADERS)
Original file line number Diff line number Diff line change @@ -32,6 +32,10 @@ TEST_CASE("Cholesky test 3") {
3232 Q3.factorize (m3);
3333 CHECK (!Q3.is_spd ());
3434 const auto ep3 = Q3.witness ();
35+ Arr v = xt::zeros<double >({m3.shape ()[0 ]});
36+ Q3.set_witness_vec (v);
37+
3538 // CHECK(Q3.p.second == 1);
36- CHECK (ep3 == 0 .);
39+ CHECK_EQ (ep3, 0.0 );
40+ CHECK_EQ (v[0 ], 1.0 );
3741}
You can’t perform that action at this time.
0 commit comments