Skip to content

Commit

Permalink
LateralConnectLayer was not updated; fixed
Browse files Browse the repository at this point in the history
  • Loading branch information
rcoreilly committed Oct 27, 2024
1 parent 77842e7 commit ba32fb2
Showing 1 changed file with 1 addition and 24 deletions.
25 changes: 1 addition & 24 deletions leabra/networkbase.go
Original file line number Diff line number Diff line change
Expand Up @@ -331,34 +331,11 @@ func (nt *Network) BidirConnectLayers(low, high *Layer, pat paths.Pattern) (fwdp
return
}

// BidirConnectLayersPy establishes bidirectional pathways between two layers,
// with low = lower layer that sends a Forward pathway to the high layer,
// and receives a Back pathway in the opposite direction.
// Does not yet actually connect the units within the layers -- that
// requires Build.
// Py = python version with no return vals.
func (nt *Network) BidirConnectLayersPy(low, high *Layer, pat paths.Pattern) {
nt.ConnectLayers(low, high, pat, ForwardPath)
nt.ConnectLayers(high, low, pat, BackPath)
}

// LateralConnectLayer establishes a self-pathway within given layer.
// Does not yet actually connect the units within the layers -- that
// requires Build.
func (nt *Network) LateralConnectLayer(lay *Layer, pat paths.Pattern) *Path {
pt := &Path{}
return nt.LateralConnectLayerPath(lay, pat, pt)
}

// LateralConnectLayerPath makes lateral self-pathway using given pathway.
// Does not yet actually connect the units within the layers -- that
// requires Build.
func (nt *Network) LateralConnectLayerPath(lay *Layer, pat paths.Pattern, pt *Path) *Path {
// pt.Init(pt)
pt.Connect(lay, lay, pat, LateralPath)
lay.RecvPaths = append(lay.RecvPaths, pt)
lay.SendPaths = append(lay.SendPaths, pt)
return pt
return nt.ConnectLayers(lay, lay, pat, LateralPath)
}

// Build constructs the layer and pathway state based on the layer shapes
Expand Down

0 comments on commit ba32fb2

Please sign in to comment.