Creates a directed edge from node from to node to with optional weight (defaults to 1.0).
from
to
weight
const GraphUtils(int from, int to, [double weight = 1.0]) : _from = from, _to = to, _weight = weight;