- Timestamp:
- 04/15/14 22:34:05 (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/SimSharp/HeuristicLab.Encodings.ParameterVector/ParameterVectorBuilder.cs
r10753 r10754 32 32 33 33 public ParameterVectorBuilder() { 34 booleanParameters = n ew HashSet<string>();35 integerParameters = n ew Dictionary<string, Tuple<int, int, int?>>();36 realParameters = n ew Dictionary<string, Tuple<double, double>>();34 booleanParameters = null; 35 integerParameters = null; 36 realParameters = null; 37 37 permutationParameter = null; 38 38 } 39 39 40 40 public ParameterVectorBuilder AddBoolean(string name) { 41 if (booleanParameters == null) booleanParameters = new HashSet<string>(); 41 42 booleanParameters.Add(name); 42 43 return this; … … 44 45 45 46 public ParameterVectorBuilder AddInteger(string name, int min, int max, int? step = null) { 47 if (integerParameters == null) integerParameters = new Dictionary<string, Tuple<int, int, int?>>(); 46 48 integerParameters.Add(name, Tuple.Create(min, max, step)); 47 49 return this; … … 49 51 50 52 public ParameterVectorBuilder AddReal(string name, double min, double max) { 53 if (realParameters == null) realParameters = new Dictionary<string, Tuple<double, double>>(); 51 54 realParameters.Add(name, Tuple.Create(min, max)); 52 55 return this;
Note: See TracChangeset
for help on using the changeset viewer.