Changeset 13821
- Timestamp:
- 05/02/16 15:25:14 (9 years ago)
- Location:
- branches/HeuristicLab.VariableInteractionNetworks
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/DirectedGraphChart.cs
r13806 r13821 44 44 45 45 // graph layout options 46 public double IdealEdgeLength { get; set; } = 50;47 public bool PerformEdgeRouting { get; set; } = false;46 public double IdealEdgeLength { get; set; } 47 public bool PerformEdgeRouting { get; set; } 48 48 public Routing RoutingMode { get; set; } 49 49 … … 84 84 shapes = new Dictionary<Type, LabeledPrimitive>(); 85 85 SmoothingMode = SmoothingMode.HighQuality; // set antialiasing for nicer rendering 86 IdealEdgeLength = 50; 86 87 } 87 88 -
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/Layout/ConstrainedForceDirectedLayout.cs
r13727 r13821 45 45 private Dictionary<uint, uint> idMap; 46 46 private Dictionary<IVertex, int> indexMap; 47 public double IdealEdgeLength { get; set; } = 1;48 public double DefaultEdgeLength { get; set; } = 200;49 public bool PreventOverlaps { get; set; } = true;50 public int LayoutWidth { get; set; } = 800;51 public int LayoutHeight { get; set; } = 600;52 public bool PerformEdgeRouting { get; set; } = true;53 public int MinHorizontalSpacing { get; set; } = 0;54 public int MinVerticalSpacing { get; set; } = 0;55 public EdgeRouting EdgeRoutingMode { get; set; } = EdgeRouting.None;47 public double IdealEdgeLength { get; set; } 48 public double DefaultEdgeLength { get; set; } 49 public bool PreventOverlaps { get; set; } 50 public int LayoutWidth { get; set; } 51 public int LayoutHeight { get; set; } 52 public bool PerformEdgeRouting { get; set; } 53 public int MinHorizontalSpacing { get; set; } 54 public int MinVerticalSpacing { get; set; } 55 public EdgeRouting EdgeRoutingMode { get; set; } 56 56 57 57 public Dictionary<IVertex, PointF> VertexPositions { … … 82 82 } 83 83 84 public ConstrainedForceDirectedLayout() { } 84 public ConstrainedForceDirectedLayout() { 85 IdealEdgeLength = 1; 86 DefaultEdgeLength = 200; 87 PreventOverlaps = true; 88 LayoutWidth = 800; 89 LayoutHeight = 600; 90 PerformEdgeRouting = true; 91 MinHorizontalSpacing = 0; 92 MinVerticalSpacing = 0; 93 EdgeRoutingMode = EdgeRouting.None; 94 } 85 95 86 96 public void Run(Dictionary<IVertex, RectangleF> nodeShapes) { -
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/RunCollectionVariableInteractionNetworkView.Designer.cs
r13789 r13821 1 namespace HeuristicLab.VariableInteractionNetworks.Views { 1 using System.Globalization; 2 3 namespace HeuristicLab.VariableInteractionNetworks.Views { 2 4 partial class RunCollectionVariableInteractionNetworkView { 3 5 /// <summary> … … 114 116 this.impactThresholdTextBox.Size = new System.Drawing.Size(201, 20); 115 117 this.impactThresholdTextBox.TabIndex = 2; 116 this.impactThresholdTextBox.Text = "0.2";118 this.impactThresholdTextBox.Text = 0.2.ToString(CultureInfo.CurrentCulture); 117 119 this.impactThresholdTextBox.Validating += new System.ComponentModel.CancelEventHandler(this.TextBoxValidating); 118 120 this.impactThresholdTextBox.Validated += new System.EventHandler(this.ImpactThresholdTextBoxValidated); -
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/RunCollectionVariableInteractionNetworkView.cs
r13806 r13821 24 24 using System.ComponentModel; 25 25 using System.Drawing; 26 using System.Globalization; 26 27 using System.Linq; 27 28 using System.Text; … … 237 238 vn.AddVertex(junctionNode); 238 239 nodes[junctionLabel] = junctionNode; 239 junctionNode.Label = s tring.Format("Target quality: {0:0.000}", solutionsEnsemble.TrainingRSquared);240 junctionNode.Label = solutionsEnsemble.TrainingRSquared.ToString("N3", CultureInfo.CurrentCulture); 240 241 } 241 242 IArc arc; … … 247 248 nodes[v] = variableNode; 248 249 } 249 arc = new Arc(variableNode, junctionNode) { Weight = impact, Label = string.Format("Impact: {0:0.000}", impact) };250 arc = new Arc(variableNode, junctionNode) { Weight = impact, Label = impact.ToString("N3", CultureInfo.CurrentCulture) }; 250 251 vn.AddArc(arc); 251 252 } 252 253 var trainingR2 = ((IRegressionSolution)((JunctionNetworkNode)junctionNode).Data).TrainingRSquared; 253 arc = new Arc(junctionNode, targetNode) { Weight = junctionNode.InArcs.Sum(x => x.Weight), Label = string.Format("Quality: {0:0.000}", trainingR2) };254 arc = new Arc(junctionNode, targetNode) { Weight = junctionNode.InArcs.Sum(x => x.Weight), Label = trainingR2.ToString("N3", CultureInfo.CurrentCulture) }; 254 255 vn.AddArc(arc); 255 256 } else { … … 261 262 nodes[v] = variableNode; 262 263 } 263 var arc = new Arc(variableNode, targetNode) { Weight = impact, Label = string.Format("Impact: {0:0.000}", impact) }; 264 var arc = new Arc(variableNode, targetNode) { 265 Weight = impact, Label = impact.ToString("N3", CultureInfo.CurrentCulture) 266 }; 264 267 vn.AddArc(arc); 265 268 } … … 392 395 double impact; 393 396 if (!double.TryParse(tb.Text, out impact)) 394 impact = 0. 1;397 impact = 0.2; 395 398 var network = ApplyThreshold(variableInteractionNetwork, impact); 396 399 graphChart.Graph = network; -
branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks/3.3/CreateTargetVariationExperimentDialog.cs
r13814 r13821 156 156 var totalNumberOfCombinations = (inputCount + 1) * EnumerableExtensions.BinomialCoefficient(inputCount, combinationGroupSize); 157 157 int progress = 0; 158 foreach (var optimizer in CreateVariableCombinations(algorithm, combinationGroupSize, repetitions)) { 159 experiment.Optimizers.Add(optimizer); 160 progress++; 161 worker.ReportProgress((int)Math.Round(100d * progress / totalNumberOfCombinations)); 162 } 163 Experiment = experiment; 158 try { 159 foreach (var optimizer in CreateVariableCombinations(algorithm, combinationGroupSize, repetitions)) { 160 if (worker.CancellationPending) 161 throw new OperationCanceledException(); 162 experiment.Optimizers.Add(optimizer); 163 progress++; 164 worker.ReportProgress((int)Math.Round(100d * progress / totalNumberOfCombinations)); 165 } 166 Experiment = experiment; 167 } catch (OperationCanceledException) { 168 e.Cancel = true; 169 UpdateProgress(0); 170 progressBar.Visible = false; 171 okButton.Enabled = true; 172 combinationsLabel.Visible = true; 173 combinationCountLabel.Visible = true; 174 } 164 175 } 165 176
Note: See TracChangeset
for help on using the changeset viewer.