go-rquad alternatives and similar packages
Based on the "Data Structures" category.
Alternatively, view go-rquad alternatives based on common mentions on social networks and blogs.
-
gods
GoDS (Go Data Structures) - Sets, Lists, Stacks, Maps, Trees, Queues, and much more -
go-datastructures
A collection of useful, performant, and threadsafe Go datastructures. -
golang-set
A simple, battle-tested and generic set type for the Go language. Trusted by Docker, 1Password, Ethereum and Hashicorp. -
willf/bloom
Go package implementing Bloom filters, used by Milvus and Beego. -
roaring
Roaring bitmaps in Go (golang), used by InfluxDB, Bleve, DataDog -
gocache
☔️ A complete Go cache library that brings you multiple ways of managing your caches -
boomfilters
Probabilistic data structures for processing continuous, unbounded streams. -
gostl
Data structure and algorithm library for go, designed to provide functions similar to C++ STL -
hyperloglog
HyperLogLog with lots of sugar (Sparse, LogLog-Beta bias correction and TailCut space reduction) brought to you by Axiom -
trie
Data structure and relevant algorithms for extremely fast prefix/fuzzy string searching. -
go-geoindex
Go native library for fast point tracking and K-Nearest queries -
ttlcache
An in-memory cache with item expiration and generics [Moved to: https://github.com/jellydator/ttlcache] -
go-adaptive-radix-tree
Adaptive Radix Trees implemented in Go -
Bloomfilter
Face-meltingly fast, thread-safe, marshalable, unionable, probability- and optimal-size-calculating Bloom filter in go -
hilbert
Go package for mapping values to and from space-filling curves, such as Hilbert and Peano curves. -
goconcurrentqueue
Go concurrent-safe, goroutine-safe, thread-safe queue -
cuckoo-filter
Cuckoo Filter go implement, better than Bloom Filter, configurable and space optimized 布谷鸟过滤器的Go实现,优于布隆过滤器,可以定制化过滤器参数,并进行了空间优化 -
ring
Package ring provides a high performance and thread safe Go implementation of a bloom filter. -
set
A simple Set data structure implementation in Go (Golang) using LinkedHashMap. -
nan
Zero allocation Nullable structures in one library with handy conversion functions, marshallers and unmarshallers -
goset
Set is a useful collection but there is no built-in implementation in Go lang. -
hide
ID type with marshalling to/from hash to prevent sending IDs to clients.
Learn any GitHub repo in 59 seconds
Do you think we are missing an alternative of go-rquad or a related project?
Popular Comparisons
README
Region quadtrees in Go
Region quadtrees and efficient neighbour finding techniques in Go
Go-rquad proposes various implementations of region quadtrees.
A region quadtree is a special kind of quadtree that recursively subdivides a 2 dimensional space into 4 smaller and generally equal rectangular regions, until the wanted quadtree resolution has been reached, or no further subdivisions can be performed.
Region quadtrees can be used for image processing; in this case a leaf node represents a rectangular region of an image in which all colors are equal or the color difference is under a given threshold.
Region quadtrees may also be used to represent data fields with variable resolution. For example, the temperatures in an area may be stored as a quadtree where each leaf node stores the average temperature over the subregion it represents.
In this package, quadtrees implement the imgscan.Scanner
interface,
this provides a way to scan (i.e extract) the pixels in order to perform the subdivisions.
API Overview
Node
interface
type Node interface {
Parent() Node
Child(Quadrant) Node
Bounds() image.Rectangle
Color() Color
Location() Quadrant
}
Quadtree
interface
A Quadtree
represents a hierarchical collection of Node
s, its API is
simple: access to the root Node and a way to iterate over all the leaves.
type Quadtree interface {
ForEachLeaf(Color, func(Node))
Root() Node
}
Functions
Locate
returns the leaf node of q
that contains pt
, or nil if q
doesn't contain pt
.
func Locate(q Quadtree, pt image.Point) Node
ForEachNeighbour
calls fn
for each neighbour of n
.
func ForEachNeighbour(n Node, fn func(Node))
Basic implementation: BasicTree
and basicNode
BasicTree
is in many ways the standard implementation of Quadtree
, it just does the job.
State of the art implementation: CNTree
and CNNode
CNTree
or Cardinal Neighbour Quadtree implements state of the art techniques:
- from any given leaf node, its neighbours (of any size) are accessed in constant time 0(1) as they implement the Cardinal Neighbour Quadtree technique (cf Safwan Qasem 2015). The time complexity reduction is obtained through the addition of only four pointers per leaf node in the quadtree.
- fast point location queries (locating which leaf node contains a specific point), thanks to the binary branching method (cf Frisken Perry 2002). This simple and efficient method is nonrecursive, table free, and reduces the number of comparisons with poor predictive behavior, that are otherwise required with the standard method.
Benchmarks
Research papers
Bottom-up neighour finding technique. cf Hanan Samet 1981,
Neighbor Finding Techniques for Images Represented by Quadtrees, paperCardinal Neighbor Quadtree. cf Safwan Qasem 2015,
Cardinal Neighbor Quadtree: a New Quadtree-based Structure for Constant-Time Neighbor Finding, paperFast point location using binary branching method. cf Frisken, Perry 2002
Simple and Efficient Traversal Methods for Quadtrees and Octrees, paper
License
go-rquad is open source software distributed in accordance with the MIT License, which says:
Copyright (c) 2016 Aurélien Rainone
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*Note that all licence references and agreements mentioned in the go-rquad README section above
are relevant to that project's source code only.