Skip to content

Commit

Permalink
Rename state manager to domain manager in learning ruel
Browse files Browse the repository at this point in the history
  • Loading branch information
hmcalister committed Nov 22, 2023
1 parent dbe0859 commit b5ced88
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions hopfieldnetwork/LearningRule.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
package hopfieldnetwork

import (
"hmcalister/hopfield/hopfieldnetwork/states/statemanager"
"hmcalister/hopfield/hopfieldnetwork/states/domainmanager"
"math"

"gonum.org/v1/gonum/mat"
Expand Down Expand Up @@ -78,7 +78,7 @@ func hebbian(network *HopfieldNetwork, states []*mat.VecDense) {
// Compute the bipolar mapped hebbian weight update
func bipolarMappedHebbian(network *HopfieldNetwork, states []*mat.VecDense) {

bipolarStateManager := statemanager.BipolarStateManager{}
bipolarStateManager := domainmanager.BinaryDomainManager{}
mappedTargetStates := make([]*mat.VecDense, len(states))
for stateIndex := range states {
mappedTargetStates[stateIndex] = mat.VecDenseCopyOf(states[stateIndex])
Expand Down Expand Up @@ -119,7 +119,7 @@ func delta(network *HopfieldNetwork, states []*mat.VecDense) {
// Compute the bipolar mapped delta weight update
func bipolarMappedDelta(network *HopfieldNetwork, states []*mat.VecDense) {

bipolarStateManager := statemanager.BipolarStateManager{}
bipolarStateManager := domainmanager.BipolarDomainManager{}
mappedTargetStates := make([]*mat.VecDense, len(states))
for stateIndex := range states {
mappedTargetStates[stateIndex] = mat.VecDenseCopyOf(states[stateIndex])
Expand Down Expand Up @@ -165,7 +165,7 @@ func thermalDelta(network *HopfieldNetwork, states []*mat.VecDense) {
// Compute the bipolar mapped thermal delta weight update
func bipolarMappedThermalDelta(network *HopfieldNetwork, states []*mat.VecDense) {

bipolarStateManager := statemanager.BipolarStateManager{}
bipolarStateManager := domainmanager.BipolarDomainManager{}
mappedTargetStates := make([]*mat.VecDense, len(states))
for stateIndex := range states {
mappedTargetStates[stateIndex] = mat.VecDenseCopyOf(states[stateIndex])
Expand Down

0 comments on commit b5ced88

Please sign in to comment.