From 60498b8e546295424ce317c8aaea11481589395f Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:21:48 +0900 Subject: [PATCH 01/24] Add IsGreater like std::greater to index comparer. --- include/mvPolynomial/index_comparer.hpp | 47 ++++++++++++------------- 1 file changed, 23 insertions(+), 24 deletions(-) diff --git a/include/mvPolynomial/index_comparer.hpp b/include/mvPolynomial/index_comparer.hpp index cde5ad0..39957a8 100644 --- a/include/mvPolynomial/index_comparer.hpp +++ b/include/mvPolynomial/index_comparer.hpp @@ -5,6 +5,7 @@ #include #include +#include namespace mvPolynomial { /** @@ -12,51 +13,49 @@ namespace mvPolynomial { * \tparam IntType the type of elements of indices. * \tparam D the dimension of indices. */ -template -class IndexComparer { +template +class IndexComparer final { public: static_assert(D > 0, "IndexComparer: the dimension must be positive."); - using Index = IndexType; + using Int = Int_; + using Index = IndexType; + + static constexpr int dim = D; /** - * \brief If the elems of lhd are equal to that of rhd until i th time and lhd[i] is greater than - * rhd[i], return true: otherwise, false. + * \brief If lhd[i] == rhd[i] for i = 0, ..., N - 1 and lhd[N] > rhd[N], + * return greater: if lhd[N] < rhd[N], return less: otherwise, return equal. * \param[in] lhd an index * \param[in] rhd an index */ - constexpr bool operator()(const Index& lhd, const Index& rhd) const noexcept { + static constexpr std::strong_ordering Compare(const Index& lhd, const Index& rhd) { for (std::size_t i = 0; i != lhd.size(); ++i) { auto comp = lhd[i] <=> rhd[i]; if (comp > 0) { - return true; + return std::strong_ordering::greater; } else if (comp < 0) { - return false; + return std::strong_ordering::less; } } - return false; + return std::strong_ordering::equal; } - constexpr std::strong_ordering get_ordering(const Index& lhd, const Index& rhd) const noexcept { + /** + * \brief If lhd[i] == rhd[i] for i = 0, ..., N - 1 and lhd[N] > rhd[N], + * return true: otherwise, false. + * \param[in] lhd an index + * \param[in] rhd an index + */ + static constexpr bool IsGreater(const Index& lhd, const Index& rhd) { for (std::size_t i = 0; i != lhd.size(); ++i) { - auto comp = lhd[i] <=> rhd[i]; - if (comp > 0) { - return std::strong_ordering::greater; - } else if (comp < 0) { - return std::strong_ordering::less; + if (lhd[i] > rhd[i]) { + return true; } } - return std::strong_ordering::equal; + return false; } }; - -template -class IndexComparer { - public: - using Index = IntType; - - constexpr bool operator()(Index lhd, Index rhd) const noexcept { return lhd > rhd; } -}; } // namespace mvPolynomial #endif From 0a586f053e50b0d53d8baeb4a0ade84088f285a7 Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:25:41 +0900 Subject: [PATCH 02/24] move 6 special member funcs and CheckAxis outside. --- include/mvPolynomial/mvPolynomial.hpp | 32 ++++++++++++++------------- 1 file changed, 17 insertions(+), 15 deletions(-) diff --git a/include/mvPolynomial/mvPolynomial.hpp b/include/mvPolynomial/mvPolynomial.hpp index 816e95c..9458fc4 100644 --- a/include/mvPolynomial/mvPolynomial.hpp +++ b/include/mvPolynomial/mvPolynomial.hpp @@ -19,6 +19,16 @@ #include "fmt/core.h" namespace mvPolynomial { +namespace { +void CheckAxis(int dim, int axis) { + if (axis < 0 || axis >= dim) { + throw std::runtime_error( + fmt::format("CheckAxis: Given axis {} must be in [0, {}).", axis, dim) + ); + } +} +} // namespace + template < std::signed_integral IntType, std::floating_point R, @@ -67,6 +77,13 @@ class MVPolynomial { using reverse_iterator = IndexContainer::reverse_iterator; using const_reverse_iterator = IndexContainer::const_reverse_iterator; + MVPolynomial() = default; + MVPolynomial(const MVPolynomial& other) = default; + MVPolynomial& operator=(const MVPolynomial& other) = default; + MVPolynomial(MVPolynomial&& other) = default; + MVPolynomial& operator=(MVPolynomial&& other) = default; + ~MVPolynomial() = default; + explicit MVPolynomial(const allocator_type& allocator) : index2value_(allocator) { CheckSelfIndexes(); } @@ -210,21 +227,6 @@ class MVPolynomial { explicit MVPolynomial(mapped_type r) { index2value_.at(index_type::Zero()) = r; } - MVPolynomial() = default; - MVPolynomial(const MVPolynomial& other) = default; - MVPolynomial& operator=(const MVPolynomial& other) = default; - MVPolynomial(MVPolynomial&& other) = default; - MVPolynomial& operator=(MVPolynomial&& other) = default; - virtual ~MVPolynomial() = default; - - static void CheckAxis(std::size_t axis) { - if (axis < 0 || axis >= dim) { - throw std::runtime_error( - fmt::format("CheckAxis: Given axis {} must be in [0, {}).", axis, dim) - ); - } - } - allocator_type get_allocator() const noexcept { return index2value_.get_allocator(); } auto get_stored_allocator() noexcept { return index2value_.get_stored_allocator(); } From 87fdd7de2188d0690207556413432e490efc39cc Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:30:30 +0900 Subject: [PATCH 03/24] Fix compare tmpl param to index_comparer and rm boost. --- include/mvPolynomial/mvPolynomial.hpp | 158 +++----------------------- 1 file changed, 18 insertions(+), 140 deletions(-) diff --git a/include/mvPolynomial/mvPolynomial.hpp b/include/mvPolynomial/mvPolynomial.hpp index 9458fc4..ac8ec71 100644 --- a/include/mvPolynomial/mvPolynomial.hpp +++ b/include/mvPolynomial/mvPolynomial.hpp @@ -11,8 +11,6 @@ #include #include -#include "boost/container/flat_map.hpp" -#include "boost/container/new_allocator.hpp" #include "boost/tuple/tuple.hpp" #include "boost/iterator/zip_iterator.hpp" #include "Eigen/Core" @@ -33,35 +31,33 @@ template < std::signed_integral IntType, std::floating_point R, int D, - class Comparer = IndexComparer, - class AllocatorOrContainer = - boost::container::new_allocator, R>>> -class MVPolynomial { + class Allocator = std::allocator, R>>> +class MVPolynomial final { public: static_assert(D > 0, "MVPolynomial: the dimension must be greater than 0."); static constexpr int dim = D; - using index_type = typename AllocatorOrContainer::value_type::first_type; + // This setting is too strict, so I expect users to set tolerance. + static R tolerance = std::numeric_limits::min_exponent10(); + + using index_type = IndexType; using coord_type = CoordType; private: - using IndexContainer = boost::container::flat_map; + using Compare = IndexComparer; + using IndexContainer = platanus::btree_map; public: - using key_type = IndexContainer::key_type; - using mapped_type = IndexContainer::mapped_type; - using value_type = IndexContainer::value_type; - using movable_value_type = IndexContainer::movable_value_type; + using key_type = IndexContainer::key_type; + using value_type = IndexContainer::value_type; + using mapped_type = IndexContainer::mapped_type; + using coeff_type = mapped_type; using key_compare = IndexContainer::key_compare; using value_compare = IndexContainer::value_compare; - using sequence_type = IndexContainer::sequence_type; - - using allocator_type = IndexContainer::allocator_type; - using allocator_traits_type = IndexContainer::allocator_traits_type; - using stored_allocator_type = IndexContainer::stored_allocator_type; + using allocator_type = IndexContainer::allocator_type; using pointer = IndexContainer::pointer; using const_pointer = IndexContainer::const_pointer; @@ -88,13 +84,6 @@ class MVPolynomial { CheckSelfIndexes(); } - explicit MVPolynomial(const Comparer& comparer) : index2value_(comparer) { CheckSelfIndexes(); } - - explicit MVPolynomial(const Comparer& comparer, const allocator_type& allocator) - : index2value_(comparer, allocator) { - CheckSelfIndexes(); - } - template MVPolynomial(InputIterator s, InputIterator e) : index2value_(s, e) { CheckSelfIndexes(); @@ -106,109 +95,11 @@ class MVPolynomial { CheckSelfIndexes(); } - template - explicit MVPolynomial(InputIterator s, InputIterator e, const Comparer& c) - : index2value_(s, e, c) { - CheckSelfIndexes(); - } - - template - explicit MVPolynomial( - InputIterator s, InputIterator e, const Comparer& c, const allocator_type& a - ) - : index2value_(s, e, c, a) { - CheckSelfIndexes(); - } - - template - explicit MVPolynomial( - boost::container::ordered_unique_range_t o, InputIterator s, InputIterator e - ) - : index2value_(o, s, e) { - CheckSelfIndexes(); - } - - template - explicit MVPolynomial( - boost::container::ordered_unique_range_t o, - InputIterator s, - InputIterator e, - const Comparer& c - ) - : index2value_(o, s, e, c) { - CheckSelfIndexes(); - } - - template - explicit MVPolynomial( - boost::container::ordered_unique_range_t o, - InputIterator s, - InputIterator e, - const Comparer& c, - const allocator_type& a - ) - : index2value_(o, s, e, c, a) { - CheckSelfIndexes(); - } - - template - explicit MVPolynomial( - boost::container::ordered_unique_range_t o, - InputIterator s, - InputIterator e, - const allocator_type& a - ) - : index2value_(o, s, e, a) { - CheckSelfIndexes(); - } - - explicit MVPolynomial(std::initializer_list l) : index2value_(l) { - CheckSelfIndexes(); - } - - explicit MVPolynomial(std::initializer_list l, const allocator_type& a) + MVPolynomial(std::initializer_list l, const allocator_type& a = allocator_type{}) : index2value_(l, a) { CheckSelfIndexes(); } - explicit MVPolynomial(std::initializer_list l, const Comparer& c) - : index2value_(l, c) { - CheckSelfIndexes(); - } - - explicit MVPolynomial( - std::initializer_list l, const Comparer& c, const allocator_type& a - ) - : index2value_(l, c, a) { - CheckSelfIndexes(); - } - - explicit MVPolynomial( - boost::container::ordered_unique_range_t o, std::initializer_list l - ) - : index2value_(o, l) { - CheckSelfIndexes(); - } - - explicit MVPolynomial( - boost::container::ordered_unique_range_t o, - std::initializer_list l, - const Comparer& c - ) - : index2value_(o, l, c) { - CheckSelfIndexes(); - } - - explicit MVPolynomial( - boost::container::ordered_unique_range_t o, - std::initializer_list l, - const Comparer& c, - const allocator_type& a - ) - : index2value_(o, l, c, a) { - CheckSelfIndexes(); - } - explicit MVPolynomial(const MVPolynomial& m, const allocator_type& a) : index2value_(m.index2value_, a) { CheckSelfIndexes(); @@ -621,24 +512,11 @@ class MVPolynomial { friend void swap(MVPolynomial& l, MVPolynomial& r) { swap(l.index2value_, r.index2value_); } private: - void CheckIndex(const key_type& index) const { - if ((index < index_type::Zero()).any()) { - auto err_msg_stream = std::stringstream(); - for (auto i = 0; i != index.size() - 1; ++i) { - err_msg_stream << i << ", "; - } - err_msg_stream << index[index.size() - 1]; - - throw std::runtime_error( - fmt::format("Each element of the index ({}) must be non-negative.", err_msg_stream.str()) - ); - } - } - void CheckSelfIndexes() const { - for (const auto& index_and_value : index2value_) { - const auto& [index, value] = index_and_value; - CheckIndex(index); + // The last index is the lowest index of all index, + // so I only have to check if each of its elements is non-negative. + if ((index2value_.back().first < 0).any()) { + throw std::invalid_argument(fmt::format("Negative index not supported!")); } } From 958e3b47f19d0a9c2fd915a4e28a07c440ce0108 Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Mon, 13 Oct 2025 15:33:57 +0900 Subject: [PATCH 04/24] Remove unnecessary check and fix a bug. --- include/mvPolynomial/mvPolynomial.hpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/include/mvPolynomial/mvPolynomial.hpp b/include/mvPolynomial/mvPolynomial.hpp index ac8ec71..fa334e5 100644 --- a/include/mvPolynomial/mvPolynomial.hpp +++ b/include/mvPolynomial/mvPolynomial.hpp @@ -101,17 +101,13 @@ class MVPolynomial final { } explicit MVPolynomial(const MVPolynomial& m, const allocator_type& a) - : index2value_(m.index2value_, a) { - CheckSelfIndexes(); - } + : index2value_(m.index2value_, a) {} explicit MVPolynomial(MVPolynomial&& m, const allocator_type& a) - : index2value_(std::move(m.index2value_), a) { - CheckSelfIndexes(); - } + : index2value_(std::move(m.index2value_), a) {} MVPolynomial& operator=(std::initializer_list l) { - index2value_ = l; + index2value_.insert(l.begin(), l.end()); CheckSelfIndexes(); return *this; } @@ -120,9 +116,6 @@ class MVPolynomial final { allocator_type get_allocator() const noexcept { return index2value_.get_allocator(); } - auto get_stored_allocator() noexcept { return index2value_.get_stored_allocator(); } - auto get_stored_allocator() const noexcept { return index2value_.get_stored_allocator(); } - iterator begin() noexcept { return index2value_.begin(); } const_iterator begin() const noexcept { return index2value_.begin(); } From 7241aed3021af75b9c3b7d1d393a9deabb083cb3 Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Tue, 14 Oct 2025 07:56:57 +0900 Subject: [PATCH 05/24] Remove unsuitable member funcs. --- include/mvPolynomial/mvPolynomial.hpp | 174 -------------------------- platanus | 2 +- 2 files changed, 1 insertion(+), 175 deletions(-) diff --git a/include/mvPolynomial/mvPolynomial.hpp b/include/mvPolynomial/mvPolynomial.hpp index fa334e5..64e8930 100644 --- a/include/mvPolynomial/mvPolynomial.hpp +++ b/include/mvPolynomial/mvPolynomial.hpp @@ -142,10 +142,6 @@ class MVPolynomial final { size_type capacity() const noexcept { return index2value_.capacity(); } - void reserve(size_type size) { return index2value_.reserve(size); } - - void shrink_to_fit() { return index2value_.shrink_to_fit(); } - mapped_type& operator[](const key_type& index) { return index2value_[index]; } mapped_type& operator[](key_type&& index) { return index2value_[index]; } @@ -156,142 +152,11 @@ class MVPolynomial final { return const_cast(this)->operator[](index); } - template - std::pair insert_or_assign(const key_type& i, M&& m) { - CheckIndex(i); - return index2value_.insert_or_assign(i, std::move(m)); - } - - template - std::pair insert_or_assign(key_type&& i, M&& m) { - CheckIndex(i); - return index2value_.insert_or_assign(std::move(i), std::move(m)); - } - - template - iterator insert_or_assign(const_iterator ci, const key_type& i, M&& m) { - CheckIndex(i); - return index2value_.insert_or_assign(ci, i, std::move(m)); - } - - template - iterator insert_or_assign(const_iterator ci, key_type&& i, M&& m) { - CheckIndex(i); - return index2value_.insert_or_assign(ci, std::move(i), std::move(m)); - } - - iterator nth(size_type size) noexcept { return index2value_.nth(size); } - const_iterator nth(size_type size) const noexcept { return index2value_.nth(size); } - - size_type index_of(iterator i) noexcept { return index2value_.index_of(i); } - size_type index_of(const_iterator ci) const noexcept { return index2value_.index_of(ci); } - mapped_type& at(const key_type& i) { return index2value_.at(i); } const mapped_type& at(const key_type& i) const { return index2value_.at(i); } - template - std::pair emplace(Args&&... args) { - return CheckIndexOfPairOfIterAndIsInserted(index2value_.emplace(std::move(args...))); - } - - template - iterator emplace_hint(const_iterator ci, Args&&... args) { - auto iter = index2value_.emplace_hint(ci, std::move(args)...); - CheckIndex(iter->first); - return iter; - } - - template - std::pair try_emplace(const key_type& i, Args&&... args) { - return CheckIndexOfPairOfIterAndIsInserted(index2value_.try_emplace(i, std::move(args...))); - } - - template - iterator try_emplace(const_iterator ci, const key_type& i, Args&&... args) { - auto iter = index2value_.try_emplace(ci, i, std::move(args...)); - CheckIndex(iter->first); - return iter; - } - - template - std::pair try_emplace(key_type&& i, Args&&... args) { - return CheckIndexOfPairOfIterAndIsInserted( - index2value_.try_emplace(std::move(i), std::move(args...)) - ); - } - - template - iterator try_emplace(const_iterator ci, key_type&& i, Args&&... args) { - auto iter = index2value_.try_emplace(ci, std::move(i), std::move(args...)); - CheckIndex(iter->first); - return iter; - } - - std::pair insert(const value_type& i_and_v) { - return CheckIndexOfPairOfIterAndIsInserted(index2value_.insert(i_and_v)); - } - - std::pair insert(value_type&& i_and_v) { - return CheckIndexOfPairOfIterAndIsInserted(index2value_.insert(std::move(i_and_v))); - } - - template - std::pair insert(Pair&& p) { - return CheckIndexOfPairOfIterAndIsInserted(index2value_.insert(std::move(p))); - } - - iterator insert(const_iterator ci, const value_type& i_and_v) { - auto iter = index2value_.insert(ci, i_and_v); - CheckIndex(iter->first); - return iter; - } - - iterator insert(const_iterator ci, value_type&& i_and_v) { - auto iter = index2value_.insert(ci, std::move(i_and_v)); - CheckIndex(iter->first); - return iter; - } - - template - iterator insert(const_iterator ci, Pair&& p) { - auto iter = index2value_.insert(ci, std::move(p)); - CheckIndex(iter->first); - return iter; - } - - template - void insert(InputIterator s, InputIterator e) { - index2value_.insert(s, e); - CheckSelfIndexes(); - } - - template - void insert(boost::container::ordered_unique_range_t o, InputIterator s, InputIterator e) { - index2value_.insert(o, s, e); - CheckSelfIndexes(); - } - - void insert(std::initializer_list l) { - index2value_.insert(l); - CheckSelfIndexes(); - } - - void insert(boost::container::ordered_unique_range_t o, std::initializer_list l) { - index2value_.insert(o, l); - CheckSelfIndexes(); - } - - iterator erase(const_iterator ci) { return index2value_.erase(ci); } - size_type erase(const value_type& i_and_v) { return index2value_.erase(i_and_v); } - iterator erase(const_iterator s, const_iterator e) { return index2value_.erase(s, e); } - void swap(MVPolynomial& m) { index2value_.swap(m.index2value_); } - void clear() noexcept { index2value_.clear(); } - - key_compare key_comp() const { return index2value_.key_comp(); } - value_compare value_comp() const { return index2value_.value_comp(); } - iterator find(const key_type& i) { return index2value_.find(i); } const_iterator find(const key_type& i) const { return index2value_.find(i); } template @@ -303,12 +168,6 @@ class MVPolynomial final { return index2value_.find(i); } - size_type count(const key_type& i) const { return index2value_.count(i); } - template - size_type count(const K& i) const { - return index2value_.count(i); - } - bool contains(const key_type& i) const { return index2value_.contains(i); } template bool contains(const K& i) const { @@ -337,39 +196,6 @@ class MVPolynomial final { return index2value_.upper_bound(i); } - std::pair equal_range(const key_type& i) { - return index2value_.equal_range(i); - } - - std::pair equal_range(const key_type& i) const { - return index2value_.equal_range(i); - } - - template - std::pair equal_range(const K& i) { - return index2value_.equal_range(i); - } - - template - std::pair equal_range(const K& i) const { - return index2value_.equal_range(i); - } - - sequence_type extract_sequence() { return index2value_.extract_sequence(); } - - void adopt_sequence(sequence_type&& seq) { index2value_.adopt_sequence(std::move(seq)); } - void adopt_sequence(boost::container::ordered_unique_range_t o, sequence_type&& seq) { - index2value_.adopt_sequence(o, std::move(seq)); - } - - const sequence_type& sequence() const noexcept { return index2value_.sequence(); } - - reference front() { return *(index2value_.begin()); } - const_reference front() const { return *(index2value_.cbegin()); } - - reference back() { return *(index2value_.rbegin()); } - const_reference back() const { return *(index2value_.crbegin()); } - MVPolynomial operator+() const { return *this; } MVPolynomial operator-() const { diff --git a/platanus b/platanus index a939249..0fdc852 160000 --- a/platanus +++ b/platanus @@ -1 +1 @@ -Subproject commit a9392495db854a17d0acdc1130504b209021352c +Subproject commit 0fdc852a8d7778c72515396d5dda7cd139644328 From b528edb164aa3a5a2be15f695201e20d33d5dc55 Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Tue, 14 Oct 2025 08:22:25 +0900 Subject: [PATCH 06/24] Add `degree` member func. --- include/mvPolynomial/mvPolynomial.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/mvPolynomial/mvPolynomial.hpp b/include/mvPolynomial/mvPolynomial.hpp index 64e8930..c4b0396 100644 --- a/include/mvPolynomial/mvPolynomial.hpp +++ b/include/mvPolynomial/mvPolynomial.hpp @@ -196,6 +196,11 @@ class MVPolynomial final { return index2value_.upper_bound(i); } + index_type degree() const noexcept { + assert(size() != 0); + return *(cbegin()).first; + } + MVPolynomial operator+() const { return *this; } MVPolynomial operator-() const { From f8efcdb38313142d0e4bee5246f11c165b6e0fda Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Tue, 14 Oct 2025 08:22:48 +0900 Subject: [PATCH 07/24] Consider tolerance when comparing mvPolynomials. --- include/mvPolynomial/mvPolynomial.hpp | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/include/mvPolynomial/mvPolynomial.hpp b/include/mvPolynomial/mvPolynomial.hpp index c4b0396..9a82f18 100644 --- a/include/mvPolynomial/mvPolynomial.hpp +++ b/include/mvPolynomial/mvPolynomial.hpp @@ -221,12 +221,27 @@ class MVPolynomial final { } // friend functions - // TODO consider tolerance. friend bool operator==(const MVPolynomial& l, const MVPolynomial& r) { - return l.index2value_ == r.index2value_; + if (l.size() != r.size()) { + return false; + } + auto l_it = l.cbegin(); + auto r_it = r.cbegin(); + for (std::size_t i = 0; i != l.size(); ++i) { + const auto& [l_idx, l_coeff] = *l_it; + const auto& [r_idx, r_coeff] = *r_it; + if ((l_idx != r_idx).any()) { + return false; + } + if (std::abs(l_coeff - r_coeff) >= tolerance) { + return false; + } + ++l_it; + ++r_it; + } + return true; } - // TODO consider tolerance. friend bool operator!=(const MVPolynomial& l, const MVPolynomial& r) { return !(l == r); } friend MVPolynomial operator+(const MVPolynomial& l, const MVPolynomial& r) { From a59aafd6099aeb399baff6aeeee788020c3986d6 Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Tue, 14 Oct 2025 08:24:08 +0900 Subject: [PATCH 08/24] Add prefix to a CMake variable. --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 0b61a1a..78228f7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -36,7 +36,7 @@ target_link_libraries( mvPolynomial_compiler_flags ) -if (BUILD_TESTS) +if (MVPOLYNOMIAL_BUILD_TESTS) include(CTest) add_subdirectory(test) endif() From a134e71ac7b8563c7c0dc37bc2ac9d5d871ed02b Mon Sep 17 00:00:00 2001 From: Yuya Asano <64895419+sukeya@users.noreply.github.com> Date: Tue, 14 Oct 2025 09:23:32 +0900 Subject: [PATCH 09/24] Remove `ExactOf`. --- include/mvPolynomial/mvPolynomial.hpp | 347 -------------------------- test/mvPolynomial_test.cpp | 63 ----- 2 files changed, 410 deletions(-) diff --git a/include/mvPolynomial/mvPolynomial.hpp b/include/mvPolynomial/mvPolynomial.hpp index 9a82f18..4aba593 100644 --- a/include/mvPolynomial/mvPolynomial.hpp +++ b/include/mvPolynomial/mvPolynomial.hpp @@ -583,353 +583,6 @@ auto Of( return OfImpl(p.cbegin(), p.cend(), MP::dim, 0, x); } -template