Graph(int nodesCount, this.isOriented) { _nodes = Iterable.generate(nodesCount).map((e) => Node<num>(e)).toList(); }