HOG2
Public Member Functions | Private Types | Private Attributes | List of all members
DVCBSOpenClosed< state, dataStructure > Class Template Reference

#include <DVCBSOpenClosed.h>

Public Member Functions

 DVCBSOpenClosed ()
 
 ~DVCBSOpenClosed ()
 
void Reset ()
 Remove all objects from queue. More...
 
uint64_t AddOpenNode (const state &val, uint64_t hash, double g, double h, uint64_t parent=kTBDNoNode, stateLocation whichQueue=kOpenWaiting)
 Add object into open list. More...
 
uint64_t AddClosedNode (state &val, uint64_t hash, double g, double h, uint64_t parent=kTBDNoNode)
 Add object into closed list. More...
 
void KeyChanged (uint64_t objKey, double oldVal)
 Indicate that the key for a particular object has changed. More...
 
void eraseFromNodesMap (stateLocation whichQueue, uint64_t val)
 
void eraseFromNodesMap (stateLocation whichQueue, uint64_t val, double oldKey)
 
void eraseFirstClusterFromNodesMap (stateLocation whichQueue)
 
void putInNodesMap (stateLocation whichQueue, uint64_t val)
 
void Remove (uint64_t objKey)
 
stateLocation Lookup (uint64_t hashKey, uint64_t &objKey) const
 
dataStructure & Lookup (uint64_t objKey)
 
const dataStructure & Lookat (uint64_t objKey) const
 
double getFirstKey (stateLocation whichQueue) const
 
uint64_t Close ()
 
uint64_t CloseAtIndex (uint64_t index)
 
void PutToReady ()
 
size_t OpenReadySize () const
 
size_t OpenWaitingSize () const
 
size_t OpenSize () const
 
std::map< double, std::set< uint64_t > >::iterator getNodesMapBegin (stateLocation whichQueue)
 
std::map< double, std::set< uint64_t > >::iterator getNodesMapEnd (stateLocation whichQueue)
 
std::set< uint64_t > getNodesMapElements (stateLocation whichQueue, double key)
 
size_t ClosedSize () const
 
size_t size () const
 
void verifyData ()
 

Private Types

typedef std::unordered_map< uint64_t, uint64_t, AHash64IndexTable
 

Private Attributes

std::vector< std::map< double, std::set< uint64_t > > > nodesMap
 
std::vector< double > nodesMapSize
 
IndexTable table
 
std::vector< dataStructure > elements
 

Detailed Description

template<typename state, class dataStructure = DVCBSOpenClosedData<state>>
class DVCBSOpenClosed< state, dataStructure >

Definition at line 37 of file DVCBSOpenClosed.h.

Member Typedef Documentation

◆ IndexTable

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
typedef std::unordered_map<uint64_t, uint64_t, AHash64> DVCBSOpenClosed< state, dataStructure >::IndexTable
private

Definition at line 86 of file DVCBSOpenClosed.h.

Constructor & Destructor Documentation

◆ DVCBSOpenClosed()

template<typename state , class dataStructure >
DVCBSOpenClosed< state, dataStructure >::DVCBSOpenClosed

Definition at line 95 of file DVCBSOpenClosed.h.

◆ ~DVCBSOpenClosed()

template<typename state , class dataStructure >
DVCBSOpenClosed< state, dataStructure >::~DVCBSOpenClosed

Definition at line 108 of file DVCBSOpenClosed.h.

Member Function Documentation

◆ AddClosedNode()

template<typename state , class dataStructure >
uint64_t DVCBSOpenClosed< state, dataStructure >::AddClosedNode ( state &  val,
uint64_t  hash,
double  g,
double  h,
uint64_t  parent = kTBDNoNode 
)

Add object into closed list.

Definition at line 163 of file DVCBSOpenClosed.h.

◆ AddOpenNode()

template<typename state , class dataStructure >
uint64_t DVCBSOpenClosed< state, dataStructure >::AddOpenNode ( const state &  val,
uint64_t  hash,
double  g,
double  h,
uint64_t  parent = kTBDNoNode,
stateLocation  whichQueue = kOpenWaiting 
)

Add object into open list.

Definition at line 132 of file DVCBSOpenClosed.h.

◆ Close()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
uint64_t DVCBSOpenClosed< state, dataStructure >::Close ( )

◆ CloseAtIndex()

template<typename state , class dataStructure >
uint64_t DVCBSOpenClosed< state, dataStructure >::CloseAtIndex ( uint64_t  index)

Definition at line 278 of file DVCBSOpenClosed.h.

◆ ClosedSize()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
size_t DVCBSOpenClosed< state, dataStructure >::ClosedSize ( ) const
inline

Definition at line 73 of file DVCBSOpenClosed.h.

◆ eraseFirstClusterFromNodesMap()

template<typename state , class dataStructure >
void DVCBSOpenClosed< state, dataStructure >::eraseFirstClusterFromNodesMap ( stateLocation  whichQueue)

Definition at line 246 of file DVCBSOpenClosed.h.

◆ eraseFromNodesMap() [1/2]

template<typename state , class dataStructure >
void DVCBSOpenClosed< state, dataStructure >::eraseFromNodesMap ( stateLocation  whichQueue,
uint64_t  val 
)

Definition at line 204 of file DVCBSOpenClosed.h.

◆ eraseFromNodesMap() [2/2]

template<typename state , class dataStructure >
void DVCBSOpenClosed< state, dataStructure >::eraseFromNodesMap ( stateLocation  whichQueue,
uint64_t  val,
double  oldKey 
)

Definition at line 230 of file DVCBSOpenClosed.h.

◆ getFirstKey()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
double DVCBSOpenClosed< state, dataStructure >::getFirstKey ( stateLocation  whichQueue) const
inline

Definition at line 54 of file DVCBSOpenClosed.h.

Referenced by DVCBSQueue< state >::getVertexCover().

◆ getNodesMapBegin()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
std::map<double,std::set<uint64_t> >::iterator DVCBSOpenClosed< state, dataStructure >::getNodesMapBegin ( stateLocation  whichQueue)
inline

Definition at line 68 of file DVCBSOpenClosed.h.

Referenced by DVCBSQueue< state >::getVertexCover().

◆ getNodesMapElements()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
std::set<uint64_t> DVCBSOpenClosed< state, dataStructure >::getNodesMapElements ( stateLocation  whichQueue,
double  key 
)
inline

Definition at line 70 of file DVCBSOpenClosed.h.

Referenced by DVCBSQueue< state >::getVertexCover().

◆ getNodesMapEnd()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
std::map<double,std::set<uint64_t> >::iterator DVCBSOpenClosed< state, dataStructure >::getNodesMapEnd ( stateLocation  whichQueue)
inline

Definition at line 69 of file DVCBSOpenClosed.h.

Referenced by DVCBSQueue< state >::getVertexCover().

◆ KeyChanged()

template<typename state , class dataStructure >
void DVCBSOpenClosed< state, dataStructure >::KeyChanged ( uint64_t  objKey,
double  oldVal 
)

Indicate that the key for a particular object has changed.

Definition at line 179 of file DVCBSOpenClosed.h.

◆ Lookat()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
const dataStructure& DVCBSOpenClosed< state, dataStructure >::Lookat ( uint64_t  objKey) const
inline

Definition at line 53 of file DVCBSOpenClosed.h.

◆ Lookup() [1/2]

template<typename state , class dataStructure >
stateLocation DVCBSOpenClosed< state, dataStructure >::Lookup ( uint64_t  hashKey,
uint64_t &  objKey 
) const

Definition at line 265 of file DVCBSOpenClosed.h.

Referenced by DVCBSQueue< state >::tieBreakCriteria().

◆ Lookup() [2/2]

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
dataStructure& DVCBSOpenClosed< state, dataStructure >::Lookup ( uint64_t  objKey)
inline

Definition at line 52 of file DVCBSOpenClosed.h.

◆ OpenReadySize()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
size_t DVCBSOpenClosed< state, dataStructure >::OpenReadySize ( ) const
inline

◆ OpenSize()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
size_t DVCBSOpenClosed< state, dataStructure >::OpenSize ( ) const
inline

Definition at line 66 of file DVCBSOpenClosed.h.

Referenced by DVCBSQueue< state >::getVertexCover().

◆ OpenWaitingSize()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
size_t DVCBSOpenClosed< state, dataStructure >::OpenWaitingSize ( ) const
inline

◆ putInNodesMap()

template<typename state , class dataStructure >
void DVCBSOpenClosed< state, dataStructure >::putInNodesMap ( stateLocation  whichQueue,
uint64_t  val 
)

Definition at line 186 of file DVCBSOpenClosed.h.

◆ PutToReady()

template<typename state , class dataStructure >
void DVCBSOpenClosed< state, dataStructure >::PutToReady

Definition at line 288 of file DVCBSOpenClosed.h.

Referenced by DVCBSQueue< state >::getVertexCover().

◆ Remove()

template<typename state , class dataStructure >
void DVCBSOpenClosed< state, dataStructure >::Remove ( uint64_t  objKey)

Definition at line 257 of file DVCBSOpenClosed.h.

◆ Reset()

template<typename state , class dataStructure >
void DVCBSOpenClosed< state, dataStructure >::Reset

Remove all objects from queue.

Definition at line 116 of file DVCBSOpenClosed.h.

Referenced by DVCBSQueue< state >::Reset().

◆ size()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
size_t DVCBSOpenClosed< state, dataStructure >::size ( ) const
inline

Definition at line 74 of file DVCBSOpenClosed.h.

Referenced by DVCBSOpenClosed< state >::ClosedSize().

◆ verifyData()

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
void DVCBSOpenClosed< state, dataStructure >::verifyData ( )

Member Data Documentation

◆ elements

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
std::vector<dataStructure> DVCBSOpenClosed< state, dataStructure >::elements
private

◆ nodesMap

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
std::vector<std::map<double,std::set<uint64_t> > > DVCBSOpenClosed< state, dataStructure >::nodesMap
private

◆ nodesMapSize

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
std::vector<double> DVCBSOpenClosed< state, dataStructure >::nodesMapSize
private

◆ table

template<typename state , class dataStructure = DVCBSOpenClosedData<state>>
IndexTable DVCBSOpenClosed< state, dataStructure >::table
private

Definition at line 88 of file DVCBSOpenClosed.h.


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