Documentation ¶
Index ¶
- Constants
- func AppendIntfArgs(args []interface{}, moreArgs ...interface{}) []interface{}
- func AsUint16Slice(v ...uint16) []uint16
- func BitCountToMaxDecimalCount(bitLen int) int
- func CeilingPowerOfTwo(x uint) uint
- func DurationFixedLen(d time.Duration, expectedLen int) string
- func FromGrey(g uint) uint
- func GCDListInt(min, a int, b ...int) int
- func GCDListInt64(min, a int64, b ...int64) int64
- func GCDListUint64(min, a uint64, b ...uint64) uint64
- func GreatestCommonDivisor(a, b int) int
- func GreatestCommonDivisorInt64(a, b int64) int64
- func GreatestCommonDivisorUint64(a, b uint64) uint64
- func Grey(v uint) uint
- func GreyInc(v uint) uint
- func GreyIncBit(v uint) uint8
- func IsNil(v interface{}) bool
- func IsPowerOfTwo(x uint) bool
- func LazyFmt(format string, a ...interface{}) fmt.Stringer
- func LazyStr(fn func() string) fmt.Stringer
- func LazyTimeFmt(format string, t time.Time) fmt.Stringer
- func Prime(i int) int
- type PrimeList
- type ShuffleFunc
Constants ¶
View Source
const MaxPrime = 65581
View Source
const PrimeCount = 6550
Variables ¶
This section is empty.
Functions ¶
func AppendIntfArgs ¶
func AppendIntfArgs(args []interface{}, moreArgs ...interface{}) []interface{}
func AsUint16Slice ¶
func DurationFixedLen ¶
NB! "µs" require 3 bytes, not 2 bytes, hence the difference with "ms" on a number of decimal positions
func GCDListInt ¶
func GCDListInt64 ¶
func GCDListUint64 ¶
func GreatestCommonDivisor ¶
func GreyInc ¶
Gives a grey-code increment for the given binary. Result always has only one non-zero bit. The following is always true: Grey(v) ^ GreyInc(v) == Grey(v + 1)
func GreyIncBit ¶
Returns a bit (offset) that will change in grey-code equivalent of v on incrementing it The following is always true: 1<<GreyIncBit(v) == GreyInc(v)
Types ¶
type PrimeList ¶
type PrimeList struct {
// contains filtered or unexported fields
}
func IsolatedOddPrimes ¶
func IsolatedOddPrimes() PrimeList
type ShuffleFunc ¶
Click to show internal directories.
Click to hide internal directories.