class BMat8

Defined in bmat8.hpp.

Class for fast boolean matrices of dimension up to 8 x 8

The member functions for these small matrices over the boolean semiring are more optimised than the generic member functions for boolean matrices. Note that all BMat8 are represented internally as an 8 x 8 matrix; any entries not defined by the user are taken to be 0. This does not affect the results of any calculations.

BMat8 is a trivial class.


BMat8() noexcept = default

Default constructor.

BMat8(BMat8 const&) noexcept = default

Default copy constructor.

BMat8(BMat8&&) noexcept = default

Default move constructor.

BMat8(std::vector<std::vector<bool>> const&)


BMat8(uint64_t) noexcept

Construct from uint64_t.

operator=(BMat8 const&) noexcept = default

Default copy assignment operator.

operator=(BMat8&&) noexcept = default

Default move assignment operator.

Static member functions

one(size_t) noexcept

Returns the identity BMat8 .


Construct a random BMat8 .


Construct a random BMat8 of dimension at most dim.


set(size_t, size_t, bool)

Sets the ( i , j )th position to val.

swap(BMat8&) noexcept

Swaps this with that.


get(size_t, size_t) const noexcept

Returns the entry in the ( i , j )th position.

operator!=(BMat8 const&) const noexcept

Returns true if this does not equal that.

operator*(BMat8 const&) const noexcept

Returns the matrix product of this and that.

operator<(BMat8 const&) const noexcept

Returns true if this is less than that.

operator<<(std::ostream&, BMat8 const&)

Insertion operator.

operator<<(std::ostringstream&, BMat8 const&)

Insertion operator.

operator==(BMat8 const&) const noexcept

Returns true if this equals that.

operator>(BMat8 const&) const noexcept

Returns true if this is greater than that.

to_int() const noexcept

Returns the integer representation of this.

transpose() const noexcept

Returns the transpose of this.

Column and row space

col_space_basis() const noexcept

Find a basis for the column space of this.

number_of_rows() const noexcept

Returns the number of non-zero rows in this.

row_space_basis() const noexcept

Find a basis for the row space of this.

row_space_size() const

Find the size of the row space of this.

rows() const

Returns a vector containing the rows of this.


is_regular_element() const noexcept

Check whether this is a regular element of the full boolean matrix monoid of appropriate dimension.