public interface DirectedGraph extends Graph
This interface has additional methods specific to directed graphs compared to the Graph interface it inherits from.
Modifier and Type | Method and Description |
---|---|
Edge |
getEdge(Node source,
Node target)
Gets the edge adjacent to source and target.
|
Edge |
getEdge(Node source,
Node target,
int type)
Gets the edge adjacent to source and target with an edge of the given
type.
|
int |
getInDegree(Node node)
Gets the edge's in-degree.
|
EdgeIterable |
getInEdges(Node node)
Gets the node's incoming edges.
|
EdgeIterable |
getInEdges(Node node,
int type)
Gets the node's incoming edges for the given type.
|
Edge |
getMutualEdge(Edge edge)
Gets the edge in the other direction of the given edge.
|
int |
getOutDegree(Node node)
Gets the edge's out-degree.
|
EdgeIterable |
getOutEdges(Node node)
Gets the node's outgoing edges.
|
EdgeIterable |
getOutEdges(Node node,
int type)
Gets the node's incoming edges for the given type.
|
NodeIterable |
getPredecessors(Node node)
Gets the node's predecessors.
|
NodeIterable |
getPredecessors(Node node,
int type)
Gets the node's predecessors through a specific edge type.
|
NodeIterable |
getSuccessors(Node node)
Gets the node's successors.
|
NodeIterable |
getSuccessors(Node node,
int type)
Gets the node's successors through a specific edge type.
|
boolean |
isAdjacent(Node source,
Node target)
Returns true if source and target are adjacent.
|
boolean |
isAdjacent(Node source,
Node target,
int type)
Returns true if source and target are adjacent with an edge of the given
type.
|
addAllEdges, addAllNodes, addEdge, addNode, clear, clearEdges, clearEdges, clearEdges, contains, contains, getAttribute, getAttribute, getAttributeKeys, getDegree, getEdge, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdges, getModel, getNeighbors, getNeighbors, getNode, getNodeCount, getNodes, getOpposite, getSelfLoops, getView, isDirected, isDirected, isIncident, isIncident, isMixed, isSelfLoop, isUndirected, readLock, readUnlock, readUnlockAll, removeAllEdges, removeAllNodes, removeEdge, removeNode, setAttribute, setAttribute, writeLock, writeUnlock
Edge getEdge(Node source, Node target, int type)
boolean isAdjacent(Node source, Node target)
isAdjacent
in interface Graph
source
- the source nodetarget
- the target nodeboolean isAdjacent(Node source, Node target, int type)
isAdjacent
in interface Graph
source
- the source nodetarget
- the target nodetype
- the edge typeNodeIterable getPredecessors(Node node)
A node predecessor is a node connected by an incoming edge.
node
- the node to get predecessorsNodeIterable getPredecessors(Node node, int type)
A node predecessor is a node connected by an incoming edge.
node
- the node to get predecessorstype
- the edge typeNodeIterable getSuccessors(Node node)
A node successor is a node connected by an outgoing edge.
node
- the node to get successorsNodeIterable getSuccessors(Node node, int type)
A node successor is a node connected by an outgoing edge.
node
- the node to get successorstype
- the edge typeEdgeIterable getInEdges(Node node)
node
- the node to get incoming edgesEdgeIterable getInEdges(Node node, int type)
node
- the node to get incoming edgestype
- the edge typeEdgeIterable getOutEdges(Node node)
node
- the node to get outgoing edgesEdgeIterable getOutEdges(Node node, int type)
node
- the node to get incoming edgestype
- the edge typeEdge getMutualEdge(Edge edge)
This takes in account the edge type so only edges of the same type can be mutual.
edge
- the edge to get the mutual edgeint getInDegree(Node node)
node
- the node to get the in-degree fromint getOutDegree(Node node)
node
- the node to get the out-degree fromCopyright © 2007–2015 Gephi Consortium. All rights reserved.