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.

Exceptions

This function is noexcept and is guaranteed never to throw.

Parameters

(None)

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.

Exceptions

This function is noexcept and is guaranteed never to throw.

Parameters

(None)

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.

Exceptions

This function is noexcept and is guaranteed never to throw.

Parameters

(None)

Returns

A value of size_t.

inline bool libsemigroups::Action::empty() const noexcept

Checks if the Action contains any points.

Exceptions

This function is noexcept and is guaranteed never to throw.

Complexity

Constant.

Parameters

(None)

Returns

true if the action contains no points (including seeds), and false 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.

Exceptions

This function is noexcept and is guaranteed never to throw.

Complexity

Constant.

Parameters

pos – the index of an element.

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.

Exceptions

This function guarantees not to throw a LibsemigroupsException.

Complexity

Constant.

Parameters

pt – the point whose position is sought.

Returns

The index of pt in this 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.

Exceptions

This function guarantees not to throw a LibsemigroupsException.

Parameters

(None)

Returns

The size of the action, a value of type size_t.