slice_utils

package
v0.0.0-...-6b870f6 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2014 License: BSD-2-Clause Imports: 1 Imported by: 0

Documentation

Overview

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author: anupam.kapoor@gmail.com (Anupam Kapoor)

this package implements a bunch of convenience routines for working with slices.

this file implements slice-comparison routines.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Author: anupam.kapoor@gmail.com (Anupam Kapoor)

this package implements a bunch of convenience routines for working with slices.

this file implements slice-sorting routines

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CmpInt32Slice

func CmpInt32Slice(x, y *[]int32) bool

this function returns true if two int32 slices are equal i.e. for all i, x[i] == y[i] and 0 <= i < len(x)

func CmpIntSlice

func CmpIntSlice(x, y *[]int) bool

this function returns true if two int slices are equal i.e. for all i, x[i] == y[i] and 0 <= i < len(x)

func CmpStringSlice

func CmpStringSlice(x, y *[]string) bool

this function returns true if two string slices are equal i.e. for all i, x[i] == y[i] and 0 <= i < len(x)

func RelaxedCmpInt32Slice

func RelaxedCmpInt32Slice(x, y *[]int32) bool

this function returns true if two int32 slices contain the same values but at different locations. slices are considered unequal if the number of elements are not equal i.e. len(x) != len(y)

func RelaxedCmpStringSlice

func RelaxedCmpStringSlice(x, y *[]string) bool

this function returns true if two string slices contain the same values but at different locations. slices are considered unequal if the number of elements are not equal i.e. len(x) != len(y)

func SortInt32Slice

func SortInt32Slice(x *[]int32)

sort int32 slice

Types

type Int32Slice

type Int32Slice []int32

[]int32 slice sort interface

func (Int32Slice) Len

func (x Int32Slice) Len() int

func (Int32Slice) Less

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

func (Int32Slice) Swap

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

Jump to

Keyboard shortcuts

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