FastLED 3.9.15
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 19 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  iterator
 
struct  Node
 

Public Types

using allocator_type = Allocator
 
enum  Color { RED , BLACK }
 
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())
 
 RedBlackTree (const RedBlackTree &other)
 
 ~RedBlackTree ()
 
iterator begin ()
 
const_iterator begin () const
 
const_iterator cbegin () const
 
const_iterator cend () const
 
void clear ()
 
bool contains (const value_type &value) const
 
fl::size count (const value_type &value) const
 
template<typename... Args>
fl::pair< iterator, bool > emplace (Args &&... args)
 
bool empty () const
 
iterator end ()
 
const_iterator end () const
 
fl::pair< iterator, iteratorequal_range (const value_type &value)
 
fl::pair< const_iterator, const_iteratorequal_range (const value_type &value) const
 
fl::size erase (const value_type &value)
 
iterator erase (const_iterator pos)
 
iterator find (const value_type &value)
 
const_iterator find (const value_type &value) const
 
fl::pair< iterator, bool > insert (const value_type &value)
 
fl::pair< iterator, bool > insert (value_type &&value)
 
iterator lower_bound (const value_type &value)
 
const_iterator lower_bound (const value_type &value) const
 
fl::size max_size () const
 
bool operator!= (const RedBlackTree &other) const
 
RedBlackTreeoperator= (const RedBlackTree &other)
 
bool operator== (const RedBlackTree &other) const
 
fl::size size () const
 
void swap (RedBlackTree &other)
 
iterator upper_bound (const value_type &value)
 
const_iterator upper_bound (const value_type &value) const
 
compare_type value_comp () const
 

Private Types

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

Private Member Functions

NodecopyTree (Node *node, Node *parent=nullptr)
 
void deleteFixup (Node *x, Node *xParent)
 
void destroyTree (Node *node)
 
NodefindNode (const value_type &value) const
 
void insertFixup (Node *z)
 
template<typename U>
fl::pair< iterator, bool > insertImpl (U &&value)
 
NodelowerBoundNode (const value_type &value) const
 
Nodemaximum (Node *x) const
 
Nodeminimum (Node *x) const
 
void rotateLeft (Node *x)
 
void rotateRight (Node *x)
 
void transplant (Node *u, Node *v)
 
NodeupperBoundNode (const value_type &value) const
 

Private Attributes

NodeAllocator alloc_
 
Compare comp_
 
Noderoot_
 
fl::size size_
 

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