(shape Shape, alpha int)
| 44 | } |
| 45 | |
| 46 | func (worker *Worker) Energy(shape Shape, alpha int) float64 { |
| 47 | worker.Counter++ |
| 48 | lines := shape.Rasterize() |
| 49 | // worker.Heatmap.Add(lines) |
| 50 | color := computeColor(worker.Target, worker.Current, lines, alpha) |
| 51 | copyLines(worker.Buffer, worker.Current, lines) |
| 52 | drawLines(worker.Buffer, color, lines) |
| 53 | return differencePartial(worker.Target, worker.Current, worker.Buffer, worker.Score, lines) |
| 54 | } |
| 55 | |
| 56 | func (worker *Worker) BestHillClimbState(t ShapeType, a, n, age, m int) *State { |
| 57 | var bestEnergy float64 |
nothing calls this directly
no test coverage detected