Documentation ¶
Index ¶
- func ArrayCopy(arrsrc []interface{}, lowsrc int, arrdest []interface{}, lowdest, size int)
- func EvaluateMin(a, b interface{}, comp goutils.TypeComparator) interface{}
- func FindMaxMinElementIndex(arr []interface{}, comp goutils.TypeComparator, low, high int) (interface{}, interface{})
- func GetMaxIndex(arr []interface{}, comp goutils.TypeComparator, i, j int) int
- func GetMinIndex(arr []interface{}, comp goutils.TypeComparator, i, j int) int
- func HighestPowerofTwoLessThan(n int) int
- func IsPowerOfTwo(x int) (bool, int)
- func IsSorted(arr []interface{}, comp goutils.TypeComparator, low, high int) bool
- func Permute(arr []interface{}, comp goutils.TypeComparator, low, high int)
- func Reverse(arr []interface{}, low, high int)
- func SetPowerOfTwo(x uint) int
- func Shuffle(arr []interface{}, comp goutils.TypeComparator, low, high int)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EvaluateMin ¶
func EvaluateMin(a, b interface{}, comp goutils.TypeComparator) interface{}
return min between a, b
func FindMaxMinElementIndex ¶
func FindMaxMinElementIndex(arr []interface{}, comp goutils.TypeComparator, low, high int) (interface{}, interface{})
Returns the max_min element in arr[0..size-1]
func GetMaxIndex ¶
func GetMaxIndex(arr []interface{}, comp goutils.TypeComparator, i, j int) int
Return max index
func GetMinIndex ¶
func GetMinIndex(arr []interface{}, comp goutils.TypeComparator, i, j int) int
Return min index
func HighestPowerofTwoLessThan ¶
return the highest number less than N that is power of 2
func IsSorted ¶
func IsSorted(arr []interface{}, comp goutils.TypeComparator, low, high int) bool
verify is Sorted
func Permute ¶
func Permute(arr []interface{}, comp goutils.TypeComparator, low, high int)
Generate permutation in the array
func Shuffle ¶
func Shuffle(arr []interface{}, comp goutils.TypeComparator, low, high int)
Generate random permutation in the array
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.