class

Cadmium::EdgeWeightedDigraph

Inherits Reference / Object

Represents a digraph, you can add an edge, get the number vertexes, edges, get all edges and use #to_s to print the Digraph.

Constructors

new

Create a new EdgeWeightedDigraph.

Source

Instance methods

add(from : Int32, to : Int32, weight : Float64)

Create and add a new DirectedEdge.

Source
add_edge(e : DirectedEdge)

Add a DirectedEdge.

Source
e

Get the number of edges saved.

Source
edges

Use callback on all edges.

Source
get_adj(v : Int32)

Use callback on all edges from v.

Source
to_s(io)
Source
v

Get the number of vertexs saved.

Source

Nested types