Package org.tensorics.core.math
Interface Cheating<T>
-
- Type Parameters:
T
-
- All Known Implementing Classes:
DoubleCheating
public interface Cheating<T>
This interface provides methods for field elements, whose usage is highly discouraged and should be avoided. Currently, they are necessary, mainly because no base-treatment implementation is available, which is purely baes on fields. We hope to get rid of this at some point, therefore clients should NOT use these methods.Currently, this interface provides conversion methods from/to double. This is required for the current implementation of base conversions. The general plan for the future is to also base the base conversions fully on the field structure, therefore, these two methods are marked as deprecated, to avoid that clients start rely on them and abuse them.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description T
fromDouble(double value)
Has to return a field element, constructed from the given double value.double
toDouble(T value)
Has to convert the given field element to a (unique) double value.
-
-
-
Method Detail
-
fromDouble
T fromDouble(double value)
Has to return a field element, constructed from the given double value.- Parameters:
value
- the double value from which to construct the field element.- Returns:
- the field element constructed from the double value
-
toDouble
double toDouble(T value)
Has to convert the given field element to a (unique) double value.- Parameters:
value
- field element to convert- Returns:
- a double value related to the field
-
-