libsemigroups  v3.6.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
is-matrix.hpp
1//
2// libsemigroups - C++ library for semigroups and monoids
3// Copyright (C) 2026 James D. Mitchell
4//
5// This program is free software: you can redistribute it and/or modify
6// it under the terms of the GNU General Public License as published by
7// the Free Software Foundation, either version 3 of the License, or
8// (at your option) any later version.
9//
10// This program is distributed in the hope that it will be useful,
11// but WITHOUT ANY WARRANTY; without even the implied warranty of
12// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13// GNU General Public License for more details.
14//
15// You should have received a copy of the GNU General Public License
16// along with this program. If not, see <http://www.gnu.org/licenses/>.
17
18#ifndef LIBSEMIGROUPS_IS_MATRIX_HPP_
19#define LIBSEMIGROUPS_IS_MATRIX_HPP_
20
21#include <type_traits>
22
23namespace libsemigroups {
24 namespace detail {
25
26 struct MatrixPolymorphicBase {};
27
28 template <typename T>
29 struct IsMatrixHelper {
30 static constexpr bool value
31 = std::is_base_of<detail::MatrixPolymorphicBase, T>::value;
32 };
33
34 template <typename T>
35 struct IsStaticMatrixHelper : std::false_type {};
36
37 template <typename T>
38 struct IsMatWithSemiringHelper : std::false_type {};
39
40 template <typename S, typename T = void>
41 struct IsTruncMatHelper : std::false_type {};
42
43 template <typename T>
44 static constexpr bool IsTruncMat = IsTruncMatHelper<T>::value;
45
46 template <typename T>
47 struct IsIntMatHelper : std::false_type {};
48
49 template <typename T>
50 struct IsBMatHelper : std::false_type {};
51
52 template <typename T>
53 struct IsMaxPlusMatHelper : std::false_type {};
54
55 template <typename T>
56 struct IsMinPlusMatHelper : std::false_type {};
57
58 template <typename T>
59 struct IsMaxPlusTruncMatHelper : std::false_type {};
60
61 template <typename T>
62 struct IsMinPlusTruncMatHelper : std::false_type {};
63
64 template <typename T>
65 struct IsNTPMatHelper : std::false_type {};
66
67 template <typename T>
68 struct IsProjMaxPlusMatHelper : std::false_type {};
69
70 } // namespace detail
71
86 template <typename T>
87 constexpr bool IsMatrix = detail::IsMatrixHelper<T>::value;
88
99 template <typename T>
100 constexpr bool IsStaticMatrix = detail::IsStaticMatrixHelper<T>::value;
101
112 template <typename T>
114
125 template <typename T>
126 static constexpr bool IsMatWithSemiring
127 = detail::IsMatWithSemiringHelper<T>::value;
128
139 template <typename T>
140 static constexpr bool IsIntMat = detail::IsIntMatHelper<T>::value;
141
152 template <typename T>
153 static constexpr bool IsBMat = detail::IsBMatHelper<T>::value;
154
165 template <typename T>
166 static constexpr bool IsMaxPlusMat = detail::IsMaxPlusMatHelper<T>::value;
167
178 template <typename T>
179 static constexpr bool IsMinPlusMat = detail::IsMinPlusMatHelper<T>::value;
180
192 template <typename T>
193 static constexpr bool IsMaxPlusTruncMat
194 = detail::IsMaxPlusTruncMatHelper<T>::value;
195
207 template <typename T>
208 static constexpr bool IsMinPlusTruncMat
209 = detail::IsMinPlusTruncMatHelper<T>::value;
210
222 template <typename U>
223 static constexpr bool IsNTPMat = detail::IsNTPMatHelper<U>::value;
224
236 template <typename T>
237 static constexpr bool IsProjMaxPlusMat
238 = detail::IsProjMaxPlusMatHelper<T>::value;
239} // namespace libsemigroups
240#endif // LIBSEMIGROUPS_IS_MATRIX_HPP_
static constexpr bool IsBMat
Helper to check if a type is BMat.
Definition is-matrix.hpp:153
static constexpr bool IsMaxPlusMat
Helper variable template.
Definition is-matrix.hpp:166
constexpr bool IsStaticMatrix
Helper variable template.
Definition is-matrix.hpp:100
constexpr bool IsDynamicMatrix
Helper variable template.
Definition is-matrix.hpp:113
static constexpr bool IsIntMat
Helper variable template.
Definition is-matrix.hpp:140
static constexpr bool IsMatWithSemiring
Helper variable template.
Definition is-matrix.hpp:127
static constexpr bool IsMinPlusMat
Helper variable template.
Definition is-matrix.hpp:179
constexpr bool IsMatrix
Helper variable template.
Definition is-matrix.hpp:87
static constexpr bool IsMaxPlusTruncMat
Helper to check if a type is MaxPlusTruncMat.
Definition is-matrix.hpp:194
static constexpr bool IsMinPlusTruncMat
Helper to check if a type is MinPlusTruncMat.
Definition is-matrix.hpp:209
static constexpr bool IsNTPMat
Helper to check if a type is NTPMat.
Definition is-matrix.hpp:223
static constexpr bool IsProjMaxPlusMat
Helper to check if a type is ProjMaxPlusMat.
Definition is-matrix.hpp:238
Namespace for everything in the libsemigroups library.
Definition action.hpp:44