FastLED 3.10.8
Loading...
Searching...
No Matches
fl::RedBlackTree< T, Compare, Allocator > Class Template Reference

Detailed Description

template<typename T, typename Compare = less<T>, typename Allocator = allocator_slab<char>>
class fl::RedBlackTree< T, Compare, Allocator >

Definition at line 24 of file rbtree.h.

#include <rbtree.h>

+ Inheritance diagram for fl::RedBlackTree< T, Compare, Allocator >:
+ Collaboration diagram for fl::RedBlackTree< T, Compare, Allocator >:

Classes

class  const_iterator
 
class  const_reverse_iterator
 
class  iterator
 
struct  RBNode
 
class  reverse_iterator
 

Public Types

using allocator_type = Allocator
 
enum class  Color { kRed , kBlack }
 
using compare_type = Compare
 
using const_pointer = const value_type*
 
using const_reference = const value_type&
 
using difference_type = ptrdiff_t
 
using pointer = value_type*
 
using reference = value_type&
 
using size_type = fl::size
 
using value_type = T
 

Public Member Functions

 RedBlackTree (const Compare &comp=Compare(), const Allocator &alloc=Allocator()) FL_NO_EXCEPT
 
 RedBlackTree (const RedBlackTree &other) FL_NO_EXCEPT
 
 RedBlackTree (RedBlackTree &&other) FL_NO_EXCEPT
 
 ~RedBlackTree () FL_NO_EXCEPT
 
const_iterator begin () const FL_NO_EXCEPT
 
iterator begin () FL_NO_EXCEPT
 
const_iterator cbegin () const FL_NO_EXCEPT
 
const_iterator cend () const FL_NO_EXCEPT
 
void clear () FL_NO_EXCEPT
 
bool contains (const value_type &value) const FL_NO_EXCEPT
 
fl::size count (const value_type &value) const FL_NO_EXCEPT
 
const_reverse_iterator crbegin () const FL_NO_EXCEPT
 
const_reverse_iterator crend () const FL_NO_EXCEPT
 
template<typename... Args>
fl::pair< iterator, bool > emplace (Args &&... args) FL_NO_EXCEPT
 
bool empty () const FL_NO_EXCEPT
 
const_iterator end () const FL_NO_EXCEPT
 
iterator end () FL_NO_EXCEPT
 
fl::pair< const_iterator, const_iterator > equal_range (const value_type &value) const FL_NO_EXCEPT
 
fl::pair< iterator, iterator > equal_range (const value_type &value) FL_NO_EXCEPT
 
fl::size erase (const value_type &value) FL_NO_EXCEPT
 
iterator erase (const_iterator pos) FL_NO_EXCEPT
 
const_iterator find (const value_type &value) const FL_NO_EXCEPT
 
iterator find (const value_type &value) FL_NO_EXCEPT
 
allocator_type get_allocator () const FL_NO_EXCEPT
 
fl::pair< iterator, bool > insert (const value_type &value) FL_NO_EXCEPT
 
fl::pair< iterator, bool > insert (value_type &&value) FL_NO_EXCEPT
 
const_iterator lower_bound (const value_type &value) const FL_NO_EXCEPT
 
iterator lower_bound (const value_type &value) FL_NO_EXCEPT
 
fl::size max_size () const FL_NO_EXCEPT
 
bool operator!= (const RedBlackTree &other) const FL_NO_EXCEPT
 
RedBlackTree & operator= (const RedBlackTree &other) FL_NO_EXCEPT
 
RedBlackTree & operator= (RedBlackTree &&other) FL_NO_EXCEPT
 
bool operator== (const RedBlackTree &other) const FL_NO_EXCEPT
 
const_reverse_iterator rbegin () const FL_NO_EXCEPT
 
reverse_iterator rbegin () FL_NO_EXCEPT
 
const_reverse_iterator rend () const FL_NO_EXCEPT
 
reverse_iterator rend () FL_NO_EXCEPT
 
fl::size size () const FL_NO_EXCEPT
 
void swap (RedBlackTree &other) FL_NO_EXCEPT
 
const_iterator upper_bound (const value_type &value) const FL_NO_EXCEPT
 
iterator upper_bound (const value_type &value) FL_NO_EXCEPT
 
compare_type value_comp () const FL_NO_EXCEPT
 

Private Types

using NodeAllocator = typename Allocator::template rebind<RBNode>::other
 

Private Member Functions

RBNode * copyTree (RBNode *node, RBNode *parent=nullptr) FL_NO_EXCEPT
 
void deleteFixup (RBNode *x, RBNode *xParent) FL_NO_EXCEPT
 
void destroyTree (RBNode *node) FL_NO_EXCEPT
 
RBNode * findNode (const value_type &value) const FL_NO_EXCEPT
 
void insertFixup (RBNode *z) FL_NO_EXCEPT
 
template<typename U>
fl::pair< iterator, bool > insertImpl (U &&value) FL_NO_EXCEPT
 
RBNode * lowerBoundNode (const value_type &value) const FL_NO_EXCEPT
 
RBNode * maximum (RBNode *x) const FL_NO_EXCEPT
 
RBNode * minimum (RBNode *x) const FL_NO_EXCEPT
 
void rotateLeft (RBNode *x) FL_NO_EXCEPT
 
void rotateRight (RBNode *x) FL_NO_EXCEPT
 
void transplant (RBNode *u, RBNode *v) FL_NO_EXCEPT
 
RBNode * upperBoundNode (const value_type &value) const FL_NO_EXCEPT
 

Private Attributes

NodeAllocator mAlloc
 
Compare mComp
 
RBNode * mRoot
 
fl::size mSize
 

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