AnnoyIndexFactory constructor

AnnoyIndexFactory(
  1. DynamicLibrary _lib
)

Implementation

AnnoyIndexFactory(this._lib) {
  _loadAnnoyIndex = _lib.lookupFunction<LoadAnnoyIndexNative, LoadAnnoyIndex>(
      'load_annoy_index');
  _freeAnnoyIndex = _lib.lookupFunction<FreeAnnoyIndexNative, FreeAnnoyIndex>(
      'free_annoy_index');
  _getDimension =
      _lib.lookupFunction<GetDimensionNative, GetDimension>('get_dimension');
  _getSize = _lib.lookupFunction<GetSizeNative, GetSize>('get_size');
  _getItemVector = _lib
      .lookupFunction<GetItemVectorNative, GetItemVector>('get_item_vector');
  _getNearest =
      _lib.lookupFunction<GetNearestNative, GetNearest>('get_nearest');
  _getNearestToItem =
      _lib.lookupFunction<GetNearestToItemNative, GetNearestToItem>(
          'get_nearest_to_item');
  _freeSearchResult =
      _lib.lookupFunction<FreeSearchResultNative, FreeSearchResult>(
          'free_search_result');
  _getResultCount = _lib.lookupFunction<GetResultCountNative, GetResultCount>(
      'get_result_count');
  _getIdList = _lib.lookupFunction<GetIdListNative, GetIdList>('get_id_list');
  _getDistanceList =
      _lib.lookupFunction<GetDistanceListNative, GetDistanceList>(
          'get_distance_list');
}