Provide dynamic operations currying for Algebra<T> instead of eager calls and add JS code generation support #162

Merged
CommanderTvis merged 44 commits from feature/dynamic-ops-currying into dev 2021-01-05 16:36:51 +03:00
Showing only changes of commit c8df741a4e - Show all commits

View File

@ -297,11 +297,6 @@ public interface Space<T> : SpaceOperations<T> {
* The neutral element of addition. * The neutral element of addition.
*/ */
public val zero: T public val zero: T
public override fun symbol(value: String): T = when (value) {
"zero" -> zero
else -> super.symbol(value)
}
} }
/** /**
@ -354,11 +349,6 @@ public interface Ring<T> : Space<T>, RingOperations<T>, NumericAlgebra<T> {
public override fun number(value: Number): T = one * value.toDouble() public override fun number(value: Number): T = one * value.toDouble()
public override fun symbol(value: String): T = when (value) {
"one" -> one
else -> super<Space>.symbol(value)
}
/** /**
* Addition of element and scalar. * Addition of element and scalar.
* *