Ring

interface Ring<T> : Group<T> , RingOperations<T>

Represents ring i.e., algebraic structure with two associative binary operations called "addition" and "multiplication" and their neutral elements.

Parameters

T

the type of element of this ring.

Functions

add
Link copied to clipboard
common
abstract fun add(a: T, b: 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.
minus
Link copied to clipboard
common
open operator fun T.minus(b: T): T
Subtraction of two elements.
multiply
Link copied to clipboard
common
abstract fun multiply(a: T, b: T): T
Multiplies two elements.
plus
Link copied to clipboard
common
open operator fun T.plus(b: T): T
Addition of two elements.
times
Link copied to clipboard
common
open operator fun T.times(b: T): T
Multiplies this element by scalar.
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

FunctionalExpressionRing
Link copied to clipboard
MstRing
Link copied to clipboard
RingND
Link copied to clipboard
Field
Link copied to clipboard
NumbersAddOperations
Link copied to clipboard
IntRing
Link copied to clipboard
ShortRing
Link copied to clipboard
ByteRing
Link copied to clipboard
LongRing
Link copied to clipboard
JBigIntegerField
Link copied to clipboard

Extensions

abs
Link copied to clipboard
common
fun <T : Comparable<T>> Ring<T>.abs(value: T): T
Absolute of the comparable value
power
Link copied to clipboard
common
fun <T> Ring<T>.power(arg: T, exponent: UInt): T
Raises arg to the non-negative integer power exponent.
sum
Link copied to clipboard
common
fun <T> Ring<T>.sum(data: Iterable<T>): T
Returns the sum of all elements in the iterable in this Ring.
fun <T> Ring<T>.sum(data: Sequence<T>): T
Returns the sum of all elements in the sequence in this Ring.

Sources

common source
Link copied to clipboard