VALUE - essentially ignored, since no values are stored in this table. Although subclasses can.public abstract class IntArrayBasedKeyTable<VALUE> extends PowerOfTwoQuantizedTable<VALUE>
| Modifier and Type | Method and Description |
|---|---|
void |
clear()
Removes all entries from this table.
|
long |
hopBits(int index)
A short summary of the hop bits format: It's a bit map represented as an int, where each set bit represents
an offset where there's a neighbor for this index.
|
long |
move(int fromIndex,
int toIndex)
Moves the key/value from one index to another, any hop bits stay.
|
void |
moveHopBit(int index,
int hd,
int delta)
Moves one hop bit
delta steps. |
void |
put(int index,
long key,
VALUE value)
Puts (key/value) at the given
index. |
void |
putHopBit(int index,
int hd)
Adds one hop bit to the set of hop bits at the given index.
|
VALUE |
putValue(int index,
VALUE value)
Puts, actually overwrites, the value at the given
index. |
VALUE |
remove(int index)
Removes the currently assigned key/value from the given
index. |
void |
removeHopBit(int index,
int hd)
Removes one hop bit from the set of hop bits at the given index.
|
VALUE |
value(int index)
OPTIONAL operation.
|
baseCapacity, capacity, close, grow, h, isEmpty, mask, nullKey, size, toString, version, versionpublic void put(int index,
long key,
VALUE value)
Tableindex. This index must contractually be free at the point where the
algorithm calls this method.index - the index to put this key/value in.key - the key to put.value - the value to put.public VALUE remove(int index)
Tableindex.index - the index to remove key/value from.public long move(int fromIndex,
int toIndex)
TablefromIndex followed by a put at toIndex. After this method has been called there will no longer
be any key/value assigned at fromIndex.fromIndex - the index to move the key/value from.toIndex - the index to move the key/value to.public VALUE value(int index)
Tablenull if unsupported.null will be returned.public VALUE putValue(int index, VALUE value)
Tableindex. This index will contractually be occupied
at the point where the algorithm calls this method. This new value
replaces the existing value at this index.index - the index to put this value in.value - the value to put at this index.public long hopBits(int index)
Table....[0000,0001][0000,0100]In the above example, if we assume the index carrying these hop bits is 5, then index 5 has two neighbors: index 8 and index 14. (the least significant bit represents an offset of 1). Maximum number of hop bits is controlled by
Table.h().
Interesting to note is that hop bits for an index and key/value are not really associated, where a key/value
can be moved to a new location, but the hop bits stay behind. The location of Hop bits
is tied to table index, whereas the location of key/value is tied to table index AND hop bits.index - the index to get the hop bits for.public void putHopBit(int index,
int hd)
Tableindex - the index to add the hop bit at.hd - h-delta, i.e. which hop bit to set, zero-based.Table.hopBits(int)public void moveHopBit(int index,
int hd,
int delta)
Tabledelta steps. If delta is positive it will be moved towards msb,
if negative towards lsb.index - the index to move the hop bit for.hd - the hop bit to move.delta - how far (and based on sign) which direction to move it in.public void removeHopBit(int index,
int hd)
Tableindex - the index to remove the hop bit from.hd - h-delta, i.e. which hop bit to remove, zero-based.Table.hopBits(int)Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.