algo

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DotMatrixBuilder

type DotMatrixBuilder struct {
	Size                int
	PointThresholdOrder []Point2D[int]
}

type DotSettings

type DotSettings struct {
	MinValue, MaxValue byte
	Size               int
}

type Point2D

type Point2D[T constraints.Integer | constraints.Float] struct {
	X, Y T
}

func (*Point2D[T]) Distance

func (p *Point2D[T]) Distance(x, y T) float64

Distance calculate distance between two points

type PointValue2D

type PointValue2D[T constraints.Integer | constraints.Float, V any] struct {
	Point2D[T]
	Value V
}

type SquareMatrix

type SquareMatrix[T any] struct {
	Size   int
	Matrix []T
}

func CreateThresholdMatrix

func CreateThresholdMatrix(dotSettings DotSettings) SquareMatrix[byte]

func (*SquareMatrix[T]) Get

func (pm *SquareMatrix[T]) Get(x, y int) T

Jump to

Keyboard shortcuts

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