libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
bmat-fastest.hpp
1//
2// libsemigroups - C++ library for semigroups and monoids
3// Copyright (C) 2021-2025 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
19// This file contains the alias BMatFastest, and is separate from matrix.hpp,
20// bmat.hpp, and bmat8.hpp because these headers don't require each other.
21
22#ifndef LIBSEMIGROUPS_BMAT_FASTEST_HPP_
23#define LIBSEMIGROUPS_BMAT_FASTEST_HPP_
24
25#include <cstddef> // for size_t
26#include <type_traits> // for conditional_t
27
28#include "config.hpp" // for LIBSEMIGROUPS_HPCOMBI_ENABLED
29#include "hpcombi.hpp" // for HPCombi::BMat8
30#include "matrix.hpp" // for BMat
31
32namespace libsemigroups {
33 class BMat8; // forward decl
34
35 namespace detail {
36 template <size_t N>
37 struct BMatFastestHelper {
38#ifdef LIBSEMIGROUPS_HPCOMBI_ENABLED
39 using type = std::conditional_t<(N > 8), BMat<N>, HPCombi::BMat8>;
40#else
41 using type = std::conditional_t<(N > 8), BMat<N>, BMat8>;
42#endif
43 };
44 } // namespace detail
45
57 // TODO(later) example
58 template <size_t N>
59 using BMatFastest = typename detail::BMatFastestHelper<N>::type;
60
61} // namespace libsemigroups
62#endif // LIBSEMIGROUPS_BMAT_FASTEST_HPP_
Fast boolean matrices of dimension up to 8 x 8.
Definition bmat8.hpp:74
std::conditional_t< R==0||C==0, DynamicBMat, StaticBMat< R, C > > BMat
Alias template for boolean matrices.
Definition matrix.hpp:3963
typename detail::BMatFastestHelper< N >::type BMatFastest
Type of the fastest type of boolean matrix of given dimension.
Definition bmat-fastest.hpp:59
Namespace for everything in the libsemigroups library.
Definition action.hpp:44