- Timestamp:
- 12/11/18 13:09:04 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/2966_interval_calculation/HeuristicLab.Problems.DataAnalysis/3.4/DatasetUtil.cs
r15583 r16363 93 93 } 94 94 95 public static Dictionary<string, Interval> GetVariableBoundaries(IDataset dataset) { 96 Dictionary<string, Interval> variableBoundaries = new Dictionary<string, Interval>(); 97 98 foreach (var variable in dataset.VariableNames) { 99 var min = double.MaxValue; 100 var max = double.MinValue; 101 102 foreach (var val in dataset.GetDoubleValues(variable)) { 103 if (val < min) min = val; 104 if (val > max) max = val; 105 } 106 variableBoundaries.Add(variable, new Interval(min, max)); 107 } 108 109 return variableBoundaries; 110 } 111 95 112 private static bool GetEqualValues(this Dictionary<ValuesType, ValuesType> variableValuesMapping, ValuesType originalValues, out ValuesType matchingValues) { 96 113 if (variableValuesMapping.ContainsKey(originalValues)) {
Note: See TracChangeset
for help on using the changeset viewer.