Skip to content

A Julia wrapper for Fast Library for Approximate Nearest Neighbors (FLANN)

License

Notifications You must be signed in to change notification settings

wildart/FLANN.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

63 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

FLANN.jl

A simple wrapper for FLANN, Fast Library for Approximate Nearest Neighbors. It has an interface similar to the NearestNeighbors package API.

Installation

Prerequisites for building binary dependency: gcc, cmake, liblz4.

Use the package manager to install:

pkg> add FLANN

Usage Example

using Distances
using FLANN

X = readdlm(Pkg.dir("FLANN", "test", "iris.csv"), ',')
v = X[:, 84]
k = 3
r = 10.0

idxs, dsts = knn(X, v, k, FLANNParameters())

# or

t = flann(X, FLANNParameters(), Minkowski(3))
inds, dists = knn(t, v, k)

# or

idxs, dsts = inrange(t, v, r)

# Do not forget to close index!
close(t)

TODO

  • Documentation