search

package module
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 11, 2022 License: BSL-1.0 Imports: 2 Imported by: 0

README

idxsearch

Go Reference Go Report Card

About

idxsearch is a package for Go providing indexed binary search for slices of basic type. It is published on https://github.com/vbsw/golib/idxsearch and https://gitlab.com/vbsw/golib/idxsearch.

Copyright 2022, Vitali Baumtrok (vbsw@mailbox.org).

idxsearch is distributed under the Boost Software License, version 1.0. (See accompanying file LICENSE or copy at http://www.boost.org/LICENSE_1_0.txt)

idxsearch is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the Boost Software License for more details.

References

Documentation

Overview

Package search provides the "binary search" function for slices of basic types.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Bool

func Bool(list []bool, indices []int, element bool) (int, bool)

Bool searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and sorted from false to true.

func BoolDesc

func BoolDesc(list []bool, indices []int, element bool) (int, bool)

BoolDesc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and sorted from true to false.

func BoolRng

func BoolRng(list []bool, indices []int, element bool) (int, int, bool)

BoolRng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be sorted from false to true.

func BoolRngDesc

func BoolRngDesc(list []bool, indices []int, element bool) (int, int, bool)

BoolRngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be sorted from true to false.

func Byte

func Byte(list []byte, indices []int, element byte) (int, bool)

Byte searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func ByteDesc

func ByteDesc(list []byte, indices []int, element byte) (int, bool)

ByteDesc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func ByteRng

func ByteRng(list []byte, indices []int, element byte) (int, int, bool)

ByteRng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func ByteRngDesc

func ByteRngDesc(list []byte, indices []int, element byte) (int, int, bool)

ByteRngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Complex128

func Complex128(list []complex128, indices []int, element complex128) (int, bool)

Complex128 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Complex128Desc

func Complex128Desc(list []complex128, indices []int, element complex128) (int, bool)

Complex128Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func Complex128Rng

func Complex128Rng(list []complex128, indices []int, element complex128) (int, int, bool)

Complex128Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func Complex128RngDesc

func Complex128RngDesc(list []complex128, indices []int, element complex128) (int, int, bool)

Complex128RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Complex64

func Complex64(list []complex64, indices []int, element complex64) (int, bool)

Complex64 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Complex64Desc

func Complex64Desc(list []complex64, indices []int, element complex64) (int, bool)

Complex64Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func Complex64Rng

func Complex64Rng(list []complex64, indices []int, element complex64) (int, int, bool)

Complex64Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func Complex64RngDesc

func Complex64RngDesc(list []complex64, indices []int, element complex64) (int, int, bool)

Complex64RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Float32

func Float32(list []float32, indices []int, element float32) (int, bool)

Float32 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Float32Desc

func Float32Desc(list []float32, indices []int, element float32) (int, bool)

Float32Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func Float32Rng

func Float32Rng(list []float32, indices []int, element float32) (int, int, bool)

Float32Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func Float32RngDesc

func Float32RngDesc(list []float32, indices []int, element float32) (int, int, bool)

Float32RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Float64

func Float64(list []float64, indices []int, element float64) (int, bool)

Float64 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Float64Desc

func Float64Desc(list []float64, indices []int, element float64) (int, bool)

Float64Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func Float64Rng

func Float64Rng(list []float64, indices []int, element float64) (int, int, bool)

Float64Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func Float64RngDesc

func Float64RngDesc(list []float64, indices []int, element float64) (int, int, bool)

Float64RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Int

func Int(list []int, indices []int, element int) (int, bool)

Int searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Int16

func Int16(list []int16, indices []int, element int16) (int, bool)

Int16 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Int16Desc

func Int16Desc(list []int16, indices []int, element int16) (int, bool)

Int16Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func Int16Rng

func Int16Rng(list []int16, indices []int, element int16) (int, int, bool)

Int16Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func Int16RngDesc

func Int16RngDesc(list []int16, indices []int, element int16) (int, int, bool)

Int16RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Int32

func Int32(list []int32, indices []int, element int32) (int, bool)

Int32 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Int32Desc

func Int32Desc(list []int32, indices []int, element int32) (int, bool)

Int32Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func Int32Rng

func Int32Rng(list []int32, indices []int, element int32) (int, int, bool)

Int32Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func Int32RngDesc

func Int32RngDesc(list []int32, indices []int, element int32) (int, int, bool)

Int32RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Int64

func Int64(list []int64, indices []int, element int64) (int, bool)

Int64 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Int64Desc

func Int64Desc(list []int64, indices []int, element int64) (int, bool)

Int64Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func Int64Rng

func Int64Rng(list []int64, indices []int, element int64) (int, int, bool)

Int64Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func Int64RngDesc

func Int64RngDesc(list []int64, indices []int, element int64) (int, int, bool)

Int64RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Int8

func Int8(list []int8, indices []int, element int8) (int, bool)

Int8 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func Int8Desc

func Int8Desc(list []int8, indices []int, element int8) (int, bool)

Int8Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func Int8Rng

func Int8Rng(list []int8, indices []int, element int8) (int, int, bool)

Int8Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func Int8RngDesc

func Int8RngDesc(list []int8, indices []int, element int8) (int, int, bool)

Int8RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func IntDesc

func IntDesc(list []int, indices []int, element int) (int, bool)

IntDesc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func IntRng

func IntRng(list []int, indices []int, element int) (int, int, bool)

IntRng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func IntRngDesc

func IntRngDesc(list []int, indices []int, element int) (int, int, bool)

IntRngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Pointer

func Pointer(list []unsafe.Pointer, indices []int, element unsafe.Pointer) (int, bool)

Pointer searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func PointerDesc

func PointerDesc(list []unsafe.Pointer, indices []int, element unsafe.Pointer) (int, bool)

PointerDesc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func PointerRng

func PointerRng(list []unsafe.Pointer, indices []int, element unsafe.Pointer) (int, int, bool)

PointerRng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func PointerRngDesc

func PointerRngDesc(list []unsafe.Pointer, indices []int, element unsafe.Pointer) (int, int, bool)

PointerRngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func Rune

func Rune(list []rune, indices []int, element rune) (int, bool)

Rune searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func RuneDesc

func RuneDesc(list []rune, indices []int, element rune) (int, bool)

RuneDesc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func RuneRng

func RuneRng(list []rune, indices []int, element rune) (int, int, bool)

RuneRng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func RuneRngDesc

func RuneRngDesc(list []rune, indices []int, element rune) (int, int, bool)

RuneRngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func String

func String(list []string, indices []int, element string) (int, bool)

String searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func StringDesc

func StringDesc(list []string, indices []int, element string) (int, bool)

StringDesc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func StringOff

func StringOff(list []string, indices []int, element string, offset int) (int, bool)

StringOff searches elements in list starting at offset matching element, i.e. list[i][offset:offset+len(element)] == element. Returns start and end index, i.e. start <= i < end. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order regarding offset.

func StringOffDesc

func StringOffDesc(list []string, indices []int, element string, offset int) (int, bool)

StringOffDesc searches elements in list starting at offset matching element, i.e. list[i][offset:offset+len(element)] == element. Returns start and end index, i.e. start <= i < end. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order regarding offset.

func StringPfx

func StringPfx(list []string, indices []int, element string) (int, bool)

StringPfx searches element in list by prefix and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique by prefix and in ascending order.

func StringPfxDesc

func StringPfxDesc(list []string, indices []int, element string) (int, bool)

StringPfxDesc searches element in list by prefix and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique by prefix and in descending order.

func StringPfxOff

func StringPfxOff(list []string, indices []int, element string, offset int) (int, bool)

StringPfxOff searches elements in list by prefix starting at offset matching element, i.e. HasPrefix(list[i][offset:offset+len(element)], element). Returns start and end index, i.e. start <= i < end. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique by prefix and in ascending order, both regarding offset.

func StringPfxOffDesc

func StringPfxOffDesc(list []string, indices []int, element string, offset int) (int, bool)

StringPfxOffDesc searches elements in list by prefix starting at offset matching element, i.e. HasPrefix(list[i][offset:offset+len(element)], element). Returns start and end index, i.e. start <= i < end. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique by prefix and in descending order, both regarding offset.

func StringPfxRngOff

func StringPfxRngOff(list []string, indices []int, element string, offset int) (int, int, bool)

StringPfxRngOff searches elements in list starting at offset matching element, i.e. HasPrefix(list[i][offset:offset+len(element)], element). Returns start and end index, i.e. start <= i < end. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order regarding offset.

func StringPfxRngOffDesc

func StringPfxRngOffDesc(list []string, indices []int, element string, offset int) (int, int, bool)

StringPfxRngOffDesc searches elements in list starting at offset matching element, i.e. HasPrefix(list[i][offset:offset+len(element)], element). Returns start and end index, i.e. start <= i < end. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order regarding offset.

func StringRng

func StringRng(list []string, indices []int, element string) (int, int, bool)

StringRng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func StringRngDesc

func StringRngDesc(list []string, indices []int, element string) (int, int, bool)

StringRngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func StringRngOff

func StringRngOff(list []string, indices []int, element string, offset int) (int, int, bool)

StringRngOff searches elements in list starting at offset matching element, i.e. list[i][offset:offset+len(element)] == element. Returns start and end index, i.e. start <= i < end. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order regarding offset.

func StringRngOffDesc

func StringRngOffDesc(list []string, indices []int, element string, offset int) (int, int, bool)

StringRngOffDesc searches elements in list starting at offset matching element, i.e. list[i][offset:offset+len(element)] == element. Returns start and end index, i.e. start <= i < end. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order regarding offset.

func UInt

func UInt(list []uint, indices []int, element uint) (int, bool)

UInt searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func UInt16

func UInt16(list []uint16, indices []int, element uint16) (int, bool)

UInt16 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func UInt16Desc

func UInt16Desc(list []uint16, indices []int, element uint16) (int, bool)

UInt16Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func UInt16Rng

func UInt16Rng(list []uint16, indices []int, element uint16) (int, int, bool)

UInt16Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func UInt16RngDesc

func UInt16RngDesc(list []uint16, indices []int, element uint16) (int, int, bool)

UInt16RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func UInt32

func UInt32(list []uint32, indices []int, element uint32) (int, bool)

UInt32 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func UInt32Desc

func UInt32Desc(list []uint32, indices []int, element uint32) (int, bool)

UInt32Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func UInt32Rng

func UInt32Rng(list []uint32, indices []int, element uint32) (int, int, bool)

UInt32Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func UInt32RngDesc

func UInt32RngDesc(list []uint32, indices []int, element uint32) (int, int, bool)

UInt32RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func UInt64

func UInt64(list []uint64, indices []int, element uint64) (int, bool)

UInt64 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func UInt64Desc

func UInt64Desc(list []uint64, indices []int, element uint64) (int, bool)

UInt64Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func UInt64Rng

func UInt64Rng(list []uint64, indices []int, element uint64) (int, int, bool)

UInt64Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func UInt64RngDesc

func UInt64RngDesc(list []uint64, indices []int, element uint64) (int, int, bool)

UInt64RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func UInt8

func UInt8(list []uint8, indices []int, element uint8) (int, bool)

UInt8 searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func UInt8Desc

func UInt8Desc(list []uint8, indices []int, element uint8) (int, bool)

UInt8Desc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func UInt8Rng

func UInt8Rng(list []uint8, indices []int, element uint8) (int, int, bool)

UInt8Rng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func UInt8RngDesc

func UInt8RngDesc(list []uint8, indices []int, element uint8) (int, int, bool)

UInt8RngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func UIntDesc

func UIntDesc(list []uint, indices []int, element uint) (int, bool)

UIntDesc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func UIntPtr

func UIntPtr(list []uintptr, indices []int, element uintptr) (int, bool)

UIntPtr searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in ascending order.

func UIntPtrDesc

func UIntPtrDesc(list []uintptr, indices []int, element uintptr) (int, bool)

UIntPtrDesc searches element in list and returns its index. Second return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be unique and in descending order.

func UIntPtrRng

func UIntPtrRng(list []uintptr, indices []int, element uintptr) (int, int, bool)

UIntPtrRng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func UIntPtrRngDesc

func UIntPtrRngDesc(list []uintptr, indices []int, element uintptr) (int, int, bool)

UIntPtrRngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

func UIntRng

func UIntRng(list []uint, indices []int, element uint) (int, int, bool)

UIntRng searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in ascending order.

func UIntRngDesc

func UIntRngDesc(list []uint, indices []int, element uint) (int, int, bool)

UIntRngDesc searches element in list and returns matching start and end index. Start index is inclusive, end index is exclusive. Third return value is true, if element is in list, otherwise false and the index returned is the insert index. Elements in list must be in descending order.

Types

This section is empty.

Jump to

Keyboard shortcuts

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