radix: a go radix tree with nearest matching

Related tags

Miscellaneous radix
Overview

radix Go Reference Coverall

radix implements a radix tree. The package only provides a single Tree implementation, optimized for sparse nodes.

Based on armon/go-radix, with additional optimizations and a generic version.

As a radix tree, it provides the following:

  • O(k) operations. In many cases, this can be faster than a hash table since the hash function is an O(k) operation, and hash tables have very poor cache locality.
  • Minimum / Maximum value lookups
  • Ordered iteration
  • Can walk the tree from the nearest path
  • optional case-insensitive matching
  • Concurrency-safe version
  • Generic

Example

// Create a tree
var t radix.Tree[int]
t.CaseInsensitive = true
// or thread-safe version
// var t radix.LockedTree[int]
t.Set("foo", 1)
t.Set("bar", 2)
t.Set("foobar", 2)

// Find the longest prefix match
m, _, _ := t.LongestPrefix("fOoZiP")
if m != "foo" {
    panic("should be foo")
}

Install Go with generics support (dev.typeparams)

$ go get golang.org/dl/gotip
$ gotip download dev.typeparams
Releases(v1.0.5)
Owner
Ahmed W.
Coder and gamer. VP of technology @ alpineiq.com
Ahmed W.
Print lines matching a pattern in repositories using GitHub API

gh-grep Print lines matching a pattern in repositories using GitHub API Usage $ gh grep func.*schema.Schema --include=**/*.go --owner k1LoW --repo tbl

Ken’ichiro Oyama 119 Jun 25, 2022
Shows your recent browser history in tree style. 树状展示浏览器历史 (For Edge / Chromium / Chrome)

Tree Style Histyle This extension shows your recent browser history in tree style. When you browser pages from internet, you always jump from one page

null 123 Jun 23, 2022
Tool for printing a directory tree and indicating the space it occupies.

Tool for printing a directory tree and indicating the space it occupies.

null 0 Nov 6, 2021
A versioned, snapshottable (immutable) AVL+ tree for persistent data.

IAVL+ Tree Note: Requires Go 1.13+ A versioned, snapshottable (immutable) AVL+ tree for persistent data. The purpose of this data structure is to prov

null 0 Nov 26, 2021
GoMerkle: A merkle-tree implementation in Go

GoMerkle A merkle-tree implementation in Go. Motivation: Learning Go Merkle trees are great Usage package main import ( "fmt" "github.com/anishsuja

Anish Sujanani 0 Jan 15, 2022
Provides the radix package that implements a radix tree.

go-radix Provides the radix package that implements a radix tree. The package only provides a single Tree implementation, optimized for sparse nodes.

null 0 Oct 26, 2021
watch for file changes (matching a suffix whitelist) in a directory tree and run a command when they change

watchspawn what is it? Watches for file creates and writes in and below the current directory and when any of them (matching a suffix list) change, ru

John Slee 0 Jan 16, 2022
Go native library for fast point tracking and K-Nearest queries

Geo Index Geo Index library Overview Splits the earth surface in a grid. At each cell we can store data, such as list of points, count of points, etc.

Hailo Network IP Ltd 340 May 26, 2022
A min-distance problem where it requires to find K nearest points to a specific location

Elizabeths-phaeton Elizabeths-Phaeton is a min-distance problem where it requires to find K nearest points to a specific location. Inorder to do so, w

Bardia Ardakanian 4 May 11, 2022
Pure is a fast radix-tree based HTTP router

package pure Pure is a fast radix-tree based HTTP router that sticks to the native implementations of Go's "net/http" package; in essence, keeping the

Go Playgound 126 Jun 25, 2022
An immutable radix tree implementation in Golang

go-immutable-radix Provides the iradix package that implements an immutable radix tree. The package only provides a single Tree implementation, optimi

HashiCorp 821 Jun 15, 2022
A Go implementation of a radix tree, that uses binary searches to speed up insert, retrieve and delete operations on dense trees

radixs A Go implementation of a radix tree, that uses binary searches to speed up insert, retrieve and delete operations on dense trees. This implemen

Bruno Moura 0 Feb 14, 2022
Exp-tree: go library for parsing expression tree

Vinshop expression tree Exp-tree is go library for parsing expression tree Installation go get -u github.com/vinshop/exp-tree Quick start Format Expre

VinShop 6 May 11, 2022
Multi-String Pattern Matching Algorithm Using TrieHashNode

Multi-String Pattern Matching algorithm. This implementation is inspired from Aho-Corasick algorithm Getting Started modelA = mspm.NewModel("mspm_mode

Sujit Shakya 17 Jan 23, 2022
fastme - Fast extensible matching engine Go implementation.

fastme (fast golang matching engine) library Design The library solves the task of recalculating the exchange order book. A classic matching engine co

LLC Newity 35 Jun 6, 2022
Matching Engine for Limit Order Book in Golang

Go orderbook Improved matching engine written in Go (Golang) Features Standard price-time priority Supports both market and limit orders Supports orde

Karlson Lee 272 Jun 26, 2022
Quick and easy expression matching for JSON schemas used in requests and responses

schema schema makes it easier to check if map/array structures match a certain schema. Great for testing JSON API's or validating the format of incomi

Jaap Groeneveld 17 May 12, 2022
An extremely fast Go (golang) HTTP router that supports regular expression route matching. Comes with full support for building RESTful APIs.

ozzo-routing You may consider using go-rest-api to jumpstart your new RESTful applications with ozzo-routing. Description ozzo-routing is a Go package

Ozzo Framework 438 Jun 15, 2022
agrep-like fuzzy matching, but made faster using Golang and precomputation.

goagrep There are situations where you want to take the user's input and match a primary key in a database. But, immediately a problem is introduced:

Zack 41 Nov 30, 2021
String-matching in Golang using the Knuth–Morris–Pratt algorithm (KMP)

gokmp String-matching in Golang using the Knuth–Morris–Pratt algorithm (KMP). Disclaimer This library was written as part of my Master's Thesis and sh

Patrick-Ranjit D. Madsen 38 Dec 16, 2021
Go library that provides fuzzy string matching optimized for filenames and code symbols in the style of Sublime Text, VSCode, IntelliJ IDEA et al.

Go library that provides fuzzy string matching optimized for filenames and code symbols in the style of Sublime Text, VSCode, IntelliJ IDEA et al. This library is external dependency-free. It only depends on the Go standard library.

Sahil Muthoo 1.1k Jun 26, 2022
efficient string matching in Golang via the aho-corasick algorithm.

aho-corasick Efficient string matching in Golang via the aho-corasick algorithm. x20 faster than https://github.com/cloudflare/ahocorasick and x3 fast

Petar Dambovaliev 27 Jun 9, 2022
WhatsApp Bot to auto join groups with subjects matching whitelist.

WhatsApp AutoJoin Bot Premise: My Uni uses WhatsApp for most unofficial communication during coronavirus "study from home". Naturally students share h

Anchit Bajaj 4 May 11, 2022
This is a "simple" game server. Main functionalities are matching and establishing a connection between players

Game Server This is a "simple" game server. Main functionalities are matching and establishing a connection between players How to Run? run the server

eco 7 Feb 6, 2022
Act is a task runner and supervisor with some great features like act name matching, subacts, etc. We use this in nosebit workspaces.

Act Act is a task runner and supervisor tool written in Go which aims to provide the following features: process supervision in a project level allow

Nosebit 6 May 8, 2022
A distributed fault-tolerant order book matching engine

Go - Between A distributed fault-tolerant order book matching engine. Features Limit orders Market orders Order book depth Calculate market price for

Daniel Gatis 1 Dec 24, 2021
Print lines matching a pattern in repositories using GitHub API

gh-grep Print lines matching a pattern in repositories using GitHub API Usage $ gh grep func.*schema.Schema --include=**/*.go --owner k1LoW --repo tbl

Ken’ichiro Oyama 119 Jun 25, 2022
Trade Matching / Transaction System Load Testing Solution

Load Generation System for Trade Matching Systems Operation Users select one of the following options from thew Test Management Portal: Generate a new

Traiano Welcome 1 Feb 25, 2022
A simple go tool, that calculates the allocated resources from all nodes matching the label selector.

kube-allocated-resources This is a simple go tool, that calculates the allocated resources from all nodes matching the label selector. Build Build on

Yusuf Kör 1 Jan 12, 2022