Package org.tensorics.core.scalar.lang
Class ScalarSupport<V>
- java.lang.Object
-
- org.tensorics.core.scalar.lang.ScalarSupport<V>
-
- Type Parameters:
V
- the type of the scalar values (elements of the fields) on which to operate
- All Implemented Interfaces:
BasicOperationSupport<V>
- Direct Known Subclasses:
AbstractQuantityStatisticPredicate
,FieldInterpolator
,IterableAverage
,IterableRms
,IterableSize
,IterableStd
,IterableSum
,IterableSumOfSquares
,IterableVar
,LinearInterpolationStrategy
,ScalarIterableSupport
,UncorrelatedErrorPropagationStrategy
public class ScalarSupport<V> extends java.lang.Object implements BasicOperationSupport<V>
Contains the starting methods for tensoric eDSL language expressions, related to basic operations of scalar values (field elements). The class is designed that it can be used in both ways: Either that it can be instantiated or that other classes can inherit from it. The latter option makes the language expressions very concise.
-
-
Constructor Summary
Constructors Constructor Description ScalarSupport(ExtendedField<V> field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
absoluteValueOf(V value)
OngoingBinaryOperation<V>
calculate(V operand)
V
countOf(int number)
ExtendedField<V>
field()
V
inverseOf(V element)
V
negativeOf(V element)
V
one()
V
squareOf(V value)
V
squareRootOf(V value)
OngoingScalarBinaryPredicate<V>
testIf(V left)
V
two()
V
zero()
-
-
-
Constructor Detail
-
ScalarSupport
public ScalarSupport(ExtendedField<V> field)
-
-
Method Detail
-
calculate
public OngoingBinaryOperation<V> calculate(V operand)
- Specified by:
calculate
in interfaceBasicOperationSupport<V>
-
testIf
public OngoingScalarBinaryPredicate<V> testIf(V left)
-
negativeOf
public final V negativeOf(V element)
- Specified by:
negativeOf
in interfaceBasicOperationSupport<V>
-
inverseOf
public final V inverseOf(V element)
- Specified by:
inverseOf
in interfaceBasicOperationSupport<V>
-
zero
public final V zero()
-
two
public final V two()
-
one
public final V one()
-
countOf
public V countOf(int number)
-
squareRootOf
public V squareRootOf(V value)
- Specified by:
squareRootOf
in interfaceBasicOperationSupport<V>
-
squareOf
public V squareOf(V value)
- Specified by:
squareOf
in interfaceBasicOperationSupport<V>
-
absoluteValueOf
public V absoluteValueOf(V value)
- Specified by:
absoluteValueOf
in interfaceBasicOperationSupport<V>
-
field
public ExtendedField<V> field()
-
-