library/algebra/monoid/Concepts.hpp
- View this file on GitHub
- Last update: 2025-11-24 18:49:07+09:00
- Include:
#include "library/algebra/monoid/Concepts.hpp"
Depends on
Required by
library/algebra/group/Concepts.hpp
library/datastructure/CumulativeGroup.hpp
library/datastructure/CumulativeMonoid.hpp
library/datastructure/FenwickTree.hpp
library/datastructure/GroupWaveletMatrix.hpp
library/datastructure/SWAG.hpp
library/math/FactorialNumberSystem.hpp
library/segtree/SegmentTree.hpp
library/tree/TreeMonoid.hpp
Verified with
test/AOJ/DSL_2_B.test.cpp
test/library-checker/DataStructure/PointAddRangeSum.test.cpp
test/library-checker/DataStructure/PointAddRectangleSum.test.cpp
test/library-checker/DataStructure/PointSetRangeComposite.test.cpp
test/library-checker/DataStructure/QueueOperateAllComposite.test.cpp
test/library-checker/DataStructure/RectangleSum.test.cpp
test/library-checker/Tree/vertex_add_path_sum.test.cpp
test/library-checker/Tree/vertex_add_subtree_sum.test.cpp
test/library-checker/Tree/vertex_set_path_composite.test.cpp
test/yukicoder/1036.test.cpp
test/yukicoder/650.test.cpp
test/yukicoder/924.test.cpp
Code
#pragma once
template <class M>
concept monoid = requires(typename M::value_type x) {
{ M::op(x, x) } -> std::same_as<typename M::value_type>;
{ M::Lchop(x, x) };
{ M::Rchop(x, x) };
{ M::unit() } -> std::same_as<typename M::value_type>;
};#line 2 "library/algebra/monoid/Concepts.hpp"
template <class M>
concept monoid = requires(typename M::value_type x) {
{ M::op(x, x) } -> std::same_as<typename M::value_type>;
{ M::Lchop(x, x) };
{ M::Rchop(x, x) };
{ M::unit() } -> std::same_as<typename M::value_type>;
};