using System; namespace HeuristicLab.Problems.DataAnalysis.Symbolic { public interface IAlgebraicType { T Zero { get; } // Zero and One must create new objects T One { get; } T AssignAbs(T a); // set this to assign abs(a) T Assign(T a); // assign this to same value as a (copy!) T AssignNeg(T a); // set this to negative(a) T AssignInv(T a); // set this to inv(a); T Scale(double s); // scale this with s T Add(T a); // add a to this T Sub(T a); // subtract a from this T Mul(T a); // multiply this with a T Div(T a); // divide this by a T AssignLog(T a); // set this to log a T AssignExp(T a); // set this to exp(a) T AssignSin(T a); // set this to sin(a) T AssignCos(T a); // set this to cos(a) T AssignTanh(T a); // set this to tanh(a) T AssignIntPower(T a, int p); T AssignIntRoot(T a, int r); T AssignSgn(T a); // set this to sign(a) //T AssignMin(T other); // set this min(this, other) //T AssignMax(T other); // set this max(this, other) T Clone(); } public interface IComparableAlgebraicType : IAlgebraicType, IComparable { } }