Changeset 14097 for branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Analyzers/ScatterPlotAnalyzer.cs
- Timestamp:
- 07/18/16 15:50:10 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/HeuristicLab.Problems.MultiObjectiveTestFunctions/HeuristicLab.Problems.MultiObjectiveTestFunctions/3.3/Analyzers/ScatterPlotAnalyzer.cs
r14092 r14097 37 37 } 38 38 39 public IResultParameter<ScatterPlotContent> ScatterPlotResultParameter { 40 get { return (IResultParameter<ScatterPlotContent>)Parameters["Scatterplot"]; } 41 } 42 43 39 44 [StorableConstructor] 40 45 protected ScatterPlotAnalyzer(bool deserializing) : base(deserializing) { } … … 46 51 public ScatterPlotAnalyzer() { 47 52 Parameters.Add(new ScopeTreeLookupParameter<RealVector>("Individuals", "The individual solutions to the problem")); 53 Parameters.Add(new ResultParameter<ScatterPlotContent>("Scatterplot", "The scatterplot for the current and optimal (if known front)")); 54 48 55 } 49 56 50 57 public override IOperation Apply() { 51 var results = ResultsParameter.ActualValue;52 58 var qualities = QualitiesParameter.ActualValue; 53 59 var testFunction = TestFunctionParameter.ActualValue; 54 60 int objectives = qualities[0].Length; 55 61 var individuals = IndividualsParameter.ActualValue; 56 57 if (!results.ContainsKey("Scatterplot")) {58 results.Add(new Result("Scatterplot", typeof(ScatterPlotContent)));59 }60 62 61 63 double[][] optimalFront = new double[0][]; … … 66 68 var solutionClones = individuals.Select(s => s.ToArray()).ToArray(); 67 69 68 results["Scatterplot"].Value = new ScatterPlotContent(qualityClones, solutionClones, optimalFront, objectives);70 ScatterPlotResultParameter.ActualValue = new ScatterPlotContent(qualityClones, solutionClones, optimalFront, objectives); 69 71 70 72 return base.Apply();
Note: See TracChangeset
for help on using the changeset viewer.