algorithms

package module
v0.0.0-...-d456db9 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Amplitude

type Amplitude struct {
	Graph    s.Graph_t
	Solution s.Path_t
}

func (Amplitude) Solve

func (a Amplitude) Solve() (s.Path_t, error)

First in amplitude

type Astar

type Astar struct {
	Graph    s.Graph_t
	Solution s.Path_t
}

func (Astar) Solve

func (a Astar) Solve() (s.Path_t, error)

Dijkstra's algorithm

type Bnb

type Bnb struct {
	Graph    s.Graph_t
	Solution s.Path_t
}

func (Bnb) Solve

func (a Bnb) Solve() (s.Path_t, error)

Branch and bounds depth first search The algorithm checks if a node has already been visited before exploring it

type Dfs

type Dfs struct {
	Graph    s.Graph_t
	Solution s.Path_t
}

func (Dfs) Solve

func (a Dfs) Solve(max_depth int) (s.Path_t, error)

Depth first search. Set max depth to -1 for no limit.

type Dijkstra

type Dijkstra struct {
	Graph    s.Graph_t
	Solution s.Path_t
}

func (Dijkstra) Solve

func (a Dijkstra) Solve() (s.Path_t, error)

Dijkstra's algorithm

type IDAstar

type IDAstar struct {
	Graph    s.Graph_t
	Solution s.Path_t
}

func (IDAstar) Solve

func (a IDAstar) Solve(max_depth int) (s.Path_t, error)

IDA star search. Set max depth to -1 for no limit.

type IterativeSolver

type IterativeSolver interface {
	Solve(max_depth int) (s.Path_t, error)
}

type Solver

type Solver interface {
	Solve() (s.Path_t, error)
}

Each algorithm will implement the solver interface

Jump to

Keyboard shortcuts

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