solver

package
v0.0.0-...-7dad8b2 Latest Latest
Warning

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

Go to latest
Published: Aug 1, 2019 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrEpochMustBePositiveNumber = errors.New("solver: epoch must be positive number")
)

Functions

Types

type DistanceAggregator

type DistanceAggregator interface {
	Reset()
	Add(float64)
	Result() float64
}

type DistanceFun

type DistanceFun func(prevValue *opinion.Type, newValue *opinion.Type) float64

type EpochEndFun

type EpochEndFun func(epoch uint, aggregatedDistance float64) error

type EpochStartFun

type EpochStartFun func(epoch uint) error

type Options

type Options func(opts *options) (*options, error)

func UseChebyshevDistance

func UseChebyshevDistance() Options

func UseDistanceAggregator

func UseDistanceAggregator(distanceAggregator DistanceAggregator) Options

func UseDistanceFunction

func UseDistanceFunction(distanceFun DistanceFun) Options

func UseEuclideanDistance

func UseEuclideanDistance() Options

func UseManhattanDistance

func UseManhattanDistance() Options

func UseMaxDistanceAggregator

func UseMaxDistanceAggregator() Options

func UseMaxEpochs

func UseMaxEpochs(epochs uint) Options

func UseOnEpochEndCallback

func UseOnEpochEndCallback(onEpochEnd EpochEndFun) Options

func UseOnEpochStartCallback

func UseOnEpochStartCallback(onEpochStart EpochStartFun) Options

func UseSumDistanceAggregator

func UseSumDistanceAggregator() Options

func UseTolerance

func UseTolerance(tolerance float64) Options

Jump to

Keyboard shortcuts

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