|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface MixedGraph
Graph that contains both directed and undirected edges.
GraphModel
Method Summary | |
---|---|
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. |
Methods inherited from interface org.gephi.graph.api.Graph |
---|
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, writeUnlock |
Method Detail |
---|
boolean 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 created
java.lang.IllegalArgumentException
- if source
or target
is null
or not legal nodes for this edge
java.lang.IllegalMonitorStateException
- 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 Graph
node1
- the first incident node of the queried edgenode2
- thge second incident node of the queried edge
node1
and node2
or null
if no such edge exists
java.lang.IllegalArgumentException
- 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 Graph
edge
- the edge to be queried
true
if edge
is directed if
undirected
java.lang.IllegalArgumentException
- if edge
is null
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |