Add mapping for other dynamic operations
This commit is contained in:
parent
e47ec1aeb9
commit
a275e74cf2
@ -17,6 +17,10 @@ interface ExtendedFieldOperations<T> :
|
|||||||
override fun unaryOperation(operation: String, arg: T): T = when (operation) {
|
override fun unaryOperation(operation: String, arg: T): T = when (operation) {
|
||||||
TrigonometricOperations.COS_OPERATION -> cos(arg)
|
TrigonometricOperations.COS_OPERATION -> cos(arg)
|
||||||
TrigonometricOperations.SIN_OPERATION -> sin(arg)
|
TrigonometricOperations.SIN_OPERATION -> sin(arg)
|
||||||
|
TrigonometricOperations.TAN_OPERATION -> tan(arg)
|
||||||
|
InverseTrigonometricOperations.ACOS_OPERATION -> acos(arg)
|
||||||
|
InverseTrigonometricOperations.ASIN_OPERATION -> asin(arg)
|
||||||
|
InverseTrigonometricOperations.ATAN_OPERATION -> atan(arg)
|
||||||
PowerOperations.SQRT_OPERATION -> sqrt(arg)
|
PowerOperations.SQRT_OPERATION -> sqrt(arg)
|
||||||
ExponentialOperations.EXP_OPERATION -> exp(arg)
|
ExponentialOperations.EXP_OPERATION -> exp(arg)
|
||||||
ExponentialOperations.LN_OPERATION -> ln(arg)
|
ExponentialOperations.LN_OPERATION -> ln(arg)
|
||||||
|
@ -13,7 +13,7 @@ package scientifik.kmath.operations
|
|||||||
interface TrigonometricOperations<T> : FieldOperations<T> {
|
interface TrigonometricOperations<T> : FieldOperations<T> {
|
||||||
fun sin(arg: T): T
|
fun sin(arg: T): T
|
||||||
fun cos(arg: T): T
|
fun cos(arg: T): T
|
||||||
fun tan(arg: T): T = sin(arg) / cos(arg)
|
fun tan(arg: T): T
|
||||||
|
|
||||||
companion object {
|
companion object {
|
||||||
const val SIN_OPERATION = "sin"
|
const val SIN_OPERATION = "sin"
|
||||||
|
Loading…
Reference in New Issue
Block a user