Changeset 461
- Timestamp:
- 08/06/08 16:59:39 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.StructureIdentification/StructIdProblemInjector.cs
r397 r461 38 38 : base() { 39 39 AddVariableInfo(new VariableInfo("Dataset", "Dataset", typeof(Dataset), VariableKind.New)); 40 GetVariableInfo("Dataset").Local = true; 40 41 AddVariable(new Variable("Dataset", new Dataset())); 42 41 43 AddVariableInfo(new VariableInfo("TargetVariable", "TargetVariable", typeof(IntData), VariableKind.New)); 44 GetVariableInfo("TargetVariable").Local = true; 42 45 AddVariable(new Variable("TargetVariable", new IntData())); 46 43 47 AddVariableInfo(new VariableInfo("TrainingSamplesStart", "TrainingSamplesStart", typeof(IntData), VariableKind.New)); 48 GetVariableInfo("TrainingSamplesStart").Local = true; 44 49 AddVariable(new Variable("TrainingSamplesStart", new IntData())); 50 45 51 AddVariableInfo(new VariableInfo("TrainingSamplesEnd", "TrainingSamplesEnd", typeof(IntData), VariableKind.New)); 52 GetVariableInfo("TrainingSamplesEnd").Local = true; 46 53 AddVariable(new Variable("TrainingSamplesEnd", new IntData())); 54 47 55 AddVariableInfo(new VariableInfo("ValidationSamplesStart", "ValidationSamplesStart", typeof(IntData), VariableKind.New)); 56 GetVariableInfo("ValidationSamplesStart").Local = true; 48 57 AddVariable(new Variable("ValidationSamplesStart", new IntData())); 58 49 59 AddVariableInfo(new VariableInfo("ValidationSamplesEnd", "ValidationSamplesEnd", typeof(IntData), VariableKind.New)); 60 GetVariableInfo("ValidationSamplesEnd").Local = true; 50 61 AddVariable(new Variable("ValidationSamplesEnd", new IntData())); 62 51 63 AddVariableInfo(new VariableInfo("TestSamplesStart", "TestSamplesStart", typeof(IntData), VariableKind.New)); 64 GetVariableInfo("TestSamplesStart").Local = true; 52 65 AddVariable(new Variable("TestSamplesStart", new IntData())); 66 53 67 AddVariableInfo(new VariableInfo("TestSamplesEnd", "TestSamplesEnd", typeof(IntData), VariableKind.New)); 68 GetVariableInfo("TestSamplesEnd").Local = true; 54 69 AddVariable(new Variable("TestSamplesEnd", new IntData())); 55 70 } … … 60 75 61 76 public override IOperation Apply(IScope scope) { 62 scope.AddVariable(new Variable(scope.TranslateName("Dataset"), (IItem)GetVariable("Dataset").Value.Clone())); 63 scope.AddVariable(new Variable(scope.TranslateName("TargetVariable"), (IItem)GetVariable("TargetVariable").Value.Clone())); 64 scope.AddVariable(new Variable(scope.TranslateName("TrainingSamplesStart"), (IItem)GetVariable("TrainingSamplesStart").Value.Clone())); 65 scope.AddVariable(new Variable(scope.TranslateName("TrainingSamplesEnd"), (IItem)GetVariable("TrainingSamplesEnd").Value.Clone())); 66 scope.AddVariable(new Variable(scope.TranslateName("ValidationSamplesStart"), (IItem)GetVariable("ValidationSamplesStart").Value.Clone())); 67 scope.AddVariable(new Variable(scope.TranslateName("ValidationSamplesEnd"), (IItem)GetVariable("ValidationSamplesEnd").Value.Clone())); 68 scope.AddVariable(new Variable(scope.TranslateName("TestSamplesStart"), (IItem)GetVariable("TestSamplesStart").Value.Clone())); 69 scope.AddVariable(new Variable(scope.TranslateName("TestSamplesEnd"), (IItem)GetVariable("TestSamplesEnd").Value.Clone())); 77 foreach(VariableInfo info in VariableInfos) { 78 if(info.Local) { 79 scope.AddVariable(new Variable(info.ActualName, (IItem)GetVariable(info.FormalName).Value.Clone())); 80 } 81 } 70 82 return null; 71 83 }
Note: See TracChangeset
for help on using the changeset viewer.