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 ¶
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 ¶
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 ¶
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 ¶
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 ¶
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)
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)