Mercurial > gemma
comparison pkg/controllers/bottlenecks.go @ 3374:7d8c41cc50f5
Added TODO in waterlevel classifcation to find a good starting point.
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 22 May 2019 13:26:54 +0200 |
parents | 27aca46771b5 |
children | ff79a9b6707f |
comparison
equal
deleted
inserted
replaced
3373:27aca46771b5 | 3374:7d8c41cc50f5 |
---|---|
143 classes[len(classes)-1] = breaks[len(breaks)-1].value + 9999 | 143 classes[len(classes)-1] = breaks[len(breaks)-1].value + 9999 |
144 for i := range breaks { | 144 for i := range breaks { |
145 classes[i+1] = breaks[i].value | 145 classes[i+1] = breaks[i].value |
146 } | 146 } |
147 | 147 |
148 // TODO: Find a good starting point with binary or interpolation search. | |
149 | |
148 for i := 0; i < len(measurements)-1; i++ { | 150 for i := 0; i < len(measurements)-1; i++ { |
149 p1 := &measurements[i] | 151 p1 := &measurements[i] |
150 p2 := &measurements[i+1] | 152 p2 := &measurements[i+1] |
151 | 153 |
152 if p1.when.After(to) { | 154 if p1.when.After(to) { |