Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
08/10/08 23:02:49 (16 years ago)
Author:
gkronber
Message:

implemented #245 (StructIdProblemInjector should inject a list of allowed features)

Location:
trunk/sources/HeuristicLab.StructureIdentification
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.StructureIdentification/FunctionLibraryInjector.cs

    r471 r487  
    3535    private const string MINTIMEOFFSET = "MinTimeOffset";
    3636    private const string MAXTIMEOFFSET = "MaxTimeOffset";
    37     private const string OPERATORLIBRARY = "OperatorLibrary";
     37    private const string OPERATORLIBRARY = "FunctionLibrary";
    3838
    3939    private HeuristicLab.Functions.Variable variable;
     
    4848      : base() {
    4949      AddVariableInfo(new VariableInfo(ALLOWEDFEATURES, "List of indexes of allowed features", typeof(ItemList<IntData>), VariableKind.In));
    50       GetVariableInfo(ALLOWEDFEATURES).Local = true;
    51       AddVariable(new Variable(ALLOWEDFEATURES, new ItemList<IntData>()));
    52 
    5350      AddVariableInfo(new VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData), VariableKind.In));
    54       GetVariableInfo(MINTIMEOFFSET).Local = true;
    55       AddVariable(new Variable(MINTIMEOFFSET, new IntData()));
    56 
    5751      AddVariableInfo(new VariableInfo(MAXTIMEOFFSET, "Maximal time offset for all feature", typeof(IntData), VariableKind.In));
    58       GetVariableInfo(MAXTIMEOFFSET).Local = true;
    59       AddVariable(new Variable(MAXTIMEOFFSET, new IntData()));
    60 
    61       AddVariableInfo(new VariableInfo("OperatorLibrary", "Preconfigured default operator library", typeof(GPOperatorLibrary), VariableKind.New));
     52      AddVariableInfo(new VariableInfo(OPERATORLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), VariableKind.New));
    6253    }
    6354
  • trunk/sources/HeuristicLab.StructureIdentification/StructIdProblemInjector.cs

    r461 r487  
    4545      AddVariable(new Variable("TargetVariable", new IntData()));
    4646
     47      AddVariableInfo(new VariableInfo("AllowedFeatures", "Indexes of allowed input variables", typeof(ItemList<IntData>), VariableKind.New));
     48      GetVariableInfo("AllowedFeatures").Local = true;
     49      AddVariable(new Variable("AllowedFeatures", new ItemList<IntData>()));
     50
    4751      AddVariableInfo(new VariableInfo("TrainingSamplesStart", "TrainingSamplesStart", typeof(IntData), VariableKind.New));
    4852      GetVariableInfo("TrainingSamplesStart").Local = true;
  • trunk/sources/HeuristicLab.StructureIdentification/StructIdProblemInjectorView.cs

    r404 r487  
    105105          ((IntData)StructIdProblemInjector.GetVariable("TestSamplesEnd").Value).Data = parser.TestSamplesEnd;
    106106          ((IntData)StructIdProblemInjector.GetVariable("TargetVariable").Value).Data = parser.TargetVariable;
     107          ItemList<IntData> allowedFeatures = (ItemList<IntData>)StructIdProblemInjector.GetVariable("AllowedFeatures").Value;
     108          List<int> nonInputVariables = parser.NonInputVariables;
     109          for(int i = 0; i < dataset.Columns; i++) {
     110            if(!nonInputVariables.Contains(i)) allowedFeatures.Add(new IntData(i));
     111          }
    107112          Refresh();
    108113        }
Note: See TracChangeset for help on using the changeset viewer.