ADS
Algorithms and Data Structures
Loading...
Searching...
No Matches
ADS::StdSequence< S > Class Template Reference

the sequence \( S \) of ADS, which inserts and erases by rank, with the members by iterator of a SequenceContainer, each one call of insert( i , x ) or erase( i ) of \( S \) at the rank \( i \) of the iterator More...

#include <ADS/interop/std/FlatMap.h>

Inheritance diagram for ADS::StdSequence< S >:

Public types

using value_type = typename S::value_type
 the items
using reference = value_type &
 a reference to an item
using const_reference = const value_type &
 to a constant item
using size_type = std::size_t
 the sizes
using difference_type = std::ptrdiff_t
 the distances
using iterator = typename S::iterator
 the iterator
using const_iterator = typename S::const_iterator
 the constant one

Public member functions

 StdSequence (void)=default
 the empty sequence
template<std::input_iterator I, std::sentinel_for< I > E>
 StdSequence (I first, E last)
 the items of \( [ \mathit{first} , \mathit{last} ) \), in their order
const_iterator cbegin (void) const
 the constant iterator on the first item
const_iterator cend (void) const
 the constant iterator past the last item
iterator insert (const_iterator p, const value_type &x)
 \( x \) before the item of \( p \); an iterator on \( x \)
template<std::input_iterator I, std::sentinel_for< I > E>
iterator insert (const_iterator p, I first, E last)
 the items of \( [ \mathit{first} , \mathit{last} ) \) before the item of \( p \), in their order; an iterator on the first of them
template<class... A>
iterator emplace (const_iterator p, A &&... a)
 an item built from \( a \) before the item of \( p \)
template<class... A>
reference emplace_back (A &&... a)
 an item built from \( a \) at the end
iterator erase (const_iterator p)
 the item of \( p \) removed; an iterator on the item after it
iterator erase (const_iterator first, const_iterator last)
 the items of \( [ \mathit{first} , \mathit{last} ) \) removed; an iterator on the item after them

Detailed description

template<class S>
requires ( std::random_access_iterator< typename S::iterator > && requires( S & s , std::size_t i , const typename S::value_type & x ) { s.insert( i , x ); s.erase( i ); } )
class ADS::StdSequence< S >

the sequence \( S \) of ADS, which inserts and erases by rank, with the members by iterator of a SequenceContainer, each one call of insert( i , x ) or erase( i ) of \( S \) at the rank \( i \) of the iterator

Member typedef documentation

◆ const_iterator

template<class S>
using ADS::StdSequence< S >::const_iterator = typename S::const_iterator

the constant one

◆ const_reference

template<class S>
using ADS::StdSequence< S >::const_reference = const value_type &

to a constant item

◆ difference_type

template<class S>
using ADS::StdSequence< S >::difference_type = std::ptrdiff_t

the distances

◆ iterator

template<class S>
using ADS::StdSequence< S >::iterator = typename S::iterator

the iterator

◆ reference

template<class S>
using ADS::StdSequence< S >::reference = value_type &

a reference to an item

◆ size_type

template<class S>
using ADS::StdSequence< S >::size_type = std::size_t

the sizes

◆ value_type

template<class S>
using ADS::StdSequence< S >::value_type = typename S::value_type

the items

Constructor and destructor documentation

◆ StdSequence() [1/2]

template<class S>
ADS::StdSequence< S >::StdSequence ( void )
default

the empty sequence

◆ StdSequence() [2/2]

template<class S>
template<std::input_iterator I, std::sentinel_for< I > E>
ADS::StdSequence< S >::StdSequence ( I first,
E last )
inline

the items of \( [ \mathit{first} , \mathit{last} ) \), in their order

Member function documentation

◆ cbegin()

template<class S>
const_iterator ADS::StdSequence< S >::cbegin ( void ) const
inlinenodiscard

the constant iterator on the first item

◆ cend()

template<class S>
const_iterator ADS::StdSequence< S >::cend ( void ) const
inlinenodiscard

the constant iterator past the last item

◆ emplace()

template<class S>
template<class... A>
iterator ADS::StdSequence< S >::emplace ( const_iterator p,
A &&... a )
inline

an item built from \( a \) before the item of \( p \)

◆ emplace_back()

template<class S>
template<class... A>
reference ADS::StdSequence< S >::emplace_back ( A &&... a)
inline

an item built from \( a \) at the end

◆ erase() [1/2]

template<class S>
iterator ADS::StdSequence< S >::erase ( const_iterator first,
const_iterator last )
inline

the items of \( [ \mathit{first} , \mathit{last} ) \) removed; an iterator on the item after them

◆ erase() [2/2]

template<class S>
iterator ADS::StdSequence< S >::erase ( const_iterator p)
inline

the item of \( p \) removed; an iterator on the item after it

◆ insert() [1/2]

template<class S>
iterator ADS::StdSequence< S >::insert ( const_iterator p,
const value_type & x )
inline

\( x \) before the item of \( p \); an iterator on \( x \)

◆ insert() [2/2]

template<class S>
template<std::input_iterator I, std::sentinel_for< I > E>
iterator ADS::StdSequence< S >::insert ( const_iterator p,
I first,
E last )
inline

the items of \( [ \mathit{first} , \mathit{last} ) \) before the item of \( p \), in their order; an iterator on the first of them


The documentation for this class was generated from the following file: