libsemigroups  v3.0.0
C++ library for semigroups and monoids
Loading...
Searching...
No Matches
Bipartitions

Defined bipart.hpp.

This page contains an overview of the functionality in libsemigroups for bipartitions and blocks.

Helper functions for bipartitions and blocks are documented:

Topics

 make<Blocks>
 Safely construct a Blocks instance.
 
 make<Bipartition>
 Safely construct a Bipartition instance.
 

Namespaces

namespace  libsemigroups::bipartition
 Namespace for Bipartition helper functions.
 
namespace  libsemigroups::blocks
 Namespace for Blocks helper functions.
 

Classes

class  Bipartition
 Class for representing bipartitions. More...
 
class  Blocks
 A Blocks object represents a signed partition of the set \(\{0, \ldots, n - 1\}\). More...
 

Functions

bool operator!= (Bipartition const &x, Bipartition const &y)
 Check bipartitions for inequality.
 
Bipartition operator* (Bipartition const &x, Bipartition const &y)
 Multiply two bipartitions.
 
bool operator<= (Bipartition const &x, Bipartition const &y)
 Compare bipartitions.
 
bool operator> (Bipartition const &x, Bipartition const &y)
 Compare bipartitions.
 
bool operator>= (Bipartition const &x, Bipartition const &y)
 Compare bipartitions.
 
std::string to_human_readable_repr (Bipartition const &x, std::string_view braces="{}", size_t max_width=72)
 Return a human readable representation of a bipartition.
 

Variables

template<typename T>
static constexpr bool IsBipartition = detail::IsBipartitionHelper<std::decay_t<T>>::value
 Helper variable template.
 

Function Documentation

◆ operator!=()

bool operator!= ( Bipartition const & x,
Bipartition const & y )
inlinenodiscard
Parameters
xa bipartition.
ya bipartition.
Returns
A value of type bool.
Exceptions
This function guarantees not to throw a LibsemigroupsException.
Complexity
At worst linear in the degree of x and y.

◆ operator*()

Bipartition operator* ( Bipartition const & x,
Bipartition const & y )
nodiscard

Returns a newly constructed bipartition equal to the product of x and y.

Parameters
xa bipartition.
ya bipartition.
Returns
A value of type Bipartition
Exceptions
This function guarantees not to throw a LibsemigroupsException.
Complexity
Quadratic in x.degree().
Warning
This function expects its arguments to have equal degree, but this is not checked.

◆ operator<=()

bool operator<= ( Bipartition const & x,
Bipartition const & y )
inlinenodiscard

Convenience function that just calls operator< and operator==.

◆ operator>()

bool operator> ( Bipartition const & x,
Bipartition const & y )
inlinenodiscard

Convenience function that just calls operator< with the arguments switched.

◆ operator>=()

bool operator>= ( Bipartition const & x,
Bipartition const & y )
inlinenodiscard

Convenience function that just calls operator<= with the arguments switched.

◆ to_human_readable_repr()

std::string to_human_readable_repr ( Bipartition const & x,
std::string_view braces = "{}",
size_t max_width = 72 )
nodiscard

Return a human readable representation (std::string) of a bipartition. The braces to be used in the returns string can be specified using the argument braces. By default the returned string can be used to reconstruct the bipartition x. If the width of this returned string would be greater than max_width, then an abbreviated string is returned instead.

Parameters
xthe Bipartition object.
bracesthe braces to use in the returned string (default: "{}").
max_widththe maximum width of the returned string (default: 72).
Returns
A std::string representation of x.
Exceptions
LibsemigroupsExceptionif braces does not have length 2.

Variable Documentation

◆ IsBipartition

template<typename T>
bool IsBipartition = detail::IsBipartitionHelper<std::decay_t<T>>::value
staticconstexpr

The value of this variable is true if the template parameter T decays to Bipartition.

Template Parameters
Ta type.