Documentation
¶
Index ¶
- func Float32BiComp(a, b float32) uint8
- func Float64BiComp(a, b float64) uint8
- func Int16BiComp(a, b int16) uint8
- func Int32BiComp(a, b int32) uint8
- func Int64BiComp(a, b int64) uint8
- func Int8BiComp(a, b int8) uint8
- func IntBiComp(a, b int) uint8
- func Uint16BiComp(a, b uint16) uint8
- func Uint32BiComp(a, b uint32) uint8
- func Uint64BiComp(a, b uint64) uint8
- func Uint8BiComp(a, b uint8) uint8
- func UintBiComp(a, b uint) uint8
- type Int32Vec
- func (v *Int32Vec) BiInsert(value int32, cmp func(a, b int32) uint8)
- func (v Int32Vec) BiSearch(value int32, cmp func(a, b int32) uint8) (int, bool)
- func (v *Int32Vec) Clear()
- func (v Int32Vec) Clone() Int32Vec
- func (v *Int32Vec) Extend(amount int)
- func (v *Int32Vec) Filter(filter func(e int32) bool)
- func (v Int32Vec) Find(find func(e int32) bool) (idx int, res int32)
- func (v Int32Vec) ForEach(con func(i int, e int32) int32)
- func (v *Int32Vec) Insert(idx int, val ...int32)
- func (v Int32Vec) Last() int32
- func (v Int32Vec) Len() int
- func (v Int32Vec) Move(old, new int)
- func (v *Int32Vec) Pop() int32
- func (v *Int32Vec) PopFront() int32
- func (v *Int32Vec) Remove(idx int) (val int32)
- func (v *Int32Vec) RemoveSlice(start, end int)
- func (v *Int32Vec) Resize(size int)
- func (v Int32Vec) Reverse()
- func (v Int32Vec) Rewrite(o Int32Vec, idx int)
- func (v Int32Vec) Sort(buff []int, comp func(a, pivot int32) bool) []int
- func (v Int32Vec) Swap(a, b int)
- func (v *Int32Vec) Truncate(l int)
- type IntVec
- func (v *IntVec) BiInsert(value int, cmp func(a, b int) uint8)
- func (v IntVec) BiSearch(value int, cmp func(a, b int) uint8) (int, bool)
- func (v *IntVec) Clear()
- func (v IntVec) Clone() IntVec
- func (v *IntVec) Extend(amount int)
- func (v *IntVec) Filter(filter func(e int) bool)
- func (v IntVec) Find(find func(e int) bool) (idx int, res int)
- func (v IntVec) ForEach(con func(i int, e int) int)
- func (v *IntVec) Insert(idx int, val ...int)
- func (v IntVec) Last() int
- func (v IntVec) Len() int
- func (v IntVec) Move(old, new int)
- func (v *IntVec) Pop() int
- func (v *IntVec) PopFront() int
- func (v *IntVec) Remove(idx int) (val int)
- func (v *IntVec) RemoveSlice(start, end int)
- func (v *IntVec) Resize(size int)
- func (v IntVec) Reverse()
- func (v IntVec) Rewrite(o IntVec, idx int)
- func (v IntVec) Sort(buff []int, comp func(a, pivot int) bool) []int
- func (v IntVec) Swap(a, b int)
- func (v *IntVec) Truncate(l int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Float32BiComp ¶
func Float64BiComp ¶
func Int16BiComp ¶
func Int32BiComp ¶
func Int64BiComp ¶
func Int8BiComp ¶
func Uint16BiComp ¶
func Uint32BiComp ¶
func Uint64BiComp ¶
func Uint8BiComp ¶
func UintBiComp ¶
Types ¶
type Int32Vec ¶
type Int32Vec []int32
Int32Vec is a standard Vector type with utility methods
func (*Int32Vec) BiInsert ¶
BiInsert inserts inserts value in a way that keebuff vec sorted, binary search is used to determinate where to insert
func (Int32Vec) BiSearch ¶
BiSearch performs a binary search on Ves assuming it is sorted. cmp consumer should return 0 if a == b equal, 1 if a > b and 2 if b > a, even if value wos not found it returns it returns closest index and false. If Int32Vec is empty -1 and false is returned
func (*Int32Vec) Extend ¶
Extend extends vec size by amount so then len(Int32Vec) = len(Int32Vec) + amount
func (Int32Vec) Find ¶
Find returns first element for which find returns true along with index, if there is none, index equals -1
func (Int32Vec) ForEach ¶
ForEach is a standard foreach method. Its shortcut for modifying all elements
func (*Int32Vec) RemoveSlice ¶
RemoveSlice removes sequence of slice
type IntVec ¶
type IntVec []int
IntVec is a standard Vector type with utility methods
func (*IntVec) BiInsert ¶
BiInsert inserts inserts value in a way that keebuff vec sorted, binary search is used to determinate where to insert
func (IntVec) BiSearch ¶
BiSearch performs a binary search on Ves assuming it is sorted. cmp consumer should return 0 if a == b equal, 1 if a > b and 2 if b > a, even if value wos not found it returns it returns closest index and false. If IntVec is empty -1 and false is returned
func (*IntVec) Extend ¶
Extend extends vec size by amount so then len(IntVec) = len(IntVec) + amount
func (IntVec) Find ¶
Find returns first element for which find returns true along with index, if there is none, index equals -1
func (IntVec) ForEach ¶
ForEach is a standard foreach method. Its shortcut for modifying all elements
func (*IntVec) RemoveSlice ¶
RemoveSlice removes sequence of slice