Class PseudoTopologicalOrderer<N>

  • All Implemented Interfaces:
    Orderer<N>
    Direct Known Subclasses:
    ReversePseudoTopologicalOrderer

    public class PseudoTopologicalOrderer<N>
    extends Object
    implements Orderer<N>
    Orders in pseudo-topological order, the nodes of a DirectedGraph instance.
    Author:
    Steven Lambeth, Marc Berndl
    • Constructor Detail

      • PseudoTopologicalOrderer

        public PseudoTopologicalOrderer()
    • Method Detail

      • newList

        public List<N> newList​(DirectedGraph<N> g,
                               boolean reverse)
        Builds an order for a directed graph. The order is represented by the returned list, i.e. is a node was assigned number i in the order, it will be in the ith position of the returned list.
        Specified by:
        newList in interface Orderer<N>
        Parameters:
        g - a DirectedGraph instance whose nodes we wish to order
        reverse - true to compute the reverse order
        Returns:
        a somehow ordered list of the graph's nodes
      • newList

        @Deprecated
        public List<N> newList​(DirectedGraph<N> g)
        Deprecated.
        use {@link #newList(DirectedGraph, boolean))} instead
        Parameters:
        g - a DirectedGraph instance whose nodes we wish to order.
        Returns:
        a pseudo-topologically ordered list of the graph's nodes.
      • setReverseOrder

        @Deprecated
        public void setReverseOrder​(boolean isReversed)
        Deprecated.
        use {@link #newList(DirectedGraph, boolean))} instead
        Set the ordering for the orderer.
        Parameters:
        isReversed - specify if we want reverse pseudo-topological ordering, or not.
      • isReverseOrder

        @Deprecated
        public boolean isReverseOrder()
        Deprecated.
        use {@link #newList(DirectedGraph, boolean))} instead
        Check the ordering for the orderer.
        Returns:
        true if we have reverse pseudo-topological ordering, false otherwise.