adt

package
v0.0.0-...-8b14abe Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MinPartitionWidth  float64 = 3.0
	MinPartitionHeight float64 = 3.0
)

Could go elsewhere...

View Source
const (
	Closed uint = iota
	SemiOpen
	Open
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BSPNode

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

func (BSPNode) Area

func (node BSPNode) Area() geom.Rectangle

func (BSPNode) Left

func (node BSPNode) Left() BSPNode

func (BSPNode) Right

func (node BSPNode) Right() BSPNode

func (BSPNode) Traversability

func (node BSPNode) Traversability() uint

type BSPTree

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

func InitBSPTree

func InitBSPTree(initialArea geom.Rectangle, partitions []geom.Point) BSPTree

func (BSPTree) Depth

func (tree BSPTree) Depth() uint

func (BSPTree) RandomizeTraversability

func (tree BSPTree) RandomizeTraversability(openFunc, closeFunc func(float64) bool)

Randomizes the traversability of nodes in a BSPTree.

func (BSPTree) Root

func (tree BSPTree) Root() BSPNode

type Barrier

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

func InitBarrier

func InitBarrier(startClosed bool) Barrier

func (*Barrier) Close

func (b *Barrier) Close()

func (*Barrier) Open

func (b *Barrier) Open()

func (*Barrier) Wait

func (b *Barrier) Wait()

type PriorityQueue

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

func (*PriorityQueue) Clear

func (pq *PriorityQueue) Clear()

func (*PriorityQueue) Extract

func (pq *PriorityQueue) Extract() (interface{}, float64)

func (*PriorityQueue) Insert

func (pq *PriorityQueue) Insert(newItem interface{}, newPriority float64)

func (PriorityQueue) IsEmpty

func (pq PriorityQueue) IsEmpty() bool

func (PriorityQueue) Peek

func (pq PriorityQueue) Peek() (interface{}, float64)

func (PriorityQueue) Size

func (pq PriorityQueue) Size() int

type Stack

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

This stack is not thread-safe (all it needs is a mutex w/ locks and deferred unlocks).

func (*Stack) Clear

func (s *Stack) Clear()

func (Stack) IsEmpty

func (s Stack) IsEmpty() bool

func (Stack) Peek

func (s Stack) Peek() interface{}

func (*Stack) Pop

func (s *Stack) Pop() interface{}

func (*Stack) Push

func (s *Stack) Push(item interface{})

func (Stack) Size

func (s Stack) Size() int

Jump to

Keyboard shortcuts

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