| ./testdata/hist.go |
| 55: func test() { |
| 57: l := line{point{1 + zero, 2 + zero}, point{3 + zero, 4 + zero}} |
| 58: tinycall() |
| 59: dx := l.end.x - l.begin.x |
| 60: dy := l.end.y - l.begin.y |
| 61: sink = dx + dy |
| 63: hist := make([]int, 7) |
| 64: var reader io.Reader = strings.NewReader(cannedInput) |
| 65: if len(os.Args) > 1 { |
| 73: scanner := bufio.NewScanner(reader) |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 75: s := scanner.Text() |
| 76: i, err := strconv.ParseInt(s, 10, 64) |
| 77: if err != nil { |
| 81: hist = ensure(int(i), hist) |
| 82: hist[int(i)]++ |
| 74: for scanner.Scan() { |
| 86: for i, a := range hist { |
| 87: if a == 0 { |
| 86: for i, a := range hist { |
| 87: if a == 0 { |
| 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) |
| 91: n += a |
| 90: t += i * a |
| 86: for i, a := range hist { |
| 87: if a == 0 { |
| 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) |
| 91: n += a |
| 90: t += i * a |
| 86: for i, a := range hist { |
| 87: if a == 0 { |
| 86: for i, a := range hist { |
| 87: if a == 0 { |
| 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) |
| 91: n += a |
| 90: t += i * a |
| 86: for i, a := range hist { |
| 87: if a == 0 { |
| 92: fmt.Fprintf(os.Stderr, "%d\t%d\t%d\t%d\t%d\n", i, a, n, i*a, t) |
| 91: n += a |
| 90: t += i * a |
| 86: for i, a := range hist { |
| 87: if a == 0 { |
| 86: for i, a := range hist { |
| 99: } |
|
|