Changeset 12969 for branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators
- Timestamp:
- 09/25/15 14:39:59 (9 years ago)
- Location:
- branches/gteufl
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/gteufl
- Property svn:ignore
-
old new 8 8 FxCopResults.txt 9 9 Google.ProtocolBuffers-0.9.1.dll 10 Google.ProtocolBuffers-2.4.1.473.dll 10 11 HeuristicLab 3.3.5.1.ReSharper.user 11 12 HeuristicLab 3.3.6.0.ReSharper.user 12 13 HeuristicLab.4.5.resharper.user 13 14 HeuristicLab.ExtLibs.6.0.ReSharper.user 15 HeuristicLab.Scripting.Development 14 16 HeuristicLab.resharper.user 15 17 ProtoGen.exe … … 17 19 _ReSharper.HeuristicLab 18 20 _ReSharper.HeuristicLab 3.3 21 _ReSharper.HeuristicLab 3.3 Tests 19 22 _ReSharper.HeuristicLab.ExtLibs 20 23 bin 21 24 protoc.exe 22 _ReSharper.HeuristicLab 3.3 Tests 23 Google.ProtocolBuffers-2.4.1.473.dll 25 obj
-
- Property svn:mergeinfo changed
-
Property
svn:global-ignores
set to
*.nuget
packages
- Property svn:ignore
-
branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding
- Property svn:mergeinfo changed
-
branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ChangeNodeTypeManipulation.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.Linq; 23 24 using HeuristicLab.Common; 24 25 using HeuristicLab.Core; 25 26 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 26 using System.Collections.Generic;27 27 28 28 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { … … 53 53 int tries = 0; 54 54 do { 55 56 #pragma warning disable 612, 618 55 57 parent = symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1).Where(n => n.SubtreeCount > 0).SelectRandom(random); 58 #pragma warning restore 612, 618 59 56 60 childIndex = random.Next(parent.SubtreeCount); 57 61 … … 81 85 if (tries < MAX_TRIES) { 82 86 var weights = allowedSymbols.Select(s => s.InitialFrequency).ToList(); 87 #pragma warning disable 612, 618 83 88 var newSymbol = allowedSymbols.SelectRandom(weights, random); 89 #pragma warning restore 612, 618 84 90 85 91 // replace the old node with the new node -
branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/FullTreeShaker.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. -
branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/MultiSymbolicExpressionTreeManipulator.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 83 83 Operators = checkedItemList.AsReadOnly(); 84 84 Operators_ItemsAdded(this, new CollectionItemsChangedEventArgs<IndexedItem<ISymbolicExpressionTreeManipulator>>(Operators.CheckedItems)); 85 86 SelectedOperatorParameter.ActualName = "SelectedManipulationOperator"; 85 87 } 86 88 -
branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/OnePointShaker.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System. Linq;22 using System.Collections.Generic; 23 23 using HeuristicLab.Common; 24 24 using HeuristicLab.Core; 25 25 using HeuristicLab.Data; 26 using HeuristicLab.Parameters; 26 27 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 27 using HeuristicLab.Parameters; 28 using System.Collections.Generic; 28 using HeuristicLab.Random; 29 29 30 30 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { … … 66 66 }); 67 67 if (parametricNodes.Count > 0) { 68 var selectedPoint = parametricNodes.S electRandom(random);68 var selectedPoint = parametricNodes.SampleRandom(random); 69 69 selectedPoint.ShakeLocalParameters(random, shakingFactor); 70 70 } -
branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/RemoveBranchManipulation.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 27 27 using HeuristicLab.Parameters; 28 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 29 using HeuristicLab.Random; 29 30 30 31 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { … … 80 81 var nodes = symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1).Where(n => n.SubtreeCount > 0).ToList(); 81 82 do { 82 parent = nodes.SelectRandom(random); 83 parent = nodes.SampleRandom(random); 84 83 85 childIndex = random.Next(parent.SubtreeCount); 84 86 var child = parent.GetSubtree(childIndex); … … 111 113 select g).First().ToList(); 112 114 var weights = possibleSymbols.Select(x => x.InitialFrequency).ToList(); 115 116 #pragma warning disable 612, 618 113 117 var selectedSymbol = possibleSymbols.SelectRandom(weights, random); 118 #pragma warning restore 612, 618 119 114 120 var newTreeNode = selectedSymbol.CreateTreeNode(); 115 121 if (newTreeNode.HasLocalParameters) newTreeNode.ResetLocalParameters(random); -
branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/ReplaceBranchManipulation.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 20 20 #endregion 21 21 22 using System.Collections.Generic; 22 23 using System.Linq; 23 24 using HeuristicLab.Common; … … 26 27 using HeuristicLab.Parameters; 27 28 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 28 using System.Collections.Generic;29 29 30 30 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { … … 78 78 int tries = 0; 79 79 do { 80 #pragma warning disable 612, 618 80 81 parent = symbolicExpressionTree.Root.IterateNodesPrefix().Skip(1).Where(n => n.SubtreeCount > 0).SelectRandom(random); 82 #pragma warning restore 612, 618 83 81 84 childIndex = random.Next(parent.SubtreeCount); 82 85 var child = parent.GetSubtree(childIndex); … … 99 102 if (tries < MAX_TRIES) { 100 103 var weights = allowedSymbols.Select(s => s.InitialFrequency).ToList(); 104 #pragma warning disable 612, 618 101 105 var seedSymbol = allowedSymbols.SelectRandom(weights, random); 106 #pragma warning restore 612, 618 107 102 108 // replace the old node with the new node 103 109 var seedNode = seedSymbol.CreateTreeNode(); -
branches/gteufl/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/SymbolicExpressionTreeManipulator.cs
r9456 r12969 1 1 #region License Information 2 2 /* HeuristicLab 3 * Copyright (C) 2002-201 3Heuristic and Evolutionary Algorithms Laboratory (HEAL)3 * Copyright (C) 2002-2015 Heuristic and Evolutionary Algorithms Laboratory (HEAL) 4 4 * 5 5 * This file is part of HeuristicLab. … … 22 22 using HeuristicLab.Common; 23 23 using HeuristicLab.Core; 24 using HeuristicLab.Data;25 24 using HeuristicLab.Parameters; 26 25 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; … … 33 32 [StorableClass] 34 33 public abstract class SymbolicExpressionTreeManipulator : SymbolicExpressionTreeOperator, ISymbolicExpressionTreeManipulator { 35 private const string SymbolicExpressionTreeParameterName = "SymbolicExpressionTree";36 37 #region Parameter Properties38 public ILookupParameter<ISymbolicExpressionTree> SymbolicExpressionTreeParameter {39 get { return (ILookupParameter<ISymbolicExpressionTree>)Parameters[SymbolicExpressionTreeParameterName]; }40 }41 #endregion42 43 #region Properties44 public ISymbolicExpressionTree SymbolicExpressionTree {45 get { return SymbolicExpressionTreeParameter.ActualValue; }46 }47 #endregion48 49 34 [StorableConstructor] 50 35 protected SymbolicExpressionTreeManipulator(bool deserializing) : base(deserializing) { } … … 52 37 public SymbolicExpressionTreeManipulator() 53 38 : base() { 54 Parameters.Add(new LookupParameter<ISymbolicExpressionTree>(SymbolicExpressionTreeParameterName, "The symbolic expression tree on which the operator should be applied."));39 55 40 } 56 41 57 public sealed override IOperation Apply() {42 public sealed override IOperation InstrumentedApply() { 58 43 ISymbolicExpressionTree tree = SymbolicExpressionTreeParameter.ActualValue; 59 44 Manipulate(RandomParameter.ActualValue, tree); 60 45 61 return base. Apply();46 return base.InstrumentedApply(); 62 47 } 63 48
Note: See TracChangeset
for help on using the changeset viewer.