Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
10/19/08 00:07:51 (16 years ago)
Author:
gkronber
Message:

fixed #322

Location:
trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/AveragePercentageChangeEvaluator.cs

    r656 r686  
    2828using HeuristicLab.GP.StructureIdentification;
    2929
    30 namespace HeuristicLab.GP.TimeSeries {
     30namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
    3131  public class AvergePercentageChangeEvaluator : GPEvaluatorBase {
    3232    protected DoubleData apc;
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/FunctionLibraryInjector.cs

    r656 r686  
    2121
    2222using System.Collections.Generic;
    23 using HeuristicLab.Core;
     23using Core = HeuristicLab.Core;
    2424using HeuristicLab.Data;
    2525using HeuristicLab.Constraints;
    26 using StructId = HeuristicLab.GP.StructureIdentification;
    27 
    28 namespace HeuristicLab.GP.TimeSeries {
    29   public class FunctionLibraryInjector : OperatorBase {
     26
     27namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
     28  public class FunctionLibraryInjector : Core.OperatorBase {
    3029    private const string TARGETVARIABLE = "TargetVariable";
    3130    private const string AUTOREGRESSIVE = "Autoregressive";
     
    3534    private const string FUNCTIONLIBRARY = "FunctionLibrary";
    3635
    37     private StructId.Variable variable;
    38     private StructId.Differential differential;
     36    private Variable variable;
     37    private Differential differential;
    3938    private GPOperatorLibrary operatorLibrary;
    4039
     
    4544    public FunctionLibraryInjector()
    4645      : base() {
    47       AddVariableInfo(new VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), VariableKind.In));
    48       AddVariableInfo(new VariableInfo(AUTOREGRESSIVE, "Switch to turn on/off autoregressive modeling (wether to allow the target variable as input)", typeof(BoolData), VariableKind.In));
    49       AddVariableInfo(new VariableInfo(ALLOWEDFEATURES, "List of indexes of allowed features", typeof(ItemList<IntData>), VariableKind.In));
    50       AddVariableInfo(new VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData), VariableKind.In));
    51       AddVariableInfo(new VariableInfo(MAXTIMEOFFSET, "Maximal time offset for all feature", typeof(IntData), VariableKind.In));
    52       AddVariableInfo(new VariableInfo(FUNCTIONLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), VariableKind.New));
    53     }
    54 
    55     public override IOperation Apply(IScope scope) {
     46      AddVariableInfo(new Core.VariableInfo(TARGETVARIABLE, "The target variable", typeof(IntData), Core.VariableKind.In));
     47      AddVariableInfo(new Core.VariableInfo(AUTOREGRESSIVE, "Switch to turn on/off autoregressive modeling (wether to allow the target variable as input)", typeof(BoolData), Core.VariableKind.In));
     48      AddVariableInfo(new Core.VariableInfo(ALLOWEDFEATURES, "List of indexes of allowed features", typeof(ItemList<IntData>), Core.VariableKind.In));
     49      AddVariableInfo(new Core.VariableInfo(MINTIMEOFFSET, "Minimal time offset for all features", typeof(IntData), Core.VariableKind.In));
     50      AddVariableInfo(new Core.VariableInfo(MAXTIMEOFFSET, "Maximal time offset for all feature", typeof(IntData), Core.VariableKind.In));
     51      AddVariableInfo(new Core.VariableInfo(FUNCTIONLIBRARY, "Preconfigured default operator library", typeof(GPOperatorLibrary), Core.VariableKind.New));
     52    }
     53
     54    public override Core.IOperation Apply(Core.IScope scope) {
    5655      IntData minTimeOffset = GetVariableValue<IntData>(MINTIMEOFFSET, scope, true);
    5756      IntData maxTimeOffset = GetVariableValue<IntData>(MAXTIMEOFFSET, scope, true);
     
    7978      differential.SetConstraints(allowedIndexes, minTimeOffset.Data, maxTimeOffset.Data);
    8079
    81       scope.AddVariable(new Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));
     80      scope.AddVariable(new Core.Variable(scope.TranslateName(FUNCTIONLIBRARY), operatorLibrary));
    8281      return null;
    8382    }
    8483
    8584    private void InitDefaultOperatorLibrary() {
    86       variable = new StructId.Variable();
    87       differential = new StructId.Differential();
    88       StructId.Constant constant = new StructId.Constant();
    89 
    90       StructId.Addition addition = new StructId.Addition();
    91       StructId.And and = new StructId.And();
    92       StructId.Average average = new StructId.Average();
    93       StructId.Cosinus cosinus = new StructId.Cosinus();
    94       StructId.Division division = new StructId.Division();
    95       StructId.Equal equal = new StructId.Equal();
    96       StructId.Exponential exponential = new StructId.Exponential();
    97       StructId.GreaterThan greaterThan = new StructId.GreaterThan();
    98       StructId.IfThenElse ifThenElse = new StructId.IfThenElse();
    99       StructId.LessThan lessThan = new StructId.LessThan();
    100       StructId.Logarithm logarithm = new StructId.Logarithm();
    101       StructId.Multiplication multiplication = new StructId.Multiplication();
    102       StructId.Not not = new StructId.Not();
    103       StructId.Or or = new StructId.Or();
    104       StructId.Power power = new StructId.Power();
    105       StructId.Signum signum = new StructId.Signum();
    106       StructId.Sinus sinus = new StructId.Sinus();
    107       StructId.Sqrt sqrt = new StructId.Sqrt();
    108       StructId.Subtraction subtraction = new StructId.Subtraction();
    109       StructId.Tangens tangens = new StructId.Tangens();
    110       StructId.Xor xor = new StructId.Xor();
     85      variable = new Variable();
     86      differential = new Differential();
     87      Constant constant = new Constant();
     88
     89      Addition addition = new Addition();
     90      And and = new And();
     91      Average average = new Average();
     92      Cosinus cosinus = new Cosinus();
     93      Division division = new Division();
     94      Equal equal = new Equal();
     95      Exponential exponential = new Exponential();
     96      GreaterThan greaterThan = new GreaterThan();
     97      IfThenElse ifThenElse = new IfThenElse();
     98      LessThan lessThan = new LessThan();
     99      Logarithm logarithm = new Logarithm();
     100      Multiplication multiplication = new Multiplication();
     101      Not not = new Not();
     102      Or or = new Or();
     103      Power power = new Power();
     104      Signum signum = new Signum();
     105      Sinus sinus = new Sinus();
     106      Sqrt sqrt = new Sqrt();
     107      Subtraction subtraction = new Subtraction();
     108      Tangens tangens = new Tangens();
     109      Xor xor = new Xor();
    111110
    112111      IFunction[] booleanFunctions = new IFunction[] {
     
    189188
    190189    private void SetAllowedSubOperators(IFunction f, IFunction[] gs) {
    191       foreach(IConstraint c in f.Constraints) {
     190      foreach(Core.IConstraint c in f.Constraints) {
    192191        if(c is SubOperatorTypeConstraint) {
    193192          SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint;
     
    207206
    208207    private void SetAllowedSubOperators(IFunction f, int p, IFunction[] gs) {
    209       foreach(IConstraint c in f.Constraints) {
     208      foreach(Core.IConstraint c in f.Constraints) {
    210209        if(c is SubOperatorTypeConstraint) {
    211210          SubOperatorTypeConstraint typeConstraint = c as SubOperatorTypeConstraint;
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/HeuristicLabGPTimeSeriesPlugin.cs

    r656 r686  
    2525using HeuristicLab.PluginInfrastructure;
    2626
    27 namespace HeuristicLab.GP.TimeSeries {
     27namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
    2828  [ClassInfo(Name = "HeuristicLab.GP.StructureIdentification.TimeSeries-3.2")]
    2929  [PluginFile(Filename = "HeuristicLab.GP.StructureIdentification.TimeSeries-3.2.dll", Filetype = PluginFileType.Assembly)]
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/ProfitEvaluator.cs

    r656 r686  
    2828using HeuristicLab.GP.StructureIdentification;
    2929
    30 namespace HeuristicLab.GP.TimeSeries {
     30namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
    3131  public class ProfitEvaluator : GPEvaluatorBase {
    3232    protected DoubleData profit;
  • trunk/sources/HeuristicLab.GP.StructureIdentification.TimeSeries/TheilInequalityCoefficientEvaluator.cs

    r656 r686  
    2828using HeuristicLab.GP.StructureIdentification;
    2929
    30 namespace HeuristicLab.GP.TimeSeries {
     30namespace HeuristicLab.GP.StructureIdentification.TimeSeries {
    3131  public class TheilInequalityCoefficientEvaluator : GPEvaluatorBase {
    3232    private bool differential;
Note: See TracChangeset for help on using the changeset viewer.