digit

package
v0.2.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 10, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Overview

Package digit

Package digit

Package digit

Package digit

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Contain

func Contain(x interface{}, y []interface{}) bool

Contain checks if x exists in a slice and returns TRUE if x is found.

func ContainFloat64

func ContainFloat64(x float64, y []float64) bool

ContainFloat64 checks if x exists in []float64s and returns TRUE if x is found.

func ContainInt

func ContainInt(x int, y []int) bool

ContainInt checks if x exists in []ints and returns TRUE if x is found.

func ContainInt8

func ContainInt8(x int8, y []int8) bool

ContainInt8 checks if x exists in []int8s and returns TRUE if x is found.

func ContainInt16

func ContainInt16(x int16, y []int16) bool

ContainInt16 checks if x exists in []int16s and returns TRUE if x is found.

func ContainInt32

func ContainInt32(x int32, y []int32) bool

ContainInt32 checks if x exists in []int32s and returns TRUE if x is found.

func ContainInt64

func ContainInt64(x int64, y []int64) bool

ContainInt64 checks if x exists in []int64s and returns TRUE if x is found.

func ContainUint

func ContainUint(x uint, y []uint) bool

ContainUint checks if x exists in []uints and returns TRUE if x is found.

func ContainUint8

func ContainUint8(x uint8, y []uint8) bool

ContainUint8 checks if x exists in []uint8s and returns TRUE if x is found.

func ContainUint16

func ContainUint16(x uint16, y []uint16) bool

ContainUint16 checks if x exists in []uint16s and returns TRUE if x is found.

func ContainUint32

func ContainUint32(x uint32, y []uint32) bool

ContainUint32 checks if x exists in []uint32s and returns TRUE if x is found.

func ContainUint64

func ContainUint64(x uint64, y []uint64) bool

ContainUint64 checks if x exists in []uint64s and returns TRUE if x is found.

func SearchInt8s

func SearchInt8s(a []int8, x int8) int

SearchInt8s searches for x in a sorted slice of int8s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func SearchInt16s

func SearchInt16s(a []int16, x int16) int

SearchInt16s searches for x in a sorted slice of int16s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func SearchInt32s

func SearchInt32s(a []int32, x int32) int

SearchInt32s searches for x in a sorted slice of int32s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func SearchInt64s

func SearchInt64s(a []int64, x int64) int

SearchInt64s searches for x in a sorted slice of int64s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func SearchUint8s

func SearchUint8s(a []uint8, x uint8) int

SearchUint8s searches for x in a sorted slice of uint8s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func SearchUint16s

func SearchUint16s(a []uint16, x uint16) int

SearchUints searches for x in a sorted slice of uint16s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func SearchUint32s

func SearchUint32s(a []uint32, x uint32) int

SearchUint32s searches for x in a sorted slice of uint32s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func SearchUint64s

func SearchUint64s(a []uint64, x uint64) int

SearchUint64s searches for x in a sorted slice of uint64s and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func SearchUints

func SearchUints(a []uint, x uint) int

SearchUints searches for x in a sorted slice of uints and returns the index as specified by Search. The return value is the index to insert x if x is not present (it could be len(a)). The slice must be sorted in ascending order.

func UniqueFloat64s

func UniqueFloat64s(a []float64) []float64

UniqueFloat64s takes an input slice of float64s and returns a new slice of float64s without duplicate values.

func UniqueInt8s

func UniqueInt8s(a []int8) []int8

UniqueInt8s takes an input slice of int8s and returns a new slice of int8s without duplicate values.

func UniqueInt16s

func UniqueInt16s(a []int16) []int16

UniqueInt16s takes an input slice of int16s and returns a new slice of int16s without duplicate values.

func UniqueInt32s

func UniqueInt32s(a []int32) []int32

UniqueInt32s takes an input slice of int32s and returns a new slice of int32s without duplicate values.

func UniqueInt64s

func UniqueInt64s(a []int64) []int64

UniqueInt64s takes an input slice of int64s and returns a new slice of int64s without duplicate values.

func UniqueInts

func UniqueInts(a []int) []int

UniqueInts takes an input slice of ints and returns a new slice of ints without duplicate values.

func UniqueUint8s

func UniqueUint8s(a []uint8) []uint8

UniqueUint8s takes an input slice of uint8s and returns a new slice of uint8s without duplicate values.

func UniqueUint16s

func UniqueUint16s(a []uint16) []uint16

UniqueUint16s takes an input slice of uint16s and returns a new slice of uint16s without duplicate values.

func UniqueUint32s

func UniqueUint32s(a []uint32) []uint32

UniqueUint32s takes an input slice of uint32s and returns a new slice of uint32s without duplicate values.

func UniqueUint64s

func UniqueUint64s(a []uint64) []uint64

UniqueUint64s takes an input slice of uint64s and returns a new slice of uint64s without duplicate values.

func UniqueUints

func UniqueUints(a []uint) []uint

UniqueUints takes an input slice of uints and returns a new slice of uints without duplicate values.

Types

type Int8Slice

type Int8Slice []int8

Int8Slice attaches the methods of Interface to []int8, sorting a increasing order.

func (Int8Slice) Len

func (p Int8Slice) Len() int

func (Int8Slice) Less

func (p Int8Slice) Less(i, j int) bool

func (Int8Slice) Search

func (p Int8Slice) Search(x int8) int

Search returns the result of applying SearchInts to the receiver and x.

func (Int8Slice) Sort

func (p Int8Slice) Sort()

Sort is a convenience method.

func (Int8Slice) Swap

func (p Int8Slice) Swap(i, j int)

type Int16Slice

type Int16Slice []int16

Int16Slice attaches the methods of Interface to []int16, sorting a increasing order.

func (Int16Slice) Len

func (p Int16Slice) Len() int

func (Int16Slice) Less

func (p Int16Slice) Less(i, j int) bool

func (Int16Slice) Search

func (p Int16Slice) Search(x int16) int

Search returns the result of applying SearchInts to the receiver and x.

func (Int16Slice) Sort

func (p Int16Slice) Sort()

Sort is a convenience method.

func (Int16Slice) Swap

func (p Int16Slice) Swap(i, j int)

type Int32Slice

type Int32Slice []int32

Int32Slice attaches the methods of Interface to []int32, sorting a increasing order.

func (Int32Slice) Len

func (p Int32Slice) Len() int

func (Int32Slice) Less

func (p Int32Slice) Less(i, j int) bool

func (Int32Slice) Search

func (p Int32Slice) Search(x int32) int

Search returns the result of applying SearchInts to the receiver and x.

func (Int32Slice) Sort

func (p Int32Slice) Sort()

Sort is a convenience method.

func (Int32Slice) Swap

func (p Int32Slice) Swap(i, j int)

type Int64Slice

type Int64Slice []int64

Int64Slice attaches the methods of Interface to []int64, sorting a increasing order.

func (Int64Slice) Len

func (p Int64Slice) Len() int

func (Int64Slice) Less

func (p Int64Slice) Less(i, j int) bool

func (Int64Slice) Search

func (p Int64Slice) Search(x int64) int

Search returns the result of applying SearchInts to the receiver and x.

func (Int64Slice) Sort

func (p Int64Slice) Sort()

Sort is a convenience method.

func (Int64Slice) Swap

func (p Int64Slice) Swap(i, j int)

type Uint8Slice

type Uint8Slice []uint8

Uint8Slice attaches the methods of Interface to []uint8, sorting a increasing order.

func (Uint8Slice) Len

func (p Uint8Slice) Len() int

func (Uint8Slice) Less

func (p Uint8Slice) Less(i, j int) bool

func (Uint8Slice) Search

func (p Uint8Slice) Search(x uint8) int

Search returns the result of applying SearchInts to the receiver and x.

func (Uint8Slice) Sort

func (p Uint8Slice) Sort()

Sort is a convenience method.

func (Uint8Slice) Swap

func (p Uint8Slice) Swap(i, j int)

type Uint16Slice

type Uint16Slice []uint16

Uint16Slice attaches the methods of Interface to []uint16, sorting a increasing order.

func (Uint16Slice) Len

func (p Uint16Slice) Len() int

func (Uint16Slice) Less

func (p Uint16Slice) Less(i, j int) bool

func (Uint16Slice) Search

func (p Uint16Slice) Search(x uint16) int

Search returns the result of applying SearchInts to the receiver and x.

func (Uint16Slice) Sort

func (p Uint16Slice) Sort()

Sort is a convenience method.

func (Uint16Slice) Swap

func (p Uint16Slice) Swap(i, j int)

type Uint32Slice

type Uint32Slice []uint32

Uint32Slice attaches the methods of Interface to []uint, sorting a increasing order.

func (Uint32Slice) Len

func (p Uint32Slice) Len() int

func (Uint32Slice) Less

func (p Uint32Slice) Less(i, j int) bool

func (Uint32Slice) Search

func (p Uint32Slice) Search(x uint32) int

Search returns the result of applying SearchInts to the receiver and x.

func (Uint32Slice) Sort

func (p Uint32Slice) Sort()

Sort is a convenience method.

func (Uint32Slice) Swap

func (p Uint32Slice) Swap(i, j int)

type Uint64Slice

type Uint64Slice []uint64

Uint64Slice attaches the methods of Interface to []uint64, sorting a increasing order.

func (Uint64Slice) Len

func (p Uint64Slice) Len() int

func (Uint64Slice) Less

func (p Uint64Slice) Less(i, j int) bool

func (Uint64Slice) Search

func (p Uint64Slice) Search(x uint64) int

Search returns the result of applying SearchInts to the receiver and x.

func (Uint64Slice) Sort

func (p Uint64Slice) Sort()

Sort is a convenience method.

func (Uint64Slice) Swap

func (p Uint64Slice) Swap(i, j int)

type UintSlice

type UintSlice []uint

UintSlice attaches the methods of Interface to []uint, sorting a increasing order.

func (UintSlice) Len

func (p UintSlice) Len() int

func (UintSlice) Less

func (p UintSlice) Less(i, j int) bool

func (UintSlice) Search

func (p UintSlice) Search(x uint) int

Search returns the result of applying SearchInts to the receiver and x.

func (UintSlice) Sort

func (p UintSlice) Sort()

Sort is a convenience method.

func (UintSlice) Swap

func (p UintSlice) Swap(i, j int)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL