-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathyael.py
2372 lines (1906 loc) · 76.6 KB
/
yael.py
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 2.0.7
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.
from sys import version_info
if version_info >= (2,6,0):
def swig_import_helper():
from os.path import dirname
import imp
fp = None
try:
fp, pathname, description = imp.find_module('_yael', [dirname(__file__)])
except ImportError:
import _yael
return _yael
if fp is not None:
try:
_mod = imp.load_module('_yael', fp, pathname, description)
finally:
fp.close()
return _mod
_yael = swig_import_helper()
del swig_import_helper
else:
import _yael
del version_info
try:
_swig_property = property
except NameError:
pass # Python < 2.2 doesn't have 'property'.
def _swig_setattr_nondynamic(self,class_type,name,value,static=1):
if (name == "thisown"): return self.this.own(value)
if (name == "this"):
if type(value).__name__ == 'SwigPyObject':
self.__dict__[name] = value
return
method = class_type.__swig_setmethods__.get(name,None)
if method: return method(self,value)
if (not static):
self.__dict__[name] = value
else:
raise AttributeError("You cannot add attributes to %s" % self)
def _swig_setattr(self,class_type,name,value):
return _swig_setattr_nondynamic(self,class_type,name,value,0)
def _swig_getattr(self,class_type,name):
if (name == "thisown"): return self.this.own()
method = class_type.__swig_getmethods__.get(name,None)
if method: return method(self)
raise AttributeError(name)
def _swig_repr(self):
try: strthis = "proxy of " + self.this.__repr__()
except: strthis = ""
return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)
try:
_object = object
_newclass = 1
except AttributeError:
class _object : pass
_newclass = 0
def _frompointer_and_acquire(aclass,ptr):
r=aclass.frompointer(ptr)
if r: r.this.acquire()
return r
def fvec_from_pointer_long(*args):
return _yael.fvec_from_pointer_long(*args)
fvec_from_pointer_long = _yael.fvec_from_pointer_long
def fvec_to_pointer_long(*args):
return _yael.fvec_to_pointer_long(*args)
fvec_to_pointer_long = _yael.fvec_to_pointer_long
def dvec_from_pointer_long(*args):
return _yael.dvec_from_pointer_long(*args)
dvec_from_pointer_long = _yael.dvec_from_pointer_long
def dvec_to_pointer_long(*args):
return _yael.dvec_to_pointer_long(*args)
dvec_to_pointer_long = _yael.dvec_to_pointer_long
class DoubleArray(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, DoubleArray, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, DoubleArray, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _yael.new_DoubleArray(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_DoubleArray
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.DoubleArray___getitem__(self, *args)
def __setitem__(self, *args): return _yael.DoubleArray___setitem__(self, *args)
def cast(self): return _yael.DoubleArray_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.DoubleArray_frompointer
if _newclass:frompointer = staticmethod(_yael.DoubleArray_frompointer)
def plus(self, *args): return _yael.DoubleArray_plus(self, *args)
def clear(self, *args): return _yael.DoubleArray_clear(self, *args)
def copyfrom(self, *args): return _yael.DoubleArray_copyfrom(self, *args)
def tostring(self, *args): return _yael.DoubleArray_tostring(self, *args)
def fromstring(self, *args): return _yael.DoubleArray_fromstring(self, *args)
DoubleArray_swigregister = _yael.DoubleArray_swigregister
DoubleArray_swigregister(DoubleArray)
cvar = _yael.cvar
def DoubleArray_frompointer(*args):
return _yael.DoubleArray_frompointer(*args)
DoubleArray_frompointer = _yael.DoubleArray_frompointer
DoubleArray.aptr=DoubleArray.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(DoubleArray,ptr))
class FloatArray(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, FloatArray, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, FloatArray, name)
__repr__ = _swig_repr
__swig_destroy__ = _yael.delete_FloatArray
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.FloatArray___getitem__(self, *args)
def __setitem__(self, *args): return _yael.FloatArray___setitem__(self, *args)
def cast(self): return _yael.FloatArray_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.FloatArray_frompointer
if _newclass:frompointer = staticmethod(_yael.FloatArray_frompointer)
def plus(self, *args): return _yael.FloatArray_plus(self, *args)
def clear(self, *args): return _yael.FloatArray_clear(self, *args)
def copyfrom(self, *args): return _yael.FloatArray_copyfrom(self, *args)
def tostring(self, *args): return _yael.FloatArray_tostring(self, *args)
def fromstring(self, *args): return _yael.FloatArray_fromstring(self, *args)
def __init__(self, *args):
this = _yael.new_FloatArray(*args)
try: self.this.append(this)
except: self.this = this
FloatArray_swigregister = _yael.FloatArray_swigregister
FloatArray_swigregister(FloatArray)
def FloatArray_frompointer(*args):
return _yael.FloatArray_frompointer(*args)
FloatArray_frompointer = _yael.FloatArray_frompointer
FloatArray.aptr=FloatArray.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(FloatArray,ptr))
class IntArray(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, IntArray, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, IntArray, name)
__repr__ = _swig_repr
__swig_destroy__ = _yael.delete_IntArray
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.IntArray___getitem__(self, *args)
def __setitem__(self, *args): return _yael.IntArray___setitem__(self, *args)
def cast(self): return _yael.IntArray_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.IntArray_frompointer
if _newclass:frompointer = staticmethod(_yael.IntArray_frompointer)
def plus(self, *args): return _yael.IntArray_plus(self, *args)
def clear(self, *args): return _yael.IntArray_clear(self, *args)
def copyfrom(self, *args): return _yael.IntArray_copyfrom(self, *args)
def tostring(self, *args): return _yael.IntArray_tostring(self, *args)
def fromstring(self, *args): return _yael.IntArray_fromstring(self, *args)
def __init__(self, *args):
this = _yael.new_IntArray(*args)
try: self.this.append(this)
except: self.this = this
IntArray_swigregister = _yael.IntArray_swigregister
IntArray_swigregister(IntArray)
def IntArray_frompointer(*args):
return _yael.IntArray_frompointer(*args)
IntArray_frompointer = _yael.IntArray_frompointer
IntArray.aptr=IntArray.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(IntArray,ptr))
class bvec(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, bvec, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, bvec, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _yael.new_bvec(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_bvec
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.bvec___getitem__(self, *args)
def __setitem__(self, *args): return _yael.bvec___setitem__(self, *args)
def cast(self): return _yael.bvec_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.bvec_frompointer
if _newclass:frompointer = staticmethod(_yael.bvec_frompointer)
def plus(self, *args): return _yael.bvec_plus(self, *args)
def clear(self, *args): return _yael.bvec_clear(self, *args)
def copyfrom(self, *args): return _yael.bvec_copyfrom(self, *args)
def tostring(self, *args): return _yael.bvec_tostring(self, *args)
def fromstring(self, *args): return _yael.bvec_fromstring(self, *args)
bvec_swigregister = _yael.bvec_swigregister
bvec_swigregister(bvec)
def bvec_frompointer(*args):
return _yael.bvec_frompointer(*args)
bvec_frompointer = _yael.bvec_frompointer
bvec.aptr=bvec.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(bvec,ptr))
class lvec(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, lvec, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, lvec, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _yael.new_lvec(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_lvec
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.lvec___getitem__(self, *args)
def __setitem__(self, *args): return _yael.lvec___setitem__(self, *args)
def cast(self): return _yael.lvec_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.lvec_frompointer
if _newclass:frompointer = staticmethod(_yael.lvec_frompointer)
def plus(self, *args): return _yael.lvec_plus(self, *args)
def clear(self, *args): return _yael.lvec_clear(self, *args)
def copyfrom(self, *args): return _yael.lvec_copyfrom(self, *args)
def tostring(self, *args): return _yael.lvec_tostring(self, *args)
def fromstring(self, *args): return _yael.lvec_fromstring(self, *args)
lvec_swigregister = _yael.lvec_swigregister
lvec_swigregister(lvec)
def lvec_frompointer(*args):
return _yael.lvec_frompointer(*args)
lvec_frompointer = _yael.lvec_frompointer
lvec.aptr=lvec.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(lvec,ptr))
class UInt64Array(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, UInt64Array, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, UInt64Array, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _yael.new_UInt64Array(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_UInt64Array
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.UInt64Array___getitem__(self, *args)
def __setitem__(self, *args): return _yael.UInt64Array___setitem__(self, *args)
def cast(self): return _yael.UInt64Array_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.UInt64Array_frompointer
if _newclass:frompointer = staticmethod(_yael.UInt64Array_frompointer)
def plus(self, *args): return _yael.UInt64Array_plus(self, *args)
def clear(self, *args): return _yael.UInt64Array_clear(self, *args)
def copyfrom(self, *args): return _yael.UInt64Array_copyfrom(self, *args)
def tostring(self, *args): return _yael.UInt64Array_tostring(self, *args)
def fromstring(self, *args): return _yael.UInt64Array_fromstring(self, *args)
UInt64Array_swigregister = _yael.UInt64Array_swigregister
UInt64Array_swigregister(UInt64Array)
def UInt64Array_frompointer(*args):
return _yael.UInt64Array_frompointer(*args)
UInt64Array_frompointer = _yael.UInt64Array_frompointer
UInt64Array.aptr=UInt64Array.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(UInt64Array,ptr))
class IntPtrArray(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, IntPtrArray, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, IntPtrArray, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _yael.new_IntPtrArray(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_IntPtrArray
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.IntPtrArray___getitem__(self, *args)
def __setitem__(self, *args): return _yael.IntPtrArray___setitem__(self, *args)
def cast(self): return _yael.IntPtrArray_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.IntPtrArray_frompointer
if _newclass:frompointer = staticmethod(_yael.IntPtrArray_frompointer)
def plus(self, *args): return _yael.IntPtrArray_plus(self, *args)
def clear(self, *args): return _yael.IntPtrArray_clear(self, *args)
def copyfrom(self, *args): return _yael.IntPtrArray_copyfrom(self, *args)
def tostring(self, *args): return _yael.IntPtrArray_tostring(self, *args)
def fromstring(self, *args): return _yael.IntPtrArray_fromstring(self, *args)
IntPtrArray_swigregister = _yael.IntPtrArray_swigregister
IntPtrArray_swigregister(IntPtrArray)
def IntPtrArray_frompointer(*args):
return _yael.IntPtrArray_frompointer(*args)
IntPtrArray_frompointer = _yael.IntPtrArray_frompointer
IntPtrArray.aptr=IntPtrArray.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(IntPtrArray,ptr))
class FloatPtrArray(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, FloatPtrArray, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, FloatPtrArray, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _yael.new_FloatPtrArray(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_FloatPtrArray
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.FloatPtrArray___getitem__(self, *args)
def __setitem__(self, *args): return _yael.FloatPtrArray___setitem__(self, *args)
def cast(self): return _yael.FloatPtrArray_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.FloatPtrArray_frompointer
if _newclass:frompointer = staticmethod(_yael.FloatPtrArray_frompointer)
def plus(self, *args): return _yael.FloatPtrArray_plus(self, *args)
def clear(self, *args): return _yael.FloatPtrArray_clear(self, *args)
def copyfrom(self, *args): return _yael.FloatPtrArray_copyfrom(self, *args)
def tostring(self, *args): return _yael.FloatPtrArray_tostring(self, *args)
def fromstring(self, *args): return _yael.FloatPtrArray_fromstring(self, *args)
FloatPtrArray_swigregister = _yael.FloatPtrArray_swigregister
FloatPtrArray_swigregister(FloatPtrArray)
def FloatPtrArray_frompointer(*args):
return _yael.FloatPtrArray_frompointer(*args)
FloatPtrArray_frompointer = _yael.FloatPtrArray_frompointer
FloatPtrArray.aptr=FloatPtrArray.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(FloatPtrArray,ptr))
class BytePtrArray(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, BytePtrArray, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, BytePtrArray, name)
__repr__ = _swig_repr
def __init__(self, *args):
this = _yael.new_BytePtrArray(*args)
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_BytePtrArray
__del__ = lambda self : None;
def __getitem__(self, *args): return _yael.BytePtrArray___getitem__(self, *args)
def __setitem__(self, *args): return _yael.BytePtrArray___setitem__(self, *args)
def cast(self): return _yael.BytePtrArray_cast(self)
__swig_getmethods__["frompointer"] = lambda x: _yael.BytePtrArray_frompointer
if _newclass:frompointer = staticmethod(_yael.BytePtrArray_frompointer)
def plus(self, *args): return _yael.BytePtrArray_plus(self, *args)
def clear(self, *args): return _yael.BytePtrArray_clear(self, *args)
def copyfrom(self, *args): return _yael.BytePtrArray_copyfrom(self, *args)
def tostring(self, *args): return _yael.BytePtrArray_tostring(self, *args)
def fromstring(self, *args): return _yael.BytePtrArray_fromstring(self, *args)
BytePtrArray_swigregister = _yael.BytePtrArray_swigregister
BytePtrArray_swigregister(BytePtrArray)
def BytePtrArray_frompointer(*args):
return _yael.BytePtrArray_frompointer(*args)
BytePtrArray_frompointer = _yael.BytePtrArray_frompointer
BytePtrArray.aptr=BytePtrArray.acquirepointer=staticmethod(lambda ptr: _frompointer_and_acquire(BytePtrArray,ptr))
fvec=FloatArray
dvec=DoubleArray
ivec=IntArray
def knn_full(*args):
return _yael.knn_full(*args)
knn_full = _yael.knn_full
def knn_full_thread(*args):
return _yael.knn_full_thread(*args)
knn_full_thread = _yael.knn_full_thread
def nn(*args):
return _yael.nn(*args)
nn = _yael.nn
def nn_thread(*args):
return _yael.nn_thread(*args)
nn_thread = _yael.nn_thread
def knn(*args):
return _yael.knn(*args)
knn = _yael.knn
def knn_thread(*args):
return _yael.knn_thread(*args)
knn_thread = _yael.knn_thread
def knn_reorder_shortlist(*args):
return _yael.knn_reorder_shortlist(*args)
knn_reorder_shortlist = _yael.knn_reorder_shortlist
def knn_recompute_exact_dists(*args):
return _yael.knn_recompute_exact_dists(*args)
knn_recompute_exact_dists = _yael.knn_recompute_exact_dists
def compute_cross_distances(*args):
return _yael.compute_cross_distances(*args)
compute_cross_distances = _yael.compute_cross_distances
def compute_cross_distances_nonpacked(*args):
return _yael.compute_cross_distances_nonpacked(*args)
compute_cross_distances_nonpacked = _yael.compute_cross_distances_nonpacked
def compute_cross_distances_thread(*args):
return _yael.compute_cross_distances_thread(*args)
compute_cross_distances_thread = _yael.compute_cross_distances_thread
def compute_cross_distances_alt(*args):
return _yael.compute_cross_distances_alt(*args)
compute_cross_distances_alt = _yael.compute_cross_distances_alt
def compute_cross_distances_alt_nonpacked(*args):
return _yael.compute_cross_distances_alt_nonpacked(*args)
compute_cross_distances_alt_nonpacked = _yael.compute_cross_distances_alt_nonpacked
def compute_cross_distances_alt_thread(*args):
return _yael.compute_cross_distances_alt_thread(*args)
compute_cross_distances_alt_thread = _yael.compute_cross_distances_alt_thread
def compute_distances_1(*args):
return _yael.compute_distances_1(*args)
compute_distances_1 = _yael.compute_distances_1
def compute_distances_1_nonpacked(*args):
return _yael.compute_distances_1_nonpacked(*args)
compute_distances_1_nonpacked = _yael.compute_distances_1_nonpacked
def compute_distances_1_thread(*args):
return _yael.compute_distances_1_thread(*args)
compute_distances_1_thread = _yael.compute_distances_1_thread
def compute_distances_1_nonpacked_thread(*args):
return _yael.compute_distances_1_nonpacked_thread(*args)
compute_distances_1_nonpacked_thread = _yael.compute_distances_1_nonpacked_thread
KMEANS_QUIET = _yael.KMEANS_QUIET
KMEANS_INIT_BERKELEY = _yael.KMEANS_INIT_BERKELEY
KMEANS_NORMALIZE_CENTS = _yael.KMEANS_NORMALIZE_CENTS
KMEANS_INIT_RANDOM = _yael.KMEANS_INIT_RANDOM
KMEANS_INIT_USER = _yael.KMEANS_INIT_USER
KMEANS_L1 = _yael.KMEANS_L1
KMEANS_CHI2 = _yael.KMEANS_CHI2
def kmeans(*args):
return _yael.kmeans(*args)
kmeans = _yael.kmeans
def clustering_kmeans(*args):
return _yael.clustering_kmeans(*args)
clustering_kmeans = _yael.clustering_kmeans
def clustering_kmeans_assign(*args):
return _yael.clustering_kmeans_assign(*args)
clustering_kmeans_assign = _yael.clustering_kmeans_assign
def clustering_kmeans_assign_with_score(*args):
return _yael.clustering_kmeans_assign_with_score(*args)
clustering_kmeans_assign_with_score = _yael.clustering_kmeans_assign_with_score
class hkm_t(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, hkm_t, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, hkm_t, name)
__repr__ = _swig_repr
__swig_setmethods__["nlevel"] = _yael.hkm_t_nlevel_set
__swig_getmethods__["nlevel"] = _yael.hkm_t_nlevel_get
if _newclass:nlevel = _swig_property(_yael.hkm_t_nlevel_get, _yael.hkm_t_nlevel_set)
__swig_setmethods__["bf"] = _yael.hkm_t_bf_set
__swig_getmethods__["bf"] = _yael.hkm_t_bf_get
if _newclass:bf = _swig_property(_yael.hkm_t_bf_get, _yael.hkm_t_bf_set)
__swig_setmethods__["k"] = _yael.hkm_t_k_set
__swig_getmethods__["k"] = _yael.hkm_t_k_get
if _newclass:k = _swig_property(_yael.hkm_t_k_get, _yael.hkm_t_k_set)
__swig_setmethods__["d"] = _yael.hkm_t_d_set
__swig_getmethods__["d"] = _yael.hkm_t_d_get
if _newclass:d = _swig_property(_yael.hkm_t_d_get, _yael.hkm_t_d_set)
__swig_setmethods__["centroids"] = _yael.hkm_t_centroids_set
__swig_getmethods__["centroids"] = _yael.hkm_t_centroids_get
if _newclass:centroids = _swig_property(_yael.hkm_t_centroids_get, _yael.hkm_t_centroids_set)
def __init__(self):
this = _yael.new_hkm_t()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_hkm_t
__del__ = lambda self : None;
hkm_t_swigregister = _yael.hkm_t_swigregister
hkm_t_swigregister(hkm_t)
def hkm_learn(*args):
return _yael.hkm_learn(*args)
hkm_learn = _yael.hkm_learn
def hkm_delete(*args):
return _yael.hkm_delete(*args)
hkm_delete = _yael.hkm_delete
def hkm_quantize(*args):
return _yael.hkm_quantize(*args)
hkm_quantize = _yael.hkm_quantize
def hkm_write(*args):
return _yael.hkm_write(*args)
hkm_write = _yael.hkm_write
def hkm_read(*args):
return _yael.hkm_read(*args)
hkm_read = _yael.hkm_read
def hkm_get_centroids(*args):
return _yael.hkm_get_centroids(*args)
hkm_get_centroids = _yael.hkm_get_centroids
def fvec_k_max(*args):
return _yael.fvec_k_max(*args)
fvec_k_max = _yael.fvec_k_max
def fvec_k_min(*args):
return _yael.fvec_k_min(*args)
fvec_k_min = _yael.fvec_k_min
def fvec_ranks_of(*args):
return _yael.fvec_ranks_of(*args)
fvec_ranks_of = _yael.fvec_ranks_of
def fvec_ranks_inc_of(*args):
return _yael.fvec_ranks_inc_of(*args)
fvec_ranks_inc_of = _yael.fvec_ranks_inc_of
def find_labels(*args):
return _yael.find_labels(*args)
find_labels = _yael.find_labels
def fvec_min(*args):
return _yael.fvec_min(*args)
fvec_min = _yael.fvec_min
def ivec_min(*args):
return _yael.ivec_min(*args)
ivec_min = _yael.ivec_min
def fvec_max(*args):
return _yael.fvec_max(*args)
fvec_max = _yael.fvec_max
def ivec_max(*args):
return _yael.ivec_max(*args)
ivec_max = _yael.ivec_max
def fvec_arg_min(*args):
return _yael.fvec_arg_min(*args)
fvec_arg_min = _yael.fvec_arg_min
def fvec_arg_max(*args):
return _yael.fvec_arg_max(*args)
fvec_arg_max = _yael.fvec_arg_max
def fvec_median(*args):
return _yael.fvec_median(*args)
fvec_median = _yael.fvec_median
def fvec_median_const(*args):
return _yael.fvec_median_const(*args)
fvec_median_const = _yael.fvec_median_const
def fvec_quantile(*args):
return _yael.fvec_quantile(*args)
fvec_quantile = _yael.fvec_quantile
def ivec_sort(*args):
return _yael.ivec_sort(*args)
ivec_sort = _yael.ivec_sort
def ivec_sort_index(*args):
return _yael.ivec_sort_index(*args)
ivec_sort_index = _yael.ivec_sort_index
def ivec_invert_perm(*args):
return _yael.ivec_invert_perm(*args)
ivec_invert_perm = _yael.ivec_invert_perm
def fvec_sort(*args):
return _yael.fvec_sort(*args)
fvec_sort = _yael.fvec_sort
def fvecs_sort(*args):
return _yael.fvecs_sort(*args)
fvecs_sort = _yael.fvecs_sort
def fvec_sort_index(*args):
return _yael.fvec_sort_index(*args)
fvec_sort_index = _yael.fvec_sort_index
def ivec_sort_by_permutation(*args):
return _yael.ivec_sort_by_permutation(*args)
ivec_sort_by_permutation = _yael.ivec_sort_by_permutation
def fvec_sort_by_permutation(*args):
return _yael.fvec_sort_by_permutation(*args)
fvec_sort_by_permutation = _yael.fvec_sort_by_permutation
def ivec_sorted_count_occurrences(*args):
return _yael.ivec_sorted_count_occurrences(*args)
ivec_sorted_count_occurrences = _yael.ivec_sorted_count_occurrences
def ivec_sorted_find(*args):
return _yael.ivec_sorted_find(*args)
ivec_sorted_find = _yael.ivec_sorted_find
def ivec_sorted_count_unique(*args):
return _yael.ivec_sorted_count_unique(*args)
ivec_sorted_count_unique = _yael.ivec_sorted_count_unique
def ivec_sorted_count_occurrences_multiple(*args):
return _yael.ivec_sorted_count_occurrences_multiple(*args)
ivec_sorted_count_occurrences_multiple = _yael.ivec_sorted_count_occurrences_multiple
def merge_ordered_sets(*args):
return _yael.merge_ordered_sets(*args)
merge_ordered_sets = _yael.merge_ordered_sets
def compress_labels_by_disratio(*args):
return _yael.compress_labels_by_disratio(*args)
compress_labels_by_disratio = _yael.compress_labels_by_disratio
class fbinheap_s(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, fbinheap_s, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, fbinheap_s, name)
__repr__ = _swig_repr
__swig_setmethods__["val"] = _yael.fbinheap_s_val_set
__swig_getmethods__["val"] = _yael.fbinheap_s_val_get
if _newclass:val = _swig_property(_yael.fbinheap_s_val_get, _yael.fbinheap_s_val_set)
__swig_setmethods__["label"] = _yael.fbinheap_s_label_set
__swig_getmethods__["label"] = _yael.fbinheap_s_label_get
if _newclass:label = _swig_property(_yael.fbinheap_s_label_get, _yael.fbinheap_s_label_set)
__swig_setmethods__["k"] = _yael.fbinheap_s_k_set
__swig_getmethods__["k"] = _yael.fbinheap_s_k_get
if _newclass:k = _swig_property(_yael.fbinheap_s_k_get, _yael.fbinheap_s_k_set)
__swig_setmethods__["maxk"] = _yael.fbinheap_s_maxk_set
__swig_getmethods__["maxk"] = _yael.fbinheap_s_maxk_get
if _newclass:maxk = _swig_property(_yael.fbinheap_s_maxk_get, _yael.fbinheap_s_maxk_set)
def __init__(self):
this = _yael.new_fbinheap_s()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_fbinheap_s
__del__ = lambda self : None;
fbinheap_s_swigregister = _yael.fbinheap_s_swigregister
fbinheap_s_swigregister(fbinheap_s)
def fbinheap_new(*args):
return _yael.fbinheap_new(*args)
fbinheap_new = _yael.fbinheap_new
def fbinheap_sizeof(*args):
return _yael.fbinheap_sizeof(*args)
fbinheap_sizeof = _yael.fbinheap_sizeof
def fbinheap_init(*args):
return _yael.fbinheap_init(*args)
fbinheap_init = _yael.fbinheap_init
def fbinheap_delete(*args):
return _yael.fbinheap_delete(*args)
fbinheap_delete = _yael.fbinheap_delete
def fbinheap_reset(*args):
return _yael.fbinheap_reset(*args)
fbinheap_reset = _yael.fbinheap_reset
def fbinheap_add(*args):
return _yael.fbinheap_add(*args)
fbinheap_add = _yael.fbinheap_add
def fbinheap_pop(*args):
return _yael.fbinheap_pop(*args)
fbinheap_pop = _yael.fbinheap_pop
def fbinheap_addn(*args):
return _yael.fbinheap_addn(*args)
fbinheap_addn = _yael.fbinheap_addn
def fbinheap_addn_label_range(*args):
return _yael.fbinheap_addn_label_range(*args)
fbinheap_addn_label_range = _yael.fbinheap_addn_label_range
def fbinheap_sort_labels(*args):
return _yael.fbinheap_sort_labels(*args)
fbinheap_sort_labels = _yael.fbinheap_sort_labels
def fbinheap_sort_values(*args):
return _yael.fbinheap_sort_values(*args)
fbinheap_sort_values = _yael.fbinheap_sort_values
def fbinheap_sort(*args):
return _yael.fbinheap_sort(*args)
fbinheap_sort = _yael.fbinheap_sort
def fbinheap_sort_per_labels(*args):
return _yael.fbinheap_sort_per_labels(*args)
fbinheap_sort_per_labels = _yael.fbinheap_sort_per_labels
def fbinheap_display(*args):
return _yael.fbinheap_display(*args)
fbinheap_display = _yael.fbinheap_display
class abinheap_s(_object):
__swig_setmethods__ = {}
__setattr__ = lambda self, name, value: _swig_setattr(self, abinheap_s, name, value)
__swig_getmethods__ = {}
__getattr__ = lambda self, name: _swig_getattr(self, abinheap_s, name)
__repr__ = _swig_repr
__swig_setmethods__["val"] = _yael.abinheap_s_val_set
__swig_getmethods__["val"] = _yael.abinheap_s_val_get
if _newclass:val = _swig_property(_yael.abinheap_s_val_get, _yael.abinheap_s_val_set)
__swig_setmethods__["label"] = _yael.abinheap_s_label_set
__swig_getmethods__["label"] = _yael.abinheap_s_label_get
if _newclass:label = _swig_property(_yael.abinheap_s_label_get, _yael.abinheap_s_label_set)
__swig_setmethods__["k"] = _yael.abinheap_s_k_set
__swig_getmethods__["k"] = _yael.abinheap_s_k_get
if _newclass:k = _swig_property(_yael.abinheap_s_k_get, _yael.abinheap_s_k_set)
__swig_setmethods__["maxk"] = _yael.abinheap_s_maxk_set
__swig_getmethods__["maxk"] = _yael.abinheap_s_maxk_get
if _newclass:maxk = _swig_property(_yael.abinheap_s_maxk_get, _yael.abinheap_s_maxk_set)
__swig_setmethods__["labelsize"] = _yael.abinheap_s_labelsize_set
__swig_getmethods__["labelsize"] = _yael.abinheap_s_labelsize_get
if _newclass:labelsize = _swig_property(_yael.abinheap_s_labelsize_get, _yael.abinheap_s_labelsize_set)
def __init__(self):
this = _yael.new_abinheap_s()
try: self.this.append(this)
except: self.this = this
__swig_destroy__ = _yael.delete_abinheap_s
__del__ = lambda self : None;
abinheap_s_swigregister = _yael.abinheap_s_swigregister
abinheap_s_swigregister(abinheap_s)
def abinheap_new(*args):
return _yael.abinheap_new(*args)
abinheap_new = _yael.abinheap_new
def abinheap_sizeof(*args):
return _yael.abinheap_sizeof(*args)
abinheap_sizeof = _yael.abinheap_sizeof
def abinheap_init(*args):
return _yael.abinheap_init(*args)
abinheap_init = _yael.abinheap_init
def abinheap_delete(*args):
return _yael.abinheap_delete(*args)
abinheap_delete = _yael.abinheap_delete
def abinheap_reset(*args):
return _yael.abinheap_reset(*args)
abinheap_reset = _yael.abinheap_reset
def abinheap_add(*args):
return _yael.abinheap_add(*args)
abinheap_add = _yael.abinheap_add
def abinheap_pop(*args):
return _yael.abinheap_pop(*args)
abinheap_pop = _yael.abinheap_pop
def abinheap_sort(*args):
return _yael.abinheap_sort(*args)
abinheap_sort = _yael.abinheap_sort
def abinheap_get_label(*args):
return _yael.abinheap_get_label(*args)
abinheap_get_label = _yael.abinheap_get_label
def gaussrand():
return _yael.gaussrand()
gaussrand = _yael.gaussrand
def fvec_new(*args):
return _yael.fvec_new(*args)
fvec_new = _yael.fvec_new
def ivec_new(*args):
return _yael.ivec_new(*args)
ivec_new = _yael.ivec_new
def bvec_new(*args):
return _yael.bvec_new(*args)
bvec_new = _yael.bvec_new
def lvec_new(*args):
return _yael.lvec_new(*args)
lvec_new = _yael.lvec_new
def dvec_new(*args):
return _yael.dvec_new(*args)
dvec_new = _yael.dvec_new
def fvec_new_0(*args):
return _yael.fvec_new_0(*args)
fvec_new_0 = _yael.fvec_new_0
def dvec_new_0(*args):
return _yael.dvec_new_0(*args)
dvec_new_0 = _yael.dvec_new_0
def ivec_new_0(*args):
return _yael.ivec_new_0(*args)
ivec_new_0 = _yael.ivec_new_0
def bvec_new_0(*args):
return _yael.bvec_new_0(*args)
bvec_new_0 = _yael.bvec_new_0
def lvec_new_0(*args):
return _yael.lvec_new_0(*args)
lvec_new_0 = _yael.lvec_new_0
def fvec_new_nan(*args):
return _yael.fvec_new_nan(*args)
fvec_new_nan = _yael.fvec_new_nan
def fvec_new_set(*args):
return _yael.fvec_new_set(*args)
fvec_new_set = _yael.fvec_new_set
def ivec_new_set(*args):
return _yael.ivec_new_set(*args)
ivec_new_set = _yael.ivec_new_set
def fvec_new_rand(*args):
return _yael.fvec_new_rand(*args)
fvec_new_rand = _yael.fvec_new_rand
def fvec_new_randn(*args):
return _yael.fvec_new_randn(*args)
fvec_new_randn = _yael.fvec_new_randn
def fvec_randn_r(*args):
return _yael.fvec_randn_r(*args)
fvec_randn_r = _yael.fvec_randn_r
def fvec_new_rand_r(*args):
return _yael.fvec_new_rand_r(*args)
fvec_new_rand_r = _yael.fvec_new_rand_r
def fvec_new_randn_r(*args):
return _yael.fvec_new_randn_r(*args)
fvec_new_randn_r = _yael.fvec_new_randn_r
def ivec_new_range(*args):
return _yael.ivec_new_range(*args)
ivec_new_range = _yael.ivec_new_range
def ivec_new_cpy(*args):
return _yael.ivec_new_cpy(*args)
ivec_new_cpy = _yael.ivec_new_cpy
def fvec_new_cpy(*args):
return _yael.fvec_new_cpy(*args)
fvec_new_cpy = _yael.fvec_new_cpy
def ivec_new_random_perm(*args):
return _yael.ivec_new_random_perm(*args)
ivec_new_random_perm = _yael.ivec_new_random_perm
def ivec_new_random_idx(*args):
return _yael.ivec_new_random_idx(*args)
ivec_new_random_idx = _yael.ivec_new_random_idx
def ivec_new_random_perm_r(*args):
return _yael.ivec_new_random_perm_r(*args)
ivec_new_random_perm_r = _yael.ivec_new_random_perm_r
def ivec_new_random_idx_r(*args):
return _yael.ivec_new_random_idx_r(*args)
ivec_new_random_idx_r = _yael.ivec_new_random_idx_r
def fvec_resize(*args):
return _yael.fvec_resize(*args)
fvec_resize = _yael.fvec_resize
def ivec_resize(*args):
return _yael.ivec_resize(*args)
ivec_resize = _yael.ivec_resize
def ivec_new_histogram(*args):
return _yael.ivec_new_histogram(*args)
ivec_new_histogram = _yael.ivec_new_histogram
def ivec_new_histogram_clip(*args):
return _yael.ivec_new_histogram_clip(*args)
ivec_new_histogram_clip = _yael.ivec_new_histogram_clip
def fvec_new_histogram_clip(*args):
return _yael.fvec_new_histogram_clip(*args)
fvec_new_histogram_clip = _yael.fvec_new_histogram_clip
def ivec_hash(*args):
return _yael.ivec_hash(*args)
ivec_hash = _yael.ivec_hash
def ivec_replace(*args):
return _yael.ivec_replace(*args)
ivec_replace = _yael.ivec_replace
def ivec_count_occurrences(*args):
return _yael.ivec_count_occurrences(*args)
ivec_count_occurrences = _yael.ivec_count_occurrences
def fvec_count_occurrences(*args):
return _yael.fvec_count_occurrences(*args)
fvec_count_occurrences = _yael.fvec_count_occurrences
def fvec_count_lt(*args):
return _yael.fvec_count_lt(*args)
fvec_count_lt = _yael.fvec_count_lt
def ivec_count_lt(*args):
return _yael.ivec_count_lt(*args)
ivec_count_lt = _yael.ivec_count_lt
def fvec_count_gt(*args):
return _yael.fvec_count_gt(*args)
fvec_count_gt = _yael.fvec_count_gt
def ivec_count_gt(*args):
return _yael.ivec_count_gt(*args)
ivec_count_gt = _yael.ivec_count_gt
def fvec_count_inrange(*args):
return _yael.fvec_count_inrange(*args)
fvec_count_inrange = _yael.fvec_count_inrange
def ivec_count_inrange(*args):
return _yael.ivec_count_inrange(*args)
ivec_count_inrange = _yael.ivec_count_inrange
def fvec_count_nan(*args):
return _yael.fvec_count_nan(*args)
fvec_count_nan = _yael.fvec_count_nan
def fvec_count_nonfinite(*args):
return _yael.fvec_count_nonfinite(*args)
fvec_count_nonfinite = _yael.fvec_count_nonfinite
def fvec_count_0(*args):
return _yael.fvec_count_0(*args)
fvec_count_0 = _yael.fvec_count_0
def fvecs_fsize(*args):
return _yael.fvecs_fsize(*args)
fvecs_fsize = _yael.fvecs_fsize
def ivecs_fsize(*args):
return _yael.ivecs_fsize(*args)
ivecs_fsize = _yael.ivecs_fsize
def bvecs_fsize(*args):
return _yael.bvecs_fsize(*args)
bvecs_fsize = _yael.bvecs_fsize
def lvecs_fsize(*args):
return _yael.lvecs_fsize(*args)
lvecs_fsize = _yael.lvecs_fsize
def ivec_fwrite(*args):
return _yael.ivec_fwrite(*args)
ivec_fwrite = _yael.ivec_fwrite
def fvec_fwrite(*args):
return _yael.fvec_fwrite(*args)
fvec_fwrite = _yael.fvec_fwrite
def ivec_fwrite_raw(*args):
return _yael.ivec_fwrite_raw(*args)
ivec_fwrite_raw = _yael.ivec_fwrite_raw
def fvec_fwrite_raw(*args):
return _yael.fvec_fwrite_raw(*args)
fvec_fwrite_raw = _yael.fvec_fwrite_raw
def bvec_fwrite_raw(*args):
return _yael.bvec_fwrite_raw(*args)
bvec_fwrite_raw = _yael.bvec_fwrite_raw
def ivec_write_raw(*args):
return _yael.ivec_write_raw(*args)
ivec_write_raw = _yael.ivec_write_raw