BMat8 helpers¶
Defined in bmat8.hpp
.
This page contains the documentation for various helper functions for
libsemigroups::BMat8
, and HPCombi::BMat8
.
-
namespace
bmat8_helpers
¶ Defined in
bmat8.hpp
.This namespace contains various helper functions for the class BMat8. These functions could be member functions of BMat8 but they only use public member functions of BMat8, and so they are declared as free functions instead.
Functions
-
template<typename
T
>
Tone
(size_t dim)¶ Returns the identity boolean matrix of a given dimension.
- Return
A value of type
T
with the firstdim
values on the main diagonal equal to 1 and every other entry equal to 0.- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Template Parameters
T
: the type of the boolean matrix being constructed, should be BMat8 or HPCombi::BMat8.
- Parameters
dim
: the dimension of the identity matrix, must be at most 7.
-
static size_t
nr_cols
(BMat8 const &x)¶ Returns the number of non-zero columns in
x
.BMat8s do not know their “dimension” - in effect they are all of dimension 8. However, this member function can be used to obtain the number of non-zero rows of
this
.- Return
A
size_t
.- Exceptions
This function is
noexcept
and is guaranteed never to throw.- Complexity
Constant.
- See
- Parameters
x
: the BMat8 whose number of columns we want.
-
static size_t
col_space_size
(BMat8 const &x)¶ Find the size of the column space of
x
.- Return
A
size_t
.- Exceptions
This function guarantees not to throw a LibsemigroupsException.
- Complexity
\(O(n)\) where \(n\) is the return value of this function.
- See
- Parameters
x
: a BMat8.
-
template<typename