Position, size, empty…¶
This page contains information about accessing the values in an instance of the Action
class.

inline const_reference_point_type libsemigroups::Action::at(size_t pos) const¶
Returns a const reference to the point in a given position.
 Complexity
Constant.
 Parameters
pos – the index of an element.
 Throws
std::out_of_range – if
!(pos < current_size())
. Returns
A const_reference_point_type to the point in position
pos
of the currently enumerated points.

inline const_iterator libsemigroups::Action::cbegin() const noexcept¶
Returns a const_iterator (random access iterator) pointing at the first point.
 Complexity
Constant.
 Parameters
(None)
 Throws
(None) – This function is
noexcept
and is guaranteed never to throw. Returns
A const iterator to the first point.

inline const_iterator libsemigroups::Action::cend() const noexcept¶
Returns a const_iterator (random access iterator) pointing one past the last point.
 Complexity
Constant.
 Parameters
(None)
 Throws
(None) – This function is
noexcept
and is guaranteed never to throw. Returns
A const iterator to one past the end.

inline size_t libsemigroups::Action::current_size() const noexcept¶
Returns the number of points found so far.
 Complexity
Constant.
 Parameters
(None)
 Throws
(None) – This function is
noexcept
and is guaranteed never to throw. Returns
A value of
size_t
.

inline bool libsemigroups::Action::empty() const noexcept¶
Checks if the Action contains any points.
 Complexity
Constant.
 Parameters
(None)
 Throws
(None) – This function is
noexcept
and is guaranteed never to throw. Returns
true
if the action contains no points (including seeds), andfalse
if not.

inline const_reference_point_type libsemigroups::Action::operator[](size_t pos) const noexcept¶
Returns a const reference to the point in a given position.
 Complexity
Constant.
 Parameters
pos – the index of an element.
 Throws
(None) – This function is
noexcept
and is guaranteed never to throw. Returns
A const_reference_point_type to the point in position
pos
of the currently enumerated points.

inline index_type libsemigroups::Action::position(const_reference_point_type pt) const¶
Returns the position of a point in the so far discovered points.
 Complexity
Constant.
 Parameters
pt – the point whose position is sought.
 Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
. Returns
The index of
pt
inthis
or UNDEFINED.

inline size_t libsemigroups::Action::size()¶
Returns the size of the fully enumerated action.
 Complexity
The time complexity is \(O(mn)\) where \(m\) is the total number of points in the orbit and \(n\) is the number of generators.
 Parameters
(None)
 Throws
(None) – This function guarantees not to throw a
LibsemigroupsException
. Returns
The size of the action, a value of type
size_t
.