Class EmptyLinearDag


  • public class EmptyLinearDag
    extends LinearDag
    Author:
    dmitry.neverov
    • Constructor Detail

      • EmptyLinearDag

        public EmptyLinearDag()
    • Method Detail

      • toposort

        @NotNull
        public List<Long> toposort()
        Description copied from class: DAG
        Get topologically sorted list of graph nodes (parents go before children)
        Specified by:
        toposort in class DAG<Long>
        Returns:
        see above
      • getParents

        @NotNull
        public List<Long> getParents​(@NotNull
                                     Long node)
        Description copied from class: DAG
        Get parents of the specified node
        Specified by:
        getParents in class DAG<Long>
        Parameters:
        node - node of interest
        Returns:
        see above
      • containsNode

        public boolean containsNode​(@NotNull
                                    Long node)
        Description copied from class: DAG
        Check if graph contains specified node
        Specified by:
        containsNode in class DAG<Long>
        Parameters:
        node - node to check
        Returns:
        true if graph contains node, false otherwise
      • getNodesWithoutParents

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

        public int size()
        Description copied from class: DAG
        Returns number of nodes in the graph
        Specified by:
        size in class DAG<Long>
        Returns:
        see above