Documentation ¶
Index ¶
- Variables
- func ByteComparator(a, b interface{}) int
- func Float32Comparator(a, b interface{}) int
- func Float64Comparator(a, b interface{}) int
- func Hash(p interface{}) uintptr
- func Int16Comparator(a, b interface{}) int
- func Int32Comparator(a, b interface{}) int
- func Int64Comparator(a, b interface{}) int
- func Int8Comparator(a, b interface{}) int
- func IntComparator(aAsserted, bAsserted int) int
- func RuneComparator(a, b interface{}) int
- func StringComparator(s1, s2 string) int
- func TimeComparator(a, b interface{}) int
- func UInt16Comparator(a, b interface{}) int
- func UInt32Comparator(aAsserted, bAsserted uint32) int
- func UInt64Comparator(a, b interface{}) int
- func UInt8Comparator(a, b interface{}) int
- func UIntComparator(a, b interface{}) int
- type Comparator
- type Container
- type Hashable
- type Map
- type Serializer
- type Set
- type UInt32Slice
Constants ¶
This section is empty.
Variables ¶
var ErrFatalAddress = errors.New("fatal address")
var ErrIndexOutOfRange = errors.New("index out of range")
var Logger = log.NewWithHandle("container::log", log.DiscardHandler())
var TypeByte = reflect.TypeOf(byte(0))
var TypeFloat32 = reflect.TypeOf(float32(0))
var TypeFloat64 = reflect.TypeOf(float64(0))
var TypeInt = reflect.TypeOf(int(0))
var TypeInt16 = reflect.TypeOf(int16(0))
var TypeInt32 = reflect.TypeOf(int32(0))
var TypeInt64 = reflect.TypeOf(int64(0))
var TypeInt8 = reflect.TypeOf(int8(0))
var TypeRune = reflect.TypeOf(rune(0))
var TypeString = reflect.TypeOf(string(""))
var TypeTime = reflect.TypeOf(time.Time{})
var TypeUInt = reflect.TypeOf(uint(0))
var TypeUInt16 = reflect.TypeOf(uint16(0))
var TypeUInt64 = reflect.TypeOf(uint64(0))
var TypeUInt8 = reflect.TypeOf(uint8(0))
Functions ¶
func ByteComparator ¶
func ByteComparator(a, b interface{}) int
ByteComparator provides a basic comparison on byte
func Float32Comparator ¶
func Float32Comparator(a, b interface{}) int
Float32Comparator provides a basic comparison on float32
func Float64Comparator ¶
func Float64Comparator(a, b interface{}) int
Float64Comparator provides a basic comparison on float64
func Int16Comparator ¶
func Int16Comparator(a, b interface{}) int
Int16Comparator provides a basic comparison on int16
func Int32Comparator ¶
func Int32Comparator(a, b interface{}) int
Int32Comparator provides a basic comparison on int32
func Int64Comparator ¶
func Int64Comparator(a, b interface{}) int
Int64Comparator provides a basic comparison on int64
func Int8Comparator ¶
func Int8Comparator(a, b interface{}) int
Int8Comparator provides a basic comparison on int8
func IntComparator ¶
IntComparator provides a basic comparison on int
func RuneComparator ¶
func RuneComparator(a, b interface{}) int
RuneComparator provides a basic comparison on rune
func StringComparator ¶
StringComparator provides a fast comparison on strings
func TimeComparator ¶
func TimeComparator(a, b interface{}) int
TimeComparator provides a basic comparison on time.Time
func UInt16Comparator ¶
func UInt16Comparator(a, b interface{}) int
UInt16Comparator provides a basic comparison on uint16
func UInt32Comparator ¶
UInt32Comparator provides a basic comparison on uint32
func UInt64Comparator ¶
func UInt64Comparator(a, b interface{}) int
UInt64Comparator provides a basic comparison on uint64
func UInt8Comparator ¶
func UInt8Comparator(a, b interface{}) int
UInt8Comparator provides a basic comparison on uint8
func UIntComparator ¶
func UIntComparator(a, b interface{}) int
UIntComparator provides a basic comparison on uint
Types ¶
type Comparator ¶
type Comparator func(a, b interface{}) int
Comparator will make type assertion (see IntComparator for example), which will panic if a or b are not of the asserted type.
Should return a number:
negative , if a < b zero , if a == b positive , if a > b
type Container ¶
type Container interface { Empty() bool Size() int Clear() Serializer }
type Serializer ¶
type UInt32Slice ¶
type UInt32Slice []uint32
func (UInt32Slice) Len ¶
func (p UInt32Slice) Len() int
func (UInt32Slice) Less ¶
func (p UInt32Slice) Less(i, j int) bool
func (UInt32Slice) Swap ¶
func (p UInt32Slice) Swap(i, j int)
Directories ¶
Path | Synopsis |
---|---|
Package redblacktree implements a red-black tree.
|
Package redblacktree implements a red-black tree. |
Package treemap implements a map backed by red-black Tree.
|
Package treemap implements a map backed by red-black Tree. |
example
Package treemap implements a map backed by red-black Tree.
|
Package treemap implements a map backed by red-black Tree. |
Package treeset implements a Tree backed by a red-black Tree.
|
Package treeset implements a Tree backed by a red-black Tree. |
example
Package treeset implements a Tree backed by a red-black Tree.
|
Package treeset implements a Tree backed by a red-black Tree. |