Ignore:
Timestamp:
09/07/16 15:20:29 (5 years ago)
Author:
bburlacu
Message:

#2288: Clean up code and add comments in the ConstrainedForceDirectedLayout class. Minor changes to view and directed graph chart. Introduced an INetworkNode interface for more flexibility. Updated cola and adaptagrams dlls with latest changes from upstream.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/HeuristicLab.VariableInteractionNetworks/HeuristicLab.VariableInteractionNetworks.Views/3.3/RunCollectionVariableInteractionNetworkView.cs

    r13893 r14275  
    9797    }
    9898
    99     private static RegressionEnsembleSolution CreateEnsembleSolution(IEnumerable<IRun> runs) {
     99    public static RegressionEnsembleSolution CreateEnsembleSolution(IEnumerable<IRun> runs) {
    100100      var solutions = runs.Select(x => x.Results.Values.Single(v => v is IRegressionSolution)).Cast<IRegressionSolution>();
    101101      return new RegressionEnsembleSolution(new RegressionEnsembleModel(solutions.Select(x => x.Model)), solutions.First().ProblemData);
     
    186186    }
    187187
    188     private static Dictionary<string, Tuple<IEnumerable<IRun>, Dictionary<string, double>>> CalculateVariableImpactsFromRunResults(RunCollection runs,
     188    public static Dictionary<string, Tuple<IEnumerable<IRun>, Dictionary<string, double>>> CalculateVariableImpactsFromRunResults(RunCollection runs,
    189189      string qualityResultName, bool maximization, string impactsResultName, bool useBestRunsPerTarget = false) {
    190190      var targets = runs.GroupBy(x => ((IRegressionProblemData)x.Parameters["ProblemData"]).TargetVariable).ToList();
     
    210210    }
    211211
    212     private static VariableInteractionNetwork CreateNetwork(Dictionary<string, Tuple<IEnumerable<IRun>, Dictionary<string, double>>> targetImpacts) {
     212    public static VariableInteractionNetwork CreateNetwork(Dictionary<string, Tuple<IEnumerable<IRun>, Dictionary<string, double>>> targetImpacts) {
    213213      var nodes = new Dictionary<string, IVertex>();
    214214      var vn = new VariableInteractionNetwork();
     
    275275    }
    276276
    277     private static VariableInteractionNetwork ApplyThreshold(VariableInteractionNetwork originalNetwork, double threshold) {
     277    public static VariableInteractionNetwork ApplyThreshold(VariableInteractionNetwork originalNetwork, double threshold) {
    278278      var arcs = originalNetwork.Arcs.Where(x => x.Weight >= threshold).ToList();
    279279      if (!arcs.Any()) return originalNetwork;
     
    305305    }
    306306
    307     private static Dictionary<string, double> CalculateAverageImpacts(RunCollection runs, string resultName) {
     307    public static Dictionary<string, double> CalculateAverageImpacts(RunCollection runs, string resultName) {
    308308      var pd = (IRegressionProblemData)runs.First().Parameters["ProblemData"];
    309309      var target = pd.TargetVariable;
     
    439439      }
    440440      var idealEdgeLength = double.Parse(idealEdgeLengthTextBox.Text);
    441       if (routingMode == graphChart.RoutingMode && idealEdgeLength.IsAlmost(graphChart.IdealEdgeLength)) return;
     441      if (routingMode == graphChart.RoutingMode && idealEdgeLength.IsAlmost(graphChart.DefaultEdgeLength)) return;
    442442      graphChart.RoutingMode = routingMode;
    443443      graphChart.PerformEdgeRouting = routingMode != ConstrainedForceDirectedLayout.EdgeRouting.None;
    444       graphChart.IdealEdgeLength = idealEdgeLength;
     444      graphChart.DefaultEdgeLength = idealEdgeLength;
    445445      graphChart.Draw();
    446446    }
Note: See TracChangeset for help on using the changeset viewer.