From 416b28bd3e62fe8adffc5891225c1a0ada945e9f Mon Sep 17 00:00:00 2001 From: Wai-Shing Luk Date: Wed, 15 May 2024 12:57:04 +0800 Subject: [PATCH] remove more_alt --- .github/workflows/documentation.yaml | 6 +++--- .github/workflows/style.bak | 10 ++++++++-- include/ellalgo/oracles/lowpass_oracle.hpp | 1 - source/lowpass_oracle.cpp | 4 ++-- 4 files changed, 13 insertions(+), 8 deletions(-) diff --git a/.github/workflows/documentation.yaml b/.github/workflows/documentation.yaml index 9e90bf5..283f320 100644 --- a/.github/workflows/documentation.yaml +++ b/.github/workflows/documentation.yaml @@ -11,7 +11,7 @@ env: jobs: build: name: Build and publish documentation - runs-on: macos-latest + runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 @@ -22,7 +22,7 @@ jobs: - name: Install dependencies run: | - brew install doxygen + sudo apt-get install doxygen pip3 install jinja2 Pygments - name: Build @@ -34,4 +34,4 @@ jobs: uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./build/doxygen/html + publish_dir: ./build/doxygen/html \ No newline at end of file diff --git a/.github/workflows/style.bak b/.github/workflows/style.bak index 4237559..d8db8dc 100644 --- a/.github/workflows/style.bak +++ b/.github/workflows/style.bak @@ -25,12 +25,18 @@ jobs: path: "**/cpm_modules" key: ${{ github.workflow }}-cpm-modules-${{ hashFiles('**/CMakeLists.txt', '**/*.cmake') }} + - name: Before Install + run: | + sudo apt-get install g++-10 + sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-10 90 + - name: Install format dependencies run: | - pip3 install clang-format==18.1.2 cmake_format==0.6.13 pyyaml + sudo apt-get install clang-format + pip3 install cmake_format==0.6.13 pyyaml - name: configure - run: cmake -S. -Bbuild + run: cmake -Stest -Bbuild - name: check style run: cmake --build build --target check-format diff --git a/include/ellalgo/oracles/lowpass_oracle.hpp b/include/ellalgo/oracles/lowpass_oracle.hpp index 202cc07..4c6aec6 100644 --- a/include/ellalgo/oracles/lowpass_oracle.hpp +++ b/include/ellalgo/oracles/lowpass_oracle.hpp @@ -52,7 +52,6 @@ class LowpassOracle { double _fmax = -1e100; size_t _kmax = 0; - bool more_alt{true}; Mat A; double Lpsq; diff --git a/source/lowpass_oracle.cpp b/source/lowpass_oracle.cpp index 6292282..3b7f259 100644 --- a/source/lowpass_oracle.cpp +++ b/source/lowpass_oracle.cpp @@ -75,7 +75,7 @@ LowpassOracle::LowpassOracle(size_t N, double Lpsq, double Upsq, double wpass, d auto LowpassOracle::assess_feas(const Vec &x, const double &Spsq) -> ParallelCut * { static ParallelCut cut = std::make_pair(Vec{0.0}, Vec{0.0}); - this->more_alt = true; + // this->more_alt = true; auto n = x.size(); auto matrix_vector = [this, &x](size_t k) { @@ -148,7 +148,7 @@ auto LowpassOracle::assess_feas(const Vec &x, const double &Spsq) -> ParallelCut } } - this->more_alt = false; + // this->more_alt = false; // 1.0 nonnegative-real constraint // case 1,