Class SubplanPattern

  • All Implemented Interfaces:
    java.io.Serializable, Operator

    public class SubplanPattern
    extends OperatorBase
    A subplan pattern describes a class of subplans in a WayangPlan.

    NB: Currently, only such patterns are tested and supported that form a chain of operators, i.e., no DAGs are allowed and at most one input and one output operator.

    See Also:
    Serialized Form
    • Method Detail

      • createSingleton

        public static final SubplanPattern createSingleton​(OperatorPattern operatorPattern)
        Creates a new instance that matches only a single operator.
        Parameters:
        operatorPattern - the only operator pattern
        Returns:
        the new instance
      • fromOperatorPatterns

        public static final SubplanPattern fromOperatorPatterns​(OperatorPattern inputOperatorPattern,
                                                                OperatorPattern outputOperatorPattern)
        Creates a new instance that matches a graph of operator patterns.
        Parameters:
        inputOperatorPattern - the only operator pattern that has inputs wrt. the subplan pattern
        outputOperatorPattern - the only operator pattern that has outputs wrt. the subplan pattern
        Returns:
        the new instance
      • match

        public java.util.List<SubplanMatch> match​(WayangPlan plan,
                                                  int minEpoch)
        Match this pattern against a plan.
        Parameters:
        plan - the plan to match against
        minEpoch - the (inclusive) minimum epoch value for matched subplans
        Returns:
        all matches
      • accept

        public <Payload,​Return> Return accept​(TopDownPlanVisitor<Payload,​Return> visitor,
                                                    OutputSlot<?> outputSlot,
                                                    Payload payload)
        Description copied from interface: Operator
        This method is part of the visitor pattern and calls the appropriate visit method on visitor.
        Specified by:
        accept in interface Operator
        Overrides:
        accept in class OperatorBase