Changeset 11234
- Timestamp:
- 07/30/14 02:01:41 (9 years ago)
- Location:
- branches/HeuristicLab.BottomUpTreeDistance
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.BottomUpTreeDistance.sln
r11219 r11234 5 5 MinimumVisualStudioVersion = 10.0.40219.1 6 6 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}" 7 EndProject8 Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{296A2ED3-637A-4E1E-8C06-170651BF1F04}"9 ProjectSection(SolutionItems) = preProject10 Performance1.psess = Performance1.psess11 EndProjectSection12 7 EndProject 13 8 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "HeuristicLab.Tests", "HeuristicLab.Tests\HeuristicLab.Tests.csproj", "{07C05C8F-0769-4607-96C6-D90A219F4C85}" … … 47 42 HideSolutionNode = FALSE 48 43 EndGlobalSection 49 GlobalSection(Performance) = preSolution50 HasPerformanceSessions = true51 EndGlobalSection52 44 EndGlobal -
branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/DirectedGraph/DirectedGraph.cs
r11229 r11234 94 94 vertex.ArcAdded += OnArcAdded; 95 95 vertex.ArcRemoved += OnArcRemoved; 96 OnVertexAdded(this, EventArgs.Empty);97 96 } 98 97 … … 100 99 vertices.Remove(vertex); 101 100 // remove connections to/from the removed vertex 102 foreach (var arc in vertex.InArcs.Concat(vertex.OutArcs)) 101 var arcList = vertex.InArcs.Concat(vertex.OutArcs).ToList(); 102 foreach (var arc in arcList) 103 103 RemoveArc(arc); 104 104 // deregister event handlers … … 106 106 vertex.ArcRemoved -= OnArcRemoved; 107 107 vertex.Changed -= OnVertexChanged; 108 OnVertexRemoved(this, EventArgs.Empty);109 108 } 110 109 … … 131 130 } 132 131 133 public event EventHandler VertexAdded; 134 protected virtual void OnVertexAdded(object sender, EventArgs args) { 135 var added = VertexAdded; 136 if (added != null) 137 added(sender, args); 138 } 139 140 public event EventHandler VertexChanged; 141 protected virtual void OnVertexChanged(object sender, EventArgs args) { 142 var changed = VertexChanged; 143 if (changed != null) 144 changed(sender, args); 145 } 146 147 public event EventHandler VertexRemoved; 148 protected virtual void OnVertexRemoved(object sender, EventArgs args) { 149 var removed = VertexRemoved; 150 if (removed != null) 151 removed(sender, args); 152 } 132 protected virtual void OnVertexChanged(object sender, EventArgs args) { } 153 133 154 134 protected virtual void OnArcAdded(object sender, EventArgs<IArc> args) { -
branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/DirectedGraph/Vertex.cs
r11229 r11234 126 126 if (outArcs == null) 127 127 outArcs = new List<IArc>(); 128 else if (outArcs.Contains(arc) || outArcs.Any(a => a.Target == arc.Target && a.Source == arc.Source))128 else if (outArcs.Contains(arc) || outArcs.Any(a => a.Target == arc.Target)) 129 129 throw new InvalidOperationException("Arc already added."); 130 130 outArcs.Add(arc); … … 132 132 if (inArcs == null) 133 133 inArcs = new List<IArc>(); 134 else if (inArcs.Contains(arc) || inArcs.Any(a => a. Target == arc.Target && a.Source == arc.Source))134 else if (inArcs.Contains(arc) || inArcs.Any(a => a.Source == arc.Source)) 135 135 throw new InvalidOperationException("Arc already added."); 136 136 inArcs.Add(arc); -
branches/HeuristicLab.BottomUpTreeDistance/HeuristicLab.Tests/HeuristicLab.Tests.csproj
r11219 r11234 97 97 </Choose> 98 98 <ItemGroup> 99 <Compile Include="MaxCommonSubtreeSimilarityCalculatorTest.cs" /> 99 100 <Compile Include="BottomUpSimilarityCalculatorTest.cs" /> 100 101 <Compile Include="Properties\AssemblyInfo.cs" />
Note: See TracChangeset
for help on using the changeset viewer.