public interface MixedGraph extends Graph
GraphModel| Modifier and Type | Method and Description |
|---|---|
boolean |
addEdge(Node source,
Node target,
boolean directed)
Add to the graph a directed or undirected edge between
source and
target. |
EdgeIterable |
getDirectedEdges()
Returns an edge iterator of directed edges in the graph.
|
Edge |
getEdge(Node node1,
Node node2)
Finds and returns a directed or undirected edge that connects
node1 and
node2. |
EdgeIterable |
getUndirectedEdges()
Returns an edge iterator of directed edges in the graph.
|
boolean |
isDirected(Edge edge)
Returns
true if edge is directed if
undirected. |
addEdge, addNode, clear, clearEdges, clearEdges, contains, contains, getDegree, getEdge, getEdge, getEdgeCount, getEdges, getEdges, getEdgeVersion, getGraphModel, getNeighbors, getNode, getNode, getNodeCount, getNodes, getNodeVersion, getOpposite, getView, isAdjacent, isAdjacent, isSelfLoop, readLock, readUnlock, readUnlockAll, removeEdge, removeNode, setId, setId, writeLock, writeUnlockgetAttributesboolean addEdge(Node source, Node target, boolean directed)
source and
target. Graph does not accept parallel edges.
Fails if a such edge already exists in the graph.source - the source nodetarget - the target nodedirected - the type of edge to be createdIllegalArgumentException - if source or target
is null or not legal nodes for this edgeIllegalMonitorStateException - if the current thread is holding a read lockEdge getEdge(Node node1, Node node2)
node1 and
node2. Returns null if no such edge is found.
Warning: This method is not thread safe, be sure to call it in a locked statement.
getEdge in interface Graphnode1 - the first incident node of the queried edgenode2 - thge second incident node of the queried edgenode1 and node2
or null if no such edge existsIllegalArgumentException - if node1 or node2
is null or not legal nodes in the graphEdgeIterable getDirectedEdges()
EdgeIterable getUndirectedEdges()
boolean isDirected(Edge edge)
true if edge is directed if
undirected.isDirected in interface Graphedge - the edge to be queriedtrue if edge is directed if
undirectedIllegalArgumentException - if edge is nullCopyright © 2007-2012 Gephi Consortium. All Rights Reserved.