diff options
| author | Dmitry Vyukov <dvyukov@google.com> | 2022-11-24 12:33:42 +0100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2022-11-25 13:53:49 +0100 |
| commit | 0e8f14dcc4db15a509dc2ba4b291e2c28fc51ca0 (patch) | |
| tree | 87db770b7786c0018a58e979a2d2a8b8257d871b /prog/heatmap_test.go | |
| parent | 70393e5d05ae78166599755b835f0d465c815f48 (diff) | |
prog: refactor HeatMap
Provide NumMutations method instead of Size.
It allows HeatMap to choose number of mutations better
(e.g. for completely empty/flat images w/o interesting data).
Diffstat (limited to 'prog/heatmap_test.go')
| -rw-r--r-- | prog/heatmap_test.go | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/prog/heatmap_test.go b/prog/heatmap_test.go index 4103a4f97..9c891f258 100644 --- a/prog/heatmap_test.go +++ b/prog/heatmap_test.go @@ -57,10 +57,10 @@ func TestGenericHeatmap(t *testing.T) { t.Fatalf("bad decode: %v", err) } for i := 0; i < iters; i++ { - hm := MakeGenericHeatmap(data).(*GenericHeatmap) + hm := MakeGenericHeatmap(data, r).(*GenericHeatmap) for j := 0; j < tries; j++ { - index := hm.ChooseLocation(r) + index := hm.ChooseLocation() if !checkIndex(index, len(data), test.regions) { hm.debugPrint(t, data, test.regions) t.Fatalf("selected index %d does not fall in a region\n", index) |
