Changeset 220 for branches/ExperimentalFunctionsBaking/Xor.cs
- Timestamp:
- 05/07/08 00:02:43 (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ExperimentalFunctionsBaking/Xor.cs
r155 r220 28 28 29 29 namespace HeuristicLab.Functions { 30 public class Xor : FunctionBase {30 public sealed class Xor : FunctionBase { 31 31 public override string Description { 32 32 get { … … 40 40 } 41 41 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 48 42 public override void Accept(IFunctionVisitor visitor) { 49 43 visitor.Visit(this);
Note: See TracChangeset
for help on using the changeset viewer.