class

CGL::AbstractDiGraph(V)

Inherits CGL::AnyGraph / Reference / Object

Instance methods

count_strongly_connected_components

Returns the number of strongly connected components in self.

Source
count_weakly_connected_components

Returns the number of weakly connected components in self.

Source
degree_of(v : V) : Int32

Returns the degree of the given vertex v.

For directed graphs, the value equals #out_degree_of.

For undirected graphs, the value is the sum of #in_degree_of and #in_degree_of.

Source
density

Returns the density of self.

Self loops are counted in the total number of edges so graphs with self loops can have density higher than 1.

Source
directed?

Whether self is directed.

Source
each_edge

Yields each edges in the graph.

Source
each_edge_from(u : V, & : AnyEdge(V) -> )

Yields each edge incident to u in the graph.

Source
each_strongly_connected_component

Yields each strongly connected component of self as an `Array'.

Note: Based on (Tarjan, 1972) and (Nuutila and Soisalon-Soinen, 1994)

Source
each_strongly_connected_component

Returns an iterator of strongly connected components.

Source
each_successor(u : V, &block : V -> )

Yields each successor of u in the graph.

Source
each_weakly_connected_component

Yields each connected component of self as an `Array'.

Source
each_weakly_connected_component

Returns an Iterator of connected components.

Source
strongly_connected?

Whether self is strongly connected.

Source
weakly_connected?

Whether self is weakly connected.

Source