V
- the type of the elements of the tensor(ic)public class TensorSupport<V> extends ScalarIterableSupport<V>
Constructor and Description |
---|
TensorSupport(Environment<V> environment) |
Modifier and Type | Method and Description |
---|---|
<C> OngoingTensorOperation<C,V> |
calculate(Tensor<V> tensoric)
Allows to perform calculation on given tensoric.
|
Tensor<V> |
elementInverseOf(Tensor<V> tensor) |
<S,R> Tensor<R> |
elementwise(BinaryFunction<S,R> operation,
Tensor<S> left,
Tensor<S> right) |
<S> Tensor<S> |
elementwise(BinaryOperation<S> operation,
Tensor<S> left,
Tensor<S> right) |
Tensor<V> |
negativeOf(Tensor<V> tensor) |
Tensor<V> |
ones(Shape shape)
|
OngoingFieldAwareResamplingStart<V> |
resample(Tensor<V> tensor)
Starting clause for a fluent expression to resample a tensor, using structural resamplings (e.g.
|
Tensor<V> |
zeros(Shape shape)
|
averageOf, rmsOf, sizeOf, stdOf, sumOf, sumOfSquaresOf, varOf
absoluteValueOf, calculate, countOf, field, inverseOf, negativeOf, one, squareOf, squareRootOf, testIf, two, zero
public TensorSupport(Environment<V> environment)
public final <C> OngoingTensorOperation<C,V> calculate(Tensor<V> tensoric)
tensoric
- to calculate with.public Tensor<V> elementInverseOf(Tensor<V> tensor)
tensor
- to use.sTensor
with field inverse valuespublic Tensor<V> negativeOf(Tensor<V> tensor)
tensor
- to useTensor
of negative valuespublic OngoingFieldAwareResamplingStart<V> resample(Tensor<V> tensor)
Tensoric<Double> resampled = resample(aDoubleTensor)
.repeat(String.class)
.then().linear(Integer.class, Integer::doubleValue)
.toTensoric();
Note: The order of the options is important, as the resampling will be performed in the given order!
For options which do not require a field, see the version in TensorStructurals.resample(Tensor)
.
tensor
- the tensor to be resampledpublic <S> Tensor<S> elementwise(BinaryOperation<S> operation, Tensor<S> left, Tensor<S> right)
public <S,R> Tensor<R> elementwise(BinaryFunction<S,R> operation, Tensor<S> left, Tensor<S> right)