Programmer's Documentation

Classes | Public Member Functions | Static Private Member Functions | Private Attributes | Friends | List of all members
DcEdgeOpenTable Class Reference

Detailed Description

Edge hash table.

A linearly stored, open-adressing hash table for DcEdge objects. Works in 64bit systems only, because it relies on the ability to store both edge vertex indices in a single size_t value.

  • Use first 8 bytes as key instead of key computation
  • Pack entire DcEdge objects into table and let table own edges
  • Store src+1 and trg+1 to eliminate key==0 case, elide branches
See Also
DcEdge, PreshingTable

#include <dcedgetable.h>

Collaboration diagram for DcEdgeOpenTable:


class  Iterator

Public Member Functions

 DcEdgeOpenTable (size_t initialSize=512)
 initialize with size guess
size_t size () const
 number of edges presently stored in container
DcEdgefind (uint src, uint trg)
 lookup edge
void insert (DcEdge *pe)
 insert edge
void erase (uint src, uint trg)
 erase edge
void clear ()
 erase contents
Iterator begin ()
 iteration over all edges
Iterator end ()
 iteration over all edges

Static Private Member Functions

static uint64_t keyOf (uint src, uint trg)
 compute key for src/target combination
static DcEdgedecode (const PreshingTable::Cell *c)
 decode content pointer
static size_t encode (const DcEdge *ptr)
 encode content pointer

Private Attributes

PreshingTable m_imap
 64bit integer key-value map


class Iterator

The documentation for this class was generated from the following file:
Generated on Wed Jan 19 2022 03:03:16 for libsurf by   doxygen 1.8.5