Free cookie consent management tool by TermsFeed Policy Generator

Changeset 17679


Ignore:
Timestamp:
07/17/20 20:46:30 (4 years ago)
Author:
dleko
Message:

#2825 Show best known pareto front in scatter plot.

Location:
branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/NSGA3.cs

    r17669 r17679  
    274274            if (problem == null) return;
    275275            // todo: add BestKnownFront parameter
    276             ResultsScatterPlot = new ParetoFrontScatterPlot(new double[0][], new double[0][], null, problem.Objectives, problem.ProblemSize);
     276            ResultsScatterPlot = new ParetoFrontScatterPlot(new double[0][], new double[0][], problem.BestKnownFront.ToJaggedArray(), problem.Objectives, problem.ProblemSize);
    277277        }
    278278
  • branches/2825-NSGA3/HeuristicLab.Algorithms.NSGA3/3.3/Utility.cs

    r17667 r17679  
    4545
    4646            return product;
     47        }
     48        public static double[][] ToJaggedArray(this DoubleMatrix m)
     49        {
     50            if (m == null) return null;
     51            var i = m.Rows - 1;
     52            var a = new double[i][];
     53            for (i--; i >= 0; i--)
     54            {
     55                var j = m.Columns;
     56                a[i] = new double[j];
     57                for (j--; j >= 0; j--) a[i][j] = m[i, j];
     58            }
     59            return a;
    4760        }
    4861
Note: See TracChangeset for help on using the changeset viewer.