|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.kuka.graph.impl.AbstractGraph<N,E>
com.kuka.graph.impl.AbstractBaseGraph<N,E>
com.kuka.graph.impl.Subgraph<N,E>
N - the node type.E - the edge type.public class Subgraph<N,E extends Edge<N>>
Class realizing a subgraph of a directed graph. A subgraph is itself a directed graph. However, only nodes and edges present in the super graph may be added. No new nodes may be created.
| Constructor Summary | |
|---|---|
Subgraph(Graph<N,E> graph)
Constructor. |
|
| Method Summary | |
|---|---|
boolean |
addEdge(E edge)
Adds the specified edge to this graph if it is not already present (optional operation). |
boolean |
addNode(N node)
Adds the specified node to this graph if it is not already present (optional operation). |
E |
createEdge(N source,
N target)
Creates a new edge from the specified source node to the target node, adds it to this graph and returns the created edge. |
N |
createNode()
Creates a new node, adds it to this graph and returns the created node. |
protected Graph<N,E> |
graph()
|
| Methods inherited from class com.kuka.graph.impl.AbstractBaseGraph |
|---|
clone, containsEdge, containsNode, edges, getEdge, incomingEdges, neighbors, nodes, outgoingEdges, removeEdge, removeNode |
| Methods inherited from class com.kuka.graph.impl.AbstractGraph |
|---|
addAllEdges, addAllNodes, clear, containsAllEdges, containsAllNodes, containsEdge, edges, edgeSize, isEmpty, iterator, nodes, nodeSize, removeAllEdges, removeAllNodes, removeEdge, retainAllEdges, retainAllNodes, toString |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Subgraph(Graph<N,E> graph)
graph - the graph of which this graph is a subgraph.| Method Detail |
|---|
public boolean addNode(N node)
GraphMore formally, adds the specified node n to this graph if the graph contains no element n2 such that n.equals(n2)) . If this graph already contains the element, the call leaves the graph unchanged and returns false.
addNode in interface Graph<N,E extends Edge<N>>addNode in class AbstractBaseGraph<N,E extends Edge<N>>node - node to be added to this graph
public boolean addEdge(E edge)
GraphMore formally, adds the specified edge e to this graph if the graph contains no element e2 such that e.equals(e2)) . If this graph already contains the element, the call leaves the graph unchanged and returns false.
addEdge in interface Graph<N,E extends Edge<N>>addEdge in class AbstractBaseGraph<N,E extends Edge<N>>edge - edge to be added to this graph
public N createNode()
Graph
public E createEdge(N source,
N target)
Graph
source - the source node of the edge that is to be createdtarget - the target node of the edge that is to be created
protected Graph<N,E> graph()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||