Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/03/19 15:50:35 (5 years ago)
Author:
abeham
Message:

#2521: add multi-objective analysis to all multi-objective encoding-base problems

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2521_ProblemRefactoring/HeuristicLab.Analysis/3.3/MultiObjective/ParetoFrontScatterPlot.cs

    r17229 r17230  
    4444
    4545    [Storable]
    46     private IList<double[][]> fronts;
    47     public IList<double[][]> Fronts {
     46    private IReadOnlyList<double[][]> fronts;
     47    public IReadOnlyList<double[][]> Fronts {
    4848      get { return fronts; }
    4949    }
    5050
    5151    [Storable]
    52     private IList<T[]> items;
    53     public IList<T[]> Items {
     52    private IReadOnlyList<T[]> items;
     53    public IReadOnlyList<T[]> Items {
    5454      get { return items; }
    5555    }
    5656
    5757    [Storable]
    58     private IList<double[]> bestKnownFront;
    59     public IList<double[]> BestKnownFront {
     58    private IReadOnlyList<double[]> bestKnownFront;
     59    public IReadOnlyList<double[]> BestKnownFront {
    6060      get { return bestKnownFront; }
    6161    }
     
    6464    protected ParetoFrontScatterPlot(StorableConstructorFlag _) : base(_) { }
    6565    public ParetoFrontScatterPlot() { }
    66     public ParetoFrontScatterPlot(IList<double[][]> qualities, IList<T[]> items, IList<double[]> paretoFront, int objectives) {
     66    /// <summary>
     67    /// Provides the data for displaying a multi-objective population in a scatter plot.
     68    /// </summary>
     69    /// <param name="items">The solutions grouped by pareto front (first is best).</param>
     70    /// <param name="qualities">The objective vectors grouped by pareto front (first is best).</param>
     71    /// <param name="objectives">The number of objectives.</param>
     72    /// <param name="bestKnownParetoFront">Optional, the best known front in objective space.</param>
     73    public ParetoFrontScatterPlot(IReadOnlyList<T[]> items, IReadOnlyList<double[][]> qualities, int objectives, IReadOnlyList<double[]> bestKnownParetoFront = null)
     74    {
    6775      this.fronts = qualities;
    6876      this.items = items;
    69       this.bestKnownFront = paretoFront;
     77      this.bestKnownFront = bestKnownParetoFront;
    7078      this.objectives = objectives;
     79    }
     80    /// <summary>
     81    /// Provides the data for displaying a multi-objective population in a scatter plot.
     82    /// </summary>
     83    /// <param name="fronts">The fronts (first is best) with the indices of the solutions and qualities.</param>
     84    /// <param name="items">The solutions.</param>
     85    /// <param name="qualities">The objective vectors for each solution.</param>
     86    /// <param name="objectives">The number of objectives.</param>
     87    /// <param name="bestKnownParetoFront">Optional, the best known front in objective space.</param>
     88    public ParetoFrontScatterPlot(List<List<int>> fronts, IReadOnlyList<T> items, IReadOnlyList<double[]> qualities, int objectives, IReadOnlyList<double[]> bestKnownParetoFront = null)
     89    {
     90      this.fronts = fronts.Select(x => x.Select(y => qualities[y]).ToArray()).ToArray();
     91      this.items = fronts.Select(x => x.Select(y => items[y]).ToArray()).ToArray();
     92      this.bestKnownFront = bestKnownParetoFront;
     93      this.objectives = objectives;
     94
    7195    }
    7296    protected ParetoFrontScatterPlot(ParetoFrontScatterPlot<T> original, Cloner cloner)
Note: See TracChangeset for help on using the changeset viewer.