|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.memphis.ccrg.lida.episodicmemory.sdm.HardLocationImpl
public class HardLocationImpl
Default implementation of HardLocation.
| Constructor Summary | |
|---|---|
HardLocationImpl(cern.colt.bitvector.BitVector address)
Constructs a new hard location with specified address |
|
HardLocationImpl(cern.colt.bitvector.BitVector address,
int wordLength)
Constructs a new hard location with specified address and length. |
|
| 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[] buff)
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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public HardLocationImpl(cern.colt.bitvector.BitVector address,
int wordLength)
address - BitVectorwordLength - length of the wordspublic HardLocationImpl(cern.colt.bitvector.BitVector address)
address - BitVector address of this HardLocation| Method Detail |
|---|
public cern.colt.bitvector.BitVector getAddress()
HardLocation
getAddress in interface HardLocationpublic void setAddress(cern.colt.bitvector.BitVector address)
HardLocation
setAddress in interface HardLocationaddress - the BitVector address to setpublic byte[] getCounters()
HardLocation
getCounters in interface HardLocationpublic int getWriteCount()
HardLocation
getWriteCount in interface HardLocationpublic void write(cern.colt.bitvector.BitVector word)
HardLocationBitVector 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.
write in interface HardLocationword - word to be writtenpublic void setCounters(byte[] newCounters)
HardLocation
setCounters in interface HardLocationnewCounters - new counterspublic int[] read(int[] buff)
HardLocation
read in interface HardLocationbuff - an int[] buffer where the result of the read is added
public int hammingDistance(cern.colt.bitvector.BitVector vector)
HardLocationBitVector and the address of this HardLocation
hammingDistance in interface HardLocationvector - BitVector to be compared with this HardLocation
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||