An open API service providing package, version and dependency metadata of many open source software ecosystems and registries.

Top 3.4% on proxy.golang.org
Top 0.5% dependent packages on proxy.golang.org
Top 0.5% dependent repos on proxy.golang.org
Top 8.9% forks on proxy.golang.org

proxy.golang.org : github.com/xtgo/set

Package set implements type-safe, non-allocating algorithms that operate on ordered sets. Most functions take a data parameter of type sort.Interface and a pivot parameter of type int; data represents two sets covering the ranges [0:pivot] and [pivot:Len], each of which is expected to be sorted and free of duplicates. sort.Sort may be used for sorting, and Uniq may be used to filter away duplicates. All mutating functions swap elements as necessary from the two input sets to form a single output set, returning its size: the output set will be in the range [0:size], and will be in sorted order and free of duplicates. Elements which were moved into the range [size:Len] will have undefined order and may contain duplicates. All pivots must be in the range [0:Len]. A panic may occur when invalid pivots are passed into any of the functions. Convenience functions exist for slices of int, float64, and string element types, and also serve as examples for implementing utility functions for other types. Elements will be considered equal if `!Less(i,j) && !Less(j,i)`. An implication of this is that NaN values are equal to each other.

Registry - Source - Documentation - JSON
purl: pkg:golang/github.com/xtgo/set
License: BSD-2-Clause
Latest release: over 7 years ago
First release: over 7 years ago
Namespace: github.com/xtgo
Dependent packages: 99
Dependent repositories: 143
Stars: 167 on GitHub
Forks: 4 on GitHub
See more repository details: repos.ecosyste.ms
Last synced: 27 days ago

    Loading...
    Readme
    Loading...