Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNotFound = errors.New("no path found")
)
Functions ¶
This section is empty.
Types ¶
type CostFunction ¶
type PathFinder ¶
type PathFinder struct {
// contains filtered or unexported fields
}
func NewPathFinder ¶
func NewPathFinder(start, end Point) *PathFinder
func (*PathFinder) AddConnection ¶
func (pf *PathFinder) AddConnection(from Point, cost CostFunction, to ...Point)
func (*PathFinder) BestPath ¶
func (pf *PathFinder) BestPath() ([]Point, error)
type PriorityQueue ¶ added in v0.0.5
type PriorityQueue []*PriorityQueueItem
func (PriorityQueue) Len ¶ added in v0.0.5
func (pq PriorityQueue) Len() int
func (PriorityQueue) Less ¶ added in v0.0.5
func (pq PriorityQueue) Less(i, j int) bool
func (*PriorityQueue) Pop ¶ added in v0.0.5
func (pq *PriorityQueue) Pop() interface{}
func (*PriorityQueue) Push ¶ added in v0.0.5
func (pq *PriorityQueue) Push(x interface{})
func (PriorityQueue) Swap ¶ added in v0.0.5
func (pq PriorityQueue) Swap(i, j int)
type PriorityQueueItem ¶ added in v0.0.5
type PriorityQueueItem struct {
// contains filtered or unexported fields
}
Click to show internal directories.
Click to hide internal directories.