equal
deleted
inserted
replaced
375 return full, errors.Errorf("too many ones") |
375 return full, errors.Errorf("too many ones") |
376 } |
376 } |
377 return full, nil |
377 return full, nil |
378 } |
378 } |
379 |
379 |
380 func checkRangeCounts(cells []Cell) (full bool, n0, n1 int) { |
380 // CheckRangeCounts returns true if all cells of the provided range are defined, |
|
381 // as well as the number of 0s and the number of 1s in the range. |
|
382 func CheckRangeCounts(cells []Cell) (full bool, n0, n1 int) { |
381 counters := []int{0, 0} |
383 counters := []int{0, 0} |
382 full = true |
384 full = true |
383 |
385 |
384 for _, c := range cells { |
386 for _, c := range cells { |
385 if c.Defined { |
387 if c.Defined { |