Class LoopVertex

    • Constructor Detail

      • LoopVertex

        public LoopVertex​(String compositeTransformFullName)
        The LoopVertex constructor.
        Parameters:
        compositeTransformFullName - full name of the composite transform.
    • Method Detail

      • getClone

        public LoopVertex getClone()
        Description copied from interface: Cloneable
        Creates and returns a copy of this object.

        The precise meaning of "copy" may depend on the class of the object. The general intent is that, all fields of the object are copied.

        Returns:
        a clone of this object.
      • getDAG

        public DAG<IRVertex,​IREdge> getDAG()
        Returns:
        the DAG of the LoopVertex
      • getName

        public String getName()
        Returns:
        the full name of the composite transform.
      • mapEdgeWithLoop

        public void mapEdgeWithLoop​(IREdge edgeWithLoop,
                                    IREdge edgeWithInternalVertex)
        Maps an edge from/to loop with the corresponding edge from/to internal vertex.
        Parameters:
        edgeWithLoop - an edge from/to loop
        edgeWithInternalVertex - the corresponding edge from/to internal vertex
      • getEdgeWithLoop

        public IREdge getEdgeWithLoop​(IREdge edgeWithInternalVertex)
        Parameters:
        edgeWithInternalVertex - an edge with internal vertex
        Returns:
        the corresponding edge with loop for the specified edge with internal vertex
      • addDagIncomingEdge

        public void addDagIncomingEdge​(IREdge edge)
        Adds the incoming edge of the contained DAG.
        Parameters:
        edge - edge to add.
      • getDagIncomingEdges

        public Map<IRVertex,​Set<IREdge>> getDagIncomingEdges()
        Returns:
        incoming edges of the contained DAG.
      • addIterativeIncomingEdge

        public void addIterativeIncomingEdge​(IREdge edge)
        Adds an iterative incoming edge, from the previous iteration, but connection internally.
        Parameters:
        edge - edge to add.
      • getIterativeIncomingEdges

        public Map<IRVertex,​Set<IREdge>> getIterativeIncomingEdges()
        Returns:
        the iterative incoming edges inside the DAG.
      • addNonIterativeIncomingEdge

        public void addNonIterativeIncomingEdge​(IREdge edge)
        Adds a non-iterative incoming edge, from outside the previous iteration.
        Parameters:
        edge - edge to add.
      • getNonIterativeIncomingEdges

        public Map<IRVertex,​Set<IREdge>> getNonIterativeIncomingEdges()
        Returns:
        the non-iterative incoming edges of the LoopVertex.
      • addDagOutgoingEdge

        public void addDagOutgoingEdge​(IREdge edge)
        Adds and outgoing edge of the contained DAG.
        Parameters:
        edge - edge to add.
      • getDagOutgoingEdges

        public Map<IRVertex,​Set<IREdge>> getDagOutgoingEdges()
        Returns:
        outgoing edges of the contained DAG.
      • markDuplicateEdges

        public void markDuplicateEdges()
        Marks duplicate edges with DuplicateEdgeGroupProperty.
      • unRollIteration

        public LoopVertex unRollIteration​(DAGBuilder<IRVertex,​IREdge> dagBuilder)
        Method for unrolling an iteration of the LoopVertex. So basically, in the original place of a LoopVertex, it puts a clone of the sub-DAG that iterates, and appends the LoopVertex after that, until the termination condition has been met.
        Parameters:
        dagBuilder - DAGBuilder to add the unrolled iteration to.
        Returns:
        a LoopVertex with one less maximum iteration.
      • loopTerminationConditionMet

        public Boolean loopTerminationConditionMet()
        Returns:
        whether or not the loop termination condition has been met.
      • loopTerminationConditionMet

        public Boolean loopTerminationConditionMet​(Integer intPredicateInput)
        Parameters:
        intPredicateInput - input for the intPredicate of the loop termination condition.
        Returns:
        whether or not the loop termination condition has been met.
      • setMaxNumberOfIterations

        public void setMaxNumberOfIterations​(Integer maxNum)
        Set the maximum number of iterations.
        Parameters:
        maxNum - maximum number of iterations.
      • getTerminationCondition

        public IntPredicate getTerminationCondition()
        Returns:
        termination condition int predicate.
      • getMaxNumberOfIterations

        public Integer getMaxNumberOfIterations()
        Returns:
        maximum number of iterations.
      • increaseMaxNumberOfIterations

        public void increaseMaxNumberOfIterations()
        increase the value of maximum number of iterations by 1.
      • terminationConditionEquals

        public boolean terminationConditionEquals​(LoopVertex that)
        Check termination condition.
        Parameters:
        that - another vertex.
        Returns:
        true if equals.
      • setTerminationCondition

        public void setTerminationCondition​(IntPredicate terminationCondition)
        Set the intPredicate termination condition for the LoopVertex.
        Parameters:
        terminationCondition - the termination condition to set.
      • getPropertiesAsJsonNode

        public com.fasterxml.jackson.databind.node.ObjectNode getPropertiesAsJsonNode()
        Overrides:
        getPropertiesAsJsonNode in class Vertex
        Returns:
        JSON representation of additional properties