Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/gnidan/knearest

Go package for getting the k-nearest (or largest, whatever) values in a list
https://github.com/gnidan/knearest

Last synced: 23 days ago
JSON representation

Go package for getting the k-nearest (or largest, whatever) values in a list

Awesome Lists containing this project

README

        

knearest
========

Go package for finding the k-nearest (or largest/smallest) values in a list.

Usage:

```go
kNearestStorable := knearest.NewKNearestStorable(11)
for _, comparison := range values {
kNearestStorable.Add(comparison)
}

kNearest := kNearestStorable.Get()
```