dart_native_annoy 0.1.0+1 copy "dart_native_annoy: ^0.1.0+1" to clipboard
dart_native_annoy: ^0.1.0+1 copied to clipboard

A dart binding to native annoy library to serve pre-built Annoy index.

example/example.md

Getting Started #

import 'dart:ffi';
import 'package:dart_native_annoy/annoy.dart';

/// Creat factory from DynamicLibrary
final fac = AnnoyIndexFactory(lib: DynamicLibrary.open('libru_annoy.so'));

/// Load index
final index = indexFactory.loadIndex(
      'index.euclidean.5d.ann', 5, IndexType.Euclidean)!;

print('size: ${index.size}');

final v3 = index.getItemVector(3);

final nearest = index.getNearest(v0, 5, includeDistance: true);

To get more examples #

Go to unit test

1
likes
140
pub points
0%
popularity

Publisher

unverified uploader

A dart binding to native annoy library to serve pre-built Annoy index.

Repository (GitHub)
View/report issues

Documentation

API reference

License

MIT (license)

Dependencies

ffi

More

Packages that depend on dart_native_annoy