markov

package
v0.0.0-...-2b860d5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 12, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCompression = 1
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Markov

type Markov interface {
	// GetNextColor returns a randomly selected tranistion color for the given
	// color.
	GetNextColor(c color.Color) color.Color

	// GetRandomColor returns a randomly selected color from the model.
	GetRandomColor() color.Color

	// AddColorTransition adds a color transition, c2, for the given color, c1,
	// to the model.
	AddColorTransition(c1 color.Color, c2 color.Color)

	// Generate returns a new image generated from the current model.
	Generate() *image.RGBA

	// ReadFile reads the given image file and sets the model accordingly.
	ReadFile(filename string) error

	// WriteFile generates a new image based on the current model and writes
	// it to the given file path.
	WriteFile(filename string) error
}

Markov is an interface to a markov model of an image

func New

func New() Markov

New returns a new Markov instance.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL