class Cadmium::EdgeWeightedDigraph
- Cadmium::EdgeWeightedDigraph
- Reference
- Object
Overview
Represents a digraph, you can add an edge, get the number
vertexes, edges, get all edges and use
#to_s
to print the Digraph.
Defined in:
cadmium/graph/edge_weighted_digraph.crConstructors
-
.new
Create a new
EdgeWeightedDigraph
.
Instance Method Summary
-
#add(from : Int32, to : Int32, weight : Float64)
Create and add a new
DirectedEdge
. -
#add_edge(e : DirectedEdge)
Add a
DirectedEdge
. -
#e : Int32
Get the number of edges saved.
-
#edges
Use callback on all edges.
-
#get_adj(v : Int32)
Use callback on all edges from v.
- #to_s(io)
-
#v
Get the number of vertexs saved.