Class IterableSum<V>
- java.lang.Object
-
- org.tensorics.core.scalar.lang.ScalarSupport<V>
-
- org.tensorics.core.iterable.operations.IterableSum<V>
-
- Type Parameters:
V
- the type of the elements of the field on which the operation is based on.
- All Implemented Interfaces:
java.util.function.Function<java.lang.Iterable<V>,V>
,BasicOperationSupport<V>
,Conversion<java.lang.Iterable<V>,V>
,IterableOperation<V>
public class IterableSum<V> extends ScalarSupport<V> implements IterableOperation<V>
This operation takes an iterable of values as input and returns the sum of all the elements.
-
-
Constructor Summary
Constructors Constructor Description IterableSum(ExtendedField<V> field)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description V
apply(java.lang.Iterable<V> iterable)
Has to implement the conversion logic to convert the given object into an object of type R.-
Methods inherited from class org.tensorics.core.scalar.lang.ScalarSupport
absoluteValueOf, calculate, countOf, field, inverseOf, negativeOf, one, squareOf, squareRootOf, testIf, two, zero
-
-
-
-
Constructor Detail
-
IterableSum
public IterableSum(ExtendedField<V> field)
-
-
Method Detail
-
apply
public V apply(java.lang.Iterable<V> iterable)
Description copied from interface:Conversion
Has to implement the conversion logic to convert the given object into an object of type R.
-
-