Changeset 203
- Timestamp:
- 04/28/08 21:40:46 (17 years ago)
- Location:
- branches/ExperimentalFunctionsBaking
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/ExperimentalFunctionsBaking/Addition.cs
r155 r203 46 46 } 47 47 48 public override double Apply(Dataset dataset, int sampleIndex,double[] args) {48 public static double Add(double[] args) { 49 49 // (+ 3) => 3 50 50 // (+ 2 3) => 5 … … 57 57 } 58 58 59 public override double Apply(Dataset dataset, int sampleIndex, double[] args) { 60 return Addition.Add(args); 61 } 62 59 63 public override void Accept(IFunctionVisitor visitor) { 60 64 visitor.Visit(this); -
branches/ExperimentalFunctionsBaking/Division.cs
r155 r203 52 52 } 53 53 54 public override double Apply(Dataset dataset, int sampleIndex,double[] args) {54 public static double Divide(double[] args) { 55 55 // (/ 3) => 1/3 56 56 // (/ 2 3) => 2/3 57 57 // (/ 3 4 5) => 3/20 58 59 58 if(args.Length == 1) { 60 59 double divisor = args[0]; … … 72 71 } 73 72 73 public override double Apply(Dataset dataset, int sampleIndex, double[] args) { 74 return Division.Divide(args); 75 } 76 74 77 public override void Accept(IFunctionVisitor visitor) { 75 78 visitor.Visit(this); -
branches/ExperimentalFunctionsBaking/FunctionBase.cs
r189 r203 42 42 43 43 public virtual IFunctionTree GetTreeNode() { 44 return new FunctionTree(this);44 return new BakedFunctionTree(this); 45 45 } 46 46 -
branches/ExperimentalFunctionsBaking/HeuristicLab.Functions.csproj
r201 r203 51 51 <Compile Include="And.cs" /> 52 52 <Compile Include="Average.cs" /> 53 <Compile Include="BakedFunctionTree.cs" /> 53 54 <Compile Include="Constant.cs" /> 54 <Compile Include="BakedFunctionTree.cs" />55 55 <Compile Include="GreaterThan.cs" /> 56 56 <Compile Include="FunctionTree.cs" /> -
branches/ExperimentalFunctionsBaking/Multiplication.cs
r155 r203 45 45 AddConstraint(new NumberOfSubOperatorsConstraint(2, 3)); 46 46 } 47 48 public override double Apply(Dataset dataset, int sampleIndex, double[] args) { 47 public static double Multipy(double[] args) { 49 48 // (* 3) => 3 50 49 // (* 2 3) => 6 … … 56 55 return result; 57 56 } 57 public override double Apply(Dataset dataset, int sampleIndex, double[] args) { 58 return Multiplication.Multipy(args); 59 } 58 60 59 61 public override void Accept(IFunctionVisitor visitor) { -
branches/ExperimentalFunctionsBaking/Substraction.cs
r155 r203 46 46 } 47 47 48 49 public override double Apply(Dataset dataset, int sampleIndex, double[] args) { 48 public static double Substract(double[] args) { 50 49 if(args.Length == 1) { 51 50 return -args[0]; … … 59 58 } 60 59 60 public override double Apply(Dataset dataset, int sampleIndex, double[] args) { 61 return Substraction.Substract(args); 62 } 63 61 64 public override void Accept(IFunctionVisitor visitor) { 62 65 visitor.Visit(this);
Note: See TracChangeset
for help on using the changeset viewer.