Documentation ¶
Index ¶
- Constants
- Variables
- func AssertEqual(t *testing.T, a, b interface{})
- func AssertEqualWithinError(t *testing.T, a, b, c float64)
- func AssertFalse(t *testing.T, a bool)
- func AssertNoPanic(t *testing.T)
- func AssertNotEqual(t *testing.T, a, b interface{})
- func AssertPanic(t *testing.T)
- func AssertTrue(t *testing.T, a bool)
- func CopyBinarySearchTree(oldTree *BinarySearchTree, selfBalancing bool)
- func DegToRad(x float64) float64
- func FeetPerSecondToMetersPerSecond(feetPerSecond float64) float64
- func FeetToMeters(feet float64) float64
- func FootPoundsToNewtonMeters(footPound float64) float64
- func KilogramsToPounds(kilograms float64) float64
- func KilogramsToSlugs(kilograms float64) float64
- func MetersPerSecondToFeetPerSecond(metersPerSecond float64) float64
- func MetersToFeet(meters float64) float64
- func NewtonMetersToFootPounds(newtonMeters float64) float64
- func NewtonsToPounds(newtons float64) float64
- func PoundsToKilograms(pound float64) float64
- func PoundsToNewtons(pound float64) float64
- func RadToDeg(x float64) float64
- func ReverseSlice(s []interface{})
- func SliceContains(container []interface{}, containee interface{}) bool
- func SlugsToKilograms(slugs float64) float64
- type BinarySearchTree
- func (b *BinarySearchTree) Clear()
- func (b *BinarySearchTree) Contains(comparable Comparable) bool
- func (b *BinarySearchTree) GetHeight() int
- func (b *BinarySearchTree) GetMaximum() Comparable
- func (b *BinarySearchTree) GetMinimum() Comparable
- func (b *BinarySearchTree) GetRoot() Comparable
- func (b *BinarySearchTree) GetSize() int
- func (b *BinarySearchTree) InOrderIterator() *TreeIterator
- func (b *BinarySearchTree) Insert(comparable Comparable) bool
- func (b *BinarySearchTree) IsEmpty() bool
- func (b *BinarySearchTree) IsSelfBalancing() bool
- func (b *BinarySearchTree) Iterator() *TreeIterator
- func (b *BinarySearchTree) Remove(comparable Comparable) bool
- func (b *BinarySearchTree) RemoveMaximum() Comparable
- func (b *BinarySearchTree) RemoveMinimum() Comparable
- func (b *BinarySearchTree) ReverseOrderIterator() *TreeIterator
- func (b *BinarySearchTree) SetSelfBalancing(selfBalancing bool)
- type Comparable
- type Listener
- type Node
- type TreeIterator
Constants ¶
View Source
const FOOT_POUND_TO_NEWTON_METER float64 = 0.7375621
View Source
const FOOT_TO_METER float64 = 0.0254 * 12.0
View Source
const KILOGRAM_TO_POUND float64 = 1.0 / POUND_TO_KILOGRAM
View Source
const KILOGRAM_TO_SLUG float64 = 1.0 / SLUG_TO_KILOGRAM
View Source
const METER_TO_FOOT float64 = 1.0 / FOOT_TO_METER
View Source
const NEWTON_METER_TO_FOOT_POUND float64 = 1.0 / FOOT_POUND_TO_NEWTON_METER
View Source
const NEWTON_TO_POUND float64 = 1.0 / POUND_TO_NEWTON
View Source
const POUND_TO_KILOGRAM float64 = 0.45359237
View Source
const POUND_TO_NEWTON float64 = 4.448222
View Source
const SLUG_TO_KILOGRAM float64 = 14.5939029
Variables ¶
View Source
var Epsilon = 0.5
Functions ¶
func AssertEqual ¶
func AssertEqualWithinError ¶
func AssertFalse ¶
func AssertNoPanic ¶
func AssertNotEqual ¶
func AssertPanic ¶
func AssertTrue ¶
func CopyBinarySearchTree ¶
func CopyBinarySearchTree(oldTree *BinarySearchTree, selfBalancing bool)
func FeetToMeters ¶
func KilogramsToPounds ¶
func KilogramsToSlugs ¶
func MetersToFeet ¶
func NewtonsToPounds ¶
func PoundsToKilograms ¶
func PoundsToNewtons ¶
func ReverseSlice ¶
func ReverseSlice(s []interface{})
func SliceContains ¶
func SliceContains(container []interface{}, containee interface{}) bool
func SlugsToKilograms ¶
Types ¶
type BinarySearchTree ¶
type BinarySearchTree struct { Root *Node // contains filtered or unexported fields }
func NewBinarySearchTree ¶
func NewBinarySearchTree(selfBalancing bool) *BinarySearchTree
func (*BinarySearchTree) Clear ¶
func (b *BinarySearchTree) Clear()
func (*BinarySearchTree) Contains ¶
func (b *BinarySearchTree) Contains(comparable Comparable) bool
func (*BinarySearchTree) GetHeight ¶
func (b *BinarySearchTree) GetHeight() int
func (*BinarySearchTree) GetMaximum ¶
func (b *BinarySearchTree) GetMaximum() Comparable
func (*BinarySearchTree) GetMinimum ¶
func (b *BinarySearchTree) GetMinimum() Comparable
func (*BinarySearchTree) GetRoot ¶
func (b *BinarySearchTree) GetRoot() Comparable
func (*BinarySearchTree) GetSize ¶
func (b *BinarySearchTree) GetSize() int
func (*BinarySearchTree) InOrderIterator ¶
func (b *BinarySearchTree) InOrderIterator() *TreeIterator
func (*BinarySearchTree) Insert ¶
func (b *BinarySearchTree) Insert(comparable Comparable) bool
func (*BinarySearchTree) IsEmpty ¶
func (b *BinarySearchTree) IsEmpty() bool
func (*BinarySearchTree) IsSelfBalancing ¶
func (b *BinarySearchTree) IsSelfBalancing() bool
func (*BinarySearchTree) Iterator ¶
func (b *BinarySearchTree) Iterator() *TreeIterator
func (*BinarySearchTree) Remove ¶
func (b *BinarySearchTree) Remove(comparable Comparable) bool
func (*BinarySearchTree) RemoveMaximum ¶
func (b *BinarySearchTree) RemoveMaximum() Comparable
func (*BinarySearchTree) RemoveMinimum ¶
func (b *BinarySearchTree) RemoveMinimum() Comparable
func (*BinarySearchTree) ReverseOrderIterator ¶
func (b *BinarySearchTree) ReverseOrderIterator() *TreeIterator
func (*BinarySearchTree) SetSelfBalancing ¶
func (b *BinarySearchTree) SetSelfBalancing(selfBalancing bool)
type Comparable ¶
type Comparable interface {
CompareTo(Comparable) int
}
type Node ¶
type Node struct { Data Comparable Parent *Node Left *Node Right *Node }
func NewNode ¶
func NewNode(comparable Comparable, parent, left, right *Node) *Node
func (*Node) CountNodesInTree ¶
func (*Node) IsLeftChild ¶
func (*Node) NewTreeIterator ¶
func (n *Node) NewTreeIterator(ascending bool) *TreeIterator
type TreeIterator ¶
type TreeIterator struct { NodeQueue []*Node // contains filtered or unexported fields }
func (*TreeIterator) AssembleQueue ¶
func (iter *TreeIterator) AssembleQueue(n *Node, ascending bool)
func (*TreeIterator) HasNext ¶
func (iter *TreeIterator) HasNext() bool
func (*TreeIterator) Next ¶
func (iter *TreeIterator) Next() Comparable
Source Files ¶
Click to show internal directories.
Click to hide internal directories.