Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
09/23/09 13:58:07 (15 years ago)
Author:
mkommend
Message:

added GetInputVariables to IPredictor (ticket #760)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification/3.3/Predictor.cs

    r2328 r2381  
    5959    }
    6060
     61    public override IEnumerable<string> GetInputVariables() {
     62      HashSet<string> inputVariables = new HashSet<string>();
     63      foreach (IFunctionTree ft in FunctionTreeIterator.IteratePrefix(functionTree.FunctionTree)) {
     64        if (ft is VariableFunctionTree) {
     65          VariableFunctionTree variable = (VariableFunctionTree) ft;
     66          inputVariables.Add(variable.VariableName);
     67        }
     68      }
     69      return inputVariables;
     70    }
     71
    6172    public override IView CreateView() {
    6273      return new PredictorView(this);
Note: See TracChangeset for help on using the changeset viewer.