Package org.gephi.graph.api
Interface DirectedGraph
-
- All Superinterfaces:
Graph
- All Known Subinterfaces:
DirectedSubgraph
public interface DirectedGraph extends Graph
Directed graph.This interface has additional methods specific to directed graphs compared to the Graph interface it inherits from.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method 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.-
Methods inherited from interface org.gephi.graph.api.Graph
addAllEdges, addAllNodes, addEdge, addNode, clear, clearEdges, clearEdges, clearEdges, contains, contains, getAttribute, getAttribute, getAttribute, getAttributeKeys, getDegree, getEdge, getEdgeCount, getEdgeCount, getEdges, getEdges, getEdges, getEdges, getEdges, getEdges, getLock, getModel, getNeighbors, getNeighbors, getNode, getNodeCount, getNodes, getOpposite, getSelfLoops, getVersion, getView, hasEdge, hasNode, isDirected, isDirected, isIncident, isIncident, isMixed, isSelfLoop, isUndirected, readLock, readUnlock, readUnlockAll, removeAllEdges, removeAllNodes, removeAttribute, removeAttribute, removeAttribute, removeEdge, removeNode, setAttribute, setAttribute, setAttribute, writeLock, writeUnlock
-
-
-
-
Method Detail
-
getEdge
Edge getEdge(Node source, Node target, int type)
Gets the edge adjacent to source and target with an edge of the given type.
-
isAdjacent
boolean isAdjacent(Node source, Node target)
Returns true if source and target are adjacent.- Specified by:
isAdjacent
in interfaceGraph
- Parameters:
source
- the source nodetarget
- the target node- Returns:
- true of adjacent, false otherwise
-
isAdjacent
boolean isAdjacent(Node source, Node target, int type)
Returns true if source and target are adjacent with an edge of the given type.- Specified by:
isAdjacent
in interfaceGraph
- Parameters:
source
- the source nodetarget
- the target nodetype
- the edge type- Returns:
- true if adjacent, false otherwise
-
getPredecessors
NodeIterable getPredecessors(Node node)
Gets the node's predecessors.A node predecessor is a node connected by an incoming edge.
- Parameters:
node
- the node to get predecessors- Returns:
- an iterable on node's predecessors
-
getPredecessors
NodeIterable getPredecessors(Node node, int type)
Gets the node's predecessors through a specific edge type.A node predecessor is a node connected by an incoming edge.
- Parameters:
node
- the node to get predecessorstype
- the edge type- Returns:
- an iterable on node's predecessors
-
getSuccessors
NodeIterable getSuccessors(Node node)
Gets the node's successors.A node successor is a node connected by an outgoing edge.
- Parameters:
node
- the node to get successors- Returns:
- an iterable on node's successors
-
getSuccessors
NodeIterable getSuccessors(Node node, int type)
Gets the node's successors through a specific edge type.A node successor is a node connected by an outgoing edge.
- Parameters:
node
- the node to get successorstype
- the edge type- Returns:
- an iterable on node's successors
-
getInEdges
EdgeIterable getInEdges(Node node)
Gets the node's incoming edges.- Parameters:
node
- the node to get incoming edges- Returns:
- an iterable on node's incoming edges
-
getInEdges
EdgeIterable getInEdges(Node node, int type)
Gets the node's incoming edges for the given type.- Parameters:
node
- the node to get incoming edgestype
- the edge type- Returns:
- an iterable on node's incoming edges
-
getOutEdges
EdgeIterable getOutEdges(Node node)
Gets the node's outgoing edges.- Parameters:
node
- the node to get outgoing edges- Returns:
- an iterable on node's outgoing edges
-
getOutEdges
EdgeIterable getOutEdges(Node node, int type)
Gets the node's incoming edges for the given type.- Parameters:
node
- the node to get incoming edgestype
- the edge type- Returns:
- an iterable on node's incoming edges
-
getMutualEdge
Edge getMutualEdge(Edge edge)
Gets the edge in the other direction of the given edge.This takes in account the edge type so only edges of the same type can be mutual.
- Parameters:
edge
- the edge to get the mutual edge- Returns:
- the mutual edge, or null
-
getInDegree
int getInDegree(Node node)
Gets the edge's in-degree.- Parameters:
node
- the node to get the in-degree from- Returns:
- the in-degree number
-
getOutDegree
int getOutDegree(Node node)
Gets the edge's out-degree.- Parameters:
node
- the node to get the out-degree from- Returns:
- the out-degree number
-
-