org.amino.ds.graph
Interface DirectedGraph<E>

Type Parameters:
E - type of element in the node of the graph
All Superinterfaces:
java.lang.Cloneable, java.util.Collection<E>, Graph<E>, java.lang.Iterable<E>
All Known Implementing Classes:
DirectedGraphImpl

public interface DirectedGraph<E>
extends Graph<E>

Interface of directed graph. In this graph, if there is an edge between node A and node B, we can traverse only from A to B. We can't traverse from B to A. It's different to say edge A-B or B-A.

Author:
Zhi Gan

Method Summary
 java.util.Collection<Node<E>> getDestinations(Node<E> start)
          Get nodes started with start node.
 java.util.Collection<Edge<E>> getIncoming(Node<E> node)
          Get edges ended with end node.
 java.util.Collection<Edge<E>> getOutgoing(Node<E> node)
          Get edges started with start node.
 java.util.Collection<Node<E>> getSources(Node<E> end)
          Get nodes end with end node.
 java.util.Collection<AdjacentNode<E>> getWeightDestinations(Node<E> start)
          Get weighted edges started with start node.
 java.util.Collection<AdjacentNode<E>> getWeightSources(Node<E> end)
          Get weighted edges ended with end node.
 
Methods inherited from interface org.amino.ds.graph.Graph
addAllNodes, addEdge, addEdge, addEdge, addNode, addNode, clone, containsEdge, containsNode, getAllNodes, getEdges, getEdges, getLinkedEdges, getLinkedNodes, getNodes, removeEdge, removeEdge, removeEdge, removeNode
 
Methods inherited from interface java.util.Collection
add, addAll, clear, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray
 

Method Detail

getWeightDestinations

java.util.Collection<AdjacentNode<E>> getWeightDestinations(Node<E> start)
Get weighted edges started with start node.

Parameters:
start - start node
Returns:
collection of weighted edges started with start node

getDestinations

java.util.Collection<Node<E>> getDestinations(Node<E> start)
Get nodes started with start node.

Parameters:
start - start node
Returns:
collection of nodes started with start node

getSources

java.util.Collection<Node<E>> getSources(Node<E> end)
Get nodes end with end node.

Parameters:
end - end node
Returns:
collection of nodes ended with end node

getWeightSources

java.util.Collection<AdjacentNode<E>> getWeightSources(Node<E> end)
Get weighted edges ended with end node.

Parameters:
end - end node
Returns:
collection of weighted edges ended with end node

getIncoming

java.util.Collection<Edge<E>> getIncoming(Node<E> node)
Get edges ended with end node.

Parameters:
node - end node
Returns:
collection of edges ended with node

getOutgoing

java.util.Collection<Edge<E>> getOutgoing(Node<E> node)
Get edges started with start node.

Parameters:
node - start node
Returns:
collection of edges started with start node


Copyright © 2008. All Rights Reserved.