Changeset 8213
- Timestamp:
- 07/04/12 16:12:15 (12 years ago)
- Location:
- branches/HeuristicLab.EvolutionaryTracking
- Files:
-
- 2 added
- 6 deleted
- 39 edited
- 1 copied
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.EvolutionaryTracking
- Property svn:ignore
-
old new 1 *.suo 1 2 _ReSharper.HeuristicLab.Tracking 2 3 bin
-
- Property svn:ignore
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4
- Property svn:ignore
-
old new 1 *.user 1 2 bin 2 3 obj 3 HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin.cs4 *.user5 *.vs10x6 Plugin.cs
-
- Property svn:ignore
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Crossovers/TracingSymbolicExpressionTreeCrossover.cs
r7997 r8213 21 21 22 22 using System; 23 using System.Collections.Generic;24 23 using System.Linq; 25 24 using HeuristicLab.Common; … … 117 116 118 117 // save the nodes of parent0 in a list so we can track what modifications are made by crossover 119 var nodes0 = Parents[0].IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;118 var nodes0 = Parents[0].IterateNodesBreadth().ToList(); 120 119 121 // perform crossover120 // perform crossover 122 121 Child = Crossover(Random, Parents[0], Parents[1]); 123 122 124 123 // create another list of parent0's nodes, so we can compare it with the first list to see what changed 125 var nodes1 = Child.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;124 var nodes1 = Child.IterateNodesBreadth().ToList(); 126 125 127 126 // compare the two nodes lists and check the difference (comparing node references so we avoid false functional identity). … … 130 129 for (i = 0; i != min; ++i) 131 130 if (nodes0[i] != nodes1[i]) break; 132 if (i == min) i = 0;133 134 131 // add heredity information into the global variables 135 132 GlobalTraceMap[Child] = originalParents; // map child to its corresponding parents from the previous generation 136 GlobalFragmentMap[Child] = new GenericWrapper< ISymbolicExpressionTreeNode>(nodes1[i]); // map child to the index of its fragment133 GlobalFragmentMap[Child] = new GenericWrapper<SymbolicExpressionTreeNode>(i == min ? null : (SymbolicExpressionTreeNode)nodes1[i]); // map child to the index of its fragment 137 134 return base.Apply(); 138 135 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/CutPoint.cs
r7785 r8213 65 65 } 66 66 67 public static CutPoint GetCutPoint(ISymbolicExpressionTree parent, ISymbolicExpressionTree child) {68 return GetCutPoint(parent.Root, child.Root);69 }67 //public static CutPoint GetCutPoint(ISymbolicExpressionTree parent, ISymbolicExpressionTree child) { 68 // return GetCutPoint(parent.Root, child.Root); 69 //} 70 70 71 public static CutPoint GetCutPoint(ISymbolicExpressionTree parent, ISymbolicExpressionTreeNode child) {72 return GetCutPoint(parent.Root, child);73 }71 //public static CutPoint GetCutPoint(ISymbolicExpressionTree parent, ISymbolicExpressionTreeNode child) { 72 // return GetCutPoint(parent.Root, child); 73 //} 74 74 75 public static CutPoint GetCutPoint(ISymbolicExpressionTreeNode parent, ISymbolicExpressionTree child) {76 return GetCutPoint(parent, child.Root);77 }75 //public static CutPoint GetCutPoint(ISymbolicExpressionTreeNode parent, ISymbolicExpressionTree child) { 76 // return GetCutPoint(parent, child.Root); 77 //} 78 78 79 79 // child is the result of a genetic operation on parent 80 80 // this method returns the index on which the two individuals start to differ 81 public static CutPoint GetCutPoint(ISymbolicExpressionTreeNode parent, ISymbolicExpressionTreeNode child) {82 var e1 = parent.IterateNodesPostfix().GetEnumerator();83 var e2 = child.IterateNodesPostfix().GetEnumerator();84 int pos = -1;85 var comparer = new SymbolicExpressionTreeNodeComparer((int)SymbolicExpressionTreeMatching.SimilarityLevel.Exact);86 while (e1.MoveNext() && e2.MoveNext())87 if (comparer.Equals(e1.Current, e2.Current))88 ++pos;89 return pos == -1 ? null : new CutPoint(parent, pos);90 }81 //public static CutPoint GetCutPoint(ISymbolicExpressionTreeNode parent, ISymbolicExpressionTreeNode child) { 82 // var e1 = parent.IterateNodesPostfix().GetEnumerator(); 83 // var e2 = child.IterateNodesPostfix().GetEnumerator(); 84 // int pos = -1; 85 // var comparer = new SymbolicExpressionTreeNodeSimilarityComparer((int)SymbolicExpressionTreeMatching.SimilarityLevel.Exact); 86 // while (e1.MoveNext() && e2.MoveNext()) 87 // if (comparer.Equals(e1.Current, e2.Current)) 88 // ++pos; 89 // return pos == -1 ? null : new CutPoint(parent, pos); 90 //} 91 91 } 92 92 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/GenericWrapper.cs
r7997 r8213 5 5 namespace HeuristicLab.EvolutionaryTracking { 6 6 [Item("Generic wrapper", "Wrapper class for non-item HeuristicLab objects")] 7 [StorableClass] 7 8 public class GenericWrapper<T> : NamedItem where T : class { 8 9 public T Content { get; private set; } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj
r7997 r8213 41 41 <DebugType>full</DebugType> 42 42 <Optimize>false</Optimize> 43 <OutputPath>..\..\..\..\ trunk\sources\bin\</OutputPath>43 <OutputPath>..\..\..\..\Trunk\sources\bin\</OutputPath> 44 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 45 45 <ErrorReport>prompt</ErrorReport> … … 51 51 <DebugType>pdbonly</DebugType> 52 52 <Optimize>true</Optimize> 53 <OutputPath>..\..\..\..\ trunk\sources\bin\</OutputPath>53 <OutputPath>..\..\..\..\Trunk\sources\bin\</OutputPath> 54 54 <DefineConstants>TRACE</DefineConstants> 55 55 <ErrorReport>prompt</ErrorReport> … … 132 132 <Reference Include="HeuristicLab.PluginInfrastructure-3.3"> 133 133 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 134 </Reference>135 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">136 <SpecificVersion>False</SpecificVersion>137 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>138 134 </Reference> 139 135 <Reference Include="HeuristicLab.Random-3.3"> … … 170 166 <Compile Include="Compiler\Instruction.cs" /> 171 167 <Compile Include="Compiler\SymbolicExpressionTreeCompiler.cs" /> 168 <None Include="Plugin.cs.frame" /> 172 169 <Compile Include="Creators\TracingSymbolicExpressionTreeCreator.cs" /> 173 170 <Compile Include="Creators\FullTreeCreator.cs"> … … 178 175 </Compile> 179 176 <Compile Include="Creators\RampedHalfAndHalfTreeCreator.cs" /> 180 <Compile Include="Crossovers\AssortativeSymbolicExpressionTreeCrossover.cs" />181 177 <Compile Include="Crossovers\TracingSymbolicExpressionTreeCrossover.cs" /> 182 178 <Compile Include="GenericWrapper.cs" /> … … 212 208 <Compile Include="SymbolicExpressionGrammar.cs" /> 213 209 <Compile Include="SymbolicExpressionTreeGrammar.cs" /> 214 <Compile Include="SymbolicExpressionTreeMatching.cs" />215 210 <Compile Include="SymbolicExpressionTreeTopLevelNode.cs" /> 216 211 <Compile Include="Crossovers\SubtreeCrossover.cs"> … … 238 233 <ItemGroup> 239 234 <None Include="HeuristicLab.snk" /> 240 <None Include="Plugin.cs.frame" />241 235 <None Include="Properties\AssemblyInfo.cs.frame" /> 242 236 </ItemGroup> -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj.user
r7997 r8213 7 7 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|AnyCPU'"> 8 8 <StartAction>Program</StartAction> 9 <StartProgram>C:\Users\bburlacu\ Desktop\HL-Core\Trunk\sources\bin\HeuristicLab 3.3.exe</StartProgram>9 <StartProgram>C:\Users\bburlacu\Projects\HeuristicLab\Trunk\sources\bin\HeuristicLab 3.3.exe</StartProgram> 10 10 </PropertyGroup> 11 11 <PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'"> -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Manipulators/TracingSymbolicExpressionTreeManipulator.cs
r7997 r8213 21 21 22 22 using System; 23 using System. Collections.Generic;23 using System.Linq; 24 24 using HeuristicLab.Common; 25 25 using HeuristicLab.Core; … … 96 96 gScope.Variables.Add(new Variable(GlobalFragmentMapParameterName, new CloneMapType())); 97 97 98 int i = 0; 98 99 if (GlobalTraceMap.ContainsKey(tree)) { 99 100 // tree was affected by crossover before mutation … … 102 103 // In order to preserve information, a tree clone is created before mutation and added to the trace map. 103 104 var clone = (IItem)tree.Clone(); 104 GlobalTraceMap[clone] = GlobalTraceMap[tree]; 105 GlobalTraceMap[tree] = new ItemList<IItem> { clone }; 106 GlobalFragmentMap[clone] = GlobalFragmentMap[tree]; 105 GlobalTraceMap[clone] = GlobalTraceMap[tree]; // clone gets parents of tree 106 GlobalTraceMap[tree] = new ItemList<IItem> { clone }; // tree gets clone as parent 107 var nodes = tree.IterateNodesBreadth().ToList(); 108 for (i = 0; i != nodes.Count; ++i) { 109 if ((GlobalFragmentMap[tree] as GenericWrapper<SymbolicExpressionTreeNode>).Content == nodes[i]) break; 110 } 111 var fragment = (SymbolicExpressionTreeNode)(((SymbolicExpressionTree)clone).IterateNodesBreadth().ElementAt(i)); 112 GlobalFragmentMap[clone] = new GenericWrapper<SymbolicExpressionTreeNode>(fragment); 107 113 } else { 108 114 var original = GlobalCloneMap[tree]; 109 115 GlobalTraceMap[tree] = new ItemList<IItem> { original }; 110 116 } 111 var nodes0 = tree.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;117 var nodes0 = tree.IterateNodesBreadth().ToList(); 112 118 Manipulate(RandomParameter.ActualValue, tree); 113 var nodes1 = tree.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>;114 int i, min = Math.Max(nodes0.Count, nodes1.Count);119 var nodes1 = tree.IterateNodesBreadth().ToList(); 120 int min = Math.Min(nodes0.Count, nodes1.Count); 115 121 for (i = 0; i != min; ++i) 116 122 if (nodes0[i] != nodes1[i]) break; 117 if (i == min) i = 0; 118 GlobalFragmentMap[tree] = new GenericWrapper<ISymbolicExpressionTreeNode>(nodes1[i]); 119 123 GlobalFragmentMap[tree] = new GenericWrapper<SymbolicExpressionTreeNode>(i == min ? null : (SymbolicExpressionTreeNode)nodes1[i]); 120 124 return base.Apply(); 121 125 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs
r7997 r8213 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Text;25 22 using HeuristicLab.PluginInfrastructure; 26 23 27 24 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 28 [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "Provides operators and related classes for the symbolic expression tree encoding.", "3.4.2.7817")]25 [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "Provides operators and related classes for the symbolic expression tree encoding.", "3.4.2.7997")] 29 26 [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll", PluginFileType.Assembly)] 30 27 [PluginDependency("HeuristicLab.Analysis", "3.3")] … … 38 35 [PluginDependency("HeuristicLab.Parameters", "3.3")] 39 36 [PluginDependency("HeuristicLab.Persistence", "3.3")] 37 40 38 public class HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin : PluginBase { 41 39 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Plugin.cs.frame
r7439 r8213 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Text;25 22 using HeuristicLab.PluginInfrastructure; 26 23 27 24 namespace HeuristicLab.Encodings.SymbolicExpressionTreeEncoding { 28 [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "Provides operators and related classes for the symbolic expression tree encoding.", "3.4.2.$WCREV$")]25 [Plugin("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "Provides operators and related classes for the symbolic expression tree encoding.", "3.4.2.7997")] 29 26 [PluginFile("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.dll", PluginFileType.Assembly)] 30 27 [PluginDependency("HeuristicLab.Analysis", "3.3")] … … 38 35 [PluginDependency("HeuristicLab.Parameters", "3.3")] 39 36 [PluginDependency("HeuristicLab.Persistence", "3.3")] 37 40 38 public class HeuristicLabEncodingsSymbolicExpressionTreeEncodingPlugin : PluginBase { 41 39 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Encodings.SymbolicExpressionTreeEncoding/3.4/Properties
- Property svn:ignore
-
old new 1 *.bak 1 AssemblyInfo.cs
-
- Property svn:ignore
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views
-
Property
svn:ignore
set to
*.user
bin
obj
-
Property
svn:ignore
set to
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.Designer.cs
r7779 r8213 59 59 60 60 #endregion 61 62 //private System.Windows.Forms.ToolTip toolTip;63 61 } 64 62 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphChart.cs
r7817 r8213 26 26 using System.Linq; 27 27 using System.Windows.Forms; 28 using HeuristicLab.Common; 28 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 29 30 using HeuristicLab.Visualization; … … 33 34 private Dictionary<GenealogyGraphNode, List<VisualGenealogyGraphNode>> _visualNodeMap; 34 35 private Dictionary<Tuple<VisualGenealogyGraphNode, VisualGenealogyGraphNode>, VisualGenealogyGraphArc> _visualArcMap; 35 private const int Diameter = 20; 36 private int x, y; 37 private const int Cx = 30, Cy = 30; 38 36 private const int Diameter = 20; // node diameter 37 private int x, y; // coordinates for positioning each node 38 private const int Cx = 30, Cy = 30; // position increments 39 39 private VisualGenealogyGraphNode _selectedGenealogyGraphNode; 40 40 public VisualGenealogyGraphNode SelectedGenealogyGraphNode { get { return _selectedGenealogyGraphNode; } } … … 74 74 for (int i = 0; i != count; ++i) { 75 75 // propagate elites from successive layers 76 if (currRank == (int)currRank) prevLayer = currLayer; 76 bool f = currRank % 1 == 0; 77 if (f) // if the rank is an integer, then we need to propagate elites 78 prevLayer = currLayer; 77 79 currRank = layers.ElementAt(i).Key; 78 80 currLayer = layers.ElementAt(i).ToList(); 79 if (i > 0 && currRank == (int)currRank) { 80 // this code injects elites that propagate from the previous generation into the current graph layer, so that they can be represented as visual nodes 81 int prevCount = prevLayer.Count(node => node.IsElite); 82 int currCount = currLayer.Count(node => node.IsElite); 83 for (int j = currCount; j < prevCount; ++j) currLayer.Add(prevLayer.ElementAt(j)); 81 if (i > 0 && f) { 82 // this following code injects elites that propagate from the previous generation into the current graph layer, 83 // so that they can be represented as visual nodes 84 int prevEliteCount = prevLayer.Count(node => node.IsElite); 85 int currEliteCount = currLayer.Count(node => node.IsElite); 86 for (int j = currEliteCount; j < prevEliteCount; ++j) 87 currLayer.Add(prevLayer.ElementAt(j)); 84 88 } 85 89 currLayer.Sort(); // uses the CompareTo() method inside the GenealogyGraphNode class 86 87 90 foreach (var node in currLayer) { 88 91 var pen = new Pen(Color.LightGray); 89 92 var nl = Environment.NewLine; 90 93 var visualNode = new VisualGenealogyGraphNode(Chart, x, y, x + Diameter, y + Diameter, pen, null) { 91 Data = node, ToolTipText = "Id: " + node.Label + nl + "Rank: " + node.Rank + nl + "Quality: " + String.Format("{0:0.0000}", node.Quality) + nl + "IsElite: " + node.IsElite 94 Data = node, 95 ToolTipText = "Id: " + node.Label + nl + 96 "Rank: " + node.Rank + nl + 97 "Quality: " + String.Format("{0:0.0000}", node.Quality) + nl + 98 "IsElite: " + node.IsElite 92 99 }; 93 100 Chart.Group.Add(visualNode); 94 if (!_visualNodeMap.ContainsKey(node)) _visualNodeMap[node] = new List<VisualGenealogyGraphNode>(); 101 if (!_visualNodeMap.ContainsKey(node)) 102 _visualNodeMap[node] = new List<VisualGenealogyGraphNode>(); 95 103 _visualNodeMap[node].Add(visualNode); 96 // connect visual nodes that actually represent the same individual in the genealogy graph (this applies for elites) with a dashed line 104 // connect visual nodes that actually represent the same individual 105 // in the genealogy graph (this applies for elites) with a dashed line 97 106 if (_visualNodeMap[node].Count > 1) { 98 107 for (int c = _visualNodeMap[node].Count; c >= 2; --c) { … … 104 113 } 105 114 x += Cx; // increment horizontal coordinate 106 if (node.InEdges == null ) continue;115 if (node.InEdges == null && _visualNodeMap.ContainsKey(node)) continue; 107 116 // add visual edges 108 117 foreach (var arc in node.InEdges) { 109 118 var parent = arc.Target; 110 119 // find the visual parent node that is closest to the current node in terms of vertical distance 111 var visualParent = _visualNodeMap[parent].Where(p => p.Center.Y > visualNode.Center.Y).OrderByDescending(p => p.Center.Y).Last();120 var visualParent = _visualNodeMap[parent].Where(p => p.Center.Y >= visualNode.Center.Y).OrderByDescending(p => p.Center.Y).Last(); 112 121 DashStyle style; 113 if (visualParent.Data == visualNode.Data) { 122 if (visualParent.Data == visualNode.Data) { // if the graph nodes represent the same elite individual 114 123 style = DashStyle.Dash; 115 124 } else { … … 143 152 base.pictureBox_MouseUp(sender, e); 144 153 else { // select mode 145 Chart.UpdateEnabled = false;146 // clear colors147 foreach (var primitive in Chart.Group.Primitives) {148 if (primitive is VisualGenealogyGraphNode) {149 var visualNode = primitive as VisualGenealogyGraphNode;150 visualNode.Brush = null;151 } else if (primitive is VisualGenealogyGraphArc) {152 var visualArc = primitive as VisualGenealogyGraphArc;153 if (visualArc.Source.Data != visualArc.Target.Data) visualArc.Pen.Brush = new SolidBrush(Color.Transparent);154 }155 }156 154 // get selected node 157 155 var visualNodes = Chart.GetAllPrimitives(e.Location).Where(p => p is VisualGenealogyGraphNode).ToList(); 158 156 if (visualNodes.Count > 0) { 157 if (_selectedGenealogyGraphNode == visualNodes[0]) return; 159 158 _selectedGenealogyGraphNode = visualNodes[0] as VisualGenealogyGraphNode; 160 // color selected node and its genealogy161 159 if (_selectedGenealogyGraphNode == null) return; 162 // use special highlighting for the currently selected genealogy graph node 160 // new node has been selected, clean up 161 Chart.UpdateEnabled = false; 162 // clear colors 163 ClearAllNodes(); 164 // use a rectangle to highlight the currently selected genealogy graph node 163 165 var center = _selectedGenealogyGraphNode.Center; 164 166 var size = _selectedGenealogyGraphNode.Size; 165 double x1 = center.X - size.Width / 2, x2 = x1 + size.Width; 166 double y1 = center.Y - size.Height / 2, y2 = y1 + size.Height; 167 if (_targetRectangle != null) _targetRectangle.SetPosition(x1, y1, x2, y2); 168 else { 167 double x1 = center.X - size.Width / 2; 168 double x2 = x1 + size.Width; 169 double y1 = center.Y - size.Height / 2; 170 double y2 = y1 + size.Height; 171 if (_targetRectangle == null) { 169 172 _targetRectangle = new Visualization.Rectangle(Chart, x1, y1, x2, y2, new Pen(Color.Black), null); 170 173 Chart.Group.Add(_targetRectangle); 174 } else { 175 _targetRectangle.SetPosition(x1, y1, x2, y2); 171 176 } 172 177 var gNode = _selectedGenealogyGraphNode.Data; // genealogy graph node (representing an individual in the population) 173 178 double rank = gNode.Rank; 179 // ancestors 174 180 var ancestors = gNode.Ancestors().Where(a => a.Rank < rank).ToList(); 175 181 ancestors.Add(gNode); 176 // highlight selected node and its ancestry 177 foreach (var node in ancestors.SelectMany(n => _visualNodeMap[n])) { 178 node.Brush = new SolidBrush(node.ToColor()); 179 if (node.IncomingArcs != null && node == _visualNodeMap[node.Data].First()) { 180 foreach (var arc in node.IncomingArcs) { 181 if (arc.Source.Data == node.Data) continue; 182 var start = new Point((int)arc.Start.X, (int)arc.Start.Y); 183 var end = new Point((int)arc.End.X, (int)arc.End.Y); 184 arc.Pen.Brush = new LinearGradientBrush(start, end, arc.Source.ToColor(), arc.Target.ToColor()); 185 } 186 } 187 } 188 // highlight the descendants 182 // descendants 189 183 var descendants = gNode.Descendants().Where(a => a.Rank > rank).ToList(); 190 184 descendants.Add(gNode); 191 foreach (var node in descendants.SelectMany(n => _visualNodeMap[n])) { 185 // highlight ancestors 186 foreach (var node in ancestors.Select(n => _visualNodeMap[n][0])) { 192 187 node.Brush = new SolidBrush(node.ToColor()); 193 foreach (var arc in node.IncomingArcs.Where(a => descendants.Contains(a.Source.Data))) { 194 if (arc.Source.Data == node.Data) continue; 195 var start = new Point((int)arc.Start.X, (int)arc.Start.Y); 196 var end = new Point((int)arc.End.X, (int)arc.End.Y); 197 arc.Pen.Brush = new LinearGradientBrush(start, end, arc.Source.ToColor(), arc.Target.ToColor()); 198 } 188 if (node.IncomingArcs != null) 189 foreach (var arc in node.IncomingArcs) 190 if (arc.Source.Data != arc.Target.Data && arc.Source == _visualNodeMap[arc.Source.Data][0]) { 191 var start = new Point((int)arc.Start.X, (int)arc.Start.Y); 192 var end = new Point((int)arc.End.X, (int)arc.End.Y); 193 arc.Pen.Brush = new LinearGradientBrush(start, end, arc.Source.ToColor(), arc.Target.ToColor()); 194 } 195 } 196 // highlight descendants 197 foreach (var node in descendants.Select(n => _visualNodeMap[n][0])) { 198 node.Brush = new SolidBrush(node.ToColor()); 199 if (node.OutgoingArcs != null) 200 foreach (var arc in node.OutgoingArcs) 201 if (arc.Source.Data != arc.Target.Data && arc.Target == _visualNodeMap[arc.Target.Data][0]) { 202 var start = new Point((int)arc.Start.X, (int)arc.Start.Y); 203 var end = new Point((int)arc.End.X, (int)arc.End.Y); 204 arc.Pen.Brush = new LinearGradientBrush(start, end, arc.Source.ToColor(), arc.Target.ToColor()); 205 } 199 206 } 200 207 } else { … … 206 213 if (_selectedGenealogyGraphNode != null) 207 214 /* emit clicked event */ 208 GenealogyGraphNodeClicked(_selectedGenealogyGraphNode, e);215 OnGenealogyGraphNodeClicked(_selectedGenealogyGraphNode, e); 209 216 } 210 217 } 211 218 212 219 public void ClearAllNodes() { 220 foreach (var primitive in Chart.Group.Primitives) { 221 if (primitive.Brush != null) 222 primitive.Brush = null; 223 if (primitive is VisualGenealogyGraphArc) { 224 var arc = primitive as VisualGenealogyGraphArc; 225 if (arc.Source.Data != arc.Target.Data && primitive.Pen.Brush != null) 226 primitive.Pen.Brush = new SolidBrush(Color.Transparent); 227 } 228 } 229 } 230 231 public void HighlightLineage(IEnumerable<GenealogyGraphNode> nodes) { 232 foreach (var node in nodes.SelectMany(n => _visualNodeMap[n])) { 233 node.Brush = new SolidBrush(node.ToColor()); 234 if (node.IncomingArcs != null && node == _visualNodeMap[node.Data][0]) { 235 foreach (var arc in node.IncomingArcs) { 236 if (arc.Source.Data == node.Data) continue; 237 var start = new Point((int)arc.Start.X, (int)arc.Start.Y); 238 var end = new Point((int)arc.End.X, (int)arc.End.Y); 239 arc.Pen.Brush = new LinearGradientBrush(start, end, arc.Source.ToColor(), arc.Target.ToColor()); 240 } 241 } 242 } 243 } 244 245 public void HighlightNodes(IEnumerable<ISymbolicExpressionTree> trees, Color color) { 246 foreach (var visualNode in trees.Select(tree => _visualNodeMap[Graph.GetNode(tree)]).SelectMany(vList => vList)) 247 visualNode.Brush = new SolidBrush(color); 248 } 249 250 public void HighlightInDegree() { 213 251 Chart.UpdateEnabled = false; 214 foreach (var node in Chart.Group.Primitives.Where(p => p is VisualGenealogyGraphNode).Cast<VisualGenealogyGraphNode>()) { 215 node.Brush = null; 216 if (node.IncomingArcs != null) 217 foreach (var arc in node.IncomingArcs) 218 if (arc.Source.Data != node.Data) arc.Pen = new Pen(Color.Transparent); 252 ClearAllNodes(); 253 var graphNodes = Graph.Values.ToList(); 254 double min = graphNodes.Min(x => x.InEdges == null ? 0 : x.InEdges.Count); 255 double max = graphNodes.Max(x => x.InEdges == null ? 0 : x.InEdges.Count); 256 foreach (var graphNode in graphNodes) { 257 var visualNode = _visualNodeMap[graphNode][0]; 258 double deg = graphNode.InEdges == null ? 0 : graphNode.InEdges.Count; 259 var color = Color.FromArgb((int)(1 - deg / max) * 255, (int)(deg / max * 255), 100); 260 visualNode.Brush = new SolidBrush(color); 219 261 } 220 262 Chart.UpdateEnabled = true; … … 222 264 } 223 265 224 public void Highlight Nodes(IEnumerable<ISymbolicExpressionTree> trees, Color color) {266 public void HighlightOutDegree() { 225 267 Chart.UpdateEnabled = false; 226 foreach (var visualNode in trees.Select(tree => _visualNodeMap[Graph.GetNode(tree)]).SelectMany(vList => vList)) 227 visualNode.Brush = new SolidBrush(color); 228 268 ClearAllNodes(); 269 var graphNodes = Graph.Values.ToList(); 270 double min = graphNodes.Min(x => x.OutEdges == null ? 0 : x.OutEdges.Count); 271 double max = graphNodes.Max(x => x.OutEdges == null ? 0 : x.OutEdges.Count); 272 foreach (var graphNode in graphNodes) { 273 var visualNode = _visualNodeMap[graphNode][0]; 274 double deg = graphNode.OutEdges == null ? 0 : graphNode.OutEdges.Count; 275 int index = (int)(deg / max * ColorGradient.Colors.Count) - 1; 276 if (index < 0) index = 0; 277 visualNode.Brush = new SolidBrush(ColorGradient.Colors[index]); 278 } 229 279 Chart.UpdateEnabled = true; 230 280 Chart.EnforceUpdate(); -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.Designer.cs
r7779 r8213 27 27 this.mainTableLayout = new System.Windows.Forms.TableLayoutPanel(); 28 28 this.splitContainer = new System.Windows.Forms.SplitContainer(); 29 this.topControlBox = new System.Windows.Forms.GroupBox();30 this.similarityModeLabel = new System.Windows.Forms.Label();31 this.similarityModeSelector = new System.Windows.Forms.ComboBox();32 this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart();33 29 this.genealogyTableLayout = new System.Windows.Forms.TableLayoutPanel(); 34 30 this.graphControlsPanel = new System.Windows.Forms.Panel(); … … 36 32 this.moveModeButton = new System.Windows.Forms.RadioButton(); 37 33 this.zoomModeButton = new System.Windows.Forms.RadioButton(); 34 this.symbolicExpressionTreeChart = new HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views.SymbolicExpressionTreeChart(); 35 this.topControlBox = new System.Windows.Forms.GroupBox(); 36 this.similarityModeLabel = new System.Windows.Forms.Label(); 37 this.similarityModeSelector = new System.Windows.Forms.ComboBox(); 38 38 this.genealogyGraphChart = new HeuristicLab.EvolutionaryTracking.Views.GenealogyGraphChart(); 39 this.inDegreeButton = new System.Windows.Forms.Button(); 40 this.outDegreeButton = new System.Windows.Forms.Button(); 39 41 this.mainTableLayout.SuspendLayout(); 40 42 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).BeginInit(); … … 42 44 this.splitContainer.Panel2.SuspendLayout(); 43 45 this.splitContainer.SuspendLayout(); 44 this.topControlBox.SuspendLayout();45 46 this.genealogyTableLayout.SuspendLayout(); 46 47 this.graphControlsPanel.SuspendLayout(); 48 this.topControlBox.SuspendLayout(); 47 49 this.SuspendLayout(); 48 50 // … … 83 85 this.splitContainer.TabIndex = 7; 84 86 // 85 // topControlBox86 //87 this.topControlBox.Controls.Add(this.similarityModeLabel);88 this.topControlBox.Controls.Add(this.similarityModeSelector);89 this.topControlBox.Dock = System.Windows.Forms.DockStyle.Fill;90 this.topControlBox.Location = new System.Drawing.Point(3, 3);91 this.topControlBox.Name = "topControlBox";92 this.topControlBox.Size = new System.Drawing.Size(522, 44);93 this.topControlBox.TabIndex = 6;94 this.topControlBox.TabStop = false;95 this.topControlBox.Text = "Controls";96 //97 // similarityModeLabel98 //99 this.similarityModeLabel.AutoSize = true;100 this.similarityModeLabel.Location = new System.Drawing.Point(6, 20);101 this.similarityModeLabel.Name = "similarityModeLabel";102 this.similarityModeLabel.Size = new System.Drawing.Size(80, 13);103 this.similarityModeLabel.TabIndex = 1;104 this.similarityModeLabel.Text = "Similarity Mode:";105 //106 // similarityModeSelector107 //108 this.similarityModeSelector.FormattingEnabled = true;109 this.similarityModeSelector.Items.AddRange(new object[] {110 "Exact",111 "High",112 "Relaxed"});113 this.similarityModeSelector.Location = new System.Drawing.Point(92, 17);114 this.similarityModeSelector.Name = "similarityModeSelector";115 this.similarityModeSelector.Size = new System.Drawing.Size(148, 21);116 this.similarityModeSelector.TabIndex = 0;117 this.similarityModeSelector.SelectedIndexChanged += new System.EventHandler(this.similarityModeSelector_SelectedIndexChanged);118 //119 // symbolicExpressionTreeChart120 //121 this.symbolicExpressionTreeChart.BackgroundColor = System.Drawing.Color.White;122 this.symbolicExpressionTreeChart.Dock = System.Windows.Forms.DockStyle.Fill;123 this.symbolicExpressionTreeChart.LineColor = System.Drawing.Color.Black;124 this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(0, 0);125 this.symbolicExpressionTreeChart.Name = "symbolicExpressionTreeChart";126 this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(275, 385);127 this.symbolicExpressionTreeChart.Spacing = 5;128 this.symbolicExpressionTreeChart.SuspendRepaint = false;129 this.symbolicExpressionTreeChart.TabIndex = 2;130 this.symbolicExpressionTreeChart.TextFont = new System.Drawing.Font("Times New Roman", 8F);131 this.symbolicExpressionTreeChart.Tree = null;132 //133 87 // genealogyTableLayout 134 88 // … … 148 102 // graphControlsPanel 149 103 // 104 this.graphControlsPanel.Controls.Add(this.outDegreeButton); 105 this.graphControlsPanel.Controls.Add(this.inDegreeButton); 150 106 this.graphControlsPanel.Controls.Add(this.selectModeButton); 151 107 this.graphControlsPanel.Controls.Add(this.moveModeButton); … … 160 116 this.selectModeButton.Appearance = System.Windows.Forms.Appearance.Button; 161 117 this.selectModeButton.AutoSize = true; 162 this.selectModeButton.Location = new System.Drawing.Point( 103, 3);118 this.selectModeButton.Location = new System.Drawing.Point(65, 3); 163 119 this.selectModeButton.Name = "selectModeButton"; 164 this.selectModeButton.Size = new System.Drawing.Size( 47, 23);120 this.selectModeButton.Size = new System.Drawing.Size(24, 23); 165 121 this.selectModeButton.TabIndex = 5; 166 122 this.selectModeButton.TabStop = true; 167 this.selectModeButton.Text = "S elect";123 this.selectModeButton.Text = "S"; 168 124 this.selectModeButton.UseVisualStyleBackColor = true; 169 125 this.selectModeButton.CheckedChanged += new System.EventHandler(this.selectModeButton_CheckedChanged); … … 175 131 this.moveModeButton.Location = new System.Drawing.Point(3, 3); 176 132 this.moveModeButton.Name = "moveModeButton"; 177 this.moveModeButton.Size = new System.Drawing.Size( 44, 23);133 this.moveModeButton.Size = new System.Drawing.Size(26, 23); 178 134 this.moveModeButton.TabIndex = 3; 179 135 this.moveModeButton.TabStop = true; 180 this.moveModeButton.Text = "M ove";136 this.moveModeButton.Text = "M"; 181 137 this.moveModeButton.UseVisualStyleBackColor = true; 182 138 this.moveModeButton.CheckedChanged += new System.EventHandler(this.moveModeButton_CheckedChanged); … … 186 142 this.zoomModeButton.Appearance = System.Windows.Forms.Appearance.Button; 187 143 this.zoomModeButton.AutoSize = true; 188 this.zoomModeButton.Location = new System.Drawing.Point( 53, 3);144 this.zoomModeButton.Location = new System.Drawing.Point(35, 3); 189 145 this.zoomModeButton.Name = "zoomModeButton"; 190 this.zoomModeButton.Size = new System.Drawing.Size( 44, 23);146 this.zoomModeButton.Size = new System.Drawing.Size(24, 23); 191 147 this.zoomModeButton.TabIndex = 4; 192 148 this.zoomModeButton.TabStop = true; 193 this.zoomModeButton.Text = "Z oom";149 this.zoomModeButton.Text = "Z"; 194 150 this.zoomModeButton.UseVisualStyleBackColor = true; 195 151 this.zoomModeButton.CheckedChanged += new System.EventHandler(this.zoomModeButton_CheckedChanged); 152 // 153 // symbolicExpressionTreeChart 154 // 155 this.symbolicExpressionTreeChart.BackgroundColor = System.Drawing.Color.White; 156 this.symbolicExpressionTreeChart.Dock = System.Windows.Forms.DockStyle.Fill; 157 this.symbolicExpressionTreeChart.LineColor = System.Drawing.Color.Black; 158 this.symbolicExpressionTreeChart.Location = new System.Drawing.Point(0, 0); 159 this.symbolicExpressionTreeChart.Name = "symbolicExpressionTreeChart"; 160 this.symbolicExpressionTreeChart.Size = new System.Drawing.Size(275, 385); 161 this.symbolicExpressionTreeChart.Spacing = 5; 162 this.symbolicExpressionTreeChart.SuspendRepaint = false; 163 this.symbolicExpressionTreeChart.TabIndex = 2; 164 this.symbolicExpressionTreeChart.TextFont = new System.Drawing.Font("Times New Roman", 8F); 165 this.symbolicExpressionTreeChart.Tree = null; 166 // 167 // topControlBox 168 // 169 this.topControlBox.Controls.Add(this.similarityModeLabel); 170 this.topControlBox.Controls.Add(this.similarityModeSelector); 171 this.topControlBox.Dock = System.Windows.Forms.DockStyle.Fill; 172 this.topControlBox.Location = new System.Drawing.Point(3, 3); 173 this.topControlBox.Name = "topControlBox"; 174 this.topControlBox.Size = new System.Drawing.Size(522, 44); 175 this.topControlBox.TabIndex = 6; 176 this.topControlBox.TabStop = false; 177 this.topControlBox.Text = "Controls"; 178 // 179 // similarityModeLabel 180 // 181 this.similarityModeLabel.AutoSize = true; 182 this.similarityModeLabel.Location = new System.Drawing.Point(6, 20); 183 this.similarityModeLabel.Name = "similarityModeLabel"; 184 this.similarityModeLabel.Size = new System.Drawing.Size(80, 13); 185 this.similarityModeLabel.TabIndex = 1; 186 this.similarityModeLabel.Text = "Similarity Mode:"; 187 // 188 // similarityModeSelector 189 // 190 this.similarityModeSelector.FormattingEnabled = true; 191 this.similarityModeSelector.Items.AddRange(new object[] { 192 "Exact", 193 "High", 194 "Relaxed"}); 195 this.similarityModeSelector.Location = new System.Drawing.Point(92, 17); 196 this.similarityModeSelector.Name = "similarityModeSelector"; 197 this.similarityModeSelector.Size = new System.Drawing.Size(148, 21); 198 this.similarityModeSelector.TabIndex = 0; 199 this.similarityModeSelector.SelectedIndexChanged += new System.EventHandler(this.similarityModeSelector_SelectedIndexChanged); 196 200 // 197 201 // genealogyGraphChart … … 204 208 this.genealogyGraphChart.Size = new System.Drawing.Size(233, 343); 205 209 this.genealogyGraphChart.TabIndex = 2; 210 // 211 // inDegreeButton 212 // 213 this.inDegreeButton.AutoSize = true; 214 this.inDegreeButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 215 this.inDegreeButton.Location = new System.Drawing.Point(95, 3); 216 this.inDegreeButton.Name = "inDegreeButton"; 217 this.inDegreeButton.Size = new System.Drawing.Size(28, 23); 218 this.inDegreeButton.TabIndex = 6; 219 this.inDegreeButton.Text = "IN"; 220 this.inDegreeButton.UseVisualStyleBackColor = true; 221 this.inDegreeButton.Click += new System.EventHandler(this.inDegreeButton_Click); 222 // 223 // outDegreeButton 224 // 225 this.outDegreeButton.AutoSize = true; 226 this.outDegreeButton.AutoSizeMode = System.Windows.Forms.AutoSizeMode.GrowAndShrink; 227 this.outDegreeButton.Location = new System.Drawing.Point(129, 3); 228 this.outDegreeButton.Name = "outDegreeButton"; 229 this.outDegreeButton.Size = new System.Drawing.Size(40, 23); 230 this.outDegreeButton.TabIndex = 7; 231 this.outDegreeButton.Text = "OUT"; 232 this.outDegreeButton.UseVisualStyleBackColor = true; 233 this.outDegreeButton.Click += new System.EventHandler(this.outDegreeButton_Click); 206 234 // 207 235 // GenealogyGraphView … … 217 245 ((System.ComponentModel.ISupportInitialize)(this.splitContainer)).EndInit(); 218 246 this.splitContainer.ResumeLayout(false); 219 this.topControlBox.ResumeLayout(false);220 this.topControlBox.PerformLayout();221 247 this.genealogyTableLayout.ResumeLayout(false); 222 248 this.graphControlsPanel.ResumeLayout(false); 223 249 this.graphControlsPanel.PerformLayout(); 250 this.topControlBox.ResumeLayout(false); 251 this.topControlBox.PerformLayout(); 224 252 this.ResumeLayout(false); 225 253 … … 240 268 private System.Windows.Forms.RadioButton moveModeButton; 241 269 private System.Windows.Forms.RadioButton zoomModeButton; 270 private System.Windows.Forms.Button inDegreeButton; 271 private System.Windows.Forms.Button outDegreeButton; 242 272 243 273 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/GenealogyGraphView.cs
r7997 r8213 29 29 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views; 30 30 using HeuristicLab.MainForm; 31 using HeuristicLab.Problems.DataAnalysis.Symbolic; 31 32 using HeuristicLab.Visualization; 32 33 … … 92 93 var genealogyGraphNode = (GenealogyGraphNode)visualGenealogyGraphNode.Data; 93 94 symbolicExpressionTreeChart.Tree = (ISymbolicExpressionTree)genealogyGraphNode.Data; 95 // highlight the relevant fragment in the symbolic expression tree 94 96 if (_selectedVisualSymbolicExpressionTreeNode != null) { 95 97 var nodes = symbolicExpressionTreeChart.Tree.IterateNodesBreadth() as List<ISymbolicExpressionTreeNode>; … … 140 142 var treeNode = _selectedVisualSymbolicExpressionTreeNode.SymbolicExpressionTreeNode; 141 143 Color[] colors = { Color.LightSkyBlue, Color.PaleGreen, Color.Tan }; 142 144 // update visual graph nodes 145 genealogyGraphChart.Chart.UpdateEnabled = false; 143 146 genealogyGraphChart.ClearAllNodes(); // clear node colors 144 147 // color each graph node according to the degree to which it matches the selected tree fragment … … 147 150 if (owners.Any()) genealogyGraphChart.HighlightNodes(owners, colors[i]); // highlight matching individuals from the genealogy 148 151 } 152 genealogyGraphChart.Chart.UpdateEnabled = true; 153 genealogyGraphChart.Chart.EnforceUpdate(); 149 154 150 155 // highlight subtree nodes in the tree chart … … 164 169 var owners = genealogyGraphChart.Graph.TraceFragment(treeNode, similarityModeSelector.SelectedIndex).ToList(); 165 170 if (owners.Any()) { 171 genealogyGraphChart.Chart.UpdateEnabled = false; 166 172 genealogyGraphChart.ClearAllNodes(); // clear the fill color of all nodes 167 173 genealogyGraphChart.HighlightNodes(owners, Color.LightSkyBlue); // highlight matching individuals from the genealogy 174 genealogyGraphChart.Chart.UpdateEnabled = true; 168 175 } 176 genealogyGraphChart.Chart.EnforceUpdate(); 169 177 // highlight subtree nodes in the tree chart 170 178 foreach (var visualNode in symbolicExpressionTreeChart.Tree.IterateNodesPostfix().Select(node => symbolicExpressionTreeChart.GetVisualSymbolicExpressionTreeNode(node))) … … 174 182 } 175 183 #endregion 184 185 private void inDegreeButton_Click(object sender, EventArgs e) { 186 genealogyGraphChart.HighlightInDegree(); 187 } 188 189 private void outDegreeButton_Click(object sender, EventArgs e) { 190 genealogyGraphChart.HighlightOutDegree(); 191 } 176 192 } 177 193 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/HeuristicLab.EvolutionaryTracking.Views-3.4.csproj
r7779 r8213 18 18 <DebugType>full</DebugType> 19 19 <Optimize>false</Optimize> 20 <OutputPath>..\..\..\..\ trunk\sources\bin\</OutputPath>20 <OutputPath>..\..\..\..\Trunk\sources\bin\</OutputPath> 21 21 <DefineConstants>DEBUG;TRACE</DefineConstants> 22 22 <ErrorReport>prompt</ErrorReport> … … 26 26 <DebugType>pdbonly</DebugType> 27 27 <Optimize>true</Optimize> 28 <OutputPath>..\..\..\..\ trunk\sources\bin\</OutputPath>28 <OutputPath>..\..\..\..\Trunk\sources\bin\</OutputPath> 29 29 <DefineConstants>TRACE</DefineConstants> 30 30 <ErrorReport>prompt</ErrorReport> … … 67 67 <SpecificVersion>False</SpecificVersion> 68 68 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath> 69 </Reference>70 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL">71 <SpecificVersion>False</SpecificVersion>72 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.dll</HintPath>73 69 </Reference> 74 70 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> … … 118 114 <Name>HeuristicLab.EvolutionaryTracking-3.4</Name> 119 115 </ProjectReference> 116 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj"> 117 <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project> 118 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name> 119 </ProjectReference> 120 120 </ItemGroup> 121 121 <ItemGroup> … … 123 123 </ItemGroup> 124 124 <ItemGroup> 125 <EmbeddedResource Include="GenealogyGraphView.resx"> 126 <DependentUpon>GenealogyGraphView.cs</DependentUpon> 127 </EmbeddedResource> 125 128 <EmbeddedResource Include="Properties\Resources.resx"> 126 129 <Generator>ResXFileCodeGenerator</Generator> -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/Plugin.cs
r7779 r8213 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Text;25 22 using HeuristicLab.PluginInfrastructure; 26 23 … … 28 25 [Plugin("HeuristicLab.EvolutionaryTracking.Views", "Provides controls and views for the evolution graph and related structures.", "3.4.2.7439")] 29 26 [PluginFile("HeuristicLab.EvolutionaryTracking.Views-3.4.dll", PluginFileType.Assembly)] 30 [PluginDependency("HeuristicLab.Collections", "3.3")]31 [PluginDependency("HeuristicLab.Common", "3.3")]32 27 [PluginDependency("HeuristicLab.Core", "3.3")] 33 [PluginDependency("HeuristicLab. Data", "3.3")]28 [PluginDependency("HeuristicLab.Core.Views", "3.3")] 34 29 [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding", "3.4")] 35 [PluginDependency("HeuristicLab.Operators", "3.3")] 36 [PluginDependency("HeuristicLab.Optimization", "3.3")] 37 [PluginDependency("HeuristicLab.Parameters", "3.3")] 38 [PluginDependency("HeuristicLab.Persistence", "3.3")] 30 [PluginDependency("HeuristicLab.Encodings.SymbolicExpressionTreeEncoding.Views", "3.4")] 31 [PluginDependency("HeuristicLab.MainForm", "3.3")] 32 [PluginDependency("HeuristicLab.MainForm.WindowsForms", "3.3")] 33 [PluginDependency("HeuristicLab.Visualization", "3.3")] 34 [PluginDependency("HeuristicLab.EvolutionaryTracking", "3.4")] 35 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")] 36 39 37 public class HeuristicLabEvolutionaryTrackingPlugin : PluginBase { 40 38 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/Properties
-
Property
svn:ignore
set to
AssemblyInfo.cs
-
Property
svn:ignore
set to
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/VisualGenealogyGraphArc.cs
r7779 r8213 25 25 26 26 namespace HeuristicLab.EvolutionaryTracking.Views { 27 class VisualGenealogyGraphArc : Line {27 public class VisualGenealogyGraphArc : Line { 28 28 public VisualGenealogyGraphNode Source; 29 29 public VisualGenealogyGraphNode Target; -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking.Views/3.4/VisualGenealogyGraphNode.cs
r7779 r8213 28 28 public class VisualGenealogyGraphNode : Ellipse { 29 29 public GenealogyGraphNode Data { get; internal set; } 30 internal List<VisualGenealogyGraphArc> IncomingArcs = new List<VisualGenealogyGraphArc>(); 31 internal List<VisualGenealogyGraphArc> OutgoingArcs = new List<VisualGenealogyGraphArc>(); 30 private List<VisualGenealogyGraphArc> _incomingArcs = new List<VisualGenealogyGraphArc>(); 31 private List<VisualGenealogyGraphArc> _outgoingArgs = new List<VisualGenealogyGraphArc>(); 32 33 public List<VisualGenealogyGraphArc> IncomingArcs { 34 get { return _incomingArcs; } 35 set { _incomingArcs = value; } 36 } 37 public List<VisualGenealogyGraphArc> OutgoingArcs { 38 get { return _outgoingArgs; } 39 set { _outgoingArgs = value; } 40 } 32 41 33 42 public VisualGenealogyGraphNode(IChart chart, PointD lowerLeft, PointD upperRight) -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4
- Property svn:ignore
-
old new 1 *.user 2 bin 1 3 obj
-
- Property svn:ignore
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Analyzers/SymbolicExpressionTreeFragmentsAnalyzer.cs
r7997 r8213 31 31 using HeuristicLab.Parameters; 32 32 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 33 using HeuristicLab.Problems.DataAnalysis; 34 using HeuristicLab.Problems.DataAnalysis.Symbolic; 35 using HeuristicLab.Problems.DataAnalysis.Symbolic.Regression; 33 36 // type definitions for convenience 34 37 using CloneMapType = HeuristicLab.Core.ItemDictionary<HeuristicLab.Core.IItem, HeuristicLab.Core.IItem>; … … 54 57 private const string GlobalFragmentMapParameterName = "GlobalFragmentMap"; 55 58 private const string GenerationsParameterName = "Generations"; 59 private const string SymbolicExpressionInterpreterParameterName = "SymbolicExpressionTreeInterpreter"; 60 private const string SymbolicRegressionProblemDataParameterName = "ProblemData"; 56 61 private const string FragmentStatisticsParameterName = "FragmentStatistics"; 57 62 private const string FragmentLengthsDistributionParametersName = "FragmentLengths"; 58 63 private const string FragmentFrequenciesParameterName = "FragmentFrequencies"; 59 64 65 // impact values calculator 66 private SymbolicRegressionSolutionValuesCalculator _calculator = new SymbolicRegressionSolutionValuesCalculator(); 67 60 68 #region Parameter properties 61 69 public ValueParameter<IntValue> UpdateIntervalParameter { … … 81 89 get { return (LookupParameter<CloneMapType>)Parameters[GlobalFragmentMapParameterName]; } 82 90 } 83 public LookupParameter< ItemList<ItemList<IItem>>> FragmentFrequenciesParameter {84 get { return (LookupParameter< ItemList<ItemList<IItem>>>)Parameters[FragmentFrequenciesParameterName]; }91 public LookupParameter<DataTable> FragmentFrequenciesParameter { 92 get { return (LookupParameter<DataTable>)Parameters[FragmentFrequenciesParameterName]; } 85 93 } 86 94 public LookupParameter<DataTable> FragmentStatisticsParameter { … … 102 110 get { return (LookupParameter<CloneMapType>)Parameters[SecondaryCloneMapParameterName]; } 103 111 } 112 // problem data, interpreter and evaluator 113 public LookupParameter<SymbolicDataAnalysisExpressionTreeInterpreter> SymbolicExpressionInterpreterParameter { 114 get { return (LookupParameter<SymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicExpressionInterpreterParameterName]; } 115 } 116 public LookupParameter<RegressionProblemData> SymbolicRegressionProblemDataParameter { 117 get { return (LookupParameter<RegressionProblemData>)Parameters[SymbolicRegressionProblemDataParameterName]; } 118 } 104 119 #endregion 105 120 … … 147 162 get { return FragmentLengthsParameter.ActualValue; } 148 163 } 149 public ItemList<ItemList<IItem>>FragmentFrequencies {164 public DataTable FragmentFrequencies { 150 165 get { return FragmentFrequenciesParameter.ActualValue; } 166 } 167 public SymbolicDataAnalysisExpressionTreeInterpreter SymbolicExpressionInterpreter { 168 get { return SymbolicExpressionInterpreterParameter.ActualValue; } 169 } 170 public RegressionProblemData SymbolicRegressionProblemData { 171 get { return SymbolicRegressionProblemDataParameter.ActualValue; } 151 172 } 152 173 #endregion … … 180 201 Parameters.Add(new LookupParameter<DataTable>(FragmentStatisticsParameterName, "The data table to store the fragment statistics.")); 181 202 Parameters.Add(new LookupParameter<DataTable>(FragmentLengthsDistributionParametersName, "The data table to store the distribution of fragment lengths.")); 182 Parameters.Add(new LookupParameter<ItemList<ItemList<IItem>>>(FragmentFrequenciesParameterName, "A data structure for fragment frequencies")); 203 Parameters.Add(new LookupParameter<DataTable>(FragmentFrequenciesParameterName, "A data structure for fragment frequencies")); 204 // impact calculation 205 Parameters.Add(new LookupParameter<SymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicExpressionInterpreterParameterName, "Interpreter for symbolic expression trees")); 206 Parameters.Add(new LookupParameter<RegressionProblemData>(SymbolicRegressionProblemDataParameterName, "The symbolic data analysis problem.")); 183 207 UpdateCounterParameter.Hidden = true; 184 208 UpdateIntervalParameter.Hidden = true; 209 210 //_calculator = new SymbolicRegressionSolutionValuesCalculator(); 185 211 } 186 212 #region After deserialization code … … 194 220 Parameters.Add(new ValueParameter<IntValue>(UpdateCounterParameterName, "The value which counts how many times the operator was called since the last update", new IntValue(0))); 195 221 UpdateCounterParameter.Hidden = true; 222 } 223 if (!Parameters.ContainsKey(FragmentStatisticsParameterName)) { 224 Parameters.Add(new LookupParameter<DataTable>(FragmentStatisticsParameterName, "The data table to store the fragment statistics.")); 196 225 } 197 226 if (!Parameters.ContainsKey(FragmentLengthsDistributionParametersName)) { … … 225 254 results.Add(new Result("Fragment Statistics", FragmentStatistics)); 226 255 } 256 if (FragmentLengths == null) { 257 FragmentLengthsParameter.ActualValue = new DataTable("Fragment Lengths", "Histograms for the distribution of fragment and individual lengths"); 258 FragmentLengths.VisualProperties.YAxisTitle = "Frequency"; 259 results.Add(new Result("Fragment Lengths", FragmentLengths)); 260 } 227 261 if (FragmentFrequencies == null) { 228 FragmentFrequenciesParameter.ActualValue = new ItemList<ItemList<IItem>>(); 262 FragmentFrequenciesParameter.ActualValue = new DataTable("Fragment Frequencies", "Frequencies of good and high impact fragments"); 263 FragmentFrequencies.VisualProperties.YAxisTitle = "Frequency"; 264 results.Add(new Result("Fragment Frequencies", FragmentFrequencies)); 229 265 } 230 266 if (SecondaryTraceMap == null) { … … 270 306 if (parentsLookup.ContainsKey(individual)) { 271 307 var fragmentItem = m.Value as SymbolicExpressionTreeNodeItem; 272 goodFragments.Add(fragmentItem.Content); 273 goodParents.AddRange(SecondaryTraceMap[individual].Cast<ISymbolicExpressionTree>()); 274 goodChildren.Add(individual); 308 var fragment = fragmentItem.Content; 309 if (fragment != null) { 310 goodFragments.Add(fragmentItem.Content); 311 goodParents.AddRange(SecondaryTraceMap[individual].Cast<ISymbolicExpressionTree>()); 312 goodChildren.Add(individual); 313 } 275 314 } 276 315 } 277 var allFragments = SecondaryFragmentMap.Values.Select(x => ((SymbolicExpressionTreeNodeItem)x).Content as ISymbolicExpressionTreeNode).ToList(); 316 var allFragments = SecondaryFragmentMap.Values.Where(x => ((SymbolicExpressionTreeNodeItem)x).Content != null).Select(x => ((SymbolicExpressionTreeNodeItem)x).Content as ISymbolicExpressionTreeNode).ToList(); 317 var highImpactFragments = new List<ISymbolicExpressionTreeNode>(); 278 318 var allParents = SecondaryTraceMap.Values.SelectMany(x => x.Cast<ISymbolicExpressionTree>()).ToList(); 279 319 var allChildren = SecondaryFragmentMap.Keys.Select(x => x as ISymbolicExpressionTree).ToList(); 280 320 // high impact fragments 321 //foreach (var c in goodChildren) { 322 // var impactValues = _calculator.CalculateImpactValues(c, SymbolicExpressionInterpreter, SymbolicRegressionProblemData, 0, 0); 323 // var fragmentItem = SecondaryFragmentMap[c] as SymbolicExpressionTreeNodeItem; 324 // var fragment = fragmentItem.Content; 325 // if (fragment != null && impactValues[fragment] > 0.1) 326 // highImpactFragments.Add(fragment); 327 //} 328 FragmentFrequencies.Rows["Frequency of useful fragments"].Values.Add(goodFragments.Count); 329 FragmentFrequencies.Rows["Frequency of high impact fragments"].Values.Add(highImpactFragments.Count); 281 330 FragmentStatistics.Rows["Fragment lengths (good)"].Values.Add(goodFragments.Average(x => x.GetLength())); 282 331 FragmentStatistics.Rows["Fragment lengths (all)"].Values.Add(allFragments.Average(x => x.GetLength())); 332 //double avg = highImpactFragments.Count > 0 ? highImpactFragments.Average(x => x.GetLength()) : 0; 333 //FragmentStatistics.Rows["Fragment lengths (high impact)"].Values.Add(avg); 283 334 FragmentStatistics.Rows["Parent lengths (good)"].Values.Add(goodParents.Average(x => x.Length)); 284 335 FragmentStatistics.Rows["Parent lengths (all)"].Values.Add(allParents.Average(x => x.Length)); 285 336 FragmentStatistics.Rows["Child lengths (good)"].Values.Add(goodChildren.Average(x => x.Length)); 286 337 FragmentStatistics.Rows["Child lengths (all)"].Values.Add(allChildren.Average(x => x.Length)); 287 //FragmentStatistics.Rows["Exact similarity (good fragments)"].Values.Add(CalculateSimilarity(goodFragments, (int)SymbolicExpressionTreeMatching.SimilarityLevel.Exact)); 338 FragmentStatistics.Rows["Avg visitation length (all children)"].Values.Add(allChildren.Average(x => VisitationLength(x))); 339 FragmentStatistics.Rows["Avg visitation length (good children)"].Values.Add(goodChildren.Average(x => VisitationLength(x))); 340 //FragmentStatistics.Rows["Exact similarity (good fragments)"].Values.Add(CalculateSimilarity(allFragments, (int)SymbolicExpressionTreeMatching.SimilarityLevel.Exact)); 341 //foreach (var f in allFragments) f.SortSubtrees(); 288 342 //FragmentStatistics.Rows["Exact similarity (all fragments)"].Values.Add(CalculateSimilarity(allFragments, (int)SymbolicExpressionTreeMatching.SimilarityLevel.Exact)); 289 343 290 //WriteFragmentFrequencies(Environment.GetFolderPath(Environment.SpecialFolder.UserProfile) + "\\FragmentFrequencies.dat"); 344 FragmentLengths.Rows["All fragments length distribution"].Values.Replace(allFragments.Select(x => (double)x.GetLength())); 345 FragmentLengths.Rows["Useful fragments length distribution"].Values.Replace(goodFragments.Select(x => (double)x.GetLength())); 346 FragmentLengths.Rows["All children length distribution"].Values.Replace(allChildren.Select(x => (double)x.Length)); 347 FragmentLengths.Rows["Useful children length distribution"].Values.Replace(goodChildren.Select(x => (double)x.Length)); 291 348 #endregion 292 349 } 293 // save the current generation so it can be compared to the following one, next time the analyzer is applied 350 // save the current generation so it can be compared to the following one, next time the analyzer is applied 294 351 SecondaryTraceMap.Clear(); 295 352 foreach (var m in GlobalTraceMap) 296 353 SecondaryTraceMap.Add(m.Key, m.Value); 354 297 355 SecondaryCloneMap.Clear(); 298 356 foreach (var m in GlobalCloneMap) 299 357 SecondaryCloneMap.Add(m.Key, m.Value); 358 300 359 SecondaryFragmentMap.Clear(); 301 360 foreach (var m in GlobalFragmentMap) … … 343 402 }); 344 403 } 404 if (!FragmentStatistics.Rows.ContainsKey("Fragment lengths (high impact)")) { 405 FragmentStatistics.Rows.Add(new DataRow("Fragment lengths (high impact)") { 406 VisualProperties = { StartIndexZero = true } 407 }); 408 } 409 if (!FragmentStatistics.Rows.ContainsKey("Avg visitation length (all children)")) { 410 FragmentStatistics.Rows.Add(new DataRow("Avg visitation length (all children)") { 411 VisualProperties = { StartIndexZero = true } 412 }); 413 } 414 if (!FragmentStatistics.Rows.ContainsKey("Avg visitation length (good children)")) { 415 FragmentStatistics.Rows.Add(new DataRow("Avg visitation length (good children)") { 416 VisualProperties = { StartIndexZero = true } 417 }); 418 } 345 419 // exact similarity 346 420 if (!FragmentStatistics.Rows.ContainsKey("Exact similarity (good fragments)")) { … … 354 428 }); 355 429 } 356 } 357 358 private void WriteFragmentFrequencies(string path) { 359 using (var file = new System.IO.StreamWriter(path)) { 360 foreach (var f in FragmentFrequencies) { 361 file.WriteLine(((SymbolicExpressionTreeNodeItem)f[0]).Content.GetLength() + " " + ((IntValue)f[1]).Value); 362 } 363 } 430 if (!FragmentFrequencies.Rows.ContainsKey("Frequency of useful fragments")) { 431 FragmentFrequencies.Rows.Add(new DataRow("Frequency of useful fragments") { 432 VisualProperties = { StartIndexZero = true } 433 }); 434 } 435 if (!FragmentFrequencies.Rows.ContainsKey("Frequency of high impact fragments")) { 436 FragmentFrequencies.Rows.Add(new DataRow("Frequency of high impact fragments") { 437 VisualProperties = { StartIndexZero = true } 438 }); 439 } 440 double scaleFactor = 1.0; 441 if (!FragmentLengths.Rows.ContainsKey("All fragments length distribution")) 442 FragmentLengths.Rows.Add(new DataRow("All fragments length distribution") { 443 VisualProperties = { 444 StartIndexZero = true, 445 ChartType = DataRowVisualProperties.DataRowChartType.Histogram, 446 ScaleFactor = scaleFactor 447 } 448 }); 449 if (!FragmentLengths.Rows.ContainsKey("Useful fragments length distribution")) 450 FragmentLengths.Rows.Add(new DataRow("Useful fragments length distribution") { 451 VisualProperties = { 452 StartIndexZero = true, 453 ChartType = DataRowVisualProperties.DataRowChartType.Histogram, 454 ScaleFactor = scaleFactor 455 } 456 }); 457 if (!FragmentLengths.Rows.ContainsKey("All children length distribution")) 458 FragmentLengths.Rows.Add(new DataRow("All children length distribution") { 459 VisualProperties = { 460 StartIndexZero = true, 461 ChartType = DataRowVisualProperties.DataRowChartType.Histogram, 462 ScaleFactor = scaleFactor 463 } 464 }); 465 if (!FragmentLengths.Rows.ContainsKey("Useful children length distribution")) 466 FragmentLengths.Rows.Add(new DataRow("Useful children length distribution") { 467 VisualProperties = { 468 StartIndexZero = true, 469 ChartType = DataRowVisualProperties.DataRowChartType.Histogram, 470 ScaleFactor = scaleFactor 471 } 472 }); 473 } 474 475 private static int VisitationLength(ISymbolicExpressionTree tree) { 476 return VisitationLength(tree.Root); 477 } 478 479 private static int VisitationLength(ISymbolicExpressionTreeNode node) { 480 int sum = 0; 481 foreach (var n in node.IterateNodesBreadth()) 482 sum += n.GetLength(); 483 return sum; 364 484 } 365 485 -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Analyzers/SymbolicExpressionTreeGenealogyAnalyzer.cs
r7997 r8213 266 266 267 267 foreach (var parent in parents) { 268 object data = ((GenericWrapper< ISymbolicExpressionTreeNode>)GlobalFragmentMap[child]).Content;268 object data = ((GenericWrapper<SymbolicExpressionTreeNode>)GlobalFragmentMap[child]).Content; 269 269 graph.AddArc(parent, child, null, data); 270 270 if (GlobalTraceMap.ContainsKey(parent)) { … … 287 287 GlobalFragmentMap.Clear(); 288 288 } 289 290 #region end of the run (code for writing results to dot files)291 //bool maxGenerationsReached = (Generations.Value == MaximumGenerations.Value);292 //bool isOsga = (SelectionPressure != null && MaximumSelectionPressure != null);293 //bool maxSelectionPressureReached = isOsga && (SelectionPressure.Value >= MaximumSelectionPressure.Value);294 //if (maxGenerationsReached || maxSelectionPressureReached) {295 // var path = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);296 297 // // write whole graph to a dot file298 // WriteDot(path + @"\lineage.dot", graph);299 300 // // get genealogy of the best solution301 // var bestSolution = (ISymbolicExpressionTree)qualities.First().Key;302 // var genealogy = graph.GetNode(bestSolution).Ancestors();303 // //WriteDot(path + @"\bestlineage.dot", genealogy);304 305 // // write the direct root lineage of the best solution (is it useful?)306 307 // // calculate impact values of nodes in the best solution, attempt to trace those with high impact to their origins308 // var calculator = new SymbolicRegressionSolutionValuesCalculator();309 // var impactValues = calculator.CalculateImpactValues(bestSolution, SymbolicExpressionInterpreter, SymbolicRegressionProblemData, 0, 0);310 // foreach (var pair in impactValues.Where(pair => !(pair.Key is ConstantTreeNode || pair.Key is VariableTreeNode)).OrderByDescending(pair => pair.Value).Take(2)) {311 // var node = pair.Key;312 // }313 // //WriteDot(path + @"\impactancestry.dot", genealogy);314 315 // // trim the graph316 // // exclude the individuals of the last generation317 // var individuals = graph.Keys.Except(qualities.Select(x => x.Key)).ToList();318 // bool done = false;319 // while (!done) {320 // done = true;321 // foreach (var ind in individuals) {322 // // if node has no outgoing connections (absence of offspring), remove it from the graph323 // var node = graph.GetNode(ind);324 // if (node == null) continue;325 // if (node.OutEdges == null) {326 // done = false; // we still have "dead" nodes327 // graph.RemoveNode(ind);328 // }329 // }330 // }331 // WriteDot(path + @"\trimmedlineage.dot", graph);332 //}333 #endregion334 289 } 335 290 return base.Apply(); -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Analyzers/SymbolicExpressionTreeRelativeLengthAnalyzer.cs
r7997 r8213 125 125 126 126 [StorableConstructor] 127 pr ivateSymbolicExpressionTreeRelativeLengthAnalyzer(bool deserializing)127 protected SymbolicExpressionTreeRelativeLengthAnalyzer(bool deserializing) 128 128 : base() { 129 129 } 130 pr ivateSymbolicExpressionTreeRelativeLengthAnalyzer(SymbolicExpressionTreeRelativeLengthAnalyzer original, Cloner cloner)130 protected SymbolicExpressionTreeRelativeLengthAnalyzer(SymbolicExpressionTreeRelativeLengthAnalyzer original, Cloner cloner) 131 131 : base(original, cloner) { 132 132 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/GenealogyGraph.cs
r7800 r8213 54 54 } 55 55 56 pr ivateGenealogyGraph(GenealogyGraph<T> original, Cloner cloner)56 protected GenealogyGraph(GenealogyGraph<T> original, Cloner cloner) 57 57 : base(original, cloner) { 58 58 _nodes = new Dictionary<T, GenealogyGraphNode>(original._nodes); … … 139 139 dest.AddReverseArc(src, data2); 140 140 } 141 142 //public void AddArcs(T[] a, T b) {143 // GenealogyGraphNode src, dest;144 // if (!HasNode(b)) {145 // dest = new GenealogyGraphNode(b);146 // _nodes[b] = dest;147 // } else {148 // dest = _nodes[b];149 // }150 // foreach (var o in a) {151 // if (!HasNode(o)) {152 // src = new GenealogyGraphNode(o);153 // _nodes[o] = src;154 // } else {155 // src = _nodes[o];156 // }157 // src.AddForwardArc(dest);158 // dest.AddReverseArc(src);159 // }160 //}161 141 } 162 142 … … 207 187 /// <returns>All the ancestors of the current node</returns> 208 188 public IEnumerable<GenealogyGraphNode> Ancestors() { 189 // for performance, we use a hashset for lookup and a list for iteration 209 190 var nodes = new HashSet<GenealogyGraphNode> { this }; 191 var list = new List<GenealogyGraphNode> { this }; 210 192 int i = 0; 211 while (i != nodes.Count) { 212 if (nodes.ElementAt(i).InEdges != null) { 213 foreach (var p in nodes.ElementAt(i).InEdges.Select(e => e.Target)) { 214 nodes.Add(p); 215 yield return p; 193 while (i != list.Count) { 194 if (list[i].InEdges != null) { 195 foreach (var e in list[i].InEdges) { 196 if (nodes.Contains(e.Target)) continue; 197 nodes.Add(e.Target); 198 list.Add(e.Target); 216 199 } 217 200 } 218 201 ++i; 219 202 } 203 return list; 220 204 } 221 205 … … 226 210 public IEnumerable<GenealogyGraphNode> Descendants() { 227 211 var nodes = new HashSet<GenealogyGraphNode> { this }; 212 var list = new List<GenealogyGraphNode> { this }; 228 213 int i = 0; 229 while (i != nodes.Count) { 230 if (nodes.ElementAt(i).OutEdges != null) { 231 foreach (var p in nodes.ElementAt(i).OutEdges.Select(e => e.Target)) { 232 nodes.Add(p); 233 yield return p; 214 while (i != list.Count) { 215 if (list[i].OutEdges != null) { 216 foreach (var e in list[i].OutEdges) { 217 if (nodes.Contains(e.Target)) continue; 218 nodes.Add(e.Target); 219 list.Add(e.Target); 234 220 } 235 221 } 236 222 ++i; 237 223 } 224 return list; 238 225 } 239 226 -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/HeuristicLab.EvolutionaryTracking-3.4.csproj
r7997 r8213 18 18 <DebugType>full</DebugType> 19 19 <Optimize>false</Optimize> 20 <OutputPath>..\..\..\..\ trunk\sources\bin\</OutputPath>20 <OutputPath>..\..\..\..\Trunk\sources\bin\</OutputPath> 21 21 <DefineConstants>DEBUG;TRACE</DefineConstants> 22 22 <ErrorReport>prompt</ErrorReport> … … 26 26 <DebugType>pdbonly</DebugType> 27 27 <Optimize>true</Optimize> 28 <OutputPath>..\..\..\..\ trunk\sources\bin\</OutputPath>28 <OutputPath>..\..\..\..\Trunk\sources\bin\</OutputPath> 29 29 <DefineConstants>TRACE</DefineConstants> 30 30 <ErrorReport>prompt</ErrorReport> … … 69 69 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 70 70 <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 71 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" />72 71 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> 73 72 <Reference Include="HeuristicLab.Problems.DataAnalysis.Symbolic.Regression.Views-3.4, Version=3.4.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL" /> … … 103 102 <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name> 104 103 </ProjectReference> 104 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj"> 105 <Project>{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}</Project> 106 <Name>HeuristicLab.Problems.DataAnalysis.Symbolic-3.4</Name> 107 </ProjectReference> 105 108 <ProjectReference Include="..\..\HeuristicLab.Selection\3.3\HeuristicLab.Selection-3.3.csproj"> 106 109 <Project>{2C36CD4F-E5F5-43A4-801A-201EA895FE17}</Project> … … 113 116 <ItemGroup> 114 117 <None Include="HeuristicLab.snk" /> 115 <None Include="Plugin.cs.frame" />116 118 </ItemGroup> 117 119 <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Plugin.cs
r7479 r8213 20 20 #endregion 21 21 22 using System;23 using System.Collections.Generic;24 using System.Text;25 22 using HeuristicLab.PluginInfrastructure; 26 23 … … 28 25 [Plugin("HeuristicLab.EvolutionaryTracking", "Provides operators and related classes for tracking the evolution within a GA.", "3.4.2.7439")] 29 26 [PluginFile("HeuristicLab.EvolutionaryTracking-3.4.dll", PluginFileType.Assembly)] 27 [PluginDependency("HeuristicLab.Analysis", "3.3")] 30 28 [PluginDependency("HeuristicLab.Collections", "3.3")] 31 29 [PluginDependency("HeuristicLab.Common", "3.3")] 30 [PluginDependency("HeuristicLab.Common.Resources", "3.3")] 32 31 [PluginDependency("HeuristicLab.Core", "3.3")] 33 32 [PluginDependency("HeuristicLab.Data", "3.3")] … … 35 34 [PluginDependency("HeuristicLab.Operators", "3.3")] 36 35 [PluginDependency("HeuristicLab.Optimization", "3.3")] 36 [PluginDependency("HeuristicLab.Random", "3.3")] 37 [PluginDependency("HeuristicLab.Selection", "3.3")] 37 38 [PluginDependency("HeuristicLab.Parameters", "3.3")] 38 39 [PluginDependency("HeuristicLab.Persistence", "3.3")] 40 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic.Regression", "3.4")] 41 [PluginDependency("HeuristicLab.Problems.DataAnalysis.Symbolic", "3.4")] 42 [PluginDependency("HeuristicLab.Problems.DataAnalysis", "3.4")] 43 39 44 public class HeuristicLabEvolutionaryTrackingPlugin : PluginBase { 40 45 } -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/Properties
-
Property
svn:ignore
set to
AssemblyInfo.cs
-
Property
svn:ignore
set to
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.EvolutionaryTracking/3.4/SymbolicExpressionTreeGenealogyGraph.cs
r7817 r8213 1 1 using System.Collections.Generic; 2 2 using System.Linq; 3 using HeuristicLab.Common; 3 4 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 4 5 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 6 using HeuristicLab.Problems.DataAnalysis.Symbolic; 5 7 6 8 namespace HeuristicLab.EvolutionaryTracking { … … 14 16 } 15 17 18 public override IDeepCloneable Clone(Cloner cloner) { 19 return new SymbolicExpressionTreeGenealogyGraph(this, cloner); 20 } 21 22 protected SymbolicExpressionTreeGenealogyGraph(SymbolicExpressionTreeGenealogyGraph original, Cloner cloner) 23 : base(original, cloner) { 24 } 25 16 26 #region Fragment tracing 17 27 public IEnumerable<ISymbolicExpressionTree> TraceFragment(ISymbolicExpressionTreeNode fragment, int mode = 0) { -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic
- Property svn:mergeinfo changed
/trunk/sources/HeuristicLab.Problems.DataAnalysis.Symbolic (added) merged: 8168-8169
- Property svn:mergeinfo changed
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs
r8126 r8213 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; … … 26 27 using HeuristicLab.Data; 27 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HeuristicLab.Operators;29 29 using HeuristicLab.Optimization; 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 using System;33 32 34 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 38 37 [Item("SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer", "An operator that analyzes the Pareto-best symbolic data analysis solution for single objective symbolic data analysis problems.")] 39 38 [StorableClass] 40 public abstract class SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<T> : SymbolicDataAnalysisSingleObjectiveAnalyzer 41 where T : class, ISymbolicDataAnalysisSolution { 39 public abstract class SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<S, T> : SymbolicDataAnalysisSingleObjectiveAnalyzer, ISymbolicDataAnalysisInterpreterOperator, ISymbolicDataAnalysisBoundedOperator 40 where T : class, ISymbolicDataAnalysisSolution 41 where S : class, IDataAnalysisProblemData { 42 private const string ProblemDataParameterName = "ProblemData"; 42 43 private const string TrainingBestSolutionsParameterName = "Best training solutions"; 43 44 private const string TrainingBestSolutionQualitiesParameterName = "Best training solution qualities"; 44 45 private const string ComplexityParameterName = "Complexity"; 46 private const string SymbolicDataAnalysisTreeInterpreterParameterName = "SymbolicDataAnalysisTreeInterpreter"; 47 private const string EstimationLimitsParameterName = "EstimationLimits"; 45 48 46 49 public override bool EnabledByDefault { … … 58 61 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[ComplexityParameterName]; } 59 62 } 63 public ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter> SymbolicDataAnalysisTreeInterpreterParameter { 64 get { return (ILookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>)Parameters[SymbolicDataAnalysisTreeInterpreterParameterName]; } 65 } 66 public ILookupParameter<S> ProblemDataParameter { 67 get { return (ILookupParameter<S>)Parameters[ProblemDataParameterName]; } 68 } 69 public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter { 70 get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; } 71 } 60 72 #endregion 61 73 #region properties … … 72 84 [StorableConstructor] 73 85 protected SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer(bool deserializing) : base(deserializing) { } 74 protected SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer(SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer< T> original, Cloner cloner) : base(original, cloner) { }86 protected SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer(SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer<S, T> original, Cloner cloner) : base(original, cloner) { } 75 87 public SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer() 76 88 : base() { 89 Parameters.Add(new LookupParameter<S>(ProblemDataParameterName, "The problem data for the symbolic data analysis solution.")); 77 90 Parameters.Add(new LookupParameter<ItemList<T>>(TrainingBestSolutionsParameterName, "The training best (Pareto-optimal) symbolic data analysis solutions.")); 78 91 Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(TrainingBestSolutionQualitiesParameterName, "The qualities of the training best (Pareto-optimal) solutions.")); 79 92 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(ComplexityParameterName, "The complexity of each tree.")); 93 Parameters.Add(new LookupParameter<ISymbolicDataAnalysisExpressionTreeInterpreter>(SymbolicDataAnalysisTreeInterpreterParameterName, "The symbolic data analysis tree interpreter for the symbolic expression tree.")); 94 Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model.")); 80 95 } 81 96 -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Analyzers/SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs
r8126 r8213 20 20 #endregion 21 21 22 using System; 22 23 using System.Collections.Generic; 23 24 using System.Linq; … … 26 27 using HeuristicLab.Data; 27 28 using HeuristicLab.Encodings.SymbolicExpressionTreeEncoding; 28 using HeuristicLab.Operators;29 29 using HeuristicLab.Optimization; 30 30 using HeuristicLab.Parameters; 31 31 using HeuristicLab.Persistence.Default.CompositeSerializers.Storable; 32 using System;33 32 34 33 namespace HeuristicLab.Problems.DataAnalysis.Symbolic { … … 38 37 [Item("SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer", "An operator that analyzes the Pareto-best symbolic data analysis solution for single objective symbolic data analysis problems.")] 39 38 [StorableClass] 40 public abstract class SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U> 39 public abstract class SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer<S, T, U> : SymbolicDataAnalysisSingleObjectiveValidationAnalyzer<T, U>, ISymbolicDataAnalysisBoundedOperator 41 40 where S : class, ISymbolicDataAnalysisSolution 42 41 where T : class, ISymbolicDataAnalysisSingleObjectiveEvaluator<U> … … 45 44 private const string ValidationBestSolutionQualitiesParameterName = "Best validation solution qualities"; 46 45 private const string ComplexityParameterName = "Complexity"; 46 private const string EstimationLimitsParameterName = "EstimationLimits"; 47 47 48 48 public override bool EnabledByDefault { … … 60 60 get { return (IScopeTreeLookupParameter<DoubleValue>)Parameters[ComplexityParameterName]; } 61 61 } 62 public IValueLookupParameter<DoubleLimit> EstimationLimitsParameter { 63 get { return (IValueLookupParameter<DoubleLimit>)Parameters[EstimationLimitsParameterName]; } 64 } 65 62 66 #endregion 63 67 #region properties … … 80 84 Parameters.Add(new LookupParameter<ItemList<DoubleArray>>(ValidationBestSolutionQualitiesParameterName, "The qualities of the validation best (Pareto-optimal) solutions.")); 81 85 Parameters.Add(new ScopeTreeLookupParameter<DoubleValue>(ComplexityParameterName, "The complexity of each tree.")); 86 Parameters.Add(new ValueLookupParameter<DoubleLimit>(EstimationLimitsParameterName, "The lower and upper limit for the estimated values produced by the symbolic classification model.")); 82 87 } 83 88 -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj
r7825 r8213 41 41 <DebugType>full</DebugType> 42 42 <Optimize>false</Optimize> 43 <OutputPath> $(SolutionDir)\bin\</OutputPath>43 <OutputPath>..\..\..\..\Trunk\sources\bin\</OutputPath> 44 44 <DefineConstants>DEBUG;TRACE</DefineConstants> 45 45 <ErrorReport>prompt</ErrorReport> … … 50 50 <DebugType>pdbonly</DebugType> 51 51 <Optimize>true</Optimize> 52 <OutputPath> $(SolutionDir)\bin\</OutputPath>52 <OutputPath>..\..\..\..\Trunk\sources\bin\</OutputPath> 53 53 <DefineConstants>TRACE</DefineConstants> 54 54 <ErrorReport>prompt</ErrorReport> … … 58 58 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x64' "> 59 59 <DebugSymbols>true</DebugSymbols> 60 <OutputPath> $(SolutionDir)\bin\</OutputPath>60 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 61 61 <DefineConstants>DEBUG;TRACE</DefineConstants> 62 62 <DebugType>full</DebugType> … … 66 66 </PropertyGroup> 67 67 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x64' "> 68 <OutputPath> $(SolutionDir)\bin\</OutputPath>68 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 69 69 <DefineConstants>TRACE</DefineConstants> 70 70 <Optimize>true</Optimize> … … 76 76 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|x86' "> 77 77 <DebugSymbols>true</DebugSymbols> 78 <OutputPath> $(SolutionDir)\bin\</OutputPath>78 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 79 79 <DefineConstants>DEBUG;TRACE</DefineConstants> 80 80 <DebugType>full</DebugType> … … 84 84 </PropertyGroup> 85 85 <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|x86' "> 86 <OutputPath> $(SolutionDir)\bin\</OutputPath>86 <OutputPath>..\..\..\..\trunk\sources\bin\</OutputPath> 87 87 <DefineConstants>TRACE</DefineConstants> 88 88 <Optimize>true</Optimize> … … 93 93 </PropertyGroup> 94 94 <ItemGroup> 95 <Reference Include="ALGLIB-3.5.0, Version=3.5.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 96 <HintPath>..\..\bin\ALGLIB-3.5.0.dll</HintPath> 97 <Private>False</Private> 95 <Reference Include="ALGLIB-3.5.0"> 96 <HintPath>..\..\..\..\trunk\sources\bin\ALGLIB-3.5.0.dll</HintPath> 97 </Reference> 98 <Reference Include="HeuristicLab.Analysis-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 99 <SpecificVersion>False</SpecificVersion> 100 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Analysis-3.3.dll</HintPath> 101 </Reference> 102 <Reference Include="HeuristicLab.Collections-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 103 <SpecificVersion>False</SpecificVersion> 104 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Collections-3.3.dll</HintPath> 105 </Reference> 106 <Reference Include="HeuristicLab.Common-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 107 <SpecificVersion>False</SpecificVersion> 108 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common-3.3.dll</HintPath> 109 </Reference> 110 <Reference Include="HeuristicLab.Common.Resources-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 111 <SpecificVersion>False</SpecificVersion> 112 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Common.Resources-3.3.dll</HintPath> 113 </Reference> 114 <Reference Include="HeuristicLab.Core-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 115 <SpecificVersion>False</SpecificVersion> 116 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Core-3.3.dll</HintPath> 117 </Reference> 118 <Reference Include="HeuristicLab.Data-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 119 <SpecificVersion>False</SpecificVersion> 120 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Data-3.3.dll</HintPath> 121 </Reference> 122 <Reference Include="HeuristicLab.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 123 <SpecificVersion>False</SpecificVersion> 124 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Operators-3.3.dll</HintPath> 125 </Reference> 126 <Reference Include="HeuristicLab.Optimization-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 127 <SpecificVersion>False</SpecificVersion> 128 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization-3.3.dll</HintPath> 129 </Reference> 130 <Reference Include="HeuristicLab.Optimization.Operators-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 131 <SpecificVersion>False</SpecificVersion> 132 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Optimization.Operators-3.3.dll</HintPath> 133 </Reference> 134 <Reference Include="HeuristicLab.Parameters-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 135 <SpecificVersion>False</SpecificVersion> 136 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Parameters-3.3.dll</HintPath> 137 </Reference> 138 <Reference Include="HeuristicLab.Persistence-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 139 <SpecificVersion>False</SpecificVersion> 140 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Persistence-3.3.dll</HintPath> 141 </Reference> 142 <Reference Include="HeuristicLab.PluginInfrastructure-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 143 <SpecificVersion>False</SpecificVersion> 144 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.PluginInfrastructure-3.3.dll</HintPath> 145 </Reference> 146 <Reference Include="HeuristicLab.Problems.DataAnalysis-3.4"> 147 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.DataAnalysis-3.4.dll</HintPath> 148 </Reference> 149 <Reference Include="HeuristicLab.Problems.Instances-3.3"> 150 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Problems.Instances-3.3.dll</HintPath> 151 </Reference> 152 <Reference Include="HeuristicLab.Random-3.3, Version=3.3.0.0, Culture=neutral, PublicKeyToken=ba48961d6f65dcec, processorArchitecture=MSIL"> 153 <SpecificVersion>False</SpecificVersion> 154 <HintPath>..\..\..\..\trunk\sources\bin\HeuristicLab.Random-3.3.dll</HintPath> 98 155 </Reference> 99 156 <Reference Include="System" /> … … 113 170 <ItemGroup> 114 171 <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveValidationParetoBestSolutionAnalyzer.cs" /> 115 <Compile Include="Analyzers\SymbolicDataAnalysisComplexityAnalyzer.cs" />116 172 <Compile Include="Analyzers\SymbolicDataAnalysisSingleObjectiveTrainingParetoBestSolutionAnalyzer.cs" /> 117 173 <Compile Include="Analyzers\SymbolicDataAnalysisMultiObjectiveValidationAnalyzer.cs" /> … … 163 219 <Compile Include="SymbolicDataAnalysisExpressionTreeSimplifier.cs" /> 164 220 <Compile Include="SymbolicDataAnalysisProblem.cs" /> 221 <Compile Include="SymbolicDataAnalysisSolutionValuesCalculator.cs" /> 222 <Compile Include="SymbolicDataAnalysisExpressionTreeMatching.cs" /> 165 223 <Compile Include="Symbols\Addition.cs" /> 166 224 <Compile Include="Symbols\And.cs" /> … … 246 304 </ItemGroup> 247 305 <ItemGroup> 248 <ProjectReference Include="..\..\HeuristicLab.Analysis\3.3\HeuristicLab.Analysis-3.3.csproj">249 <Project>{887425B4-4348-49ED-A457-B7D2C26DDBF9}</Project>250 <Name>HeuristicLab.Analysis-3.3</Name>251 <Private>False</Private>252 </ProjectReference>253 <ProjectReference Include="..\..\HeuristicLab.Collections\3.3\HeuristicLab.Collections-3.3.csproj">254 <Project>{958B43BC-CC5C-4FA2-8628-2B3B01D890B6}</Project>255 <Name>HeuristicLab.Collections-3.3</Name>256 <Private>False</Private>257 </ProjectReference>258 <ProjectReference Include="..\..\HeuristicLab.Common.Resources\3.3\HeuristicLab.Common.Resources-3.3.csproj">259 <Project>{0E27A536-1C4A-4624-A65E-DC4F4F23E3E1}</Project>260 <Name>HeuristicLab.Common.Resources-3.3</Name>261 <Private>False</Private>262 </ProjectReference>263 <ProjectReference Include="..\..\HeuristicLab.Common\3.3\HeuristicLab.Common-3.3.csproj">264 <Project>{A9AD58B9-3EF9-4CC1-97E5-8D909039FF5C}</Project>265 <Name>HeuristicLab.Common-3.3</Name>266 <Private>False</Private>267 </ProjectReference>268 <ProjectReference Include="..\..\HeuristicLab.Core\3.3\HeuristicLab.Core-3.3.csproj">269 <Project>{C36BD924-A541-4A00-AFA8-41701378DDC5}</Project>270 <Name>HeuristicLab.Core-3.3</Name>271 <Private>False</Private>272 </ProjectReference>273 <ProjectReference Include="..\..\HeuristicLab.Data\3.3\HeuristicLab.Data-3.3.csproj">274 <Project>{BBAB9DF5-5EF3-4BA8-ADE9-B36E82114937}</Project>275 <Name>HeuristicLab.Data-3.3</Name>276 <Private>False</Private>277 </ProjectReference>278 306 <ProjectReference Include="..\..\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding\3.4\HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4.csproj"> 279 307 <Project>{06D4A186-9319-48A0-BADE-A2058D462EEA}</Project> 280 308 <Name>HeuristicLab.Encodings.SymbolicExpressionTreeEncoding-3.4</Name> 281 <Private>False</Private>282 </ProjectReference>283 <ProjectReference Include="..\..\HeuristicLab.Operators\3.3\HeuristicLab.Operators-3.3.csproj">284 <Project>{23DA7FF4-D5B8-41B6-AA96-F0561D24F3EE}</Project>285 <Name>HeuristicLab.Operators-3.3</Name>286 <Private>False</Private>287 </ProjectReference>288 <ProjectReference Include="..\..\HeuristicLab.Optimization.Operators\3.3\HeuristicLab.Optimization.Operators-3.3.csproj">289 <Project>{25087811-F74C-4128-BC86-8324271DA13E}</Project>290 <Name>HeuristicLab.Optimization.Operators-3.3</Name>291 <Private>False</Private>292 </ProjectReference>293 <ProjectReference Include="..\..\HeuristicLab.Optimization\3.3\HeuristicLab.Optimization-3.3.csproj">294 <Project>{14AB8D24-25BC-400C-A846-4627AA945192}</Project>295 <Name>HeuristicLab.Optimization-3.3</Name>296 </ProjectReference>297 <ProjectReference Include="..\..\HeuristicLab.Parameters\3.3\HeuristicLab.Parameters-3.3.csproj">298 <Project>{56F9106A-079F-4C61-92F6-86A84C2D84B7}</Project>299 <Name>HeuristicLab.Parameters-3.3</Name>300 <Private>False</Private>301 </ProjectReference>302 <ProjectReference Include="..\..\HeuristicLab.Persistence\3.3\HeuristicLab.Persistence-3.3.csproj">303 <Project>{102BC7D3-0EF9-439C-8F6D-96FF0FDB8E1B}</Project>304 <Name>HeuristicLab.Persistence-3.3</Name>305 <Private>False</Private>306 </ProjectReference>307 <ProjectReference Include="..\..\HeuristicLab.PluginInfrastructure\3.3\HeuristicLab.PluginInfrastructure-3.3.csproj">308 <Project>{94186A6A-5176-4402-AE83-886557B53CCA}</Project>309 <Name>HeuristicLab.PluginInfrastructure-3.3</Name>310 <Private>False</Private>311 </ProjectReference>312 <ProjectReference Include="..\..\HeuristicLab.Problems.DataAnalysis\3.4\HeuristicLab.Problems.DataAnalysis-3.4.csproj">313 <Project>{DF87C13E-A889-46FF-8153-66DCAA8C5674}</Project>314 <Name>HeuristicLab.Problems.DataAnalysis-3.4</Name>315 <Private>False</Private>316 </ProjectReference>317 <ProjectReference Include="..\..\HeuristicLab.Problems.Instances\3.3\HeuristicLab.Problems.Instances-3.3.csproj">318 <Project>{3540E29E-4793-49E7-8EE2-FEA7F61C3994}</Project>319 <Name>HeuristicLab.Problems.Instances-3.3</Name>320 <Private>False</Private>321 </ProjectReference>322 <ProjectReference Include="..\..\HeuristicLab.Random\3.3\HeuristicLab.Random-3.3.csproj">323 <Project>{F4539FB6-4708-40C9-BE64-0A1390AEA197}</Project>324 <Name>HeuristicLab.Random-3.3</Name>325 <Private>False</Private>326 309 </ProjectReference> 327 310 </ItemGroup> -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisExpressionTreeSimplifier.cs
r7696 r8213 749 749 // a is already an addition => append b 750 750 var add = addSymbol.CreateTreeNode(); 751 add.AddSubtree(b);752 751 foreach (var subtree in a.Subtrees) { 753 752 add.AddSubtree(subtree); 754 753 } 754 add.AddSubtree(b); 755 755 MergeVariablesInSum(add); 756 756 if (add.Subtrees.Count() == 1) { … … 897 897 } 898 898 } 899 900 899 foreach (var unchangedSubtree in unchangedSubtrees) 901 900 prod.AddSubtree(unchangedSubtree); -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/SymbolicDataAnalysisProblem.cs
r7823 r8213 203 203 Operators.Add(new SymbolicExpressionSymbolFrequencyAnalyzer()); 204 204 Operators.Add(new SymbolicDataAnalysisVariableFrequencyAnalyzer()); 205 Operators.Add(new SymbolicDataAnalysisComplexityAnalyzer());206 205 Operators.Add(new MinAverageMaxSymbolicExpressionTreeLengthAnalyzer()); 207 206 Operators.Add(new SymbolicExpressionTreeLengthAnalyzer()); -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection
-
Property
svn:ignore
set to
*.user
bin
obj
-
Property
svn:ignore
set to
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3/Plugin.cs
r7997 r8213 26 26 /// Plugin class for HeuristicLab.Selection plugin. 27 27 /// </summary> 28 [Plugin("HeuristicLab.Selection", "3.3.6.7 817")]28 [Plugin("HeuristicLab.Selection", "3.3.6.7997")] 29 29 [PluginFile("HeuristicLab.Selection-3.3.dll", PluginFileType.Assembly)] 30 30 [PluginDependency("HeuristicLab.Collections", "3.3")] -
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Selection/3.3/Properties
-
Property
svn:ignore
set to
AssemblyInfo.cs
-
Property
svn:ignore
set to
-
branches/HeuristicLab.EvolutionaryTracking/HeuristicLab.Tracking.sln
r7779 r8213 15 15 EndProject 16 16 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.EvolutionaryTracking.Views-3.4", "HeuristicLab.EvolutionaryTracking.Views\3.4\HeuristicLab.EvolutionaryTracking.Views-3.4.csproj", "{318DFE8C-CA23-4F1B-A4AC-62B425060241}" 17 EndProject 18 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Problems.DataAnalysis.Symbolic-3.4", "HeuristicLab.Problems.DataAnalysis.Symbolic\3.4\HeuristicLab.Problems.DataAnalysis.Symbolic-3.4.csproj", "{3D28463F-EC96-4D82-AFEE-38BE91A0CA00}" 17 19 EndProject 18 20 Global … … 84 86 {318DFE8C-CA23-4F1B-A4AC-62B425060241}.Release|x64.ActiveCfg = Release|Any CPU 85 87 {318DFE8C-CA23-4F1B-A4AC-62B425060241}.Release|x86.ActiveCfg = Release|Any CPU 88 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 89 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Any CPU.Build.0 = Debug|Any CPU 90 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Mixed Platforms.ActiveCfg = Debug|x86 91 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|Mixed Platforms.Build.0 = Debug|x86 92 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x64.ActiveCfg = Debug|x64 93 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x64.Build.0 = Debug|x64 94 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x86.ActiveCfg = Debug|x86 95 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Debug|x86.Build.0 = Debug|x86 96 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Any CPU.ActiveCfg = Release|Any CPU 97 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Any CPU.Build.0 = Release|Any CPU 98 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Mixed Platforms.ActiveCfg = Release|x86 99 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|Mixed Platforms.Build.0 = Release|x86 100 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x64.ActiveCfg = Release|x64 101 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x64.Build.0 = Release|x64 102 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x86.ActiveCfg = Release|x86 103 {3D28463F-EC96-4D82-AFEE-38BE91A0CA00}.Release|x86.Build.0 = Release|x86 86 104 EndGlobalSection 87 105 GlobalSection(SolutionProperties) = preSolution
Note: See TracChangeset
for help on using the changeset viewer.