OnSets¶
-
template<typename TElementType, typename TPointType, typename TContainerType = std::vector<TPointType>>
struct libsemigroups::OnSets¶ Defined in
adapters.hpp
.This is struct applies
OnTuples<TElementType, TPointType, TContainerType>
to a container ofTContainerType
and then sorts it.- Template Parameters
TElementType – the type of elements
TPointType – the type of the points acted on
TContainerType – a container of
TPointType
(defaults to std::vector with template parameterTPointType
).
Public Functions
-
inline void operator()(TContainerType &res, TContainerType const &pt, TElementType const &p) const¶
This call operator changes
res
in-place to contain the image of the containerpt
of points of typeTPointType
, under the induced (left or right) action of the elementx
.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
OnTuples and ImageRightAction.
- Complexity
pt.size()
times the complexity ofImageRightAction<TElementType, TPointType>
and the cost plus the complexity of sortingres
.
- Parameters
res – a container of
TPointType
(such as std::vector or std::array) to hold the resultpt – a container of
TPointType
p – an element of type
TElementType
- Returns
(None)