Documentation ¶
Index ¶
- Variables
- func AverageImageColor(im image.Image) color.NRGBA
- func LoadImage(path string) (image.Image, error)
- func Log(level int, format string, a ...interface{})
- func NumberString(x float64) string
- func PreAnneal(state Annealable, iterations int) float64
- func SaveFile(path, contents string) error
- func SaveGIF(path string, frames []image.Image, delay, lastDelay int) error
- func SaveGIFImageMagick(path string, frames []image.Image, delay, lastDelay int) error
- func SaveJPG(path string, im image.Image, quality int) error
- func SavePNG(path string, im image.Image) error
- type Annealable
- type Color
- type Ellipse
- type Heatmap
- type Model
- type Rectangle
- type Scanline
- type Shape
- type ShapeType
- type State
- type Worker
- func (worker *Worker) BestHillClimbState(t ShapeType, a, n, age, m int) *State
- func (worker *Worker) BestRandomState(t ShapeType, a, n int) *State
- func (worker *Worker) Energy(shape Shape, alpha int) float64
- func (worker *Worker) Init(current *image.RGBA, score float64)
- func (worker *Worker) RandomState(t ShapeType, a int) *State
Constants ¶
This section is empty.
Variables ¶
View Source
var LogLevel int
Functions ¶
func NumberString ¶
func PreAnneal ¶
func PreAnneal(state Annealable, iterations int) float64
func SaveGIFImageMagick ¶
Types ¶
type Annealable ¶
type Annealable interface { Energy() float64 DoMove() interface{} UndoMove(interface{}) Copy() Annealable }
func Anneal ¶
func Anneal(state Annealable, maxTemp, minTemp float64, steps int) Annealable
func HillClimb ¶
func HillClimb(state Annealable, maxAge int) Annealable
type Ellipse ¶
func NewRandomCircle ¶
type Model ¶
type Rectangle ¶
func NewRandomRectangle ¶
Click to show internal directories.
Click to hide internal directories.