Class IntersectionShapingStrategy

  • All Implemented Interfaces:
    ManipulationOption, Option<ManipulationOption>, ShapingStrategy

    public class IntersectionShapingStrategy
    extends java.lang.Object
    implements ShapingStrategy
    A strategy for shaping tensors resulting from binary (element wise) operations, which just takes the intersection of both shapes. This means that the resulting shape will be such, that it will only contain positions which are contained in both incoming shapes.

    Example:

     Shape result = shapeLeftRight(Shape.of(POS_A, POS_B), Shape.of(POS_B, POS_C));
     result.equals(Shape.of(POS_B)); // would be true