Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
04/22/08 18:05:14 (17 years ago)
Author:
gkronber
Message:

merged FunctionsAndStructIdRefactoring-branch (r142, r143, r144, r145, r146, r147, r148, r149, r152, r153) back into the trunk (ticket #112)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/sources/HeuristicLab.Functions/Tangens.cs

    r2 r155  
    3131  public class Tangens : FunctionBase {
    3232    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."; }
    3434    }
    3535
     
    4040    }
    4141
    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]);
    4444    }
    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 
    5645
    5746    public override void Accept(IFunctionVisitor visitor) {
Note: See TracChangeset for help on using the changeset viewer.