V
- the type of the values of the tensors and tensorbacked objectsTB
- the type of the tensorbacked objects into which tensors will be wrappedpublic class TensorWrappingOperation<V,TB extends Tensorbacked<V>> extends java.lang.Object implements Conversion<Tensor<V>,TB>
Constructor and Description |
---|
TensorWrappingOperation(java.lang.Class<TB> tensorbackedClass)
The constructor, which requires a class which can wrap tensors
|
Modifier and Type | Method and Description |
---|---|
TB |
apply(Tensor<V> tensor)
Has to implement the conversion logic to convert the given object into an object of type R.
|
public TensorWrappingOperation(java.lang.Class<TB> tensorbackedClass)
tensorbackedClass
- the type of the tensorbacked objects that will be createdpublic TB apply(Tensor<V> tensor)
Conversion
apply
in interface java.util.function.Function<Tensor<V>,TB extends Tensorbacked<V>>
apply
in interface Conversion<Tensor<V>,TB extends Tensorbacked<V>>
tensor
- the object to convert