template<typename TElementType, typename TPointType, typename TContainerType = std::vector<TPointType>>
struct libsemigroups::OnTuples

Defined in adapters.hpp.

This is struct applies ImageRightAction<TElementType, TPointType> to every value in a container of type TContainerType.

Template Parameters
  • TElementType – the type of the elements of the semigroup

  • TPointType – the type of the points acted on

  • TContainerType – a container of TPointType

Public Functions

inline void operator()(TContainerType &res, TContainerType const &pt, TElementType const &x) const

This call operator changes res in-place to contain the image of the container pt of points of type TPointType, under the induced (left or right) action of the element x.

The purpose of the 1st parameter is to avoid repeated allocations of memory to hold temporary points that are discarded soon after they are created.

See also

OnSets and ImageRightAction.


pt.size() times the complexity of ImageRightAction<TElementType, TPointType>.

  • res – a container of TPointType (such as std::vector or std::array) to hold the result

  • pt – a container of TPointType

  • x – an element of type TElementType