mutate

package
v0.0.0-...-1554a6c Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package mutate provides methods to mutate one solution candidate in order to generate neighboring solution candidates

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Flip

func Flip(state []bool) []bool

Flip produces a neighbor of state by changing the value of one bit

func Flipn

func Flipn(state []bool, n int) []bool

Flipn produces a neighbor of state by changing the value of n bits

func Gauss

func Gauss(a []float64, dev float64) []float64

Gauss returns a new vector with gaussian noise. dev is custom deviation

func Swap

func Swap(x []int) []int

Swap produces a neighbor of x by swapping two values

func SwapClose

func SwapClose(x []int) []int

SwapClose produces a neighbor of x by swapping two values that are next to each other

Types

This section is empty.

Jump to

Keyboard shortcuts

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