Changeset 155 for trunk/sources/HeuristicLab.Functions/Tangens.cs
- Timestamp:
- 04/22/08 18:05:14 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sources/HeuristicLab.Functions/Tangens.cs
r2 r155 31 31 public class Tangens : FunctionBase { 32 32 public override string Description { 33 get { return "Returns the tangens of the first sub- operator."; }33 get { return "Returns the tangens of the first sub-tree."; } 34 34 } 35 35 … … 40 40 } 41 41 42 public Tangens(Tangens source, IDictionary<Guid, object> clonedObjects)43 : base(source, clonedObjects) {42 public override double Apply(Dataset dataset, int sampleIndex, double[] args) { 43 return Math.Tan(args[0]); 44 44 } 45 46 public override double Evaluate(Dataset dataset, int sampleIndex) {47 return Math.Tan(SubFunctions[0].Evaluate(dataset, sampleIndex));48 }49 50 public override object Clone(IDictionary<Guid, object> clonedObjects) {51 Tangens clone = new Tangens(this, clonedObjects);52 clonedObjects.Add(clone.Guid, clone);53 return clone;54 }55 56 45 57 46 public override void Accept(IFunctionVisitor visitor) {
Note: See TracChangeset
for help on using the changeset viewer.