utils

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: May 20, 2021 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Package utils provides utilities for testing, benchmarking, and visualizing different algorithms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CompareAlgorithms

func CompareAlgorithms(a, b func() algorithm.Algorithm)

CompareAlgorithms compares the effectiveness of two algorithms.

func DefaultAlgorithm added in v1.1.2

func DefaultAlgorithm(numPoints int, image image.Image) algorithm.Algorithm

DefaultAlgorithm returns an algorithm than will be optimal for almost all cases

func GenerateAlgorithmOutput

func GenerateAlgorithmOutput(outputFile string, algo algorithm.Algorithm, reps int)

GenerateAlgorithmOutput runs an algorithm.Algorithm and writes the best point group to a file.

func GenerateProfile

func GenerateProfile(outputFile string, algo algorithm.Algorithm, seconds int)

GenerateProfile creates a CPU profile by running the algorithm.

func GenerateTrace

func GenerateTrace(outputFile string, algo algorithm.Algorithm)

GenerateTrace generates a trace of an algorithm, and is used for debugging and evaluating performance.

func RunAlgorithm

func RunAlgorithm(algo algorithm.Algorithm, reps int)

RunAlgorithm runs an algorithm.Algorithm and prints the fitness after a specified number of repetitions.

Types

This section is empty.

Jump to

Keyboard shortcuts

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