Free cookie consent management tool by TermsFeed Policy Generator

Ignore:
Timestamp:
05/07/08 00:02:43 (16 years ago)
Author:
gkronber
Message:

worked on #139:

  • fixed display of trees in the gui
  • split list representation of tree into two lists code and data
  • implemented static evaluation for all predefined functions (except ProgrammableFunction)
File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/ExperimentalFunctionsBaking/Xor.cs

    r155 r220  
    2828
    2929namespace HeuristicLab.Functions {
    30   public class Xor : FunctionBase {
     30  public sealed class Xor : FunctionBase {
    3131    public override string Description {
    3232      get {
     
    4040    }
    4141
    42     public override double Apply(Dataset dataset, int sampleIndex, double[] args) {
    43       if(args[0] == 0.0 && args[1] == 0.0) return 0.0;
    44       if(args[0] * args[1] == 0.0) return 1.0;
    45       return 0.0;
    46     }
    47 
    4842    public override void Accept(IFunctionVisitor visitor) {
    4943      visitor.Visit(this);
Note: See TracChangeset for help on using the changeset viewer.