- Timestamp:
- 02/24/10 10:45:47 (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Modeling/3.2/ProblemInjector.cs
r2440 r2855 108 108 scope.AddVariable(new Variable(scope.TranslateName("InputVariables"), inputVariables)); 109 109 110 int trainingStart = GetVariableValue<IntData>("TrainingSamplesStart", scope, true).Data;111 int trainingEnd = GetVariableValue<IntData>("TrainingSamplesEnd", scope, true).Data;110 int trainingStart = ((IntData)GetVariable("TrainingSamplesStart").Value).Data; 111 int trainingEnd = ((IntData)GetVariable("TrainingSamplesEnd").Value).Data; 112 112 113 113 var maxTraining = GetVariableValue<IntData>("MaxNumberOfTrainingSamples", scope, true, false); … … 134 134 for (int row = 0; row < rows; row++) { 135 135 int column = 0; 136 values[row *columns + column] = operatorDataset.GetValue(row, targetVariableIndex); // set target variable value to column index 0136 values[row * columns + column] = operatorDataset.GetValue(row, targetVariableIndex); // set target variable value to column index 0 137 137 column++; // start input variables at column index 1 138 138 foreach (var inputVariable in operatorAllowedVariables) { … … 165 165 166 166 private void AddVariableToScope(string variableName, IScope scope) { 167 scope.AddVariable(new Variable(scope.TranslateName(variableName), (IItem)GetVariable(variableName).Value.Clone())); 167 scope.AddVariable(new Variable(scope.TranslateName(variableName), (IItem)GetVariable(variableName).Value.Clone())); 168 168 } 169 169 }
Note: See TracChangeset
for help on using the changeset viewer.