Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
06/04/14 13:22:03 (10 years ago)
Author:
tsteinre
Message:
  • fixed CopyColumnTransformation inheritance
  • created a non-generic version of Transformation
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Transformations/3.4/CopyColumnTransformation.cs

    r10935 r10940  
    3030namespace HeuristicLab.Problems.DataAnalysis.Transformations {
    3131  [Item("CopyColumnTransformation", "Represents a transformation which represents a copied Column.")]
    32   public class CopyColumnTransformation<T> : Transformation<T> {
     32  public class CopyColumnTransformation : Transformation {
    3333    protected const string CopiedColumnNameParameterName = "CopiedColumnName";
    3434
     
    4040
    4141    #region properties
     42    public override string ShortName {
     43      get { return "Cpy"; }
     44    }
    4245    public string CopiedColumnName {
    4346      get { return CopiedColumnNameParameter.Value.Value; }
     
    4750    [StorableConstructor]
    4851    protected CopyColumnTransformation(bool deserializing) : base(deserializing) { }
    49     protected CopyColumnTransformation(CopyColumnTransformation<T> original, Cloner cloner)
     52    protected CopyColumnTransformation(CopyColumnTransformation original, Cloner cloner)
    5053      : base(original, cloner) {
    5154    }
     
    5659
    5760    public override IDeepCloneable Clone(Cloner cloner) {
    58       return new CopyColumnTransformation<T>(this, cloner);
    59     }
    60 
    61     public override IEnumerable<T> Apply(IEnumerable<T> data) {
    62       foreach (T a in data) {
    63         yield return a;
    64       }
    65     }
    66 
    67     public override bool Check(IEnumerable<T> data, out string errorMsg) {
    68       errorMsg = "";
    69       return true;
     61      return new CopyColumnTransformation(this, cloner);
    7062    }
    7163  }
Note: See TracChangeset for help on using the changeset viewer.