|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface HardLocation
Hard locations are basic components of SparseDistributedMemory
. Each has
a unique address that consists of a BitVector
of size equal to that of the SparseDistributedMemory
.
It is composed of multiple counters (one for each dimension of the space). A HardLocation can
be written to or read from.
Method Summary | |
---|---|
cern.colt.bitvector.BitVector |
getAddress()
Gets address |
byte[] |
getCounters()
Returns the counters of this HardLocation Each HardLocation has wordSize counters. |
int |
getWriteCount()
Gets write count |
int |
hammingDistance(cern.colt.bitvector.BitVector vector)
Returns the Hamming distance between a BitVector and the address of this HardLocation |
int[] |
read(int[] buffer)
Reads this HardLocation. |
void |
setAddress(cern.colt.bitvector.BitVector address)
Sets the address of this HardLocation in the vector space |
void |
setCounters(byte[] newCounters)
Sets the counters of this HardLocation Each HardLocation has wordSize counters. |
void |
write(cern.colt.bitvector.BitVector word)
Writes specified BitVector to this HardLocation. |
Method Detail |
---|
cern.colt.bitvector.BitVector getAddress()
void setAddress(cern.colt.bitvector.BitVector address)
address
- the BitVector
address to setbyte[] getCounters()
void setCounters(byte[] newCounters)
newCounters
- new countersint getWriteCount()
void write(cern.colt.bitvector.BitVector word)
BitVector
to this HardLocation.
For each bit in word, the corresponding counter is incremented if the bit is 1 or decremented if
the bit is 0.
word
- word to be writtenint[] read(int[] buffer)
buffer
- an int[] buffer where the result of the read is added
int hammingDistance(cern.colt.bitvector.BitVector vector)
BitVector
and the address of this HardLocation
vector
- BitVector
to be compared with this HardLocation
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |