normalize method

Map<String, MatrixNode> normalize()

Implementation

Map<String, MatrixNode> normalize() {
  Map<String, MatrixNode> acc = Map();
  this.s.asMap().entries.forEach((rowEntry) {
    var y = rowEntry.key;
    var row = rowEntry.value;
    row.asMap().entries.forEach((columnEntry) {
      var x = columnEntry.key;
      var cell = columnEntry.value;
      if (cell != null) {
        cell.all.forEach((item) {
          acc[item.id] =
              MatrixNode.fromNodeOutput(x: x, y: y, nodeOutput: item);
        });
      }
    });
  });
  return acc;
}