setAbsoluteAll method

void setAbsoluteAll(
  1. int row,
  2. int col,
  3. List<Logic> list
)

Set the range at absolute position (row, col) to list.

Implementation

void setAbsoluteAll(int row, int col, List<Logic> list) {
  var i = col - rowShift[row];
  final product = partialProducts[row];
  for (final val in list) {
    if (product.length > i) {
      product[i++] = val;
    } else {
      while (product.length < i) {
        product.add(Const(0));
      }
      product.add(val);
      i++;
    }
  }
}