MySQL 9.6.0
Source Code Documentation
mysql::sets::detail Namespace Reference

Classes

class  Boundary_set_binary_operation_iterator
 Forward iterator over the result of a binary set operation (union, intersection, or subtraction) over two boundary sets. More...
 
class  Boundary_set_binary_operation_view_base
 Common base class for the specializations of Union_view, Intersection_view, and Subtraction_view for boundary sets. More...
 
class  Boundary_set_interface
 CRTP base class used to implement Boundary Sets. More...
 
class  Const_boundary_view_iterator
 Contiguous iterator over a Const_boundary_view. More...
 
class  Interval_base
 Holds the start boundary and endpoint boundary of an interval. More...
 
class  Interval_set_binary_operation_view_base
 Common base class for the specializations of Union_view, Intersection_view, and Subtraction_view for interval sets. More...
 
struct  Less
 Helper class to define the Ordered_set_traits_interface::Less_t member. More...
 
struct  Make_interval
 Helper function object to construct intervals. More...
 
class  Nested_set_binary_operation_iterator_base
 Common base class for the forward iterators over union view, intersection view, and subtraction view of two nested sets. More...
 
class  Nested_set_binary_operation_view_interface
 Common base class for all the view classes. More...
 
class  Nested_set_interface
 CRTP base class/mixin used to define a Nested set based on an implementation that provides the find and upper_bound functions. More...
 
class  Nested_set_intersection_iterator
 Iterator over the intersection of two sets. More...
 
class  Nested_set_subtraction_iterator
 Iterator over the difference of two sets. More...
 
class  Nested_set_union_iterator
 Iterator over the union of two sets. More...
 
class  Relaxed_interval
 Holds the start boundary and endpoint boundary of an interval. More...
 
struct  Storage_or_void_helper
 Helper to define Storage_or_void. More...
 
struct  Storage_or_void_helper< Container_t >
 
struct  Unfold_set
 Given a nested set, returns a range over its inner sets. More...
 
struct  Volume_transform
 Given a set, returns its volume. More...
 

Concepts

concept  Shall_enable_donate_set_for_wrapper
 
concept  Is_collection_with_upper_lower_bound_helper
 
concept  Is_boundary_set_helper
 True if Test is an interval set with Element_t as its element type, assuming that Iterator_t is its iterator type and Const_iterator_t its const iterator type.
 
concept  Is_readable_boundary_storage_helper
 True if Test satisfiesIs_readable_boundary_storagewithElement_tas its element type, assuming thatIterator_tandConst_iterator_t` are its iterator/const iterator types.
 
concept  Is_boundary_storage_helper
 True if Test satisfiesIs_boundary_storagewithElement_tas its element type, assuming thatIterator_tandConst_iterator_t` are its iterator/const iterator types.
 
concept  Is_boundary_or_interval_container_helper
 Helper to implement Is_boundary_container and Is_interval_container.
 
concept  Shall_enable_donate_set_elements_for_boundary_storage
 Helper concept to define the condition when Enable_donate_set_elements shall be defined for Boundary Storage types.
 
concept  Shall_enable_donate_set_elements_for_boundary_container
 Helper concept to define the condition when Enable_donate_set_elements shall be defined for Boundary Container types.
 
concept  Shall_enable_donate_set_for_interval_container
 Helper concept to define the condition when Enable_donate_set shall be defined for Interval Container types.
 
concept  Shall_enable_donate_set_elements_for_interval_container
 Helper concept to define the condition when Enable_donate_set_elements shall be defined for Interval Container types.
 
concept  Has_disabled_fast_size
 Helper to implement Has_fast_size.
 
concept  Is_nested_set_or_storage
 Common helper for Is_nested_set and Is_nested_storage.
 
concept  Shall_enable_donate_set_elements_for_nested_storage
 Helper concept to define the condition when Enable_donate_set_elements shall be defined for Nested Storage types.
 
concept  Shall_enable_donate_set_elements_for_nested_container
 Helper concept to define the condition when Enable_donate_set_elements shall be defined for Nested Container types.
 
concept  Has_lower_bound_impl_with_hint
 True if Test::lower_bound_impl(test, hint, element) is defined.
 
concept  Has_lower_bound_impl_without_hint
 True if Test::lower_bound_impl(test, element) is defined.
 
concept  Has_lower_bound_impl
 True if one of the lower bound functions is defined.
 
concept  Has_upper_bound_impl_with_hint
 True if Test::upper_bound_impl(test, hint, element) is defined.
 
concept  Has_upper_bound_impl_without_hint
 True if Test::upper_bound_impl(test, element) is defined.
 
concept  Has_upper_bound_impl
 True if one of the upper bound functions is defined.
 

Typedefs

template<Is_bounded_set_traits Set_traits_t>
using Map_boundary_container_alias = Nonthrowing_boundary_container_adaptor< throwing::detail::Map_boundary_container_alias< Set_traits_t > >
 Boundary container using std::map as backing storage. More...
 
template<Is_bounded_set_traits Set_traits_t>
using Vector_boundary_container_alias = Nonthrowing_boundary_container_adaptor< throwing::detail::Vector_boundary_container_alias< Set_traits_t > >
 Boundary container using std::vector as backing storage. More...
 
template<Is_bounded_set_traits Set_traits_t>
using Map_interval_container_alias = Interval_container< Map_boundary_container_alias< Set_traits_t > >
 Interval container using std::map as backing storage. More...
 
template<Is_bounded_set_traits Set_traits_t>
using Vector_interval_container_alias = Interval_container< Vector_boundary_container_alias< Set_traits_t > >
 Interval container using std::vector as backing storage. More...
 
template<Is_ordered_set_traits Key_traits_t, Is_set Mapped_t>
using Map_nested_container_alias = Nested_container< Map_nested_storage< Nested_set_traits< Key_traits_t, typename Mapped_t::Set_traits_t, typename Mapped_t::Set_category_t >, Map_for_set_traits< std::map, Key_traits_t, Mapped_t > > >
 Nested set container using std::map as backing storage. More...
 
template<Is_nested_set Source1_t, Is_nested_set Source2_t, Binary_operation operation_t>
using Nested_binary_operation_iterator_type = std::conditional_t<(int) operation_t==(int) Binary_operation::op_union, Nested_set_union_iterator< Source1_t, Source2_t >, std::conditional_t<(int) operation_t==(int) Binary_operation::op_intersection, Nested_set_intersection_iterator< Source1_t, Source2_t >, Nested_set_subtraction_iterator< Source1_t, Source2_t > > >
 Type alias that provides the iterator type for a given Binary_operation. More...
 
template<Is_nested_set_traits Set_traits_t>
using Empty_nested_mapped_type = Empty_set_view< typename Set_traits_t::Mapped_category_t, typename Set_traits_t::Mapped_traits_t >
 Gives the mapped type for a nested Empty_set_view. More...
 
template<Is_nested_set_traits Set_traits_t>
using Empty_nested_iterator_type = mysql::iterators::Empty_sequence_iterator< std::pair< const typename Set_traits_t::Key_t, Empty_nested_mapped_type< Set_traits_t > > >
 Gives the iterator type for a nested Empty_set_view. More...
 

Functions

template<Is_bounded_set_traits Set_traits_tp>
bool operator== (const Interval_base< Set_traits_tp > &a, const Interval_base< Set_traits_tp > &b)
 Return true if both start-point and end-point are equal for the intervals. More...
 
template<Is_nested_set Nested_set_t>
auto make_volume_view (const Nested_set_t &nested_set)
 Given a Nested set, returns a range over the volumes of the inner sets. More...
 
template<Binary_operation operation, class Target_t , class Source_t >
bool handle_inplace_op_trivial_cases (Target_t &target, Source_t &&source)
 Handle the trivial cases of inplace union/intersection/subtraction where either both operands refer to the same set or one is empty. More...
 

Typedef Documentation

◆ Empty_nested_iterator_type

template<Is_nested_set_traits Set_traits_t>
using mysql::sets::detail::Empty_nested_iterator_type = typedef mysql::iterators::Empty_sequence_iterator< std::pair<const typename Set_traits_t::Key_t, Empty_nested_mapped_type<Set_traits_t> >>

Gives the iterator type for a nested Empty_set_view.

Template Parameters
Set_traits_tNested set traits.

◆ Empty_nested_mapped_type

template<Is_nested_set_traits Set_traits_t>
using mysql::sets::detail::Empty_nested_mapped_type = typedef Empty_set_view<typename Set_traits_t::Mapped_category_t, typename Set_traits_t::Mapped_traits_t>

Gives the mapped type for a nested Empty_set_view.

Template Parameters
Set_traits_tNested set traits.

◆ Map_boundary_container_alias

Boundary container using std::map as backing storage.

◆ Map_interval_container_alias

template<Is_bounded_set_traits Set_traits_t>
using mysql::sets::detail::Map_interval_container_alias = typedef Interval_container<Map_boundary_container_alias<Set_traits_t> >

Interval container using std::map as backing storage.

◆ Map_nested_container_alias

template<Is_ordered_set_traits Key_traits_t, Is_set Mapped_t>
using mysql::sets::detail::Map_nested_container_alias = typedef Nested_container<Map_nested_storage< Nested_set_traits<Key_traits_t, typename Mapped_t::Set_traits_t, typename Mapped_t::Set_category_t>, Map_for_set_traits<std::map, Key_traits_t, Mapped_t> >>

Nested set container using std::map as backing storage.

◆ Nested_binary_operation_iterator_type

template<Is_nested_set Source1_t, Is_nested_set Source2_t, Binary_operation operation_t>
using mysql::sets::detail::Nested_binary_operation_iterator_type = typedef std::conditional_t< (int)operation_t == (int)Binary_operation::op_union, Nested_set_union_iterator<Source1_t, Source2_t>, std::conditional_t<(int)operation_t == (int)Binary_operation::op_intersection, Nested_set_intersection_iterator<Source1_t, Source2_t>, Nested_set_subtraction_iterator<Source1_t, Source2_t> >>

Type alias that provides the iterator type for a given Binary_operation.

Template Parameters
Source1_tThe first source.
Source2_tThe second source.
operation_tThe binary operation.

◆ Vector_boundary_container_alias

Boundary container using std::vector as backing storage.

◆ Vector_interval_container_alias

template<Is_bounded_set_traits Set_traits_t>
using mysql::sets::detail::Vector_interval_container_alias = typedef Interval_container<Vector_boundary_container_alias<Set_traits_t> >

Interval container using std::vector as backing storage.

Function Documentation

◆ handle_inplace_op_trivial_cases()

template<Binary_operation operation, class Target_t , class Source_t >
bool mysql::sets::detail::handle_inplace_op_trivial_cases ( Target_t &  target,
Source_t &&  source 
)

Handle the trivial cases of inplace union/intersection/subtraction where either both operands refer to the same set or one is empty.

Returns
true if a trivial case applied and was executed, false otherwise.

◆ make_volume_view()

template<Is_nested_set Nested_set_t>
auto mysql::sets::detail::make_volume_view ( const Nested_set_t &  nested_set)

Given a Nested set, returns a range over the volumes of the inner sets.

◆ operator==()

template<Is_bounded_set_traits Set_traits_tp>
bool mysql::sets::detail::operator== ( const Interval_base< Set_traits_tp > &  a,
const Interval_base< Set_traits_tp > &  b 
)

Return true if both start-point and end-point are equal for the intervals.