IntervalSequenceTree< Key, Allocator > Class Template Reference

class implementing an Interval Sequence Tree this is a tree for storing a changing sequence of intervals that was invented one rainy afternoon by Aaron Darling and Michael Rusch. More...

#include <IntervalSequenceTree.h>

Collaboration diagram for IntervalSequenceTree< Key, Allocator >:

Collaboration graph
[legend]
List of all members.

Public Types

typedef Allocator allocator_type
typedef __generic_iterator<
true > 
const_iterator
typedef Allocator::const_pointer const_pointer
typedef Allocator::const_reference const_reference
typedef std::reverse_iterator<
const_iterator
const_reverse_iterator
typedef Allocator::difference_type difference_type
typedef __generic_iterator<
false > 
iterator
typedef Allocator::pointer pointer
typedef Allocator::reference reference
typedef std::reverse_iterator<
iterator
reverse_iterator
typedef Allocator::size_type size_type
typedef Key value_type

Public Member Functions

const_iterator begin () const
iterator begin ()
size_type countNodes (IstNode *x=NULL) const
bool empty () const
const_iterator end () const
iterator end ()
void erase (iterator first, iterator last)
size_type erase (size_type point, size_type length)
const_iterator find (size_type point) const
iterator find (size_type point)
template<class InputIterator> void insert (InputIterator first, InputIterator last, size_type point=IST_END)
iterator insert (const value_type &val, size_type point=IST_END)
 IntervalSequenceTree (const IntervalSequenceTree &ist)
template<class InputIterator>  IntervalSequenceTree (InputIterator first, InputIterator last)
 IntervalSequenceTree ()
size_type length () const
 Returns the total length of intervals contained in this interval sequence.
size_type max_size () const
size_type nodeCount () const
IntervalSequenceTreeoperator= (const IntervalSequenceTree &ist)
const_reverse_iterator rbegin () const
reverse_iterator rbegin ()
const_reverse_iterator rend () const
reverse_iterator rend ()
 ~IntervalSequenceTree ()

Protected Types

typedef node_allocator_type::const_pointer const_node_pointer
typedef Allocator::template
rebind< IstNode >::other 
node_allocator_type
typedef node_allocator_type::pointer node_pointer

Protected Member Functions

void decrement (IstNode *&x) const

Static Protected Member Functions

void checkTree (IstNode *cur_node)
void deleteSubtree (IstNode *&istn)
void increment (IstNode *&x)
void propogateChanges (IstNode *cur_node, int64 length_diff, int64 subtree_diff)
IstNoderecursiveFind (size_type &point, IstNode *node)

Protected Attributes

IstNodeleftmost
 Left most tree node, for begin() method.
IstNoderightmost
 Right most tree node, for end() method.
IstNoderoot
 Root of the tree.

Friends

class __generic_iterator< false >
class __generic_iterator< true >

Detailed Description

template<class Key, class Allocator = allocator<Key>>
class IntervalSequenceTree< Key, Allocator >

class implementing an Interval Sequence Tree this is a tree for storing a changing sequence of intervals that was invented one rainy afternoon by Aaron Darling and Michael Rusch.

Important features are that stabbing queries, stabbing insertions, and stabbing deletions are O( log n ) assuming a uniform distribution of stab sites.

Definition at line 41 of file IntervalSequenceTree.h.


Member Typedef Documentation

template<class Key, class Allocator = allocator<Key>>
typedef Allocator IntervalSequenceTree< Key, Allocator >::allocator_type
 

Definition at line 47 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef __generic_iterator<true> IntervalSequenceTree< Key, Allocator >::const_iterator
 

Definition at line 130 of file IntervalSequenceTree.h.

Referenced by IntervalSequenceTree< Key, Allocator >::begin(), IntervalSequenceTree< Key, Allocator >::end(), and IntervalSequenceTree< Key, Allocator >::find().

template<class Key, class Allocator = allocator<Key>>
typedef node_allocator_type::const_pointer IntervalSequenceTree< Key, Allocator >::const_node_pointer [protected]
 

Definition at line 85 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef Allocator::const_pointer IntervalSequenceTree< Key, Allocator >::const_pointer
 

Definition at line 53 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef Allocator::const_reference IntervalSequenceTree< Key, Allocator >::const_reference
 

Definition at line 49 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef std::reverse_iterator< const_iterator > IntervalSequenceTree< Key, Allocator >::const_reverse_iterator
 

Definition at line 132 of file IntervalSequenceTree.h.

Referenced by IntervalSequenceTree< Key, Allocator >::rbegin(), and IntervalSequenceTree< Key, Allocator >::rend().

template<class Key, class Allocator = allocator<Key>>
typedef Allocator::difference_type IntervalSequenceTree< Key, Allocator >::difference_type
 

Definition at line 51 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef __generic_iterator<false> IntervalSequenceTree< Key, Allocator >::iterator
 

Definition at line 129 of file IntervalSequenceTree.h.

Referenced by IntervalSequenceTree< Key, Allocator >::begin(), IntervalSequenceTree< Key, Allocator >::end(), IntervalSequenceTree< Key, Allocator >::erase(), and IntervalSequenceTree< Key, Allocator >::find().

template<class Key, class Allocator = allocator<Key>>
typedef Allocator::template rebind<IstNode>::other IntervalSequenceTree< Key, Allocator >::node_allocator_type [protected]
 

Definition at line 82 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef node_allocator_type::pointer IntervalSequenceTree< Key, Allocator >::node_pointer [protected]
 

Definition at line 84 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef Allocator::pointer IntervalSequenceTree< Key, Allocator >::pointer
 

Definition at line 52 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef Allocator::reference IntervalSequenceTree< Key, Allocator >::reference
 

Definition at line 48 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
typedef std::reverse_iterator< iterator > IntervalSequenceTree< Key, Allocator >::reverse_iterator
 

Definition at line 131 of file IntervalSequenceTree.h.

Referenced by IntervalSequenceTree< Key, Allocator >::rbegin(), and IntervalSequenceTree< Key, Allocator >::rend().

template<class Key, class Allocator = allocator<Key>>
typedef Allocator::size_type IntervalSequenceTree< Key, Allocator >::size_type
 

Definition at line 50 of file IntervalSequenceTree.h.

Referenced by IntervalSequenceTree< Key, Allocator >::erase(), IntervalSequenceTree< Key, Allocator >::find(), IntervalSequenceTree< Key, Allocator >::insert(), and IntervalSequenceTree< Key, Allocator >::recursiveFind().

template<class Key, class Allocator = allocator<Key>>
typedef Key IntervalSequenceTree< Key, Allocator >::value_type
 

Definition at line 44 of file IntervalSequenceTree.h.


Constructor & Destructor Documentation

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::IntervalSequenceTree  )  [inline]
 

Definition at line 195 of file IntervalSequenceTree.h.

template<class Key, class Allocator>
template<class InputIterator>
IntervalSequenceTree< Key, Allocator >::IntervalSequenceTree InputIterator  first,
InputIterator  last
 

Definition at line 204 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::insert().

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::IntervalSequenceTree const IntervalSequenceTree< Key, Allocator > &  ist  ) 
 

Definition at line 209 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::begin(), IntervalSequenceTree< Key, Allocator >::end(), and IntervalSequenceTree< Key, Allocator >::insert().

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::~IntervalSequenceTree  ) 
 

Definition at line 219 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::deleteSubtree(), and IntervalSequenceTree< Key, Allocator >::root.


Member Function Documentation

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::const_iterator IntervalSequenceTree< Key, Allocator >::begin  )  const
 

Definition at line 231 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::const_iterator, and IntervalSequenceTree< Key, Allocator >::leftmost.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::iterator IntervalSequenceTree< Key, Allocator >::begin  ) 
 

Definition at line 225 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::iterator, and IntervalSequenceTree< Key, Allocator >::leftmost.

Referenced by IntervalSequenceTree< Key, Allocator >::IntervalSequenceTree(), IntervalSequenceTree< Key, Allocator >::operator=(), and IntervalSequenceTree< Key, Allocator >::rend().

template<class Key, class Allocator>
void IntervalSequenceTree< Key, Allocator >::checkTree IstNode cur_node  )  [static, protected]
 

Definition at line 283 of file IntervalSequenceTree.h.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::size_type IntervalSequenceTree< Key, Allocator >::countNodes IstNode x = NULL  )  const
 

Definition at line 602 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::IstNode::key, IntervalSequenceTree< Key, Allocator >::IstNode::left, IntervalSequenceTree< Key, Allocator >::IstNode::right, and IntervalSequenceTree< Key, Allocator >::root.

template<class Key, class Allocator>
void IntervalSequenceTree< Key, Allocator >::decrement IstNode *&  x  )  const [protected]
 

Definition at line 639 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::IstNode::key, IntervalSequenceTree< Key, Allocator >::IstNode::left, IntervalSequenceTree< Key, Allocator >::IstNode::parent, IntervalSequenceTree< Key, Allocator >::IstNode::right, and IntervalSequenceTree< Key, Allocator >::root.

Referenced by IntervalSequenceTree< Key, Allocator >::__generic_iterator< is_const >::operator--().

template<class Key, class Allocator>
void IntervalSequenceTree< Key, Allocator >::deleteSubtree IstNode *&  istn  )  [static, protected]
 

Definition at line 669 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::IstNode::key, IntervalSequenceTree< Key, Allocator >::IstNode::left, and IntervalSequenceTree< Key, Allocator >::IstNode::right.

Referenced by IntervalSequenceTree< Key, Allocator >::~IntervalSequenceTree().

template<class Key, class Allocator>
bool IntervalSequenceTree< Key, Allocator >::empty  )  const
 

Definition at line 278 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::root.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::const_iterator IntervalSequenceTree< Key, Allocator >::end  )  const
 

Definition at line 243 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::const_iterator.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::iterator IntervalSequenceTree< Key, Allocator >::end  ) 
 

Definition at line 237 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::iterator.

Referenced by IntervalSequenceTree< Key, Allocator >::IntervalSequenceTree(), IntervalSequenceTree< Key, Allocator >::operator=(), and IntervalSequenceTree< Key, Allocator >::rbegin().

template<class Key, class Allocator>
void IntervalSequenceTree< Key, Allocator >::erase iterator  first,
iterator  last
 

Definition at line 539 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::iterator.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::size_type IntervalSequenceTree< Key, Allocator >::erase size_type  point,
size_type  length
 

Definition at line 416 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::increment(), IntervalSequenceTree< Key, Allocator >::IstNode::key, IntervalSequenceTree< Key, Allocator >::IstNode::left, IntervalSequenceTree< Key, Allocator >::leftmost, IntervalSequenceTree< Key, Allocator >::IstNode::length, IntervalSequenceTree< Key, Allocator >::IstNode::parent, IntervalSequenceTree< Key, Allocator >::propogateChanges(), IntervalSequenceTree< Key, Allocator >::recursiveFind(), IntervalSequenceTree< Key, Allocator >::IstNode::right, IntervalSequenceTree< Key, Allocator >::rightmost, IntervalSequenceTree< Key, Allocator >::root, and IntervalSequenceTree< Key, Allocator >::size_type.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::const_iterator IntervalSequenceTree< Key, Allocator >::find size_type  point  )  const
 

Definition at line 556 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::const_iterator, IntervalSequenceTree< Key, Allocator >::recursiveFind(), IntervalSequenceTree< Key, Allocator >::root, and IntervalSequenceTree< Key, Allocator >::size_type.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::iterator IntervalSequenceTree< Key, Allocator >::find size_type  point  ) 
 

Definition at line 548 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::iterator, IntervalSequenceTree< Key, Allocator >::recursiveFind(), IntervalSequenceTree< Key, Allocator >::root, and IntervalSequenceTree< Key, Allocator >::size_type.

template<class Key, class Allocator>
void IntervalSequenceTree< Key, Allocator >::increment IstNode *&  x  )  [static, protected]
 

Definition at line 612 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::IstNode::key, IntervalSequenceTree< Key, Allocator >::IstNode::left, IntervalSequenceTree< Key, Allocator >::IstNode::parent, and IntervalSequenceTree< Key, Allocator >::IstNode::right.

Referenced by IntervalSequenceTree< Key, Allocator >::erase(), and IntervalSequenceTree< Key, Allocator >::__generic_iterator< is_const >::operator++().

template<class Key, class Allocator>
template<class InputIterator>
void IntervalSequenceTree< Key, Allocator >::insert InputIterator  first,
InputIterator  last,
size_type  point = IST_END
 

Definition at line 406 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::size_type.

template<class Key, class Allocator = allocator<Key>>
iterator IntervalSequenceTree< Key, Allocator >::insert const value_type val,
size_type  point = IST_END
 

Referenced by IntervalSequenceTree< Key, Allocator >::IntervalSequenceTree(), and IntervalSequenceTree< Key, Allocator >::operator=().

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::size_type IntervalSequenceTree< Key, Allocator >::length  )  const
 

Returns the total length of intervals contained in this interval sequence.

Definition at line 590 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::IstNode::length, and IntervalSequenceTree< Key, Allocator >::root.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::size_type IntervalSequenceTree< Key, Allocator >::max_size  )  const
 

Definition at line 273 of file IntervalSequenceTree.h.

References IST_END.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::size_type IntervalSequenceTree< Key, Allocator >::nodeCount  )  const
 

Definition at line 596 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::root, and IntervalSequenceTree< Key, Allocator >::IstNode::subtree_size.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator > & IntervalSequenceTree< Key, Allocator >::operator= const IntervalSequenceTree< Key, Allocator > &  ist  ) 
 

Definition at line 214 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::begin(), IntervalSequenceTree< Key, Allocator >::end(), and IntervalSequenceTree< Key, Allocator >::insert().

template<class Key, class Allocator>
void IntervalSequenceTree< Key, Allocator >::propogateChanges IstNode cur_node,
int64  length_diff,
int64  subtree_diff
[static, protected]
 

Definition at line 522 of file IntervalSequenceTree.h.

References int64, IntervalSequenceTree< Key, Allocator >::IstNode::length, IntervalSequenceTree< Key, Allocator >::IstNode::parent, and IntervalSequenceTree< Key, Allocator >::IstNode::subtree_size.

Referenced by IntervalSequenceTree< Key, Allocator >::erase().

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::const_reverse_iterator IntervalSequenceTree< Key, Allocator >::rbegin  )  const
 

Definition at line 255 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::const_reverse_iterator, and IntervalSequenceTree< Key, Allocator >::end().

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::reverse_iterator IntervalSequenceTree< Key, Allocator >::rbegin  ) 
 

Definition at line 249 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::end(), and IntervalSequenceTree< Key, Allocator >::reverse_iterator.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::IstNode * IntervalSequenceTree< Key, Allocator >::recursiveFind size_type point,
IstNode node
[static, protected]
 

Definition at line 564 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::IstNode::key, IntervalSequenceTree< Key, Allocator >::IstNode::left, IntervalSequenceTree< Key, Allocator >::IstNode::length, IntervalSequenceTree< Key, Allocator >::IstNode::right, and IntervalSequenceTree< Key, Allocator >::size_type.

Referenced by IntervalSequenceTree< Key, Allocator >::erase(), and IntervalSequenceTree< Key, Allocator >::find().

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::const_reverse_iterator IntervalSequenceTree< Key, Allocator >::rend  )  const
 

Definition at line 267 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::begin(), and IntervalSequenceTree< Key, Allocator >::const_reverse_iterator.

template<class Key, class Allocator>
IntervalSequenceTree< Key, Allocator >::reverse_iterator IntervalSequenceTree< Key, Allocator >::rend  ) 
 

Definition at line 261 of file IntervalSequenceTree.h.

References IntervalSequenceTree< Key, Allocator >::begin(), and IntervalSequenceTree< Key, Allocator >::reverse_iterator.


Friends And Related Function Documentation

template<class Key, class Allocator = allocator<Key>>
friend class __generic_iterator< false > [friend]
 

Definition at line 127 of file IntervalSequenceTree.h.

template<class Key, class Allocator = allocator<Key>>
friend class __generic_iterator< true > [friend]
 

Definition at line 128 of file IntervalSequenceTree.h.


Member Data Documentation

template<class Key, class Allocator = allocator<Key>>
IstNode* IntervalSequenceTree< Key, Allocator >::leftmost [protected]
 

Left most tree node, for begin() method.

Definition at line 177 of file IntervalSequenceTree.h.

Referenced by IntervalSequenceTree< Key, Allocator >::begin(), and IntervalSequenceTree< Key, Allocator >::erase().

template<class Key, class Allocator = allocator<Key>>
IstNode* IntervalSequenceTree< Key, Allocator >::rightmost [protected]
 

Right most tree node, for end() method.

Definition at line 178 of file IntervalSequenceTree.h.

Referenced by IntervalSequenceTree< Key, Allocator >::erase().

template<class Key, class Allocator = allocator<Key>>
IstNode* IntervalSequenceTree< Key, Allocator >::root [protected]
 

Root of the tree.

Definition at line 176 of file IntervalSequenceTree.h.

Referenced by IntervalSequenceTree< Key, Allocator >::countNodes(), IntervalSequenceTree< Key, Allocator >::decrement(), IntervalSequenceTree< Key, Allocator >::empty(), IntervalSequenceTree< Key, Allocator >::erase(), IntervalSequenceTree< Key, Allocator >::find(), IntervalSequenceTree< Key, Allocator >::length(), IntervalSequenceTree< Key, Allocator >::nodeCount(), and IntervalSequenceTree< Key, Allocator >::~IntervalSequenceTree().


The documentation for this class was generated from the following file:
Generated on Mon Feb 14 19:30:00 2005 for libGenome by doxygen 1.3.8