Package org.tensorics.core.tensorbacked
Interface TensorbackedBuilder<V,TB extends Tensorbacked<V>>
-
- Type Parameters:
V
- the type of the values of the tensor (and thus also the tensor backed object)TB
- the type of the tensor backed object
- All Known Subinterfaces:
DimtypedTensorbackedBuilder<V,TB,B>
,Tensorbacked1dBuilder<C1,V,TB>
,Tensorbacked2dBuilder<C1,C2,V,TB>
,Tensorbacked3dBuilder<C1,C2,C3,V,TB>
,Tensorbacked4dBuilder<C1,C2,C3,C4,V,TB>
,Tensorbacked5dBuilder<C1,C2,C3,C4,C5,V,TB>
,TensorbackedScalarBuilder<V,TB>
- All Known Implementing Classes:
DimtypedTensorbackedBuilderImpl
,SimpleTensorbackedBuilder
public interface TensorbackedBuilder<V,TB extends Tensorbacked<V>>
A builder for tensor backed objects, which takes care that only positions which are compatible with the dimensions of the foreseen underlaying tensor are put into it. Internally, it uses a builder for a tensor, to which most of the methods are delegated. At build time, the tensor is encapsulated in the according tensor backed class.This class is not thread safe.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description TB
build()
Builds the tensor backed object, after all the content is set.TensorbackedBuilder<V,TB>
context(java.lang.Object... coordinates)
TensorbackedBuilder<V,TB>
context(Position context)
TensorbackedBuilder<V,TB>
put(java.util.Map.Entry<Position,V> entry)
TensorbackedBuilder<V,TB>
put(Position position, V value)
TensorbackedBuilder<V,TB>
putAll(java.util.Map<Position,V> newEntries)
TensorbackedBuilder<V,TB>
putAll(java.util.Set<java.util.Map.Entry<Position,V>> entries)
TensorbackedBuilder<V,TB>
putAll(Position position, java.util.Map<Position,V> entries)
TensorbackedBuilder<V,TB>
putAll(Position position, Tensor<V> tensor)
TensorbackedBuilder<V,TB>
putAll(Position position, Tensorbacked<V> tensorbacked)
TensorbackedBuilder<V,TB>
putAll(Tensor<V> tensor)
TensorbackedBuilder<V,TB>
putAll(TB tensorBacked)
TensorbackedBuilder<V,TB>
remove(Position position)
-
-
-
Method Detail
-
put
TensorbackedBuilder<V,TB> put(java.util.Map.Entry<Position,V> entry)
-
put
TensorbackedBuilder<V,TB> put(Position position, V value)
-
putAll
TensorbackedBuilder<V,TB> putAll(java.util.Set<java.util.Map.Entry<Position,V>> entries)
-
putAll
TensorbackedBuilder<V,TB> putAll(Position position, Tensorbacked<V> tensorbacked)
-
putAll
TensorbackedBuilder<V,TB> putAll(TB tensorBacked)
-
putAll
TensorbackedBuilder<V,TB> putAll(Tensor<V> tensor)
-
putAll
TensorbackedBuilder<V,TB> putAll(java.util.Map<Position,V> newEntries)
-
remove
TensorbackedBuilder<V,TB> remove(Position position)
-
context
TensorbackedBuilder<V,TB> context(Position context)
-
context
TensorbackedBuilder<V,TB> context(java.lang.Object... coordinates)
-
build
TB build()
Builds the tensor backed object, after all the content is set.- Returns:
- a new instance of the tensor backed object, containing all the data as described after instantiating the builder.
-
-