Interface ITcDataSource<V>

Type Parameters:
V - the type parameter of the node
All Known Implementing Classes:
CountingAlg, IncSCCAlg

public interface ITcDataSource<V>
This interface defines those methods that a transitive reachability data source should provide.
  • Method Details

    • attachObserver

      void attachObserver(ITcObserver<V> to)
      Attach a transitive closure relation observer.
      Parameters:
      to - the observer object
    • detachObserver

      void detachObserver(ITcObserver<V> to)
      Detach a transitive closure relation observer.
      Parameters:
      to - the observer object
    • getAllReachableTargets

      Set<V> getAllReachableTargets(V source)
      Returns all nodes which are reachable from the source node.
      Parameters:
      source - the source node
      Returns:
      the set of target nodes
    • getAllReachableSources

      Set<V> getAllReachableSources(V target)
      Returns all nodes from which the target node is reachable.
      Parameters:
      target - the target node
      Returns:
      the set of source nodes
    • isReachable

      boolean isReachable(V source, V target)
      Returns true if the target node is reachable from the source node.
      Parameters:
      source - the source node
      target - the target node
      Returns:
      true if target is reachable from source, false otherwise
    • getPathFinder

      IGraphPathFinder<V> getPathFinder()
      The returned IGraphPathFinder can be used to retrieve paths between nodes using transitive reachability.
      Returns:
      a path finder for the graph.
    • dispose

      void dispose()
      Call this method to properly dispose the data structures of a transitive closure algorithm.