source: branches/2994-AutoDiffForIntervals/HeuristicLab.Problems.DataAnalysis.Symbolic/3.4/Interpreter/IAlgebraicType.cs @ 17303

Last change on this file since 17303 was 17303, checked in by gkronber, 3 years ago

#2994 continued refactoring and extended unit tests. Interval calculation still fails for some edge cases (mainly for undefined behaviour). VectorEvaluator and VectorAutoDiffEvaluator produce the same results as the LinearInterpreter. TODO: check gradient calculation

File size: 1.2 KB
Line 
1using System;
2
3namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
4  public interface IAlgebraicType<T> {
5    T Zero { get; } // Zero and One must create new objects
6    T One { get; }
7
8    T AssignAbs(T a); // set this to assign abs(a)
9    T Assign(T a); // assign this to same value as a (copy!)
10    T AssignNeg(T a); // set this to negative(a)
11    T AssignInv(T a); // set this to inv(a);
12    T Scale(double s); // scale this with s
13    T Add(T a); // add a to this
14    T Sub(T a); // subtract a from this
15    T Mul(T a); // multiply this with a
16    T Div(T a); // divide this by a
17    T AssignLog(T a); // set this to log a
18    T AssignExp(T a); // set this to exp(a)
19    T AssignSin(T a); // set this to sin(a)
20    T AssignCos(T a); // set this to cos(a)
21    T AssignTanh(T a); // set this to tanh(a)
22    T AssignIntPower(T a, int p);
23    T AssignIntRoot(T a, int r);
24    T AssignSgn(T a); // set this to sign(a)
25    //T AssignMin(T other); // set this min(this, other)
26    //T AssignMax(T other); // set this max(this, other)
27    T Clone();
28  }
29
30  public interface IComparableAlgebraicType<T> : IAlgebraicType<T>, IComparable<T> {
31
32  }
33}
Note: See TracBrowser for help on using the repository browser.