This repository has been archived by the owner on Jul 29, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathannoyindex.go
1082 lines (947 loc) · 42.2 KB
/
annoyindex.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 4.0.1
*
* This file is not intended to be easily readable and contains a number of
* coding conventions designed to improve portability and efficiency. Do not make
* changes to this file unless you know what you are doing--modify the SWIG
* interface file instead.
* ----------------------------------------------------------------------------- */
// source: src/annoygomodule.i
package annoyindex
/*
#define intgo swig_intgo
typedef void *swig_voidp;
#include <stdint.h>
typedef long long intgo;
typedef unsigned long long uintgo;
typedef struct { char *p; intgo n; } _gostring_;
typedef struct { void* array; intgo len; intgo cap; } _goslice_;
typedef _goslice_ swig_type_1;
typedef _gostring_ swig_type_2;
typedef _gostring_ swig_type_3;
typedef _gostring_ swig_type_4;
typedef _gostring_ swig_type_5;
typedef _goslice_ swig_type_6;
typedef _goslice_ swig_type_7;
typedef _gostring_ swig_type_8;
typedef _goslice_ swig_type_9;
typedef _gostring_ swig_type_10;
typedef _gostring_ swig_type_11;
typedef _gostring_ swig_type_12;
typedef _gostring_ swig_type_13;
typedef _goslice_ swig_type_14;
typedef _goslice_ swig_type_15;
typedef _gostring_ swig_type_16;
extern void _wrap_Swig_free_annoyindex_acf5c19c77666e85(uintptr_t arg1);
extern uintptr_t _wrap_Swig_malloc_annoyindex_acf5c19c77666e85(swig_intgo arg1);
extern void _wrap_delete_AnnoyIndex_annoyindex_acf5c19c77666e85(uintptr_t arg1);
extern void _wrap_AnnoyIndex_addItem_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_intgo arg2, swig_type_1 arg3);
extern void _wrap_AnnoyIndex_build_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_intgo arg2);
extern _Bool _wrap_AnnoyIndex_save__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_type_2 arg2, _Bool arg3);
extern _Bool _wrap_AnnoyIndex_save__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_type_3 arg2);
extern void _wrap_AnnoyIndex_unload_annoyindex_acf5c19c77666e85(uintptr_t arg1);
extern _Bool _wrap_AnnoyIndex_load__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_type_4 arg2, _Bool arg3);
extern _Bool _wrap_AnnoyIndex_load__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_type_5 arg2);
extern float _wrap_AnnoyIndex_getDistance_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_intgo arg2, swig_intgo arg3);
extern void _wrap_AnnoyIndex_getNnsByItem__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_intgo arg2, swig_intgo arg3, swig_intgo arg4, swig_voidp arg5, swig_voidp arg6);
extern void _wrap_AnnoyIndex_getNnsByVector__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_type_6 arg2, swig_intgo arg3, swig_intgo arg4, swig_voidp arg5, swig_voidp arg6);
extern void _wrap_AnnoyIndex_getNnsByItem__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_intgo arg2, swig_intgo arg3, swig_intgo arg4, swig_voidp arg5);
extern void _wrap_AnnoyIndex_getNnsByVector__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_type_7 arg2, swig_intgo arg3, swig_intgo arg4, swig_voidp arg5);
extern swig_intgo _wrap_AnnoyIndex_getNItems_annoyindex_acf5c19c77666e85(uintptr_t arg1);
extern void _wrap_AnnoyIndex_verbose_annoyindex_acf5c19c77666e85(uintptr_t arg1, _Bool arg2);
extern void _wrap_AnnoyIndex_getItem_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_intgo arg2, swig_voidp arg3);
extern _Bool _wrap_AnnoyIndex_onDiskBuild_annoyindex_acf5c19c77666e85(uintptr_t arg1, swig_type_8 arg2);
extern uintptr_t _wrap_new_AnnoyIndex_annoyindex_acf5c19c77666e85(void);
extern uintptr_t _wrap_new_AnnoyIndexAngular_annoyindex_acf5c19c77666e85(swig_intgo arg1);
extern void _wrap_delete_AnnoyIndexAngular_annoyindex_acf5c19c77666e85(uintptr_t arg1);
extern void _wrap_AnnoyIndexAngular_addItem_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_type_9 arg2);
extern void _wrap_AnnoyIndexAngular_build_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1);
extern _Bool _wrap_AnnoyIndexAngular_save__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_10 arg1, _Bool arg2);
extern _Bool _wrap_AnnoyIndexAngular_save__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_11 arg1);
extern void _wrap_AnnoyIndexAngular_unload_annoyindex_acf5c19c77666e85(uintptr_t _swig_base);
extern _Bool _wrap_AnnoyIndexAngular_load__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_12 arg1, _Bool arg2);
extern _Bool _wrap_AnnoyIndexAngular_load__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_13 arg1);
extern float _wrap_AnnoyIndexAngular_getDistance_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2);
extern void _wrap_AnnoyIndexAngular_getNnsByItem__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4, swig_voidp arg5);
extern void _wrap_AnnoyIndexAngular_getNnsByItem__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4);
extern void _wrap_AnnoyIndexAngular_getNnsByVector__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_14 arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4, swig_voidp arg5);
extern void _wrap_AnnoyIndexAngular_getNnsByVector__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_15 arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4);
extern swig_intgo _wrap_AnnoyIndexAngular_getNItems_annoyindex_acf5c19c77666e85(uintptr_t _swig_base);
extern void _wrap_AnnoyIndexAngular_verbose_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, _Bool arg1);
extern void _wrap_AnnoyIndexAngular_getItem_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_voidp arg2);
extern _Bool _wrap_AnnoyIndexAngular_onDiskBuild_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_16 arg1);
extern uintptr_t _wrap_new_AnnoyIndexEuclidean_annoyindex_acf5c19c77666e85(swig_intgo arg1);
extern void _wrap_delete_AnnoyIndexEuclidean_annoyindex_acf5c19c77666e85(uintptr_t arg1);
extern void _wrap_AnnoyIndexEuclidean_addItem_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_type_9 arg2);
extern void _wrap_AnnoyIndexEuclidean_build_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1);
extern _Bool _wrap_AnnoyIndexEuclidean_save__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_10 arg1, _Bool arg2);
extern _Bool _wrap_AnnoyIndexEuclidean_save__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_11 arg1);
extern void _wrap_AnnoyIndexEuclidean_unload_annoyindex_acf5c19c77666e85(uintptr_t _swig_base);
extern _Bool _wrap_AnnoyIndexEuclidean_load__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_12 arg1, _Bool arg2);
extern _Bool _wrap_AnnoyIndexEuclidean_load__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_13 arg1);
extern float _wrap_AnnoyIndexEuclidean_getDistance_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2);
extern void _wrap_AnnoyIndexEuclidean_getNnsByItem__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4, swig_voidp arg5);
extern void _wrap_AnnoyIndexEuclidean_getNnsByItem__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4);
extern void _wrap_AnnoyIndexEuclidean_getNnsByVector__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_14 arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4, swig_voidp arg5);
extern void _wrap_AnnoyIndexEuclidean_getNnsByVector__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_15 arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4);
extern swig_intgo _wrap_AnnoyIndexEuclidean_getNItems_annoyindex_acf5c19c77666e85(uintptr_t _swig_base);
extern void _wrap_AnnoyIndexEuclidean_verbose_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, _Bool arg1);
extern void _wrap_AnnoyIndexEuclidean_getItem_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_voidp arg2);
extern _Bool _wrap_AnnoyIndexEuclidean_onDiskBuild_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_16 arg1);
extern uintptr_t _wrap_new_AnnoyIndexManhattan_annoyindex_acf5c19c77666e85(swig_intgo arg1);
extern void _wrap_delete_AnnoyIndexManhattan_annoyindex_acf5c19c77666e85(uintptr_t arg1);
extern void _wrap_AnnoyIndexManhattan_addItem_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_type_9 arg2);
extern void _wrap_AnnoyIndexManhattan_build_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1);
extern _Bool _wrap_AnnoyIndexManhattan_save__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_10 arg1, _Bool arg2);
extern _Bool _wrap_AnnoyIndexManhattan_save__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_11 arg1);
extern void _wrap_AnnoyIndexManhattan_unload_annoyindex_acf5c19c77666e85(uintptr_t _swig_base);
extern _Bool _wrap_AnnoyIndexManhattan_load__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_12 arg1, _Bool arg2);
extern _Bool _wrap_AnnoyIndexManhattan_load__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_13 arg1);
extern float _wrap_AnnoyIndexManhattan_getDistance_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2);
extern void _wrap_AnnoyIndexManhattan_getNnsByItem__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4, swig_voidp arg5);
extern void _wrap_AnnoyIndexManhattan_getNnsByItem__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4);
extern void _wrap_AnnoyIndexManhattan_getNnsByVector__SWIG_0_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_14 arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4, swig_voidp arg5);
extern void _wrap_AnnoyIndexManhattan_getNnsByVector__SWIG_1_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_15 arg1, swig_intgo arg2, swig_intgo arg3, swig_voidp arg4);
extern swig_intgo _wrap_AnnoyIndexManhattan_getNItems_annoyindex_acf5c19c77666e85(uintptr_t _swig_base);
extern void _wrap_AnnoyIndexManhattan_verbose_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, _Bool arg1);
extern void _wrap_AnnoyIndexManhattan_getItem_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_intgo arg1, swig_voidp arg2);
extern _Bool _wrap_AnnoyIndexManhattan_onDiskBuild_annoyindex_acf5c19c77666e85(uintptr_t _swig_base, swig_type_16 arg1);
#undef intgo
*/
import "C"
import "unsafe"
import _ "runtime/cgo"
import "sync"
type _ unsafe.Pointer
var Swig_escape_always_false bool
var Swig_escape_val interface{}
type _swig_fnptr *byte
type _swig_memberptr *byte
type _ sync.Mutex
func Swig_free(arg1 uintptr) {
_swig_i_0 := arg1
C._wrap_Swig_free_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0))
}
func Swig_malloc(arg1 int) (_swig_ret uintptr) {
var swig_r uintptr
_swig_i_0 := arg1
swig_r = (uintptr)(C._wrap_Swig_malloc_annoyindex_acf5c19c77666e85(C.swig_intgo(_swig_i_0)))
return swig_r
}
type SwigcptrAnnoyIndex uintptr
func (p SwigcptrAnnoyIndex) Swigcptr() uintptr {
return (uintptr)(p)
}
func (p SwigcptrAnnoyIndex) SwigIsAnnoyIndex() {
}
func DeleteAnnoyIndex(arg1 AnnoyIndex) {
_swig_i_0 := arg1.Swigcptr()
C._wrap_delete_AnnoyIndex_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0))
}
func (arg1 SwigcptrAnnoyIndex) AddItem(arg2 int, arg3 []float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
C._wrap_AnnoyIndex_addItem_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1), *(*C.swig_type_1)(unsafe.Pointer(&_swig_i_2)))
if Swig_escape_always_false {
Swig_escape_val = arg3
}
}
func (arg1 SwigcptrAnnoyIndex) Build(arg2 int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_AnnoyIndex_build_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1))
}
func (arg1 SwigcptrAnnoyIndex) Save__SWIG_0(arg2 string, arg3 bool) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
swig_r = (bool)(C._wrap_AnnoyIndex_save__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), *(*C.swig_type_2)(unsafe.Pointer(&_swig_i_1)), C._Bool(_swig_i_2)))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
return swig_r
}
func (arg1 SwigcptrAnnoyIndex) Save__SWIG_1(arg2 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndex_save__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), *(*C.swig_type_3)(unsafe.Pointer(&_swig_i_1))))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
return swig_r
}
func (p SwigcptrAnnoyIndex) Save(a ...interface{}) bool {
argc := len(a)
if argc == 1 {
return p.Save__SWIG_1(a[0].(string))
}
if argc == 2 {
return p.Save__SWIG_0(a[0].(string), a[1].(bool))
}
panic("No match for overloaded function call")
}
func (arg1 SwigcptrAnnoyIndex) Unload() {
_swig_i_0 := arg1
C._wrap_AnnoyIndex_unload_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0))
}
func (arg1 SwigcptrAnnoyIndex) Load__SWIG_0(arg2 string, arg3 bool) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
swig_r = (bool)(C._wrap_AnnoyIndex_load__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), *(*C.swig_type_4)(unsafe.Pointer(&_swig_i_1)), C._Bool(_swig_i_2)))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
return swig_r
}
func (arg1 SwigcptrAnnoyIndex) Load__SWIG_1(arg2 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndex_load__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), *(*C.swig_type_5)(unsafe.Pointer(&_swig_i_1))))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
return swig_r
}
func (p SwigcptrAnnoyIndex) Load(a ...interface{}) bool {
argc := len(a)
if argc == 1 {
return p.Load__SWIG_1(a[0].(string))
}
if argc == 2 {
return p.Load__SWIG_0(a[0].(string), a[1].(bool))
}
panic("No match for overloaded function call")
}
func (arg1 SwigcptrAnnoyIndex) GetDistance(arg2 int, arg3 int) (_swig_ret float32) {
var swig_r float32
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
swig_r = (float32)(C._wrap_AnnoyIndex_getDistance_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2)))
return swig_r
}
func (arg1 SwigcptrAnnoyIndex) GetNnsByItem__SWIG_0(arg2 int, arg3 int, arg4 int, arg5 *[]int, arg6 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
_swig_i_5 := arg6
C._wrap_AnnoyIndex_getNnsByItem__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_intgo(_swig_i_3), C.swig_voidp(_swig_i_4), C.swig_voidp(_swig_i_5))
}
func (arg1 SwigcptrAnnoyIndex) GetNnsByVector__SWIG_0(arg2 []float32, arg3 int, arg4 int, arg5 *[]int, arg6 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
_swig_i_5 := arg6
C._wrap_AnnoyIndex_getNnsByVector__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), *(*C.swig_type_6)(unsafe.Pointer(&_swig_i_1)), C.swig_intgo(_swig_i_2), C.swig_intgo(_swig_i_3), C.swig_voidp(_swig_i_4), C.swig_voidp(_swig_i_5))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (arg1 SwigcptrAnnoyIndex) GetNnsByItem__SWIG_1(arg2 int, arg3 int, arg4 int, arg5 *[]int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
C._wrap_AnnoyIndex_getNnsByItem__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_intgo(_swig_i_3), C.swig_voidp(_swig_i_4))
}
func (p SwigcptrAnnoyIndex) GetNnsByItem(a ...interface{}) {
argc := len(a)
if argc == 4 {
p.GetNnsByItem__SWIG_1(a[0].(int), a[1].(int), a[2].(int), a[3].(*[]int))
return
}
if argc == 5 {
p.GetNnsByItem__SWIG_0(a[0].(int), a[1].(int), a[2].(int), a[3].(*[]int), a[4].(*[]float32))
return
}
panic("No match for overloaded function call")
}
func (arg1 SwigcptrAnnoyIndex) GetNnsByVector__SWIG_1(arg2 []float32, arg3 int, arg4 int, arg5 *[]int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
C._wrap_AnnoyIndex_getNnsByVector__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), *(*C.swig_type_7)(unsafe.Pointer(&_swig_i_1)), C.swig_intgo(_swig_i_2), C.swig_intgo(_swig_i_3), C.swig_voidp(_swig_i_4))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (p SwigcptrAnnoyIndex) GetNnsByVector(a ...interface{}) {
argc := len(a)
if argc == 4 {
p.GetNnsByVector__SWIG_1(a[0].([]float32), a[1].(int), a[2].(int), a[3].(*[]int))
return
}
if argc == 5 {
p.GetNnsByVector__SWIG_0(a[0].([]float32), a[1].(int), a[2].(int), a[3].(*[]int), a[4].(*[]float32))
return
}
panic("No match for overloaded function call")
}
func (arg1 SwigcptrAnnoyIndex) GetNItems() (_swig_ret int) {
var swig_r int
_swig_i_0 := arg1
swig_r = (int)(C._wrap_AnnoyIndex_getNItems_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0)))
return swig_r
}
func (arg1 SwigcptrAnnoyIndex) Verbose(arg2 bool) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_AnnoyIndex_verbose_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), C._Bool(_swig_i_1))
}
func (arg1 SwigcptrAnnoyIndex) GetItem(arg2 int, arg3 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
C._wrap_AnnoyIndex_getItem_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_voidp(_swig_i_2))
}
func (arg1 SwigcptrAnnoyIndex) OnDiskBuild(arg2 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndex_onDiskBuild_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0), *(*C.swig_type_8)(unsafe.Pointer(&_swig_i_1))))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
return swig_r
}
func NewAnnoyIndex() (_swig_ret AnnoyIndex) {
var swig_r AnnoyIndex
swig_r = (AnnoyIndex)(SwigcptrAnnoyIndex(C._wrap_new_AnnoyIndex_annoyindex_acf5c19c77666e85()))
return swig_r
}
type AnnoyIndex interface {
Swigcptr() uintptr
SwigIsAnnoyIndex()
AddItem(arg2 int, arg3 []float32)
Build(arg2 int)
Save(a ...interface{}) bool
Unload()
Load(a ...interface{}) bool
GetDistance(arg2 int, arg3 int) (_swig_ret float32)
GetNnsByItem(a ...interface{})
GetNnsByVector(a ...interface{})
GetNItems() (_swig_ret int)
Verbose(arg2 bool)
GetItem(arg2 int, arg3 *[]float32)
OnDiskBuild(arg2 string) (_swig_ret bool)
}
type SwigcptrAnnoyIndexAngular uintptr
func (p SwigcptrAnnoyIndexAngular) Swigcptr() uintptr {
return (uintptr)(p)
}
func (p SwigcptrAnnoyIndexAngular) SwigIsAnnoyIndexAngular() {
}
func NewAnnoyIndexAngular(arg1 int) (_swig_ret AnnoyIndexAngular) {
var swig_r AnnoyIndexAngular
_swig_i_0 := arg1
swig_r = (AnnoyIndexAngular)(SwigcptrAnnoyIndexAngular(C._wrap_new_AnnoyIndexAngular_annoyindex_acf5c19c77666e85(C.swig_intgo(_swig_i_0))))
return swig_r
}
func DeleteAnnoyIndexAngular(arg1 AnnoyIndexAngular) {
_swig_i_0 := arg1.Swigcptr()
C._wrap_delete_AnnoyIndexAngular_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0))
}
func (_swig_base SwigcptrAnnoyIndexAngular) AddItem(arg1 int, arg2 []float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_AnnoyIndexAngular_addItem_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), *(*C.swig_type_9)(unsafe.Pointer(&_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (_swig_base SwigcptrAnnoyIndexAngular) Build(arg1 int) {
_swig_i_0 := arg1
C._wrap_AnnoyIndexAngular_build_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0))
}
func (_swig_base SwigcptrAnnoyIndexAngular) Save__SWIG_0(arg1 string, arg2 bool) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndexAngular_save__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_10)(unsafe.Pointer(&_swig_i_0)), C._Bool(_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexAngular) Save__SWIG_1(arg1 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_AnnoyIndexAngular_save__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_11)(unsafe.Pointer(&_swig_i_0))))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (p SwigcptrAnnoyIndexAngular) Save(a ...interface{}) bool {
argc := len(a)
if argc == 1 {
return p.Save__SWIG_1(a[0].(string))
}
if argc == 2 {
return p.Save__SWIG_0(a[0].(string), a[1].(bool))
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexAngular) Unload() {
C._wrap_AnnoyIndexAngular_unload_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base))
}
func (_swig_base SwigcptrAnnoyIndexAngular) Load__SWIG_0(arg1 string, arg2 bool) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndexAngular_load__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_12)(unsafe.Pointer(&_swig_i_0)), C._Bool(_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexAngular) Load__SWIG_1(arg1 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_AnnoyIndexAngular_load__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_13)(unsafe.Pointer(&_swig_i_0))))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (p SwigcptrAnnoyIndexAngular) Load(a ...interface{}) bool {
argc := len(a)
if argc == 1 {
return p.Load__SWIG_1(a[0].(string))
}
if argc == 2 {
return p.Load__SWIG_0(a[0].(string), a[1].(bool))
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexAngular) GetDistance(arg1 int, arg2 int) (_swig_ret float32) {
var swig_r float32
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (float32)(C._wrap_AnnoyIndexAngular_getDistance_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1)))
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexAngular) GetNnsByItem__SWIG_0(arg1 int, arg2 int, arg3 int, arg4 *[]int, arg5 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
C._wrap_AnnoyIndexAngular_getNnsByItem__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3), C.swig_voidp(_swig_i_4))
}
func (_swig_base SwigcptrAnnoyIndexAngular) GetNnsByItem__SWIG_1(arg1 int, arg2 int, arg3 int, arg4 *[]int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_AnnoyIndexAngular_getNnsByItem__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3))
}
func (p SwigcptrAnnoyIndexAngular) GetNnsByItem(a ...interface{}) {
argc := len(a)
if argc == 4 {
p.GetNnsByItem__SWIG_1(a[0].(int), a[1].(int), a[2].(int), a[3].(*[]int))
return
}
if argc == 5 {
p.GetNnsByItem__SWIG_0(a[0].(int), a[1].(int), a[2].(int), a[3].(*[]int), a[4].(*[]float32))
return
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexAngular) GetNnsByVector__SWIG_0(arg1 []float32, arg2 int, arg3 int, arg4 *[]int, arg5 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
C._wrap_AnnoyIndexAngular_getNnsByVector__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_14)(unsafe.Pointer(&_swig_i_0)), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3), C.swig_voidp(_swig_i_4))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
}
func (_swig_base SwigcptrAnnoyIndexAngular) GetNnsByVector__SWIG_1(arg1 []float32, arg2 int, arg3 int, arg4 *[]int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_AnnoyIndexAngular_getNnsByVector__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_15)(unsafe.Pointer(&_swig_i_0)), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
}
func (p SwigcptrAnnoyIndexAngular) GetNnsByVector(a ...interface{}) {
argc := len(a)
if argc == 4 {
p.GetNnsByVector__SWIG_1(a[0].([]float32), a[1].(int), a[2].(int), a[3].(*[]int))
return
}
if argc == 5 {
p.GetNnsByVector__SWIG_0(a[0].([]float32), a[1].(int), a[2].(int), a[3].(*[]int), a[4].(*[]float32))
return
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexAngular) GetNItems() (_swig_ret int) {
var swig_r int
swig_r = (int)(C._wrap_AnnoyIndexAngular_getNItems_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base)))
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexAngular) Verbose(arg1 bool) {
_swig_i_0 := arg1
C._wrap_AnnoyIndexAngular_verbose_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C._Bool(_swig_i_0))
}
func (_swig_base SwigcptrAnnoyIndexAngular) GetItem(arg1 int, arg2 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_AnnoyIndexAngular_getItem_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_voidp(_swig_i_1))
}
func (_swig_base SwigcptrAnnoyIndexAngular) OnDiskBuild(arg1 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_AnnoyIndexAngular_onDiskBuild_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_16)(unsafe.Pointer(&_swig_i_0))))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (p SwigcptrAnnoyIndexAngular) SwigIsAnnoyIndex() {
}
func (p SwigcptrAnnoyIndexAngular) SwigGetAnnoyIndex() AnnoyIndex {
return SwigcptrAnnoyIndex(p.Swigcptr())
}
type AnnoyIndexAngular interface {
Swigcptr() uintptr
SwigIsAnnoyIndexAngular()
AddItem(arg1 int, arg2 []float32)
Build(arg1 int)
Save(a ...interface{}) bool
Unload()
Load(a ...interface{}) bool
GetDistance(arg1 int, arg2 int) (_swig_ret float32)
GetNnsByItem(a ...interface{})
GetNnsByVector(a ...interface{})
GetNItems() (_swig_ret int)
Verbose(arg1 bool)
GetItem(arg1 int, arg2 *[]float32)
OnDiskBuild(arg1 string) (_swig_ret bool)
SwigIsAnnoyIndex()
SwigGetAnnoyIndex() AnnoyIndex
}
type SwigcptrAnnoyIndexEuclidean uintptr
func (p SwigcptrAnnoyIndexEuclidean) Swigcptr() uintptr {
return (uintptr)(p)
}
func (p SwigcptrAnnoyIndexEuclidean) SwigIsAnnoyIndexEuclidean() {
}
func NewAnnoyIndexEuclidean(arg1 int) (_swig_ret AnnoyIndexEuclidean) {
var swig_r AnnoyIndexEuclidean
_swig_i_0 := arg1
swig_r = (AnnoyIndexEuclidean)(SwigcptrAnnoyIndexEuclidean(C._wrap_new_AnnoyIndexEuclidean_annoyindex_acf5c19c77666e85(C.swig_intgo(_swig_i_0))))
return swig_r
}
func DeleteAnnoyIndexEuclidean(arg1 AnnoyIndexEuclidean) {
_swig_i_0 := arg1.Swigcptr()
C._wrap_delete_AnnoyIndexEuclidean_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0))
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) AddItem(arg1 int, arg2 []float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_AnnoyIndexEuclidean_addItem_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), *(*C.swig_type_9)(unsafe.Pointer(&_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) Build(arg1 int) {
_swig_i_0 := arg1
C._wrap_AnnoyIndexEuclidean_build_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0))
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) Save__SWIG_0(arg1 string, arg2 bool) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndexEuclidean_save__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_10)(unsafe.Pointer(&_swig_i_0)), C._Bool(_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) Save__SWIG_1(arg1 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_AnnoyIndexEuclidean_save__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_11)(unsafe.Pointer(&_swig_i_0))))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (p SwigcptrAnnoyIndexEuclidean) Save(a ...interface{}) bool {
argc := len(a)
if argc == 1 {
return p.Save__SWIG_1(a[0].(string))
}
if argc == 2 {
return p.Save__SWIG_0(a[0].(string), a[1].(bool))
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) Unload() {
C._wrap_AnnoyIndexEuclidean_unload_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base))
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) Load__SWIG_0(arg1 string, arg2 bool) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndexEuclidean_load__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_12)(unsafe.Pointer(&_swig_i_0)), C._Bool(_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) Load__SWIG_1(arg1 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_AnnoyIndexEuclidean_load__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_13)(unsafe.Pointer(&_swig_i_0))))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (p SwigcptrAnnoyIndexEuclidean) Load(a ...interface{}) bool {
argc := len(a)
if argc == 1 {
return p.Load__SWIG_1(a[0].(string))
}
if argc == 2 {
return p.Load__SWIG_0(a[0].(string), a[1].(bool))
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) GetDistance(arg1 int, arg2 int) (_swig_ret float32) {
var swig_r float32
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (float32)(C._wrap_AnnoyIndexEuclidean_getDistance_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1)))
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) GetNnsByItem__SWIG_0(arg1 int, arg2 int, arg3 int, arg4 *[]int, arg5 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
C._wrap_AnnoyIndexEuclidean_getNnsByItem__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3), C.swig_voidp(_swig_i_4))
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) GetNnsByItem__SWIG_1(arg1 int, arg2 int, arg3 int, arg4 *[]int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_AnnoyIndexEuclidean_getNnsByItem__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3))
}
func (p SwigcptrAnnoyIndexEuclidean) GetNnsByItem(a ...interface{}) {
argc := len(a)
if argc == 4 {
p.GetNnsByItem__SWIG_1(a[0].(int), a[1].(int), a[2].(int), a[3].(*[]int))
return
}
if argc == 5 {
p.GetNnsByItem__SWIG_0(a[0].(int), a[1].(int), a[2].(int), a[3].(*[]int), a[4].(*[]float32))
return
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) GetNnsByVector__SWIG_0(arg1 []float32, arg2 int, arg3 int, arg4 *[]int, arg5 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
C._wrap_AnnoyIndexEuclidean_getNnsByVector__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_14)(unsafe.Pointer(&_swig_i_0)), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3), C.swig_voidp(_swig_i_4))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) GetNnsByVector__SWIG_1(arg1 []float32, arg2 int, arg3 int, arg4 *[]int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_AnnoyIndexEuclidean_getNnsByVector__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_15)(unsafe.Pointer(&_swig_i_0)), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
}
func (p SwigcptrAnnoyIndexEuclidean) GetNnsByVector(a ...interface{}) {
argc := len(a)
if argc == 4 {
p.GetNnsByVector__SWIG_1(a[0].([]float32), a[1].(int), a[2].(int), a[3].(*[]int))
return
}
if argc == 5 {
p.GetNnsByVector__SWIG_0(a[0].([]float32), a[1].(int), a[2].(int), a[3].(*[]int), a[4].(*[]float32))
return
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) GetNItems() (_swig_ret int) {
var swig_r int
swig_r = (int)(C._wrap_AnnoyIndexEuclidean_getNItems_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base)))
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) Verbose(arg1 bool) {
_swig_i_0 := arg1
C._wrap_AnnoyIndexEuclidean_verbose_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C._Bool(_swig_i_0))
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) GetItem(arg1 int, arg2 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_AnnoyIndexEuclidean_getItem_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_voidp(_swig_i_1))
}
func (_swig_base SwigcptrAnnoyIndexEuclidean) OnDiskBuild(arg1 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_AnnoyIndexEuclidean_onDiskBuild_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_16)(unsafe.Pointer(&_swig_i_0))))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (p SwigcptrAnnoyIndexEuclidean) SwigIsAnnoyIndex() {
}
func (p SwigcptrAnnoyIndexEuclidean) SwigGetAnnoyIndex() AnnoyIndex {
return SwigcptrAnnoyIndex(p.Swigcptr())
}
type AnnoyIndexEuclidean interface {
Swigcptr() uintptr
SwigIsAnnoyIndexEuclidean()
AddItem(arg1 int, arg2 []float32)
Build(arg1 int)
Save(a ...interface{}) bool
Unload()
Load(a ...interface{}) bool
GetDistance(arg1 int, arg2 int) (_swig_ret float32)
GetNnsByItem(a ...interface{})
GetNnsByVector(a ...interface{})
GetNItems() (_swig_ret int)
Verbose(arg1 bool)
GetItem(arg1 int, arg2 *[]float32)
OnDiskBuild(arg1 string) (_swig_ret bool)
SwigIsAnnoyIndex()
SwigGetAnnoyIndex() AnnoyIndex
}
type SwigcptrAnnoyIndexManhattan uintptr
func (p SwigcptrAnnoyIndexManhattan) Swigcptr() uintptr {
return (uintptr)(p)
}
func (p SwigcptrAnnoyIndexManhattan) SwigIsAnnoyIndexManhattan() {
}
func NewAnnoyIndexManhattan(arg1 int) (_swig_ret AnnoyIndexManhattan) {
var swig_r AnnoyIndexManhattan
_swig_i_0 := arg1
swig_r = (AnnoyIndexManhattan)(SwigcptrAnnoyIndexManhattan(C._wrap_new_AnnoyIndexManhattan_annoyindex_acf5c19c77666e85(C.swig_intgo(_swig_i_0))))
return swig_r
}
func DeleteAnnoyIndexManhattan(arg1 AnnoyIndexManhattan) {
_swig_i_0 := arg1.Swigcptr()
C._wrap_delete_AnnoyIndexManhattan_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_i_0))
}
func (_swig_base SwigcptrAnnoyIndexManhattan) AddItem(arg1 int, arg2 []float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
C._wrap_AnnoyIndexManhattan_addItem_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), *(*C.swig_type_9)(unsafe.Pointer(&_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg2
}
}
func (_swig_base SwigcptrAnnoyIndexManhattan) Build(arg1 int) {
_swig_i_0 := arg1
C._wrap_AnnoyIndexManhattan_build_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0))
}
func (_swig_base SwigcptrAnnoyIndexManhattan) Save__SWIG_0(arg1 string, arg2 bool) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndexManhattan_save__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_10)(unsafe.Pointer(&_swig_i_0)), C._Bool(_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexManhattan) Save__SWIG_1(arg1 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_AnnoyIndexManhattan_save__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_11)(unsafe.Pointer(&_swig_i_0))))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (p SwigcptrAnnoyIndexManhattan) Save(a ...interface{}) bool {
argc := len(a)
if argc == 1 {
return p.Save__SWIG_1(a[0].(string))
}
if argc == 2 {
return p.Save__SWIG_0(a[0].(string), a[1].(bool))
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexManhattan) Unload() {
C._wrap_AnnoyIndexManhattan_unload_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base))
}
func (_swig_base SwigcptrAnnoyIndexManhattan) Load__SWIG_0(arg1 string, arg2 bool) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (bool)(C._wrap_AnnoyIndexManhattan_load__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_12)(unsafe.Pointer(&_swig_i_0)), C._Bool(_swig_i_1)))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexManhattan) Load__SWIG_1(arg1 string) (_swig_ret bool) {
var swig_r bool
_swig_i_0 := arg1
swig_r = (bool)(C._wrap_AnnoyIndexManhattan_load__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_13)(unsafe.Pointer(&_swig_i_0))))
if Swig_escape_always_false {
Swig_escape_val = arg1
}
return swig_r
}
func (p SwigcptrAnnoyIndexManhattan) Load(a ...interface{}) bool {
argc := len(a)
if argc == 1 {
return p.Load__SWIG_1(a[0].(string))
}
if argc == 2 {
return p.Load__SWIG_0(a[0].(string), a[1].(bool))
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexManhattan) GetDistance(arg1 int, arg2 int) (_swig_ret float32) {
var swig_r float32
_swig_i_0 := arg1
_swig_i_1 := arg2
swig_r = (float32)(C._wrap_AnnoyIndexManhattan_getDistance_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1)))
return swig_r
}
func (_swig_base SwigcptrAnnoyIndexManhattan) GetNnsByItem__SWIG_0(arg1 int, arg2 int, arg3 int, arg4 *[]int, arg5 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
C._wrap_AnnoyIndexManhattan_getNnsByItem__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3), C.swig_voidp(_swig_i_4))
}
func (_swig_base SwigcptrAnnoyIndexManhattan) GetNnsByItem__SWIG_1(arg1 int, arg2 int, arg3 int, arg4 *[]int) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
C._wrap_AnnoyIndexManhattan_getNnsByItem__SWIG_1_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), C.swig_intgo(_swig_i_0), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3))
}
func (p SwigcptrAnnoyIndexManhattan) GetNnsByItem(a ...interface{}) {
argc := len(a)
if argc == 4 {
p.GetNnsByItem__SWIG_1(a[0].(int), a[1].(int), a[2].(int), a[3].(*[]int))
return
}
if argc == 5 {
p.GetNnsByItem__SWIG_0(a[0].(int), a[1].(int), a[2].(int), a[3].(*[]int), a[4].(*[]float32))
return
}
panic("No match for overloaded function call")
}
func (_swig_base SwigcptrAnnoyIndexManhattan) GetNnsByVector__SWIG_0(arg1 []float32, arg2 int, arg3 int, arg4 *[]int, arg5 *[]float32) {
_swig_i_0 := arg1
_swig_i_1 := arg2
_swig_i_2 := arg3
_swig_i_3 := arg4
_swig_i_4 := arg5
C._wrap_AnnoyIndexManhattan_getNnsByVector__SWIG_0_annoyindex_acf5c19c77666e85(C.uintptr_t(_swig_base), *(*C.swig_type_14)(unsafe.Pointer(&_swig_i_0)), C.swig_intgo(_swig_i_1), C.swig_intgo(_swig_i_2), C.swig_voidp(_swig_i_3), C.swig_voidp(_swig_i_4))
if Swig_escape_always_false {