public interface Scalar<N extends Number> extends AccessScalar<N>, Field<Scalar<N>>, NormedVectorSpace<Scalar<N>,N>, ScalarOperation.Addition<Scalar<N>,N>, ScalarOperation.Division<Scalar<N>,N>, ScalarOperation.Subtraction<Scalar<N>,N>, Comparable<N>
A Scalar is:
Theoretically it is a Field or at least a Division ring.
The intention is that implementors should be final immutable subclasses of Number
and that they
should be inline with the requirements for ValueBased classes.
Modifier and Type | Interface and Description |
---|---|
static interface |
Scalar.Factory<N extends Number> |
ScalarOperation.Addition<T,N extends Number>, ScalarOperation.Division<T,N extends Number>, ScalarOperation.Multiplication<T,N extends Number>, ScalarOperation.Subtraction<T,N extends Number>
Modifier and Type | Method and Description |
---|---|
default Scalar<N> |
add(Scalar<N> addend) |
default Scalar<N> |
divide(Scalar<N> divisor) |
boolean |
isAbsolute() |
default Scalar<N> |
multiply(Scalar<N> multiplicand) |
default Scalar<N> |
subtract(Scalar<N> subtrahend) |
BigDecimal |
toBigDecimal() |
default String |
toPlainString(NumberContext context) |
String |
toString(NumberContext context) |
byteValue, doubleValue, floatValue, get, intValue, longValue, shortValue
invert
isSmall, norm, signum
conjugate
negate
multiply, multiply
add, add
divide, divide
subtract, subtract
compareTo
default Scalar<N> add(Scalar<N> addend)
add
in interface Operation.Addition<Scalar<N extends Number>>
addend
- What to addthis + addend
default Scalar<N> divide(Scalar<N> divisor)
divide
in interface Operation.Division<Scalar<N extends Number>>
divisor
- The divisorthis / divisor
.boolean isAbsolute()
isAbsolute()
default Scalar<N> multiply(Scalar<N> multiplicand)
multiply
in interface Operation.Multiplication<Scalar<N extends Number>>
multiplicand
- The multiplicandthis * multiplicand
.default Scalar<N> subtract(Scalar<N> subtrahend)
subtract
in interface Operation.Subtraction<Scalar<N extends Number>>
subtrahend
- The subtrahendthis - subtrahend
.BigDecimal toBigDecimal()
default String toPlainString(NumberContext context)
String toString(NumberContext context)
Copyright © 2019 Optimatika. All rights reserved.