Changeset 15976 for branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/Operators/SampleCollector.cs
- Timestamp:
- 06/29/18 09:07:03 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/EfficientGlobalOptimization/HeuristicLab.Algorithms.EGO/Operators/SampleCollector.cs
r15343 r15976 20 20 #endregion 21 21 22 using System.Collections.Generic; 23 using System.Linq; 22 24 using HeuristicLab.Common; 23 25 using HeuristicLab.Core; … … 58 60 if (data.Columns != vector.Length + 1) { 59 61 if (data.Columns != 0 || data.Rows != 0) throw new OperatorExecutionException(this, "dataset columns do not match samplesize+1"); 60 for (var i = 0; i < vector.Length; i++) 61 data.AddVariable("input" + i, new double[0]); 62 data.AddVariable("output", new double[0]); 62 data = new ModifiableDataset( 63 Enumerable.Range(0, vector.Length).Select(x => "input" + x).Concat(new[] { "output" }), 64 Enumerable.Range(0, vector.Length + 1).Select(x => new List<double>())); 65 DatasetParameter.ActualValue = data; 63 66 } 64 67 AddRow(data, vector, quality); 65 return base.InstrumentedApply(); ;68 return base.InstrumentedApply(); 66 69 } 67 70
Note: See TracChangeset
for help on using the changeset viewer.