edu.memphis.ccrg.lida.episodicmemory.sdm
Interface SparseDistributedMemory

All Known Implementing Classes:
SparseDistributedMemoryImpl

public interface SparseDistributedMemory

Implementation of Kanerva's sparse distributed memory. This implementation is based on the model described in P. Kanerva, "Sparse Distributed Memory and Related Models" in Associative Neural Memories: Theory and Implementation , pp. 50-76, Oxford University Press, 1993.

Author:
Javier Snaider

Method Summary
 void mappedStore(cern.colt.bitvector.BitVector word, cern.colt.bitvector.BitVector mapping)
          Stores word in this sparse distributed memory using the word as address.
 cern.colt.bitvector.BitVector retrieve(cern.colt.bitvector.BitVector addr)
          Retrieves the contents of this sparse distributed memory at the given address.
 cern.colt.bitvector.BitVector retrieve(cern.colt.bitvector.BitVector addr, cern.colt.bitvector.BitVector mapping)
          Retrieves the contents of this SDM at addr.
 cern.colt.bitvector.BitVector retrieveIterating(cern.colt.bitvector.BitVector addr)
          Retrieves the contents of this sparse distributed memory at the given address iterating this process until result is equal to the address.
 cern.colt.bitvector.BitVector retrieveIterating(cern.colt.bitvector.BitVector addr, cern.colt.bitvector.BitVector mapping)
          Retrieves the contents of this SDM at addr.
 void store(cern.colt.bitvector.BitVector word)
          Stores word in this sparse distributed memory using the word as address.
 void store(cern.colt.bitvector.BitVector word, cern.colt.bitvector.BitVector addr)
          Stores word in the given address in this sparse distributed memory.
 

Method Detail

store

void store(cern.colt.bitvector.BitVector word,
           cern.colt.bitvector.BitVector addr)
Stores word in the given address in this sparse distributed memory.

Parameters:
word - the word to be stored
addr - the address where the word is to be stored

store

void store(cern.colt.bitvector.BitVector word)
Stores word in this sparse distributed memory using the word as address.

Parameters:
word - the word to be stored

mappedStore

void mappedStore(cern.colt.bitvector.BitVector word,
                 cern.colt.bitvector.BitVector mapping)
Stores word in this sparse distributed memory using the word as address. The word is mapped (using XOR) with the mapping address.

Parameters:
word - the word to be stored.
mapping - the mapping address.

retrieve

cern.colt.bitvector.BitVector retrieve(cern.colt.bitvector.BitVector addr)
Retrieves the contents of this sparse distributed memory at the given address.

Parameters:
addr - the address of the contents to be retrieved
Returns:
the contents of this sparse distributed memory associated with the given address

retrieveIterating

cern.colt.bitvector.BitVector retrieveIterating(cern.colt.bitvector.BitVector addr)
Retrieves the contents of this sparse distributed memory at the given address iterating this process until result is equal to the address.

Parameters:
addr - the address of the contents to be retrieved
Returns:
the contents of this sparse distributed memory associated with the given address or null if the iteration did not converge

retrieveIterating

cern.colt.bitvector.BitVector retrieveIterating(cern.colt.bitvector.BitVector addr,
                                                cern.colt.bitvector.BitVector mapping)
Retrieves the contents of this SDM at addr. addr is first mapped using mapping. then retrieve contents of this SDM with mapped address until result of retrieval is equal to address.

Parameters:
addr - bitvector address that is being retreived
mapping - mapping to use
Returns:
the contents of this sparse distributed memory associated with the given address or null if the iteration did not converge

retrieve

cern.colt.bitvector.BitVector retrieve(cern.colt.bitvector.BitVector addr,
                                       cern.colt.bitvector.BitVector mapping)
Retrieves the contents of this SDM at addr. addr is first mapped using mapping. then retrieve contents of this SDM with mapped address.
Note that the retrieved vector is mapped back before return it.

Parameters:
addr - the address vector
mapping - the mapping vector
Returns:
the contents of this sparse distributed memory associated with the given address or null if the iteration did not converge