dejavu
Fast probabilistic symmetry detection.
Loading...
Searching...
No Matches
dejavu::ds::workset_t< T > Class Template Reference

Set with counting. More...

#include <ds.h>

+ Collaboration diagram for dejavu::ds::workset_t< T >:

Public Member Functions

 workset_t ()=default
 
 workset_t (int size)
 
void initialize (int size)
 
void set (int index, T value)
 
get (int index)
 
void reset ()
 
void reset_hard ()
 
inc (int index)
 
void inc_nr (int index)
 
 ~workset_t ()
 

Public Attributes

worklist reset_queue
 

Detailed Description

template<class T>
class dejavu::ds::workset_t< T >

Set with counting.

Set on a statically specified domain of elements 1, ..., size, where each element holds an additional counter. Time complexity is O(1) for set, inc, get, and amortized O(1) for reset.

Definition at line 466 of file ds.h.

Constructor & Destructor Documentation

◆ workset_t() [1/2]

template<class T >
dejavu::ds::workset_t< T >::workset_t ( )
default

Default constructor, does not allocate any memory.

◆ workset_t() [2/2]

template<class T >
dejavu::ds::workset_t< T >::workset_t ( int  size)
inlineexplicit

Constructor that allocates the internal array with size size. The allocated memory is not initialized.

Parameters
sizeSize to allocate.

Definition at line 479 of file ds.h.

◆ ~workset_t()

template<class T >
dejavu::ds::workset_t< T >::~workset_t ( )
inline

Definition at line 527 of file ds.h.

Member Function Documentation

◆ get()

template<class T >
T dejavu::ds::workset_t< T >::get ( int  index)
inline

Definition at line 499 of file ds.h.

◆ inc()

template<class T >
T dejavu::ds::workset_t< T >::inc ( int  index)
inline

Definition at line 514 of file ds.h.

◆ inc_nr()

template<class T >
void dejavu::ds::workset_t< T >::inc_nr ( int  index)
inline

Definition at line 522 of file ds.h.

◆ initialize()

template<class T >
void dejavu::ds::workset_t< T >::initialize ( int  size)
inline

Definition at line 483 of file ds.h.

◆ reset()

template<class T >
void dejavu::ds::workset_t< T >::reset ( )
inline

Definition at line 505 of file ds.h.

◆ reset_hard()

template<class T >
void dejavu::ds::workset_t< T >::reset_hard ( )
inline

Definition at line 509 of file ds.h.

◆ set()

template<class T >
void dejavu::ds::workset_t< T >::set ( int  index,
value 
)
inline

Definition at line 493 of file ds.h.

Member Data Documentation

◆ reset_queue

template<class T >
worklist dejavu::ds::workset_t< T >::reset_queue

Definition at line 532 of file ds.h.


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