neoGFX
Cross-platform C++ app/game engine
Loading...
Searching...
No Matches
neolib::segmented_tree< T, N, Alloc > Class Template Reference

#include <segmented_tree.hpp>

Classes

class  basic_const_iterator
 
class  basic_iterator
 

Public Types

enum class  iterator_type { Normal , Sibling , Skip }
 
typedef T value_type
 
typedef Alloc allocator_type
 
typedef value_typereference
 
typedef const value_typeconst_reference
 
typedef std::allocator_traits< allocator_type >::pointer pointer
 
typedef std::allocator_traits< allocator_type >::const_pointer const_pointer
 
typedef std::allocator_traits< allocator_type >::difference_type difference_type
 
typedef std::allocator_traits< allocator_type >::size_type size_type
 
typedef basic_iterator< iterator_type::Normaliterator
 
typedef basic_const_iterator< iterator_type::Normalconst_iterator
 
typedef basic_iterator< iterator_type::Siblingsibling_iterator
 
typedef basic_const_iterator< iterator_type::Siblingconst_sibling_iterator
 
typedef basic_iterator< iterator_type::Skipskip_iterator
 
typedef basic_const_iterator< iterator_type::Skipconst_skip_iterator
 

Public Member Functions

 segmented_tree ()
 
 ~segmented_tree ()
 
bool empty () const
 
std::size_t size () const
 
std::size_t ksize () const
 
const_iterator cbegin () const
 
const_iterator begin () const
 
iterator begin ()
 
const_iterator cend () const
 
const_iterator end () const
 
iterator end ()
 
const_sibling_iterator csbegin () const
 
const_sibling_iterator sbegin () const
 
sibling_iterator sbegin ()
 
const_sibling_iterator csend () const
 
const_sibling_iterator send () const
 
sibling_iterator send ()
 
const_skip_iterator ckbegin () const
 
const_skip_iterator kbegin () const
 
skip_iterator kbegin ()
 
const_skip_iterator ckend () const
 
const_skip_iterator kend () const
 
skip_iterator kend ()
 
std::reverse_iterator< const_iteratorcrbegin () const
 
std::reverse_iterator< const_iteratorrbegin () const
 
std::reverse_iterator< iteratorrbegin ()
 
std::reverse_iterator< const_iteratorcrend () const
 
std::reverse_iterator< const_iteratorrend () const
 
std::reverse_iterator< iteratorrend ()
 
std::reverse_iterator< const_sibling_iteratorcrsbegin () const
 
std::reverse_iterator< const_sibling_iteratorrsbegin () const
 
std::reverse_iterator< sibling_iteratorrsbegin ()
 
std::reverse_iterator< const_sibling_iteratorcrsend () const
 
std::reverse_iterator< const_sibling_iteratorrsend () const
 
std::reverse_iterator< sibling_iteratorrsend ()
 
std::reverse_iterator< const_skip_iteratorcrkbegin () const
 
std::reverse_iterator< const_skip_iteratorrkbegin () const
 
std::reverse_iterator< skip_iteratorrkbegin ()
 
std::reverse_iterator< const_skip_iteratorcrkend () const
 
std::reverse_iterator< const_skip_iteratorrkend () const
 
std::reverse_iterator< skip_iteratorrkend ()
 
void clear ()
 
sibling_iterator insert (const_sibling_iterator position, const value_type &value)
 
void push_back (const value_type &value)
 
void push_back (const_iterator pos, const value_type &value)
 
void push_front (const value_type &value)
 
void push_front (const_iterator pos, const value_type &value)
 
iterator erase (const_iterator pos)
 
void sort ()
 
template<typename Predicate >
void sort (Predicate pred)
 

Detailed Description

template<typename T, size_t N = 64, typename Alloc = std::allocator<T>>
class neolib::segmented_tree< T, N, Alloc >

Definition at line 46 of file segmented_tree.hpp.

Member Typedef Documentation

◆ allocator_type

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef Alloc neolib::segmented_tree< T, N, Alloc >::allocator_type

Definition at line 52 of file segmented_tree.hpp.

◆ const_iterator

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef basic_const_iterator<iterator_type::Normal> neolib::segmented_tree< T, N, Alloc >::const_iterator

Definition at line 597 of file segmented_tree.hpp.

◆ const_pointer

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef std::allocator_traits<allocator_type>::const_pointer neolib::segmented_tree< T, N, Alloc >::const_pointer

Definition at line 56 of file segmented_tree.hpp.

◆ const_reference

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef const value_type& neolib::segmented_tree< T, N, Alloc >::const_reference

Definition at line 54 of file segmented_tree.hpp.

◆ const_sibling_iterator

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef basic_const_iterator<iterator_type::Sibling> neolib::segmented_tree< T, N, Alloc >::const_sibling_iterator

Definition at line 599 of file segmented_tree.hpp.

◆ const_skip_iterator

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef basic_const_iterator<iterator_type::Skip> neolib::segmented_tree< T, N, Alloc >::const_skip_iterator

Definition at line 601 of file segmented_tree.hpp.

◆ difference_type

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef std::allocator_traits<allocator_type>::difference_type neolib::segmented_tree< T, N, Alloc >::difference_type

Definition at line 57 of file segmented_tree.hpp.

◆ iterator

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef basic_iterator<iterator_type::Normal> neolib::segmented_tree< T, N, Alloc >::iterator

Definition at line 596 of file segmented_tree.hpp.

◆ pointer

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef std::allocator_traits<allocator_type>::pointer neolib::segmented_tree< T, N, Alloc >::pointer

Definition at line 55 of file segmented_tree.hpp.

◆ reference

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef value_type& neolib::segmented_tree< T, N, Alloc >::reference

Definition at line 53 of file segmented_tree.hpp.

◆ sibling_iterator

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef basic_iterator<iterator_type::Sibling> neolib::segmented_tree< T, N, Alloc >::sibling_iterator

Definition at line 598 of file segmented_tree.hpp.

◆ size_type

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef std::allocator_traits<allocator_type>::size_type neolib::segmented_tree< T, N, Alloc >::size_type

Definition at line 58 of file segmented_tree.hpp.

◆ skip_iterator

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef basic_iterator<iterator_type::Skip> neolib::segmented_tree< T, N, Alloc >::skip_iterator

Definition at line 600 of file segmented_tree.hpp.

◆ value_type

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
typedef T neolib::segmented_tree< T, N, Alloc >::value_type

Definition at line 51 of file segmented_tree.hpp.

Member Enumeration Documentation

◆ iterator_type

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
enum class neolib::segmented_tree::iterator_type
strong
Enumerator
Normal 
Sibling 
Skip 

Definition at line 256 of file segmented_tree.hpp.

Constructor & Destructor Documentation

◆ segmented_tree()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
neolib::segmented_tree< T, N, Alloc >::segmented_tree ( )
inline

Definition at line 605 of file segmented_tree.hpp.

◆ ~segmented_tree()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
neolib::segmented_tree< T, N, Alloc >::~segmented_tree ( )
inline

Definition at line 608 of file segmented_tree.hpp.

Member Function Documentation

◆ begin() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_tree< T, N, Alloc >::begin ( )
inline

Definition at line 634 of file segmented_tree.hpp.

◆ begin() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_tree< T, N, Alloc >::begin ( ) const
inline

Definition at line 630 of file segmented_tree.hpp.

◆ cbegin()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_tree< T, N, Alloc >::cbegin ( ) const
inline

Definition at line 626 of file segmented_tree.hpp.

◆ cend()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_tree< T, N, Alloc >::cend ( ) const
inline

Definition at line 638 of file segmented_tree.hpp.

◆ ckbegin()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_skip_iterator neolib::segmented_tree< T, N, Alloc >::ckbegin ( ) const
inline

Definition at line 674 of file segmented_tree.hpp.

◆ ckend()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_skip_iterator neolib::segmented_tree< T, N, Alloc >::ckend ( ) const
inline

Definition at line 686 of file segmented_tree.hpp.

◆ clear()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_tree< T, N, Alloc >::clear ( )
inline

Definition at line 773 of file segmented_tree.hpp.

◆ crbegin()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_iterator > neolib::segmented_tree< T, N, Alloc >::crbegin ( ) const
inline

Definition at line 698 of file segmented_tree.hpp.

◆ crend()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_iterator > neolib::segmented_tree< T, N, Alloc >::crend ( ) const
inline

Definition at line 710 of file segmented_tree.hpp.

◆ crkbegin()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_skip_iterator > neolib::segmented_tree< T, N, Alloc >::crkbegin ( ) const
inline

Definition at line 746 of file segmented_tree.hpp.

◆ crkend()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_skip_iterator > neolib::segmented_tree< T, N, Alloc >::crkend ( ) const
inline

Definition at line 758 of file segmented_tree.hpp.

◆ crsbegin()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_sibling_iterator > neolib::segmented_tree< T, N, Alloc >::crsbegin ( ) const
inline

Definition at line 722 of file segmented_tree.hpp.

◆ crsend()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_sibling_iterator > neolib::segmented_tree< T, N, Alloc >::crsend ( ) const
inline

Definition at line 734 of file segmented_tree.hpp.

◆ csbegin()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_sibling_iterator neolib::segmented_tree< T, N, Alloc >::csbegin ( ) const
inline

Definition at line 650 of file segmented_tree.hpp.

◆ csend()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_sibling_iterator neolib::segmented_tree< T, N, Alloc >::csend ( ) const
inline

Definition at line 662 of file segmented_tree.hpp.

◆ empty()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
bool neolib::segmented_tree< T, N, Alloc >::empty ( ) const
inline

Definition at line 614 of file segmented_tree.hpp.

◆ end() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_tree< T, N, Alloc >::end ( )
inline

Definition at line 646 of file segmented_tree.hpp.

◆ end() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_iterator neolib::segmented_tree< T, N, Alloc >::end ( ) const
inline

Definition at line 642 of file segmented_tree.hpp.

◆ erase()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
iterator neolib::segmented_tree< T, N, Alloc >::erase ( const_iterator  pos)
inline

Definition at line 802 of file segmented_tree.hpp.

◆ insert()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
sibling_iterator neolib::segmented_tree< T, N, Alloc >::insert ( const_sibling_iterator  position,
const value_type value 
)
inline

Definition at line 778 of file segmented_tree.hpp.

◆ kbegin() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
skip_iterator neolib::segmented_tree< T, N, Alloc >::kbegin ( )
inline

Definition at line 682 of file segmented_tree.hpp.

◆ kbegin() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_skip_iterator neolib::segmented_tree< T, N, Alloc >::kbegin ( ) const
inline

Definition at line 678 of file segmented_tree.hpp.

◆ kend() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
skip_iterator neolib::segmented_tree< T, N, Alloc >::kend ( )
inline

Definition at line 694 of file segmented_tree.hpp.

◆ kend() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_skip_iterator neolib::segmented_tree< T, N, Alloc >::kend ( ) const
inline

Definition at line 690 of file segmented_tree.hpp.

◆ ksize()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::size_t neolib::segmented_tree< T, N, Alloc >::ksize ( ) const
inline

Definition at line 622 of file segmented_tree.hpp.

◆ push_back() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_tree< T, N, Alloc >::push_back ( const value_type value)
inline

Definition at line 786 of file segmented_tree.hpp.

◆ push_back() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_tree< T, N, Alloc >::push_back ( const_iterator  pos,
const value_type value 
)
inline

Definition at line 790 of file segmented_tree.hpp.

◆ push_front() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_tree< T, N, Alloc >::push_front ( const value_type value)
inline

Definition at line 794 of file segmented_tree.hpp.

◆ push_front() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_tree< T, N, Alloc >::push_front ( const_iterator  pos,
const value_type value 
)
inline

Definition at line 798 of file segmented_tree.hpp.

◆ rbegin() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< iterator > neolib::segmented_tree< T, N, Alloc >::rbegin ( )
inline

Definition at line 706 of file segmented_tree.hpp.

◆ rbegin() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_iterator > neolib::segmented_tree< T, N, Alloc >::rbegin ( ) const
inline

Definition at line 702 of file segmented_tree.hpp.

◆ rend() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< iterator > neolib::segmented_tree< T, N, Alloc >::rend ( )
inline

Definition at line 718 of file segmented_tree.hpp.

◆ rend() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_iterator > neolib::segmented_tree< T, N, Alloc >::rend ( ) const
inline

Definition at line 714 of file segmented_tree.hpp.

◆ rkbegin() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< skip_iterator > neolib::segmented_tree< T, N, Alloc >::rkbegin ( )
inline

Definition at line 754 of file segmented_tree.hpp.

◆ rkbegin() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_skip_iterator > neolib::segmented_tree< T, N, Alloc >::rkbegin ( ) const
inline

Definition at line 750 of file segmented_tree.hpp.

◆ rkend() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< skip_iterator > neolib::segmented_tree< T, N, Alloc >::rkend ( )
inline

Definition at line 766 of file segmented_tree.hpp.

◆ rkend() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_skip_iterator > neolib::segmented_tree< T, N, Alloc >::rkend ( ) const
inline

Definition at line 762 of file segmented_tree.hpp.

◆ rsbegin() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< sibling_iterator > neolib::segmented_tree< T, N, Alloc >::rsbegin ( )
inline

Definition at line 730 of file segmented_tree.hpp.

◆ rsbegin() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_sibling_iterator > neolib::segmented_tree< T, N, Alloc >::rsbegin ( ) const
inline

Definition at line 726 of file segmented_tree.hpp.

◆ rsend() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< sibling_iterator > neolib::segmented_tree< T, N, Alloc >::rsend ( )
inline

Definition at line 742 of file segmented_tree.hpp.

◆ rsend() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::reverse_iterator< const_sibling_iterator > neolib::segmented_tree< T, N, Alloc >::rsend ( ) const
inline

Definition at line 738 of file segmented_tree.hpp.

◆ sbegin() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
sibling_iterator neolib::segmented_tree< T, N, Alloc >::sbegin ( )
inline

Definition at line 658 of file segmented_tree.hpp.

◆ sbegin() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_sibling_iterator neolib::segmented_tree< T, N, Alloc >::sbegin ( ) const
inline

Definition at line 654 of file segmented_tree.hpp.

◆ send() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
sibling_iterator neolib::segmented_tree< T, N, Alloc >::send ( )
inline

Definition at line 670 of file segmented_tree.hpp.

◆ send() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
const_sibling_iterator neolib::segmented_tree< T, N, Alloc >::send ( ) const
inline

Definition at line 666 of file segmented_tree.hpp.

◆ size()

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
std::size_t neolib::segmented_tree< T, N, Alloc >::size ( ) const
inline

Definition at line 618 of file segmented_tree.hpp.

◆ sort() [1/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
void neolib::segmented_tree< T, N, Alloc >::sort ( )
inline

Definition at line 810 of file segmented_tree.hpp.

◆ sort() [2/2]

template<typename T , size_t N = 64, typename Alloc = std::allocator<T>>
template<typename Predicate >
void neolib::segmented_tree< T, N, Alloc >::sort ( Predicate  pred)
inline

Definition at line 815 of file segmented_tree.hpp.


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