Package org.tensorics.core.tensor
Class Shape.Builder
- java.lang.Object
-
- org.tensorics.core.tensor.Shape.Builder
-
- Enclosing class:
- Shape
public static final class Shape.Builder extends java.lang.Object
The builder for a tensor shape. It has to be instantiated with a set of dimensions and provides methods to add positions to the shape. It is only allowed to add positions which provide exactly one coordinate per dimension as given in the constructor of the builder. To create a shape finally, thebuild()
method has to be called.This class is not thread safe!
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Shape.Builder
add(Position position)
Shape.Builder
addAll(java.lang.Iterable<Position> positions)
Shape
build()
-
-
-
Method Detail
-
add
public Shape.Builder add(Position position)
-
addAll
public Shape.Builder addAll(java.lang.Iterable<Position> positions)
-
build
public Shape build()
-
-