Class ExactShapesOrOneZeroStrategy
- java.lang.Object
-
- org.tensorics.core.tensor.options.ExactShapesOrOneZeroStrategy
-
- All Implemented Interfaces:
ManipulationOption
,Option<ManipulationOption>
,ShapingStrategy
public class ExactShapesOrOneZeroStrategy extends java.lang.Object implements ShapingStrategy
Implementation ofShapingStrategy
that checks if for two givenTensor
objects shapes are exactly the same (type of the coordinates, number of dimensions and coordinates instances). Otherwise it throws and IllegalArgumentException.
-
-
Constructor Summary
Constructors Constructor Description ExactShapesOrOneZeroStrategy()
Deprecated.use the factory methodsget()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ExactShapesOrOneZeroStrategy
get()
java.lang.Class<ShapingStrategy>
getMarkerInterface()
<C> Shape
shapeLeftRight(Tensor<?> first, Tensor<?> second)
Resulting tensor shape of given two in following formula: FIRST_TENSOR_SHAPE on SECOND_TENSOR_SHAPE
-
-
-
Constructor Detail
-
ExactShapesOrOneZeroStrategy
@Deprecated public ExactShapesOrOneZeroStrategy()
Deprecated.use the factory methodsget()
-
-
Method Detail
-
get
public static ExactShapesOrOneZeroStrategy get()
-
shapeLeftRight
public <C> Shape shapeLeftRight(Tensor<?> first, Tensor<?> second)
Description copied from interface:ShapingStrategy
Resulting tensor shape of given two in following formula: FIRST_TENSOR_SHAPE on SECOND_TENSOR_SHAPE- Specified by:
shapeLeftRight
in interfaceShapingStrategy
- Parameters:
first
- tensorsecond
- tensor- Returns:
- resulting shape
-
getMarkerInterface
public java.lang.Class<ShapingStrategy> getMarkerInterface()
- Specified by:
getMarkerInterface
in interfaceOption<ManipulationOption>
-
-