|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectedu.memphis.ccrg.lida.episodicmemory.sdm.BasicTranslator
public class BasicTranslator
This is the class that translates from nodes to boolean vectors and vice- versa. The translation works by assigning a unique index to every node.
| Constructor Summary | |
|---|---|
BasicTranslator()
Default constructor. |
|
BasicTranslator(int size,
PerceptualAssociativeMemory pam)
Constructs a new translator with specified attributes. |
|
| Method Summary | |
|---|---|
PerceptualAssociativeMemory |
getPam()
Gets Pam |
int |
getSize()
Gets size |
void |
setPam(PerceptualAssociativeMemory pam)
Sets Pam |
void |
setSize(int s)
Sets size |
NodeStructure |
translate(cern.colt.bitvector.BitVector data)
Translates a BitVector into a NodeStructure. |
cern.colt.bitvector.BitVector |
translate(NodeStructure ns)
Translates a NodeStructure into a BitVector. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BasicTranslator()
PerceptualAssociativeMemory and vectors' size must be set before to use this Translator.
public BasicTranslator(int size,
PerceptualAssociativeMemory pam)
size - the number of positions of the bit vectorpam - the PerceptualAssociativeMemory associated with this translator| Method Detail |
|---|
public NodeStructure translate(cern.colt.bitvector.BitVector data)
BitVector into a NodeStructure. Since the method BitVector.getQuick(int)
is used, no preconditions are checked.
translate in interface Translatordata - the BitVector to be translated
NodeStructure representing the positions in the bit vector,
each node has a unique IDBitVectorpublic cern.colt.bitvector.BitVector translate(NodeStructure ns)
NodeStructure into a BitVector. Currently only nodes
are translated, but links, and maybe activations must be also
handled.
translate in interface Translatorns - the NodeStructure to be translated
BitVector representing the Node objects in the NodeStructurepublic int getSize()
public void setSize(int s)
s - the vector's size in the SparseDistributedMemorypublic PerceptualAssociativeMemory getPam()
PerceptualAssociativeMemorypublic void setPam(PerceptualAssociativeMemory pam)
pam - the PerceptualAssociativeMemory to set
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||