ant

package
v0.0.0-...-f9d0531 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: GPL-3.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Compare

func Compare(fn string)

Compare used to show time difference between Ant algorithm and Brute algorithm.

func SearchBrute

func SearchBrute(w [][]int) []int

SearchBrute used to perform brute algorithm.

Types

type Ant

type Ant struct {
	// contains filtered or unexported fields
}

Ant used to represent sigle ant in colony.

type Colony

type Colony struct {
	// contains filtered or unexported fields
}

Colony used to represent ants' environment.

func CreateCol

func CreateCol(w [][]int) *Colony

CreateCol used to create Ants' colony.

func (*Colony) CreateAnt

func (c *Colony) CreateAnt(pos int) *Ant

CreateAnt used to create single Ant for Ant algorithm.

func (*Colony) SearchAnt

func (c *Colony) SearchAnt(d int) []int

SearchAnt used to perform Ant algorithm for given colony in d days.

Jump to

Keyboard shortcuts

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