Package oracle.pgx.algorithm
Interface PgxVertex
-
public interface PgxVertexA vertex of a PgxGraph.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description PgxEdgeedge()Get the edge through which this vertex was reached.longgetDegree()Get the out-degree of this vertex.VertexSetgetDownNeighbors()Get the down-neighbors.longgetInDegree()Get the in-degree of this vertex.EdgeSetgetInEdges()Returns all incoming edges of this vertex.VertexSetgetInNeighbors()Returns all incoming neighbors of this vertex, i.e., all vertices that have an edge to this vertex.VertexSetgetNeighbors()Returns all neighbors of this vertex.longgetOutDegree()Get the out-degree of this vertex.EdgeSetgetOutEdges()Returns all outgoing edges of this vertex.VertexSetgetOutNeighbors()Returns all outgoing neighbors of this vertex, i.e., all nodes this vertex has an edge to.PgxVertexgetRandomInNeighbor()Return a random incoming neighbor.PgxVertexgetRandomInOutNeighbor()Return a random incoming or outgoing neighbor.PgxVertexgetRandomOutNeighbor()Return a random outgoing neighbor.VertexSetgetUpNeighbors()Get the up-neighbors.booleangreaterThan(PgxVertex v)Check whether this vertex is greater than the given vertex according to the ordering induced on the vertices.booleanhasEdgeFrom(PgxVertex v)Check if there is an edge from the given vertex to this vertex.booleanhasEdgeTo(PgxVertex v)Check if there is an edge from this vertex to the given vertex.booleanlessThan(PgxVertex v)Check whether this vertex is less than the given vertex according to the ordering induced on the vertices.PgxEdgeparentEdge()Returns the edge through which this vertex was reached.PgxVertexparentVertex()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:
-
-