Example #1
0
 /**
  * Updates this {@code Pool}'s store of permanences for the specified {@link Synapse}
  *
  * @param c the connections memory
  * @param s the synapse who's permanence is recorded
  * @param permanence the permanence value to record
  */
 public void updatePool(Connections c, Synapse s, double permanence) {
   int inputIndex = s.getInputIndex();
   if (synapsesBySourceIndex.get(inputIndex) == null) {
     synapsesBySourceIndex.put(inputIndex, s);
   }
   if (permanence > c.getSynPermConnected()) {
     synapseConnections.add(inputIndex);
   } else {
     synapseConnections.remove(inputIndex);
   }
 }
Example #2
0
 public boolean remove(int x, int y, int z) {
   int key = hash.key(x, y, z);
   return set.remove(key);
 }