Group

interface Group<T> : GroupOperations<T>

Represents linear space with neutral element, i.e. algebraic structure with associative, binary operation add.

Parameters

T

the type of element of this semispace.

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
Wraps a raw string to T object.
equals
Link copied to clipboard
common
open operator fun equals(other: Any?): Boolean
hashCode
Link copied to clipboard
common
open fun hashCode(): Int
minus
Link copied to clipboard
common
open operator fun T.minus(b: T): T
Subtraction of two elements.
plus
Link copied to clipboard
common
open operator fun T.plus(b: T): T
Addition of two elements.
toString
Link copied to clipboard
common
open fun toString(): String
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 an unary operation with the certain name.
unaryOperationFunction
Link copied to clipboard
common
open override fun unaryOperationFunction(operation: String): (T) -> T
Dynamically dispatches an unary operation with the certain name.
unaryPlus
Link copied to clipboard
common
open operator fun T.unaryPlus(): T
Returns this value.

Properties

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

Inheritors

FunctionalExpressionGroup
Link copied to clipboard
NDGroup
Link copied to clipboard
Ring
Link copied to clipboard
NumbersAddOperations
Link copied to clipboard

Extensions

abs
Link copied to clipboard
common
fun <T : Comparable<T>> Group<T>.abs(value: T): T
Absolute of the comparable value
spaceExpression
Link copied to clipboard
common
inline fun <T> Group<T>.spaceExpression(block: FunctionalExpressionGroup<T, Group<T>>.() -> Expression<T>): Expression<T>
Creates a functional expression with this Group.
sum
Link copied to clipboard
common
fun <T> Group<T>.sum(data: Iterable<T>): T
Returns the sum of all elements in the iterable in this Group.
fun <T> Group<T>.sum(data: Sequence<T>): T
Returns the sum of all elements in the sequence in this Group.