메소드 | 설명 | |
---|---|---|
adjacentTo ( object $vertex ) : Generator | Enumerates each vertex adjacent to the provided vertex via a generator. | |
degreeOf ( object $vertex ) : integer | Returns the degree (number of incident edges) for the provided vertex. | |
edges ( ) : Generator | Loops over each edge in the graph via a generator. | |
hasVertex ( object $vertex ) : boolean | Indicates whether or not the provided vertex is present in the graph. | |
incidentTo ( $vertex ) : Generator | Enumerates each edge incident to the provided vertex via a generator. | |
order ( ) : integer | Returns the number of vertices in the graph. | |
size ( ) : integer | Returns the number of edges in the graph. | |
vertices ( ) : Generator | Returns a generator that loops through each vertex in the graph. |
public adjacentTo ( object $vertex ) : Generator | ||
$vertex | object | The vertex whose adjacent vertices should be visited. |
리턴 | Generator | A generator that yields adjacent vertices as values. |
public incidentTo ( $vertex ) : Generator | ||
$vertex | The vertex whose incident edges should be visited. | |
리턴 | Generator | A generator that yields incident edges as values. |