Giter Club home page Giter Club logo

vecgo's Introduction

๐Ÿงฌ๐Ÿ”๐Ÿ—„๏ธ Vecgo

Build Status Go Reference goreportcard License: MIT

Vecgo is a Go library designed for efficient vector indexing and searching, supporting various index types and emphasizing approximate nearest neighbor search. It provides a versatile and user-friendly interface for managing and querying vast collections of high-dimensional vectors.

โš ๏ธ This is experimental and subject to breaking changes.

Features

  • Support for multiple index types, including flat and HNSW (Hierarchical Navigable Small World) algorithms.
  • Customizable options for memory usage and search performance.
  • Efficient handling of high-dimensional vectors.
  • Embeddable vector store for seamless integration with Go applications.

Usage

Here's a basic example demonstrating how to perform nearest neighbor search with Vecgo:

package main

import (
	"fmt"
	"log"

	"github.com/hupe1980/vecgo"
)

func main() {
	vg := vecgo.NewHNSW[string]()
	// vg := vecgo.NewFlat[string]()

	_, err := vg.Insert(vecgo.VectorWithData[string]{
		Vector: []float32{1.0, 2.0, 2.5},
		Data:   "Hello World!",
	})
	if err != nil {
		log.Fatal(err)
	}

	k := 5
	
	result, err := vg.KNNSearch([]float32{1.0, 2.0, 2.5}, k)
	if err != nil {
		log.Fatal(err)
	}

	fmt.Println(result[0].Data)
}

For more information on each method, please refer to the GoDoc documentation.

Contributing

Contributions to Vecgo are welcome! Feel free to open issues for bug reports, feature requests, or submit pull requests with improvements.

License

Vecgo is licensed under the MIT License. See the LICENSE file for details.

vecgo's People

Contributors

hupe1980 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.