Documentation ¶
Index ¶
- type APlanner
- func (p APlanner) CreatePlan(current common.State, desired common.State, profiles map[string]common.Profile) []planner.Action
- func (p APlanner) ExecutePlan(state common.State, plan []planner.Action)
- func (p APlanner) Stop()
- func (p APlanner) TriggerEffect(current common.State, profiles map[string]common.Profile)
- type Item
- type Node
- type PriorityQueue
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APlanner ¶
type APlanner struct {
// contains filtered or unexported fields
}
APlanner represent a planner using the A* algorithm.
func NewAPlanner ¶
NewAPlanner initializes a new planner.
func (APlanner) CreatePlan ¶
func (APlanner) ExecutePlan ¶
type Item ¶
type Item struct {
// contains filtered or unexported fields
}
Item represents an entity in the queue.
type Node ¶
type Node struct {
// contains filtered or unexported fields
}
Node within a state graph.
func (*Node) StringRepresentation ¶ added in v0.2.0
StringRepresentation generates a representation of the node's value.
type PriorityQueue ¶
type PriorityQueue []*Item
PriorityQueue is a min priority queue.
func (PriorityQueue) Len ¶
func (queue PriorityQueue) Len() int
Len returns the length of the queue.
func (PriorityQueue) Less ¶
func (queue PriorityQueue) Less(i, j int) bool
Less determines an item with the lowest priority.
func (*PriorityQueue) Pop ¶
func (queue *PriorityQueue) Pop() interface{}
Pop returns item with the lowest priority from the queue.
func (*PriorityQueue) Push ¶
func (queue *PriorityQueue) Push(x interface{})
Push adds an item to the queue.
func (PriorityQueue) Swap ¶
func (queue PriorityQueue) Swap(i, j int)
Swap swaps to items in the queue.
Click to show internal directories.
Click to hide internal directories.