class

CGL::AbstractGraph(V)

Inherits CGL::AnyGraph / Reference / Object

Instance methods

connected?

Whether self is connected.

Source
count_connected_components

Returns the number of connected components in self.

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_connected_component

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

Source
each_connected_component

Returns an Iterator of connected components.

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
in_degree_of(v : V) : Int32

Returns the incoming degree of the given vertex v.

For undirected graphs, the value equals #degree_of.

Source
out_degree_of(v : V) : Int32

Returns the outgoing degree of the given vertex v.

For undirected graphs, the value equals #degree_of.

Source