Class BaseModificationDAG

    • Constructor Detail

      • BaseModificationDAG

        public BaseModificationDAG()
    • Method Detail

      • iterator

        @NotNull
        public DAGIterator<Long> iterator​(@NotNull
                                          Long startNode)
        Description copied from class: DAG
        Get iterator through the nodes of the graph
        Overrides:
        iterator in class DAG<Long>
        Parameters:
        startNode - start node for iteration
        Returns:
        see above
      • iterator

        @NotNull
        public DAGIterator<Long> iterator​(@NotNull
                                          Collection<Long> startNodes)
        Description copied from class: DAG
        Get iterator through the nodes of the graph
        Overrides:
        iterator in class DAG<Long>
        Parameters:
        startNodes - start nodes for iteration
        Returns:
        see above
      • filter

        public DAG<Long> filter​(@NotNull
                                Filter<Long> filter,
                                boolean includeAcceptedNodeParents,
                                boolean extrapolateEdges)
        Specified by:
        filter in class DAG<Long>
      • breadthFirstSearch

        public void breadthFirstSearch​(@NotNull
                                       Long start,
                                       @NotNull
                                       BFSVisitor<Long> visitor)
        Description copied from class: DAG
        Run breadth-first search from the specified start node
        Specified by:
        breadthFirstSearch in class DAG<Long>
        Parameters:
        start - start node for the search
        visitor - visitor
      • getDepthFirstSearch

        public ModificationDagDFS getDepthFirstSearch​(@NotNull
                                                      Long start,
                                                      @NotNull
                                                      DFSVisitor<Long> visitor)
        Description copied from class: DAG
        Returns depth-first search from the specified start node
        Specified by:
        getDepthFirstSearch in class DAG<Long>
        Parameters:
        start - start node for the search
        visitor - visitor
        Returns:
        see above
      • getCommonAncestors

        @NotNull
        public List<Long> getCommonAncestors​(@NotNull
                                             List<Long> nodes)
        Description copied from class: DAG
        Get list of common ancestors for collection of graph nodes
        Specified by:
        getCommonAncestors in class DAG<Long>
        Parameters:
        nodes - nodes of interest, they should be presented in the graph
        Returns:
        least common ancestors or empty list if collection of nodes is empty or if there is no common ancestor between nodes.
      • getNodesWithoutChildren

        @NotNull
        public List<Long> getNodesWithoutChildren()
        Description copied from class: DAG
        Returns nodes without children
        Specified by:
        getNodesWithoutChildren in class DAG<Long>
        Returns:
        see above
      • tailSize

        public int tailSize()
      • getMaxNode

        public abstract long getMaxNode()
        Returns:
        max node from the current DAG if it is not empty, otherwise returns 0
        Since:
        2024.12