Skip to content

Commit

Permalink
Implement Connections in SP
Browse files Browse the repository at this point in the history
  • Loading branch information
david-ragazzi committed Apr 26, 2015
1 parent b3af730 commit 11113e1
Show file tree
Hide file tree
Showing 7 changed files with 467 additions and 373 deletions.
21 changes: 0 additions & 21 deletions nupic/research/connections.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,24 +281,3 @@ def _validatePermanence(permanence):
"""
if permanence < 0 or permanence > 1:
raise ValueError("Invalid permanence")



class DistalConnections(Connections):
"""
Inherited class dedicated to be a front-end class for the distal connectivity of a
collection of cells.
"""

def __init__(self, numCells):
"""
@param numCells (int) Number of cells in collection.
"""

super(DistalConnections, self).__init__(numCells)

def cellForSegment(self, segment):
return self.elementForSegment(segment)

def segmentsForCell(self, cell):
return self.segmentsForElement(cell)
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ def mmPrettyPrintConnections(self):
for cell in cells:
segmentDict = dict()

for seg in self.connections.segmentsForCell(cell):
for seg in self.connections.segmentsForElement(cell):
synapseList = []

for synapse in self.connections.synapsesForSegment(seg):
Expand Down
Loading

0 comments on commit 11113e1

Please sign in to comment.