-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Interface redesign to include schemes. Minor bugs and enhancements
Bug Fixing: #47 Incorrect computation for dL and dU when K > 0 Enhancements: #12 Vectorize invsatlin function in @hopfieldnetwork class #36 Separate CHN schemes from Simulation functions - HopfieldNetworkGQKP supports 'classic' Scheme only - HopfieldNetworkTSP supports 'classic', 'classic&2opt', 'divide-conquer', 'divide-conquer&2opt' and '2opt #37 Add CheckpointPath support for HopfieldNetworkGQKP #38 Add Runge-Kutta simulation to HopfieldNetworkTSP #39 Add GPU support for all SimFcn methods #40 Allow to provide only V as input to simulation in HopfieldNetworks #41 Compute saddle point in HopfieldNetworkGQKP #42 Compute weights and biases from parameters in HopfieldNetworkGQKP networks #43 Add support for SimulationPlot in HopfieldNetworkGQKP #44 Share CheckpointPath utilities between HopfieldNetworkGQKP and HopfieldNetworkTSP #45 Vectorize simEuler method in HopfieldNetworkTSP #46 SimFcn support in HopfieldNetworkTSP #48 2-opt simulation using 'lin-kernighan' and 'hopfield' Updating release notes.
- Loading branch information
1 parent
18c081b
commit 5b4dcb6
Showing
25 changed files
with
967 additions
and
550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
function scheme = getScheme(net) | ||
scheme = net.Scheme; | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,14 +1,8 @@ | ||
function y = invsatlin(x,u0) | ||
y = zeros(size(x)); | ||
for j = 1:size(x,2) | ||
for i = 1:size(x,1); | ||
if x(i,j) < 0 | ||
y(i,j) = u0; | ||
elseif x(i,j) > 1 | ||
y(i,j) = -u0; | ||
else | ||
y(i,j) = u0 * (2*x(i,j) - 1); | ||
end | ||
end | ||
end | ||
|
||
y(x <= 0) = -u0; | ||
y(x >= 1) = u0; | ||
y(0 < x & x < 1) = u0 .* (2.*x(0 < x & x < 1) - 1); | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
function S = saddle(net, method) | ||
|
||
method = 'analytic'; % No other method currently supported for HopfieldNetworkGQKP | ||
|
||
if ~isfield(net.TrainParam, 'T') | ||
net = train(net); | ||
end | ||
S = -net.TrainParam.T\net.TrainParam.ib; | ||
|
||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.