Field

interface Field<T> : Ring<T> , FieldOps<T> , ScaleOperations<T> , NumericAlgebra<T>

Represents field i.e., algebraic structure with three operations: associative, commutative addition and multiplication, and division. This interface differs from the eponymous mathematical definition: fields in KMath also support associative multiplication by scalar.

Parameters

T

the type of element of this field.

Functions

add
Link copied to clipboard
common
abstract fun add(left: T, right: T): T
Addition of two elements.
binaryOperation
Link copied to clipboard
common
open fun binaryOperation(operation: String, left: T, right: T): T
Dynamically invokes a binary operation with the certain name.
binaryOperationFunction
Link copied to clipboard
common
open override fun binaryOperationFunction(operation: String): (T, T) -> T
Dynamically dispatches a binary operation with the certain name.
bindSymbol
Link copied to clipboard
common
open fun bindSymbol(value: String): T
The same as bindSymbolOrNull but throws an error if symbol could not be bound
bindSymbolOrNull
Link copied to clipboard
common
open fun bindSymbolOrNull(value: String): T?
Wraps a raw string to T object.
div
Link copied to clipboard
common
open operator fun T.div(other: T): T
Division of two elements.
open operator fun T.div(k: Number): T
Division of this element by scalar.
divide
Link copied to clipboard
common
abstract fun divide(left: T, right: T): T
Division of two elements.
leftSideNumberOperation
Link copied to clipboard
common
open fun leftSideNumberOperation(operation: String, left: Number, right: T): T
Dynamically invokes a binary operation with the certain name with numeric first argument.
leftSideNumberOperationFunction
Link copied to clipboard
common
open fun leftSideNumberOperationFunction(operation: String): (left: Number, T) -> T
Dynamically dispatches a binary operation with the certain name with numeric first argument.
minus
Link copied to clipboard
common
open operator fun T.minus(other: T): T
Subtraction of two elements.
multiply
Link copied to clipboard
common
abstract fun multiply(left: T, right: T): T
Multiplies two elements.
number
Link copied to clipboard
common
open override fun number(value: Number): T
Wraps a number to T object.
plus
Link copied to clipboard
common
open operator fun T.plus(other: T): T
Addition of two elements.
rightSideNumberOperation
Link copied to clipboard
common
open fun rightSideNumberOperation(operation: String, left: T, right: Number): T
Dynamically invokes a binary operation with the certain name with numeric second argument.
rightSideNumberOperationFunction
Link copied to clipboard
common
open fun rightSideNumberOperationFunction(operation: String): (T, right: Number) -> T
Dynamically dispatches a binary operation with the certain name with numeric first argument.
scale
Link copied to clipboard
common
abstract fun scale(a: T, value: Double): T
Scaling an element by a scalar.
times
Link copied to clipboard
common
open operator fun T.times(other: T): T
Multiplies this element by scalar.
open operator fun T.times(k: Number): T
Multiplication of this element by a scalar.
open operator fun Number.times(other: T): T
Multiplication of this number by element.
unaryMinus
Link copied to clipboard
common
abstract operator fun T.unaryMinus(): T
The negation of this element.
unaryOperation
Link copied to clipboard
common
open fun unaryOperation(operation: String, arg: T): T
Dynamically invokes a unary operation with the certain name.
unaryOperationFunction
Link copied to clipboard
common
open override fun unaryOperationFunction(operation: String): (T) -> T
Dynamically dispatches a unary operation with the certain name.
unaryPlus
Link copied to clipboard
common
open operator fun T.unaryPlus(): T
Returns this value.

Properties

one
Link copied to clipboard
common
abstract val one: T
The neutral element of multiplication
zero
Link copied to clipboard
common
abstract val zero: T
The neutral element of addition.

Inheritors

FunctionalExpressionField
Link copied to clipboard
MstField
Link copied to clipboard
SimpleAutoDiffField
Link copied to clipboard
FieldND
Link copied to clipboard
BigIntField
Link copied to clipboard
BufferField
Link copied to clipboard
ExtendedField
Link copied to clipboard
JBigDecimalFieldBase
Link copied to clipboard

Extensions

power
Link copied to clipboard
common
fun <T> Field<T>.power(arg: T, exponent: Int): T
Raises arg to the integer power exponent.

Sources

common source
Link copied to clipboard