Package oracle.pgx.algorithm
Interface PgxVertex
-
public interface PgxVertex
A vertex of a PgxGraph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PgxEdge
edge()
Get the edge through which this vertex was reached.long
getDegree()
Get the out-degree of this vertex.VertexSet
getDownNeighbors()
Get the down-neighbors.long
getInDegree()
Get the in-degree of this vertex.EdgeSet
getInEdges()
Returns all incoming edges of this vertex.VertexSet
getInNeighbors()
Returns all incoming neighbors of this vertex, i.e., all vertices that have an edge to this vertex.VertexSet
getNeighbors()
Returns all neighbors of this vertex.long
getOutDegree()
Get the out-degree of this vertex.EdgeSet
getOutEdges()
Returns all outgoing edges of this vertex.VertexSet
getOutNeighbors()
Returns all outgoing neighbors of this vertex, i.e., all nodes this vertex has an edge to.PgxVertex
getRandomInNeighbor()
Return a random incoming neighbor.PgxVertex
getRandomInOutNeighbor()
Return a random incoming or outgoing neighbor.PgxVertex
getRandomOutNeighbor()
Return a random outgoing neighbor.VertexSet
getUpNeighbors()
Get the up-neighbors.boolean
greaterThan(PgxVertex v)
Check whether this vertex is greater than the given vertex according to the ordering induced on the vertices.boolean
hasEdgeFrom(PgxVertex v)
Check if there is an edge from the given vertex to this vertex.boolean
hasEdgeTo(PgxVertex v)
Check if there is an edge from this vertex to the given vertex.boolean
lessThan(PgxVertex v)
Check whether this vertex is less than the given vertex according to the ordering induced on the vertices.PgxEdge
parentEdge()
Returns the edge through which this vertex was reached.PgxVertex
parentVertex()
Returns the vertex that was visited before this vertex.
-
-
-
Field Detail
-
NONE
static final PgxVertex NONE
A value indicating the absence of a vertex.
-
-
Method Detail
-
getNeighbors
VertexSet getNeighbors()
Returns all neighbors of this vertex.- Returns:
-
getOutNeighbors
VertexSet getOutNeighbors()
Returns all outgoing neighbors of this vertex, i.e., all nodes this vertex has an edge to.- Returns:
-
getInNeighbors
VertexSet getInNeighbors()
Returns all incoming neighbors of this vertex, i.e., all vertices that have an edge to this vertex.- Returns:
-
getRandomInNeighbor
PgxVertex getRandomInNeighbor()
Return a random incoming neighbor. If the graph is undirected, this method behaves the same asgetRandomOutNeighbor()
.- Returns:
-
getRandomOutNeighbor
PgxVertex getRandomOutNeighbor()
Return a random outgoing neighbor.- Returns:
-
getRandomInOutNeighbor
PgxVertex getRandomInOutNeighbor()
Return a random incoming or outgoing neighbor. If the graph is undirected, this method behaves the same asgetRandomOutNeighbor()
.- Returns:
-
getOutEdges
EdgeSet getOutEdges()
Returns all outgoing edges of this vertex.- Returns:
-
getInEdges
EdgeSet getInEdges()
Returns all incoming edges of this vertex.- Returns:
-
parentVertex
PgxVertex parentVertex()
Returns the vertex that was visited before this vertex. Only applicable within a traversal.- Returns:
-
parentEdge
PgxEdge parentEdge()
Returns the edge through which this vertex was reached. Only applicable within a traversal.- Returns:
-
getDegree
long getDegree()
Get the out-degree of this vertex.- Returns:
-
getOutDegree
long getOutDegree()
Get the out-degree of this vertex.- Returns:
-
getInDegree
long getInDegree()
Get the in-degree of this vertex.- Returns:
-
edge
PgxEdge edge()
Get the edge through which this vertex was reached. Only applicable within a neighbor iteration.- Returns:
-
hasEdgeTo
boolean hasEdgeTo(PgxVertex v)
Check if there is an edge from this vertex to the given vertex.- Parameters:
v
-- Returns:
-
hasEdgeFrom
boolean hasEdgeFrom(PgxVertex v)
Check if there is an edge from the given vertex to this vertex.- Parameters:
v
-- Returns:
-
greaterThan
boolean greaterThan(PgxVertex v)
Check whether this vertex is greater than the given vertex according to the ordering induced on the vertices.- Parameters:
v
-- Returns:
-
lessThan
boolean lessThan(PgxVertex v)
Check whether this vertex is less than the given vertex according to the ordering induced on the vertices.- Parameters:
v
-- Returns:
-
getUpNeighbors
VertexSet getUpNeighbors()
Get the up-neighbors. Only applicable within a traversal.- Returns:
-
getDownNeighbors
VertexSet getDownNeighbors()
Get the down-neighbors. Only applicable within a traversal.- Returns:
-
-