functions

package
v0.0.0-...-cd12476 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BubbleNeighborhood

func BubbleNeighborhood(distance float64) float64

BubbleNeighborhood returns the influence for the specified distance.

func ConeNeighborhood

func ConeNeighborhood(distance float64) float64

ConeNeighborhood returns the influence for the specified distance.

func CoolingFactor

func CoolingFactor(coolingFunction string, progress float64) float64

CoolingFactor returns the cooling factors based on the selected coolingFunction.

func Distance

func Distance(distanceFunction string, from, to []float64) float64

Distance returns the distance between two points based on the selected distanceFunction.

func EpanechicovNeighborhood

func EpanechicovNeighborhood(distance float64) float64

EpanechicovNeighborhood returns the influence for the specified distance.

func EuclideanDistance

func EuclideanDistance(from, to []float64) float64

EuclideanDistance returns the euclidean distance between two points.

Note: Dimensions that include NaNs are ignored.

func GaussianNeighborhood

func GaussianNeighborhood(distance float64) float64

GaussianNeighborhood returns the influence for the specified distance.

func HardCooling

func HardCooling(progress float64) float64

HardCooling returns the hard exponential cooling factor for progress.

func LinearCooling

func LinearCooling(progress float64) float64

LinearCooling returns the linear cooling factor for progress.

func ManhattanDistance

func ManhattanDistance(from, to []float64) float64

ManhattanDistance returns the manhattan distance between two points.

Note: Dimensions that include NaNs are ignored.

func MediumCooling

func MediumCooling(progress float64) float64

MediumCooling returns the medium exponential cooling factor for progress.

func NeighborhoodInfluence

func NeighborhoodInfluence(neighborhoodFunction string, distance float64) float64

NeighborhoodInfluence returns the influence of the distance based on the selected neighborhoodFunction.

func SoftCooling

func SoftCooling(progress float64) float64

SoftCooling returns the soft exponential cooling factor for progress.

Types

type CoolingFunction

type CoolingFunction func(progress float64) float64

A CoolingFunction calculates the cooling alpha [1..0] for an input value [0..1].

type DistanceFunction

type DistanceFunction func(from, to []float64) float64

A DistanceFunction calculates the distance between to points.

type NeighborhoodFunction

type NeighborhoodFunction func(distance float64) float64

A NeighborhoodFunction calculates the influence [1..0] of a distance [0..1..2].

Jump to

Keyboard shortcuts

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