HOG2
|
This class supports compact n-bit arrays. More...
#include <NBitArray.h>
Public Member Functions | |
NBitArray (uint64_t numEntries=0) | |
NBitArray (const char *) | |
NBitArray (const NBitArray ©Me) | |
~NBitArray () | |
NBitArray & | operator= (const NBitArray ©Me) |
bool | Equal (const NBitArray &compare) const |
void | FillMax () |
void | Clear () |
void | Resize (uint64_t newMaxEntries) |
uint64_t | Size () const |
uint64_t | Get (uint64_t index) const |
void | Set (uint64_t index, uint64_t val) |
uint64_t | GetMaxValue () const |
bool | Write (FILE *) |
bool | Read (FILE *) |
bool | Write (const char *) |
bool | Read (const char *) |
uint64_t | GetMaxValue () const |
uint64_t | Get (uint64_t index) const |
uint64_t | Get (uint64_t index) const |
uint64_t | Get (uint64_t index) const |
uint64_t | Get (uint64_t index) const |
uint64_t | Get (uint64_t index) const |
void | Set (uint64_t index, uint64_t val) |
void | Set (uint64_t index, uint64_t val) |
void | Set (uint64_t index, uint64_t val) |
void | Set (uint64_t index, uint64_t val) |
void | Set (uint64_t index, uint64_t val) |
uint64_t | Get (uint64_t index) const |
uint64_t | Get (uint64_t index) const |
uint64_t | Get (uint64_t index) const |
uint64_t | Get (uint64_t index) const |
uint64_t | Get (uint64_t index) const |
void | Set (uint64_t index, uint64_t val) |
void | Set (uint64_t index, uint64_t val) |
void | Set (uint64_t index, uint64_t val) |
void | Set (uint64_t index, uint64_t val) |
void | Set (uint64_t index, uint64_t val) |
Private Attributes | |
uint64_t * | mem |
uint64_t | entries |
uint64_t | memorySize |
This class supports compact n-bit arrays.
For (1 <= n <= 64). It is efficient for powers of two, but less so for non-powers of two. (Currently about 3x slower.)
Definition at line 23 of file NBitArray.h.
Definition at line 58 of file NBitArray.h.
Definition at line 67 of file NBitArray.h.
Definition at line 75 of file NBitArray.h.
Definition at line 85 of file NBitArray.h.
void NBitArray< numBits >::Clear |
Definition at line 129 of file NBitArray.h.
bool NBitArray< numBits >::Equal | ( | const NBitArray< numBits > & | compare | ) | const |
Definition at line 104 of file NBitArray.h.
Referenced by operator==().
void NBitArray< numBits >::FillMax |
Definition at line 123 of file NBitArray.h.
Referenced by Hexagon::Load().
uint64_t NBitArray< 64 >::Get | ( | uint64_t | index | ) | const |
Definition at line 21 of file NBitArray.cpp.
uint64_t NBitArray< 32 >::Get | ( | uint64_t | index | ) | const |
Definition at line 27 of file NBitArray.cpp.
uint64_t NBitArray< 16 >::Get | ( | uint64_t | index | ) | const |
Definition at line 33 of file NBitArray.cpp.
uint64_t NBitArray< numBits >::Get | ( | uint64_t | index | ) | const |
Definition at line 209 of file NBitArray.h.
Referenced by PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::AdditiveForwardThreadWorker(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::BackwardThreadWorker(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::DivCompress(), Hexagon::Draw(), Hexagon::DrawSetup(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ForwardBackwardThreadWorker(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ForwardThreadWorker(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ModCompress(), and PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ZeroLowValues().
uint64_t NBitArray< 2 >::Get | ( | uint64_t | index | ) | const |
Definition at line 51 of file NBitArray.cpp.
uint64_t NBitArray< 1 >::Get | ( | uint64_t | index | ) | const |
Definition at line 57 of file NBitArray.cpp.
uint64_t NBitArray< 64 >::Get | ( | uint64_t | index | ) | const |
uint64_t NBitArray< 32 >::Get | ( | uint64_t | index | ) | const |
uint64_t NBitArray< 16 >::Get | ( | uint64_t | index | ) | const |
uint64_t NBitArray< 2 >::Get | ( | uint64_t | index | ) | const |
uint64_t NBitArray< 1 >::Get | ( | uint64_t | index | ) | const |
uint64_t NBitArray< 64 >::GetMaxValue | ( | ) | const |
Definition at line 13 of file NBitArray.cpp.
|
inline |
Definition at line 38 of file NBitArray.h.
Referenced by PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::AdditiveForwardThreadWorker().
NBitArray< numBits > & NBitArray< numBits >::operator= | ( | const NBitArray< numBits > & | copyMe | ) |
Definition at line 91 of file NBitArray.h.
bool NBitArray< numBits >::Read | ( | const char * | file | ) |
Definition at line 195 of file NBitArray.h.
bool NBitArray< numBits >::Read | ( | FILE * | f | ) |
Definition at line 163 of file NBitArray.h.
Referenced by NBitArray< 8 >::NBitArray().
void NBitArray< numBits >::Resize | ( | uint64_t | newMaxEntries | ) |
Definition at line 135 of file NBitArray.h.
Referenced by PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ValueRangeCompress().
void NBitArray< numBits >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
Definition at line 224 of file NBitArray.h.
Referenced by PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::AdditiveForwardThreadWorker(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::BackwardThreadWorker(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ForwardBackwardThreadWorker(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ForwardThreadWorker(), Hexagon::Load(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ValueRangeCompress(), and PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ZeroLowValues().
void NBitArray< 64 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
Definition at line 65 of file NBitArray.cpp.
void NBitArray< 32 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
Definition at line 71 of file NBitArray.cpp.
void NBitArray< 16 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
Definition at line 79 of file NBitArray.cpp.
void NBitArray< 2 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
Definition at line 104 of file NBitArray.cpp.
void NBitArray< 1 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
Definition at line 113 of file NBitArray.cpp.
void NBitArray< 64 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
void NBitArray< 32 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
void NBitArray< 16 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
void NBitArray< 2 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
void NBitArray< 1 >::Set | ( | uint64_t | index, |
uint64_t | val | ||
) |
uint64_t NBitArray< numBits >::Size |
Definition at line 144 of file NBitArray.h.
Referenced by PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::DivCompress(), PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ModCompress(), and PDBHeuristic< TOHState< patternDisks >, TOHMove, TOH< patternDisks >, TOHState< totalDisks > >::ZeroLowValues().
bool NBitArray< numBits >::Write | ( | const char * | file | ) |
Definition at line 181 of file NBitArray.h.
bool NBitArray< numBits >::Write | ( | FILE * | f | ) |
Definition at line 150 of file NBitArray.h.
|
private |
Definition at line 46 of file NBitArray.h.
Referenced by NBitArray< 8 >::Equal(), NBitArray< 8 >::NBitArray(), and NBitArray< 8 >::operator=().
|
private |
Definition at line 45 of file NBitArray.h.
Referenced by NBitArray< 8 >::Equal(), NBitArray< 8 >::NBitArray(), and NBitArray< 8 >::operator=().
|
private |
Definition at line 47 of file NBitArray.h.
Referenced by NBitArray< 8 >::NBitArray(), and NBitArray< 8 >::operator=().