Changeset 10940 for branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Transformations/3.4/CopyColumnTransformation.cs
- Timestamp:
- 06/04/14 13:22:03 (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/DataPreprocessing/HeuristicLab.Problems.DataAnalysis.Transformations/3.4/CopyColumnTransformation.cs
r10935 r10940 30 30 namespace HeuristicLab.Problems.DataAnalysis.Transformations { 31 31 [Item("CopyColumnTransformation", "Represents a transformation which represents a copied Column.")] 32 public class CopyColumnTransformation <T> : Transformation<T>{32 public class CopyColumnTransformation : Transformation { 33 33 protected const string CopiedColumnNameParameterName = "CopiedColumnName"; 34 34 … … 40 40 41 41 #region properties 42 public override string ShortName { 43 get { return "Cpy"; } 44 } 42 45 public string CopiedColumnName { 43 46 get { return CopiedColumnNameParameter.Value.Value; } … … 47 50 [StorableConstructor] 48 51 protected CopyColumnTransformation(bool deserializing) : base(deserializing) { } 49 protected CopyColumnTransformation(CopyColumnTransformation <T>original, Cloner cloner)52 protected CopyColumnTransformation(CopyColumnTransformation original, Cloner cloner) 50 53 : base(original, cloner) { 51 54 } … … 56 59 57 60 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); 70 62 } 71 63 }
Note: See TracChangeset
for help on using the changeset viewer.