-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDefaultCandidate.cs
More file actions
36 lines (33 loc) · 938 Bytes
/
DefaultCandidate.cs
File metadata and controls
36 lines (33 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System.Collections.Generic;
using System.Linq;
namespace Skewboid
{
///<summary>
/// Enumerator for Search functions that have generality
/// to either minimize or maximize (e.g. PNPPS, stochasticChoose). */
///</summary>
internal enum OptimizeDirection
{
/// <summary>
/// Minimize in the search - smaller is better.
/// </summary>
Minimize = -1,
/// <summary>
/// Maximize in the search - bigger is better.
/// </summary>
Maximize = 1
};
internal interface ICandidate
{
IEnumerable<double> Objectives { get; }
}
internal class DefaultCandidate : ICandidate
{
public IEnumerable<double> Objectives => objectives;
private double[] objectives;
internal DefaultCandidate(IEnumerable<double> objectives)
{
this.objectives = objectives.ToArray();
}
}
}