Last change
on this file since 17303 was
17303,
checked in by gkronber, 5 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
|
Rev | Line | |
---|
[17303] | 1 | using System;
|
---|
| 2 |
|
---|
| 3 | namespace HeuristicLab.Problems.DataAnalysis.Symbolic {
|
---|
[17295] | 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)
|
---|
[17303] | 25 | //T AssignMin(T other); // set this min(this, other)
|
---|
| 26 | //T AssignMax(T other); // set this max(this, other)
|
---|
[17295] | 27 | T Clone();
|
---|
| 28 | }
|
---|
[17303] | 29 |
|
---|
| 30 | public interface IComparableAlgebraicType<T> : IAlgebraicType<T>, IComparable<T> {
|
---|
| 31 |
|
---|
| 32 | }
|
---|
[17295] | 33 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.