Last change
on this file since 13834 was
13749,
checked in by ichiriac, 9 years ago
|
Add GDE3 algorithm implementation
|
File size:
1.2 KB
|
Line | |
---|
1 | using System;
|
---|
2 | using System.Linq;
|
---|
3 | using System.Collections.Generic;
|
---|
4 | using HeuristicLab.Encodings.RealVectorEncoding;
|
---|
5 |
|
---|
6 | namespace HeuristicLab.Algoritms.GDE3
|
---|
7 | {
|
---|
8 | public class SolutionSet
|
---|
9 | {
|
---|
10 | private RealVector population;
|
---|
11 | private double[] quality;
|
---|
12 | private double crowdingDistance;
|
---|
13 | private double rank;
|
---|
14 |
|
---|
15 | public double CrowdingDistance
|
---|
16 | {
|
---|
17 | get { return crowdingDistance; }
|
---|
18 | set { crowdingDistance = value; }
|
---|
19 | }
|
---|
20 |
|
---|
21 | public double Rank
|
---|
22 | {
|
---|
23 | get { return rank; }
|
---|
24 | set { rank = value; }
|
---|
25 | }
|
---|
26 |
|
---|
27 | public RealVector Population
|
---|
28 | {
|
---|
29 | get { return population; }
|
---|
30 | set { population = value; }
|
---|
31 | }
|
---|
32 |
|
---|
33 | public double[] Quality
|
---|
34 | {
|
---|
35 | get { return quality; }
|
---|
36 | set { quality = value; }
|
---|
37 | }
|
---|
38 |
|
---|
39 |
|
---|
40 | public int populationSize;
|
---|
41 | public SolutionSet(int populationSize) {
|
---|
42 | this.populationSize = populationSize;
|
---|
43 | }
|
---|
44 |
|
---|
45 | public SolutionSet createSolution(double[] v)
|
---|
46 | {
|
---|
47 | this.population = new RealVector(v);
|
---|
48 | return this;
|
---|
49 | }
|
---|
50 | }
|
---|
51 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.