1: ================================================================================
 2: 
 3: Smalltalk defineClass: #SynapseNeuralConnector
 4:     superclass: #{Core.Object}
 5:     indexedType: #none
 6:     private: false
 7:     instanceVariableNames: 'valueHistory dependentCollection '
 8:     classInstanceVariableNames: ''
 9:     imports: ''
10:     category: ''
11: 
12: ================================================================================
13: 
14: SynapseNeuralConnector method for 'dependents operation'
15: 
16: deleteNeuron: aNeuron port: portSymbol
17: 
18:     self dependentCollection
19:         reject: [:anAssociation | anAssociation key = portSymbol and: [anAssociation value = aNeuron]]
20: 
21: ------------------------------------------------------------
22: 
23: SynapseNeuralConnector method for 'accessing'
24: 
25: dependentCollection
26: 
27:     dependentCollection ifNil: [dependentCollection := OrderedCollection new].
28:     ^dependentCollection
29: 
30: ------------------------------------------------------------
31: 
32: SynapseNeuralConnector method for 'initialize-release'
33: 
34: initialize
35: 
36:     valueHistory := nil.
37:     dependentCollection := nil
38: 
39: ------------------------------------------------------------
40: 
41: SynapseNeuralConnector method for 'dependents operation'
42: 
43: registerNeuron: aNeuron port: portSymbol
44: 
45:     self dependentCollection add: portSymbol -> aNeuron
46: 
47: ------------------------------------------------------------
48: 
49: SynapseNeuralConnector method for 'evaluating'
50: 
51: value: aValue
52: 
53:     self valueHistory add: aValue.
54:     self dependentCollection do: 
55:             [:anAssociation |
56:             | portSymbol aNeuron |
57:             portSymbol := anAssociation key.
58:             aNeuron := anAssociation value.
59:             aNeuron input: aValue port: portSymbol]
60: 
61: ------------------------------------------------------------
62: 
63: SynapseNeuralConnector method for 'accessing'
64: 
65: valueHistory
66: 
67:     valueHistory ifNil: [valueHistory := OrderedCollection new].
68:     ^valueHistory
69: 
70: ================================================================================
71: 
72: Smalltalk.SynapseNeuralConnector class
73:     instanceVariableNames: ''
74: 
75: ================================================================================
76: 
77: SynapseNeuralConnector class method for 'instance creation'
78: 
79: new
80: 
81:     ^(super new)
82:         initialize;
83:         yourself
84: 
85: ================================================================================

This document was generated by KSU.TextDoclet on 2013/02/22 at 01:01:17.