|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface DirectedGraph
Graph with directed edges.
GraphModel
Method Summary | |
---|---|
boolean |
addEdge(Node source,
Node target)
Add an edge between source and target to the graph. |
Edge |
getEdge(Node source,
Node target)
Finds and returns an edge that connects source and target . |
int |
getInDegree(Node node)
Returns the number of incoming edges incident to node . |
EdgeIterable |
getInEdges(Node node)
Returns incoming edges incident to node . |
int |
getMutualDegree(Node node)
Returns the number of mutual edges incident to node . |
int |
getOutDegree(Node node)
Returns the number of outgoing edges incident to node . |
EdgeIterable |
getOutEdges(Node node)
Returns outgoing edges incident to node . |
NodeIterable |
getPredecessors(Node node)
Returns node 's predecessors. |
NodeIterable |
getSuccessors(Node node)
Returns node 's successors. |
boolean |
isPredecessor(Node node,
Node predecessor)
Returns true if predecessor is a predecessor of node . |
boolean |
isSuccessor(Node node,
Node successor)
Returns true if successor is a successor of node . |
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, isDirected, isSelfLoop, readLock, readUnlock, readUnlockAll, removeEdge, removeNode, setId, setId, writeLock, writeUnlock |
Method Detail |
---|
boolean addEdge(Node source, Node target)
source
and target
to the graph.
Graph does not accept parallel edges.
Fails if a such edge already exists in the graph.
source
- the source nodetarget
- the target node
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 source, Node target)
source
and target
. 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
source
- the source node of the queried edgetarget
- the target node of the queried edge
source
and target
or null
if no such edge exists
java.lang.IllegalArgumentException
- if source
or target
is null
or not legal nodes in the graphEdgeIterable getInEdges(Node node)
node
.
node
- the node whose incoming edges are to be returned
node
java.lang.IllegalArgumentException
- if node
is null
,
or if node
is not legal in the graph.EdgeIterable getOutEdges(Node node)
node
.
node
- the node whose outgoing edges are to be returned
node
java.lang.IllegalArgumentException
- if node
is null
,
or if node
is not legal in the graph.NodeIterable getSuccessors(Node node)
node
's successors.
A successor of node
is a node which is connected to node
by an outgoing edge going from node
.
node
- the node whose successors are to be returned
node
's successors
java.lang.IllegalArgumentException
- if node
is null
,
or if node
is not legal in the graph.NodeIterable getPredecessors(Node node)
node
's predecessors.
A predecessor of node
is a node which is connected to node
by an incoming edge going to node
.
node
- the node whose predecessors are to be returned
node
's successors
java.lang.IllegalArgumentException
- if node
is null
,
or if node
is not legal in the graph.boolean isSuccessor(Node node, Node successor)
true
if successor
is a successor of node
.
Warning: This method is not thread safe, be sure to call it in a locked statement.
node
- the node which has successor
as a successorsuccessor
- the node which has node
as a predecessor
true
if successor
is a successor of node
java.lang.IllegalArgumentException
- if node
or successor
is
null
of not legal in the graphboolean isPredecessor(Node node, Node predecessor)
true
if predecessor
is a predecessor of node
.
Warning: This method is not thread safe, be sure to call it in a locked statement.
node
- the node which has predecessor
as a predecessorpredecessor
- the node which has node
as a successor
true
if predecessor
is a predecessor of node
java.lang.IllegalArgumentException
- if node
or predecessor
is
null
of not legal in the graphint getInDegree(Node node)
node
.
Warning: This method is not thread safe, be sure to call it in a locked statement.
node
- the node whose indegree is to be returned
node
java.lang.IllegalArgumentException
- if node
is null
of not legal in
the graphint getOutDegree(Node node)
node
.
Warning: This method is not thread safe, be sure to call it in a locked statement.
node
- the node whose outdegree is to be returned
node
java.lang.IllegalArgumentException
- if node
is null
of not legal in
the graphint getMutualDegree(Node node)
node
. Edges are
considered mutual when both incoming and outgoing edges exists for a same
neighbour. Mutual edges are also called bi-directionnal.
Warning: This method is not thread safe, be sure to call it in a locked statement.
node
- the node whose outdegree is to be returned
node
java.lang.IllegalArgumentException
- if node
is null
of not legal in
the graph
|
Gephi Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |