GraphBasic constructor
Implementation
GraphBasic({required List<NodeInput> list, required bool centred}) {
this.centred = centred;
this.list = list;
this.nodesMap = this.list.fold(Map(), (m, node) {
if (m.containsKey(node.id)) {
throw 'Duplicate node ${node.id}';
}
m[node.id] = node;
return m;
});
this.detectIncomesAndOutcomes();
}