Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/11/08 08:55:19 (16 years ago)
Author:
gkronber
Message:

merged changes (r201 r203 r206 r208 r220 r223 r224 r225 r226 r227) from branch ExperimentalFunctionsBaking into the trunk. (ticket #139)

File:
1 edited

Legend:

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

    r155 r229  
    3030
    3131namespace HeuristicLab.Functions {
    32   public class Substraction : FunctionBase {
     32  public sealed class Substraction : FunctionBase {
    3333    public override string Description {
    3434      get {
     
    4646    }
    4747
    48 
    49     public override double Apply(Dataset dataset, int sampleIndex, double[] args) {
    50       if(args.Length == 1) {
    51         return -args[0];
    52       } else {
    53         double result = args[0];
    54         for(int i = 1; i < args.Length; i++) {
    55           result -= args[i];
    56         }
    57         return result;
    58       }
    59     }
    60 
    6148    public override void Accept(IFunctionVisitor visitor) {
    6249      visitor.Visit(this);
Note: See TracChangeset for help on using the changeset viewer.