GraphUtils constructor

const GraphUtils(
  1. int from,
  2. int to, [
  3. double weight = 1.0
])

Creates a directed edge from node from to node to with optional weight (defaults to 1.0).

Implementation

const GraphUtils(int from, int to, [double weight = 1.0])
  : _from = from,
    _to = to,
    _weight = weight;