Changeset 14927 for branches/PersistenceReintegration/HeuristicLab.Problems.NK/3.3/NKBitFlipMoveEvaluator.cs
- Timestamp:
- 05/04/17 17:19:35 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/PersistenceReintegration/HeuristicLab.Problems.NK/3.3/NKBitFlipMoveEvaluator.cs
r14185 r14927 26 26 using HeuristicLab.Encodings.BinaryVectorEncoding; 27 27 using HeuristicLab.Parameters; 28 using HeuristicLab.Persistence .Default.CompositeSerializers.Storable;28 using HeuristicLab.Persistence; 29 29 30 30 namespace HeuristicLab.Problems.NK { 31 31 32 32 [Item("NK BitFlip Move Evaluator", "Evaluates a single bit flip on an NK landscape.")] 33 [Storable Class]33 [StorableType("7d2664ea-fc8d-4e3e-a384-e2108265cce2")] 34 34 public class NKBitFlipMoveEvaluator : NKMoveEvaluator, IOneBitflipMoveOperator { 35 35 public ILookupParameter<OneBitflipMove> OneBitflipMoveParameter { … … 80 80 double[] w = NKLandscape.Normalize(weights); 81 81 foreach (var c in affectedFitnessComponents) { 82 moveQuality -= w[c %w.Length]*NKLandscape.F_i(x, c, g[c], seed, q, p);83 moveQuality += w[c %w.Length]*NKLandscape.F_i(y, c, g[c], seed, q, p);82 moveQuality -= w[c % w.Length] * NKLandscape.F_i(x, c, g[c], seed, q, p); 83 moveQuality += w[c % w.Length] * NKLandscape.F_i(y, c, g[c], seed, q, p); 84 84 } 85 85 }
Note: See TracChangeset
for help on using the changeset viewer.