Faiss

- Main Page
- Namespaces
- Classes
- Files

- File List

All Classes Namespaces Functions Variables Typedefs Enumerations Enumerator Friends
swigfaiss_wrap.cpp
1 /* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (http://www.swig.org).
3 * Version 3.0.12
4 *
5 * This file is not intended to be easily readable and contains a number of
6 * coding conventions designed to improve portability and efficiency. Do not make
7 * changes to this file unless you know what you are doing--modify the SWIG
8 * interface file instead.
9 * ----------------------------------------------------------------------------- */
10
11
12 #ifndef SWIGPYTHON
13 #define SWIGPYTHON
14 #endif
15
16 #define SWIG_PYTHON_DIRECTOR_NO_VTABLE
17
18
19 #ifdef __cplusplus
20 /* SwigValueWrapper is described in swig.swg */
21 template<typename T> class SwigValueWrapper {
22 struct SwigMovePointer {
23 T *ptr;
24 SwigMovePointer(T *p) : ptr(p) { }
25 ~SwigMovePointer() { delete ptr; }
26 SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
27 } pointer;
28 SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
29 SwigValueWrapper(const SwigValueWrapper<T>& rhs);
30 public:
31 SwigValueWrapper() : pointer(0) { }
32 SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
33 operator T&() const { return *pointer.ptr; }
34 T *operator&() { return pointer.ptr; }
35 };
36
37 template <typename T> T SwigValueInit() {
38 return T();
39 }
40 #endif
41
42 /* -----------------------------------------------------------------------------
43 * This section contains generic SWIG labels for method/variable
44 * declarations/attributes, and other compiler dependent labels.
45 * ----------------------------------------------------------------------------- */
46
47 /* template workaround for compilers that cannot correctly implement the C++ standard */
48 #ifndef SWIGTEMPLATEDISAMBIGUATOR
49 # if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
50 # define SWIGTEMPLATEDISAMBIGUATOR template
51 # elif defined(__HP_aCC)
52 /* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
53 /* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
54 # define SWIGTEMPLATEDISAMBIGUATOR template
55 # else
56 # define SWIGTEMPLATEDISAMBIGUATOR
57 # endif
58 #endif
59
60 /* inline attribute */
61 #ifndef SWIGINLINE
62 # if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
63 # define SWIGINLINE inline
64 # else
65 # define SWIGINLINE
66 # endif
67 #endif
68
69 /* attribute recognised by some compilers to avoid 'unused' warnings */
70 #ifndef SWIGUNUSED
71 # if defined(__GNUC__)
72 # if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
73 # define SWIGUNUSED __attribute__ ((__unused__))
74 # else
75 # define SWIGUNUSED
76 # endif
77 # elif defined(__ICC)
78 # define SWIGUNUSED __attribute__ ((__unused__))
79 # else
80 # define SWIGUNUSED
81 # endif
82 #endif
83
84 #ifndef SWIG_MSC_UNSUPPRESS_4505
85 # if defined(_MSC_VER)
86 # pragma warning(disable : 4505) /* unreferenced local function has been removed */
87 # endif
88 #endif
89
90 #ifndef SWIGUNUSEDPARM
91 # ifdef __cplusplus
92 # define SWIGUNUSEDPARM(p)
93 # else
94 # define SWIGUNUSEDPARM(p) p SWIGUNUSED
95 # endif
96 #endif
97
98 /* internal SWIG method */
99 #ifndef SWIGINTERN
100 # define SWIGINTERN static SWIGUNUSED
101 #endif
102
103 /* internal inline SWIG method */
104 #ifndef SWIGINTERNINLINE
105 # define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
106 #endif
107
108 /* exporting methods */
109 #if defined(__GNUC__)
110 # if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
111 # ifndef GCC_HASCLASSVISIBILITY
112 # define GCC_HASCLASSVISIBILITY
113 # endif
114 # endif
115 #endif
116
117 #ifndef SWIGEXPORT
118 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
119 # if defined(STATIC_LINKED)
120 # define SWIGEXPORT
121 # else
122 # define SWIGEXPORT __declspec(dllexport)
123 # endif
124 # else
125 # if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
126 # define SWIGEXPORT __attribute__ ((visibility("default")))
127 # else
128 # define SWIGEXPORT
129 # endif
130 # endif
131 #endif
132
133 /* calling conventions for Windows */
134 #ifndef SWIGSTDCALL
135 # if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
136 # define SWIGSTDCALL __stdcall
137 # else
138 # define SWIGSTDCALL
139 # endif
140 #endif
141
142 /* Deal with Microsoft's attempt at deprecating C standard runtime functions */
143 #if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
144 # define _CRT_SECURE_NO_DEPRECATE
145 #endif
146
147 /* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
148 #if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
149 # define _SCL_SECURE_NO_DEPRECATE
150 #endif
151
152 /* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
153 #if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
154 # define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
155 #endif
156
157 /* Intel's compiler complains if a variable which was never initialised is
158 * cast to void, which is a common idiom which we use to indicate that we
159 * are aware a variable isn't used. So we just silence that warning.
160 * See: https://github.com/swig/swig/issues/192 for more discussion.
161 */
162 #ifdef __INTEL_COMPILER
163 # pragma warning disable 592
164 #endif
165
166
167 #if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
168 /* Use debug wrappers with the Python release dll */
169 # undef _DEBUG
170 # include <Python.h>
171 # define _DEBUG
172 #else
173 # include <Python.h>
174 #endif
175
176 /* -----------------------------------------------------------------------------
177 * swigrun.swg
178 *
179 * This file contains generic C API SWIG runtime support for pointer
180 * type checking.
181 * ----------------------------------------------------------------------------- */
182
183 /* This should only be incremented when either the layout of swig_type_info changes,
184 or for whatever reason, the runtime changes incompatibly */
185 #define SWIG_RUNTIME_VERSION "4"
186
187 /* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
188 #ifdef SWIG_TYPE_TABLE
189 # define SWIG_QUOTE_STRING(x) #x
190 # define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
191 # define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
192 #else
193 # define SWIG_TYPE_TABLE_NAME
194 #endif
195
196 /*
197 You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
198 creating a static or dynamic library from the SWIG runtime code.
199 In 99.9% of the cases, SWIG just needs to declare them as 'static'.
200
201 But only do this if strictly necessary, ie, if you have problems
202 with your compiler or suchlike.
203 */
204
205 #ifndef SWIGRUNTIME
206 # define SWIGRUNTIME SWIGINTERN
207 #endif
208
209 #ifndef SWIGRUNTIMEINLINE
210 # define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
211 #endif
212
213 /* Generic buffer size */
214 #ifndef SWIG_BUFFER_SIZE
215 # define SWIG_BUFFER_SIZE 1024
216 #endif
217
218 /* Flags for pointer conversions */
219 #define SWIG_POINTER_DISOWN 0x1
220 #define SWIG_CAST_NEW_MEMORY 0x2
221
222 /* Flags for new pointer objects */
223 #define SWIG_POINTER_OWN 0x1
224
225
226 /*
227 Flags/methods for returning states.
228
229 The SWIG conversion methods, as ConvertPtr, return an integer
230 that tells if the conversion was successful or not. And if not,
231 an error code can be returned (see swigerrors.swg for the codes).
232
233 Use the following macros/flags to set or process the returning
234 states.
235
236 In old versions of SWIG, code such as the following was usually written:
237
238 if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
239 // success code
240 } else {
241 //fail code
242 }
243
244 Now you can be more explicit:
245
246 int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
247 if (SWIG_IsOK(res)) {
248 // success code
249 } else {
250 // fail code
251 }
252
253 which is the same really, but now you can also do
254
255 Type *ptr;
256 int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
257 if (SWIG_IsOK(res)) {
258 // success code
259 if (SWIG_IsNewObj(res) {
260 ...
261 delete *ptr;
262 } else {
263 ...
264 }
265 } else {
266 // fail code
267 }
268
269 I.e., now SWIG_ConvertPtr can return new objects and you can
270 identify the case and take care of the deallocation. Of course that
271 also requires SWIG_ConvertPtr to return new result values, such as
272
273 int SWIG_ConvertPtr(obj, ptr,...) {
274 if (<obj is ok>) {
275 if (<need new object>) {
276 *ptr = <ptr to new allocated object>;
277 return SWIG_NEWOBJ;
278 } else {
279 *ptr = <ptr to old object>;
280 return SWIG_OLDOBJ;
281 }
282 } else {
283 return SWIG_BADOBJ;
284 }
285 }
286
287 Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
288 more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
289 SWIG errors code.
290
291 Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
292 allows to return the 'cast rank', for example, if you have this
293
294 int food(double)
295 int fooi(int);
296
297 and you call
298
299 food(1) // cast rank '1' (1 -> 1.0)
300 fooi(1) // cast rank '0'
301
302 just use the SWIG_AddCast()/SWIG_CheckState()
303 */
304
305 #define SWIG_OK (0)
306 #define SWIG_ERROR (-1)
307 #define SWIG_IsOK(r) (r >= 0)
308 #define SWIG_ArgError(r) ((r != SWIG_ERROR) ? r : SWIG_TypeError)
309
310 /* The CastRankLimit says how many bits are used for the cast rank */
311 #define SWIG_CASTRANKLIMIT (1 << 8)
312 /* The NewMask denotes the object was created (using new/malloc) */
313 #define SWIG_NEWOBJMASK (SWIG_CASTRANKLIMIT << 1)
314 /* The TmpMask is for in/out typemaps that use temporal objects */
315 #define SWIG_TMPOBJMASK (SWIG_NEWOBJMASK << 1)
316 /* Simple returning values */
317 #define SWIG_BADOBJ (SWIG_ERROR)
318 #define SWIG_OLDOBJ (SWIG_OK)
319 #define SWIG_NEWOBJ (SWIG_OK | SWIG_NEWOBJMASK)
320 #define SWIG_TMPOBJ (SWIG_OK | SWIG_TMPOBJMASK)
321 /* Check, add and del mask methods */
322 #define SWIG_AddNewMask(r) (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
323 #define SWIG_DelNewMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
324 #define SWIG_IsNewObj(r) (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
325 #define SWIG_AddTmpMask(r) (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
326 #define SWIG_DelTmpMask(r) (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
327 #define SWIG_IsTmpObj(r) (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))
328
329 /* Cast-Rank Mode */
330 #if defined(SWIG_CASTRANK_MODE)
331 # ifndef SWIG_TypeRank
332 # define SWIG_TypeRank unsigned long
333 # endif
334 # ifndef SWIG_MAXCASTRANK /* Default cast allowed */
335 # define SWIG_MAXCASTRANK (2)
336 # endif
337 # define SWIG_CASTRANKMASK ((SWIG_CASTRANKLIMIT) -1)
338 # define SWIG_CastRank(r) (r & SWIG_CASTRANKMASK)
339 SWIGINTERNINLINE int SWIG_AddCast(int r) {
340 return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
341 }
342 SWIGINTERNINLINE int SWIG_CheckState(int r) {
343 return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
344 }
345 #else /* no cast-rank mode */
346 # define SWIG_AddCast(r) (r)
347 # define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
348 #endif
349
350
351 #include <string.h>
352
353 #ifdef __cplusplus
354 extern "C" {
355 #endif
356
357 typedef void *(*swig_converter_func)(void *, int *);
358 typedef struct swig_type_info *(*swig_dycast_func)(void **);
359
360 /* Structure to store information on one type */
361 typedef struct swig_type_info {
362 const char *name; /* mangled name of this type */
363 const char *str; /* human readable name of this type */
364 swig_dycast_func dcast; /* dynamic cast function down a hierarchy */
365 struct swig_cast_info *cast; /* linked list of types that can cast into this type */
366 void *clientdata; /* language specific type data */
367 int owndata; /* flag if the structure owns the clientdata */
368 } swig_type_info;
369
370 /* Structure to store a type and conversion function used for casting */
371 typedef struct swig_cast_info {
372 swig_type_info *type; /* pointer to type that is equivalent to this type */
373 swig_converter_func converter; /* function to cast the void pointers */
374 struct swig_cast_info *next; /* pointer to next cast in linked list */
375 struct swig_cast_info *prev; /* pointer to the previous cast */
376 } swig_cast_info;
377
378 /* Structure used to store module information
379 * Each module generates one structure like this, and the runtime collects
380 * all of these structures and stores them in a circularly linked list.*/
381 typedef struct swig_module_info {
382 swig_type_info **types; /* Array of pointers to swig_type_info structures that are in this module */
383 size_t size; /* Number of types in this module */
384 struct swig_module_info *next; /* Pointer to next element in circularly linked list */
385 swig_type_info **type_initial; /* Array of initially generated type structures */
386 swig_cast_info **cast_initial; /* Array of initially generated casting structures */
387 void *clientdata; /* Language specific module data */
388 } swig_module_info;
389
390 /*
391 Compare two type names skipping the space characters, therefore
392 "char*" == "char *" and "Class<int>" == "Class<int >", etc.
393
394 Return 0 when the two name types are equivalent, as in
395 strncmp, but skipping ' '.
396 */
397 SWIGRUNTIME int
398 SWIG_TypeNameComp(const char *f1, const char *l1,
399 const char *f2, const char *l2) {
400 for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
401 while ((*f1 == ' ') && (f1 != l1)) ++f1;
402 while ((*f2 == ' ') && (f2 != l2)) ++f2;
403 if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
404 }
405 return (int)((l1 - f1) - (l2 - f2));
406 }
407
408 /*
409 Check type equivalence in a name list like <name1>|<name2>|...
410 Return 0 if equal, -1 if nb < tb, 1 if nb > tb
411 */
412 SWIGRUNTIME int
413 SWIG_TypeCmp(const char *nb, const char *tb) {
414 int equiv = 1;
415 const char* te = tb + strlen(tb);
416 const char* ne = nb;
417 while (equiv != 0 && *ne) {
418 for (nb = ne; *ne; ++ne) {
419 if (*ne == '|') break;
420 }
421 equiv = SWIG_TypeNameComp(nb, ne, tb, te);
422 if (*ne) ++ne;
423 }
424 return equiv;
425 }
426
427 /*
428 Check type equivalence in a name list like <name1>|<name2>|...
429 Return 0 if not equal, 1 if equal
430 */
431 SWIGRUNTIME int
432 SWIG_TypeEquiv(const char *nb, const char *tb) {
433 return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
434 }
435
436 /*
437 Check the typename
438 */
439 SWIGRUNTIME swig_cast_info *
440 SWIG_TypeCheck(const char *c, swig_type_info *ty) {
441 if (ty) {
442 swig_cast_info *iter = ty->cast;
443 while (iter) {
444 if (strcmp(iter->type->name, c) == 0) {
445 if (iter == ty->cast)
446 return iter;
447 /* Move iter to the top of the linked list */
448 iter->prev->next = iter->next;
449 if (iter->next)
450 iter->next->prev = iter->prev;
451 iter->next = ty->cast;
452 iter->prev = 0;
453 if (ty->cast) ty->cast->prev = iter;
454 ty->cast = iter;
455 return iter;
456 }
457 iter = iter->next;
458 }
459 }
460 return 0;
461 }
462
463 /*
464 Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
465 */
466 SWIGRUNTIME swig_cast_info *
467 SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
468 if (ty) {
469 swig_cast_info *iter = ty->cast;
470 while (iter) {
471 if (iter->type == from) {
472 if (iter == ty->cast)
473 return iter;
474 /* Move iter to the top of the linked list */
475 iter->prev->next = iter->next;
476 if (iter->next)
477 iter->next->prev = iter->prev;
478 iter->next = ty->cast;
479 iter->prev = 0;
480 if (ty->cast) ty->cast->prev = iter;
481 ty->cast = iter;
482 return iter;
483 }
484 iter = iter->next;
485 }
486 }
487 return 0;
488 }
489
490 /*
491 Cast a pointer up an inheritance hierarchy
492 */
493 SWIGRUNTIMEINLINE void *
494 SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
495 return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
496 }
497
498 /*
499 Dynamic pointer casting. Down an inheritance hierarchy
500 */
501 SWIGRUNTIME swig_type_info *
502 SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
503 swig_type_info *lastty = ty;
504 if (!ty || !ty->dcast) return ty;
505 while (ty && (ty->dcast)) {
506 ty = (*ty->dcast)(ptr);
507 if (ty) lastty = ty;
508 }
509 return lastty;
510 }
511
512 /*
513 Return the name associated with this type
514 */
515 SWIGRUNTIMEINLINE const char *
516 SWIG_TypeName(const swig_type_info *ty) {
517 return ty->name;
518 }
519
520 /*
521 Return the pretty name associated with this type,
522 that is an unmangled type name in a form presentable to the user.
523 */
524 SWIGRUNTIME const char *
525 SWIG_TypePrettyName(const swig_type_info *type) {
526 /* The "str" field contains the equivalent pretty names of the
527 type, separated by vertical-bar characters. We choose
528 to print the last name, as it is often (?) the most
529 specific. */
530 if (!type) return NULL;
531 if (type->str != NULL) {
532 const char *last_name = type->str;
533 const char *s;
534 for (s = type->str; *s; s++)
535 if (*s == '|') last_name = s+1;
536 return last_name;
537 }
538 else
539 return type->name;
540 }
541
542 /*
543 Set the clientdata field for a type
544 */
545 SWIGRUNTIME void
546 SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
547 swig_cast_info *cast = ti->cast;
548 /* if (ti->clientdata == clientdata) return; */
549 ti->clientdata = clientdata;
550
551 while (cast) {
552 if (!cast->converter) {
553 swig_type_info *tc = cast->type;
554 if (!tc->clientdata) {
555 SWIG_TypeClientData(tc, clientdata);
556 }
557 }
558 cast = cast->next;
559 }
560 }
561 SWIGRUNTIME void
562 SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
563 SWIG_TypeClientData(ti, clientdata);
564 ti->owndata = 1;
565 }
566
567 /*
568 Search for a swig_type_info structure only by mangled name
569 Search is a O(log #types)
570
571 We start searching at module start, and finish searching when start == end.
572 Note: if start == end at the beginning of the function, we go all the way around
573 the circular list.
574 */
575 SWIGRUNTIME swig_type_info *
576 SWIG_MangledTypeQueryModule(swig_module_info *start,
577 swig_module_info *end,
578 const char *name) {
579 swig_module_info *iter = start;
580 do {
581 if (iter->size) {
582 size_t l = 0;
583 size_t r = iter->size - 1;
584 do {
585 /* since l+r >= 0, we can (>> 1) instead (/ 2) */
586 size_t i = (l + r) >> 1;
587 const char *iname = iter->types[i]->name;
588 if (iname) {
589 int compare = strcmp(name, iname);
590 if (compare == 0) {
591 return iter->types[i];
592 } else if (compare < 0) {
593 if (i) {
594 r = i - 1;
595 } else {
596 break;
597 }
598 } else if (compare > 0) {
599 l = i + 1;
600 }
601 } else {
602 break; /* should never happen */
603 }
604 } while (l <= r);
605 }
606 iter = iter->next;
607 } while (iter != end);
608 return 0;
609 }
610
611 /*
612 Search for a swig_type_info structure for either a mangled name or a human readable name.
613 It first searches the mangled names of the types, which is a O(log #types)
614 If a type is not found it then searches the human readable names, which is O(#types).
615
616 We start searching at module start, and finish searching when start == end.
617 Note: if start == end at the beginning of the function, we go all the way around
618 the circular list.
619 */
620 SWIGRUNTIME swig_type_info *
621 SWIG_TypeQueryModule(swig_module_info *start,
622 swig_module_info *end,
623 const char *name) {
624 /* STEP 1: Search the name field using binary search */
625 swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
626 if (ret) {
627 return ret;
628 } else {
629 /* STEP 2: If the type hasn't been found, do a complete search
630 of the str field (the human readable name) */
631 swig_module_info *iter = start;
632 do {
633 size_t i = 0;
634 for (; i < iter->size; ++i) {
635 if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
636 return iter->types[i];
637 }
638 iter = iter->next;
639 } while (iter != end);
640 }
641
642 /* neither found a match */
643 return 0;
644 }
645
646 /*
647 Pack binary data into a string
648 */
649 SWIGRUNTIME char *
650 SWIG_PackData(char *c, void *ptr, size_t sz) {
651 static const char hex[17] = "0123456789abcdef";
652 const unsigned char *u = (unsigned char *) ptr;
653 const unsigned char *eu = u + sz;
654 for (; u != eu; ++u) {
655 unsigned char uu = *u;
656 *(c++) = hex[(uu & 0xf0) >> 4];
657 *(c++) = hex[uu & 0xf];
658 }
659 return c;
660 }
661
662 /*
663 Unpack binary data from a string
664 */
665 SWIGRUNTIME const char *
666 SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
667 unsigned char *u = (unsigned char *) ptr;
668 const unsigned char *eu = u + sz;
669 for (; u != eu; ++u) {
670 char d = *(c++);
671 unsigned char uu;
672 if ((d >= '0') && (d <= '9'))
673 uu = (unsigned char)((d - '0') << 4);
674 else if ((d >= 'a') && (d <= 'f'))
675 uu = (unsigned char)((d - ('a'-10)) << 4);
676 else
677 return (char *) 0;
678 d = *(c++);
679 if ((d >= '0') && (d <= '9'))
680 uu |= (unsigned char)(d - '0');
681 else if ((d >= 'a') && (d <= 'f'))
682 uu |= (unsigned char)(d - ('a'-10));
683 else
684 return (char *) 0;
685 *u = uu;
686 }
687 return c;
688 }
689
690 /*
691 Pack 'void *' into a string buffer.
692 */
693 SWIGRUNTIME char *
694 SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
695 char *r = buff;
696 if ((2*sizeof(void *) + 2) > bsz) return 0;
697 *(r++) = '_';
698 r = SWIG_PackData(r,&ptr,sizeof(void *));
699 if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
700 strcpy(r,name);
701 return buff;
702 }
703
704 SWIGRUNTIME const char *
705 SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
706 if (*c != '_') {
707 if (strcmp(c,"NULL") == 0) {
708 *ptr = (void *) 0;
709 return name;
710 } else {
711 return 0;
712 }
713 }
714 return SWIG_UnpackData(++c,ptr,sizeof(void *));
715 }
716
717 SWIGRUNTIME char *
718 SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
719 char *r = buff;
720 size_t lname = (name ? strlen(name) : 0);
721 if ((2*sz + 2 + lname) > bsz) return 0;
722 *(r++) = '_';
723 r = SWIG_PackData(r,ptr,sz);
724 if (lname) {
725 strncpy(r,name,lname+1);
726 } else {
727 *r = 0;
728 }
729 return buff;
730 }
731
732 SWIGRUNTIME const char *
733 SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
734 if (*c != '_') {
735 if (strcmp(c,"NULL") == 0) {
736 memset(ptr,0,sz);
737 return name;
738 } else {
739 return 0;
740 }
741 }
742 return SWIG_UnpackData(++c,ptr,sz);
743 }
744
745 #ifdef __cplusplus
746 }
747 #endif
748
749 /* Errors in SWIG */
750 #define SWIG_UnknownError -1
751 #define SWIG_IOError -2
752 #define SWIG_RuntimeError -3
753 #define SWIG_IndexError -4
754 #define SWIG_TypeError -5
755 #define SWIG_DivisionByZero -6
756 #define SWIG_OverflowError -7
757 #define SWIG_SyntaxError -8
758 #define SWIG_ValueError -9
759 #define SWIG_SystemError -10
760 #define SWIG_AttributeError -11
761 #define SWIG_MemoryError -12
762 #define SWIG_NullReferenceError -13
763
764
765
766 /* Compatibility macros for Python 3 */
767 #if PY_VERSION_HEX >= 0x03000000
768
769 #define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
770 #define PyInt_Check(x) PyLong_Check(x)
771 #define PyInt_AsLong(x) PyLong_AsLong(x)
772 #define PyInt_FromLong(x) PyLong_FromLong(x)
773 #define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
774 #define PyString_Check(name) PyBytes_Check(name)
775 #define PyString_FromString(x) PyUnicode_FromString(x)
776 #define PyString_Format(fmt, args) PyUnicode_Format(fmt, args)
777 #define PyString_AsString(str) PyBytes_AsString(str)
778 #define PyString_Size(str) PyBytes_Size(str)
779 #define PyString_InternFromString(key) PyUnicode_InternFromString(key)
780 #define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
781 #define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
782 #define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)
783
784 #endif
785
786 #ifndef Py_TYPE
787 # define Py_TYPE(op) ((op)->ob_type)
788 #endif
789
790 /* SWIG APIs for compatibility of both Python 2 & 3 */
791
792 #if PY_VERSION_HEX >= 0x03000000
793 # define SWIG_Python_str_FromFormat PyUnicode_FromFormat
794 #else
795 # define SWIG_Python_str_FromFormat PyString_FromFormat
796 #endif
797
798
799 /* Warning: This function will allocate a new string in Python 3,
800 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
801 */
802 SWIGINTERN char*
803 SWIG_Python_str_AsChar(PyObject *str)
804 {
805 #if PY_VERSION_HEX >= 0x03000000
806 char *cstr;
807 char *newstr;
808 Py_ssize_t len;
809 str = PyUnicode_AsUTF8String(str);
810 PyBytes_AsStringAndSize(str, &cstr, &len);
811 newstr = (char *) malloc(len+1);
812 memcpy(newstr, cstr, len+1);
813 Py_XDECREF(str);
814 return newstr;
815 #else
816 return PyString_AsString(str);
817 #endif
818 }
819
820 #if PY_VERSION_HEX >= 0x03000000
821 # define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
822 #else
823 # define SWIG_Python_str_DelForPy3(x)
824 #endif
825
826
827 SWIGINTERN PyObject*
828 SWIG_Python_str_FromChar(const char *c)
829 {
830 #if PY_VERSION_HEX >= 0x03000000
831 return PyUnicode_FromString(c);
832 #else
833 return PyString_FromString(c);
834 #endif
835 }
836
837 /* Add PyOS_snprintf for old Pythons */
838 #if PY_VERSION_HEX < 0x02020000
839 # if defined(_MSC_VER) || defined(__BORLANDC__) || defined(_WATCOM)
840 # define PyOS_snprintf _snprintf
841 # else
842 # define PyOS_snprintf snprintf
843 # endif
844 #endif
845
846 /* A crude PyString_FromFormat implementation for old Pythons */
847 #if PY_VERSION_HEX < 0x02020000
848
849 #ifndef SWIG_PYBUFFER_SIZE
850 # define SWIG_PYBUFFER_SIZE 1024
851 #endif
852
853 static PyObject *
854 PyString_FromFormat(const char *fmt, ...) {
855 va_list ap;
856 char buf[SWIG_PYBUFFER_SIZE * 2];
857 int res;
858 va_start(ap, fmt);
859 res = vsnprintf(buf, sizeof(buf), fmt, ap);
860 va_end(ap);
861 return (res < 0 || res >= (int)sizeof(buf)) ? 0 : PyString_FromString(buf);
862 }
863 #endif
864
865 #ifndef PyObject_DEL
866 # define PyObject_DEL PyObject_Del
867 #endif
868
869 /* A crude PyExc_StopIteration exception for old Pythons */
870 #if PY_VERSION_HEX < 0x02020000
871 # ifndef PyExc_StopIteration
872 # define PyExc_StopIteration PyExc_RuntimeError
873 # endif
874 # ifndef PyObject_GenericGetAttr
875 # define PyObject_GenericGetAttr 0
876 # endif
877 #endif
878
879 /* Py_NotImplemented is defined in 2.1 and up. */
880 #if PY_VERSION_HEX < 0x02010000
881 # ifndef Py_NotImplemented
882 # define Py_NotImplemented PyExc_RuntimeError
883 # endif
884 #endif
885
886 /* A crude PyString_AsStringAndSize implementation for old Pythons */
887 #if PY_VERSION_HEX < 0x02010000
888 # ifndef PyString_AsStringAndSize
889 # define PyString_AsStringAndSize(obj, s, len) {*s = PyString_AsString(obj); *len = *s ? strlen(*s) : 0;}
890 # endif
891 #endif
892
893 /* PySequence_Size for old Pythons */
894 #if PY_VERSION_HEX < 0x02000000
895 # ifndef PySequence_Size
896 # define PySequence_Size PySequence_Length
897 # endif
898 #endif
899
900 /* PyBool_FromLong for old Pythons */
901 #if PY_VERSION_HEX < 0x02030000
902 static
903 PyObject *PyBool_FromLong(long ok)
904 {
905 PyObject *result = ok ? Py_True : Py_False;
906 Py_INCREF(result);
907 return result;
908 }
909 #endif
910
911 /* Py_ssize_t for old Pythons */
912 /* This code is as recommended by: */
913 /* http://www.python.org/dev/peps/pep-0353/#conversion-guidelines */
914 #if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
915 typedef int Py_ssize_t;
916 # define PY_SSIZE_T_MAX INT_MAX
917 # define PY_SSIZE_T_MIN INT_MIN
918 typedef inquiry lenfunc;
919 typedef intargfunc ssizeargfunc;
920 typedef intintargfunc ssizessizeargfunc;
921 typedef intobjargproc ssizeobjargproc;
922 typedef intintobjargproc ssizessizeobjargproc;
923 typedef getreadbufferproc readbufferproc;
924 typedef getwritebufferproc writebufferproc;
925 typedef getsegcountproc segcountproc;
926 typedef getcharbufferproc charbufferproc;
927 static long PyNumber_AsSsize_t (PyObject *x, void *SWIGUNUSEDPARM(exc))
928 {
929 long result = 0;
930 PyObject *i = PyNumber_Int(x);
931 if (i) {
932 result = PyInt_AsLong(i);
933 Py_DECREF(i);
934 }
935 return result;
936 }
937 #endif
938
939 #if PY_VERSION_HEX < 0x02050000
940 #define PyInt_FromSize_t(x) PyInt_FromLong((long)x)
941 #endif
942
943 #if PY_VERSION_HEX < 0x02040000
944 #define Py_VISIT(op) \
945 do { \
946 if (op) { \
947 int vret = visit((op), arg); \
948 if (vret) \
949 return vret; \
950 } \
951 } while (0)
952 #endif
953
954 #if PY_VERSION_HEX < 0x02030000
955 typedef struct {
956 PyTypeObject type;
957 PyNumberMethods as_number;
958 PyMappingMethods as_mapping;
959 PySequenceMethods as_sequence;
960 PyBufferProcs as_buffer;
961 PyObject *name, *slots;
962 } PyHeapTypeObject;
963 #endif
964
965 #if PY_VERSION_HEX < 0x02030000
966 typedef destructor freefunc;
967 #endif
968
969 #if ((PY_MAJOR_VERSION == 2 && PY_MINOR_VERSION > 6) || \
970 (PY_MAJOR_VERSION == 3 && PY_MINOR_VERSION > 0) || \
971 (PY_MAJOR_VERSION > 3))
972 # define SWIGPY_USE_CAPSULE
973 # define SWIGPY_CAPSULE_NAME ((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)
974 #endif
975
976 #if PY_VERSION_HEX < 0x03020000
977 #define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
978 #define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
979 #define Py_hash_t long
980 #endif
981
982 /* -----------------------------------------------------------------------------
983 * error manipulation
984 * ----------------------------------------------------------------------------- */
985
986 SWIGRUNTIME PyObject*
987 SWIG_Python_ErrorType(int code) {
988 PyObject* type = 0;
989 switch(code) {
990 case SWIG_MemoryError:
991 type = PyExc_MemoryError;
992 break;
993 case SWIG_IOError:
994 type = PyExc_IOError;
995 break;
996 case SWIG_RuntimeError:
997 type = PyExc_RuntimeError;
998 break;
999 case SWIG_IndexError:
1000 type = PyExc_IndexError;
1001 break;
1002 case SWIG_TypeError:
1003 type = PyExc_TypeError;
1004 break;
1005 case SWIG_DivisionByZero:
1006 type = PyExc_ZeroDivisionError;
1007 break;
1008 case SWIG_OverflowError:
1009 type = PyExc_OverflowError;
1010 break;
1011 case SWIG_SyntaxError:
1012 type = PyExc_SyntaxError;
1013 break;
1014 case SWIG_ValueError:
1015 type = PyExc_ValueError;
1016 break;
1017 case SWIG_SystemError:
1018 type = PyExc_SystemError;
1019 break;
1020 case SWIG_AttributeError:
1021 type = PyExc_AttributeError;
1022 break;
1023 default:
1024 type = PyExc_RuntimeError;
1025 }
1026 return type;
1027 }
1028
1029
1030 SWIGRUNTIME void
1031 SWIG_Python_AddErrorMsg(const char* mesg)
1032 {
1033 PyObject *type = 0;
1034 PyObject *value = 0;
1035 PyObject *traceback = 0;
1036
1037 if (PyErr_Occurred()) PyErr_Fetch(&type, &value, &traceback);
1038 if (value) {
1039 char *tmp;
1040 PyObject *old_str = PyObject_Str(value);
1041 PyErr_Clear();
1042 Py_XINCREF(type);
1043
1044 PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
1045 SWIG_Python_str_DelForPy3(tmp);
1046 Py_DECREF(old_str);
1047 Py_DECREF(value);
1048 } else {
1049 PyErr_SetString(PyExc_RuntimeError, mesg);
1050 }
1051 }
1052
1053 #if defined(SWIG_PYTHON_NO_THREADS)
1054 # if defined(SWIG_PYTHON_THREADS)
1055 # undef SWIG_PYTHON_THREADS
1056 # endif
1057 #endif
1058 #if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
1059 # if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
1060 # if (PY_VERSION_HEX >= 0x02030000) /* For 2.3 or later, use the PyGILState calls */
1061 # define SWIG_PYTHON_USE_GIL
1062 # endif
1063 # endif
1064 # if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
1065 # ifndef SWIG_PYTHON_INITIALIZE_THREADS
1066 # define SWIG_PYTHON_INITIALIZE_THREADS PyEval_InitThreads()
1067 # endif
1068 # ifdef __cplusplus /* C++ code */
1069 class SWIG_Python_Thread_Block {
1070 bool status;
1071 PyGILState_STATE state;
1072 public:
1073 void end() { if (status) { PyGILState_Release(state); status = false;} }
1074 SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
1075 ~SWIG_Python_Thread_Block() { end(); }
1076 };
1077 class SWIG_Python_Thread_Allow {
1078 bool status;
1079 PyThreadState *save;
1080 public:
1081 void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
1082 SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
1083 ~SWIG_Python_Thread_Allow() { end(); }
1084 };
1085 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK SWIG_Python_Thread_Block _swig_thread_block
1086 # define SWIG_PYTHON_THREAD_END_BLOCK _swig_thread_block.end()
1087 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW SWIG_Python_Thread_Allow _swig_thread_allow
1088 # define SWIG_PYTHON_THREAD_END_ALLOW _swig_thread_allow.end()
1089 # else /* C code */
1090 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
1091 # define SWIG_PYTHON_THREAD_END_BLOCK PyGILState_Release(_swig_thread_block)
1092 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW PyThreadState *_swig_thread_allow = PyEval_SaveThread()
1093 # define SWIG_PYTHON_THREAD_END_ALLOW PyEval_RestoreThread(_swig_thread_allow)
1094 # endif
1095 # else /* Old thread way, not implemented, user must provide it */
1096 # if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
1097 # define SWIG_PYTHON_INITIALIZE_THREADS
1098 # endif
1099 # if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
1100 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1101 # endif
1102 # if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
1103 # define SWIG_PYTHON_THREAD_END_BLOCK
1104 # endif
1105 # if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
1106 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1107 # endif
1108 # if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
1109 # define SWIG_PYTHON_THREAD_END_ALLOW
1110 # endif
1111 # endif
1112 #else /* No thread support */
1113 # define SWIG_PYTHON_INITIALIZE_THREADS
1114 # define SWIG_PYTHON_THREAD_BEGIN_BLOCK
1115 # define SWIG_PYTHON_THREAD_END_BLOCK
1116 # define SWIG_PYTHON_THREAD_BEGIN_ALLOW
1117 # define SWIG_PYTHON_THREAD_END_ALLOW
1118 #endif
1119
1120 /* -----------------------------------------------------------------------------
1121 * Python API portion that goes into the runtime
1122 * ----------------------------------------------------------------------------- */
1123
1124 #ifdef __cplusplus
1125 extern "C" {
1126 #endif
1127
1128 /* -----------------------------------------------------------------------------
1129 * Constant declarations
1130 * ----------------------------------------------------------------------------- */
1131
1132 /* Constant Types */
1133 #define SWIG_PY_POINTER 4
1134 #define SWIG_PY_BINARY 5
1135
1136 /* Constant information structure */
1137 typedef struct swig_const_info {
1138 int type;
1139 char *name;
1140 long lvalue;
1141 double dvalue;
1142 void *pvalue;
1143 swig_type_info **ptype;
1144 } swig_const_info;
1145
1146
1147 /* -----------------------------------------------------------------------------
1148 * Wrapper of PyInstanceMethod_New() used in Python 3
1149 * It is exported to the generated module, used for -fastproxy
1150 * ----------------------------------------------------------------------------- */
1151 #if PY_VERSION_HEX >= 0x03000000
1152 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func)
1153 {
1154 return PyInstanceMethod_New(func);
1155 }
1156 #else
1157 SWIGRUNTIME PyObject* SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(func))
1158 {
1159 return NULL;
1160 }
1161 #endif
1162
1163 #ifdef __cplusplus
1164 }
1165 #endif
1166
1167
1168 /* -----------------------------------------------------------------------------
1169 * pyrun.swg
1170 *
1171 * This file contains the runtime support for Python modules
1172 * and includes code for managing global variables and pointer
1173 * type checking.
1174 *
1175 * ----------------------------------------------------------------------------- */
1176
1177 /* Common SWIG API */
1178
1179 /* for raw pointers */
1180 #define SWIG_Python_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
1181 #define SWIG_ConvertPtr(obj, pptr, type, flags) SWIG_Python_ConvertPtr(obj, pptr, type, flags)
1182 #define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own) SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)
1183
1184 #ifdef SWIGPYTHON_BUILTIN
1185 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(self, ptr, type, flags)
1186 #else
1187 #define SWIG_NewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1188 #endif
1189
1190 #define SWIG_InternalNewPointerObj(ptr, type, flags) SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
1191
1192 #define SWIG_CheckImplicit(ty) SWIG_Python_CheckImplicit(ty)
1193 #define SWIG_AcquirePtr(ptr, src) SWIG_Python_AcquirePtr(ptr, src)
1194 #define swig_owntype int
1195
1196 /* for raw packed data */
1197 #define SWIG_ConvertPacked(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1198 #define SWIG_NewPackedObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1199
1200 /* for class or struct pointers */
1201 #define SWIG_ConvertInstance(obj, pptr, type, flags) SWIG_ConvertPtr(obj, pptr, type, flags)
1202 #define SWIG_NewInstanceObj(ptr, type, flags) SWIG_NewPointerObj(ptr, type, flags)
1203
1204 /* for C or C++ function pointers */
1205 #define SWIG_ConvertFunctionPtr(obj, pptr, type) SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
1206 #define SWIG_NewFunctionPtrObj(ptr, type) SWIG_Python_NewPointerObj(NULL, ptr, type, 0)
1207
1208 /* for C++ member pointers, ie, member methods */
1209 #define SWIG_ConvertMember(obj, ptr, sz, ty) SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
1210 #define SWIG_NewMemberObj(ptr, sz, type) SWIG_Python_NewPackedObj(ptr, sz, type)
1211
1212
1213 /* Runtime API */
1214
1215 #define SWIG_GetModule(clientdata) SWIG_Python_GetModule(clientdata)
1216 #define SWIG_SetModule(clientdata, pointer) SWIG_Python_SetModule(pointer)
1217 #define SWIG_NewClientData(obj) SwigPyClientData_New(obj)
1218
1219 #define SWIG_SetErrorObj SWIG_Python_SetErrorObj
1220 #define SWIG_SetErrorMsg SWIG_Python_SetErrorMsg
1221 #define SWIG_ErrorType(code) SWIG_Python_ErrorType(code)
1222 #define SWIG_Error(code, msg) SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg)
1223 #define SWIG_fail goto fail
1224
1225
1226 /* Runtime API implementation */
1227
1228 /* Error manipulation */
1229
1230 SWIGINTERN void
1231 SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
1232 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1233 PyErr_SetObject(errtype, obj);
1234 Py_DECREF(obj);
1235 SWIG_PYTHON_THREAD_END_BLOCK;
1236 }
1237
1238 SWIGINTERN void
1239 SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
1240 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
1241 PyErr_SetString(errtype, msg);
1242 SWIG_PYTHON_THREAD_END_BLOCK;
1243 }
1244
1245 #define SWIG_Python_Raise(obj, type, desc) SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)
1246
1247 /* Set a constant value */
1248
1249 #if defined(SWIGPYTHON_BUILTIN)
1250
1251 SWIGINTERN void
1252 SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
1253 PyObject *s = PyString_InternFromString(key);
1254 PyList_Append(seq, s);
1255 Py_DECREF(s);
1256 }
1257
1258 SWIGINTERN void
1259 SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {
1260 #if PY_VERSION_HEX < 0x02030000
1261 PyDict_SetItemString(d, (char *)name, obj);
1262 #else
1263 PyDict_SetItemString(d, name, obj);
1264 #endif
1265 Py_DECREF(obj);
1266 if (public_interface)
1267 SwigPyBuiltin_AddPublicSymbol(public_interface, name);
1268 }
1269
1270 #else
1271
1272 SWIGINTERN void
1273 SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {
1274 #if PY_VERSION_HEX < 0x02030000
1275 PyDict_SetItemString(d, (char *)name, obj);
1276 #else
1277 PyDict_SetItemString(d, name, obj);
1278 #endif
1279 Py_DECREF(obj);
1280 }
1281
1282 #endif
1283
1284 /* Append a value to the result obj */
1285
1286 SWIGINTERN PyObject*
1287 SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
1288 #if !defined(SWIG_PYTHON_OUTPUT_TUPLE)
1289 if (!result) {
1290 result = obj;
1291 } else if (result == Py_None) {
1292 Py_DECREF(result);
1293 result = obj;
1294 } else {
1295 if (!PyList_Check(result)) {
1296 PyObject *o2 = result;
1297 result = PyList_New(1);
1298 PyList_SetItem(result, 0, o2);
1299 }
1300 PyList_Append(result,obj);
1301 Py_DECREF(obj);
1302 }
1303 return result;
1304 #else
1305 PyObject* o2;
1306 PyObject* o3;
1307 if (!result) {
1308 result = obj;
1309 } else if (result == Py_None) {
1310 Py_DECREF(result);
1311 result = obj;
1312 } else {
1313 if (!PyTuple_Check(result)) {
1314 o2 = result;
1315 result = PyTuple_New(1);
1316 PyTuple_SET_ITEM(result, 0, o2);
1317 }
1318 o3 = PyTuple_New(1);
1319 PyTuple_SET_ITEM(o3, 0, obj);
1320 o2 = result;
1321 result = PySequence_Concat(o2, o3);
1322 Py_DECREF(o2);
1323 Py_DECREF(o3);
1324 }
1325 return result;
1326 #endif
1327 }
1328
1329 /* Unpack the argument tuple */
1330
1331 SWIGINTERN Py_ssize_t
1332 SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
1333 {
1334 if (!args) {
1335 if (!min && !max) {
1336 return 1;
1337 } else {
1338 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none",
1339 name, (min == max ? "" : "at least "), (int)min);
1340 return 0;
1341 }
1342 }
1343 if (!PyTuple_Check(args)) {
1344 if (min <= 1 && max >= 1) {
1345 Py_ssize_t i;
1346 objs[0] = args;
1347 for (i = 1; i < max; ++i) {
1348 objs[i] = 0;
1349 }
1350 return 2;
1351 }
1352 PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
1353 return 0;
1354 } else {
1355 Py_ssize_t l = PyTuple_GET_SIZE(args);
1356 if (l < min) {
1357 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1358 name, (min == max ? "" : "at least "), (int)min, (int)l);
1359 return 0;
1360 } else if (l > max) {
1361 PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d",
1362 name, (min == max ? "" : "at most "), (int)max, (int)l);
1363 return 0;
1364 } else {
1365 Py_ssize_t i;
1366 for (i = 0; i < l; ++i) {
1367 objs[i] = PyTuple_GET_ITEM(args, i);
1368 }
1369 for (; l < max; ++l) {
1370 objs[l] = 0;
1371 }
1372 return i + 1;
1373 }
1374 }
1375 }
1376
1377 /* A functor is a function object with one single object argument */
1378 #if PY_VERSION_HEX >= 0x02020000
1379 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunctionObjArgs(functor, obj, NULL);
1380 #else
1381 #define SWIG_Python_CallFunctor(functor, obj) PyObject_CallFunction(functor, "O", obj);
1382 #endif
1383
1384 /*
1385 Helper for static pointer initialization for both C and C++ code, for example
1386 static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
1387 */
1388 #ifdef __cplusplus
1389 #define SWIG_STATIC_POINTER(var) var
1390 #else
1391 #define SWIG_STATIC_POINTER(var) var = 0; if (!var) var
1392 #endif
1393
1394 /* -----------------------------------------------------------------------------
1395 * Pointer declarations
1396 * ----------------------------------------------------------------------------- */
1397
1398 /* Flags for new pointer objects */
1399 #define SWIG_POINTER_NOSHADOW (SWIG_POINTER_OWN << 1)
1400 #define SWIG_POINTER_NEW (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)
1401
1402 #define SWIG_POINTER_IMPLICIT_CONV (SWIG_POINTER_DISOWN << 1)
1403
1404 #define SWIG_BUILTIN_TP_INIT (SWIG_POINTER_OWN << 2)
1405 #define SWIG_BUILTIN_INIT (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)
1406
1407 #ifdef __cplusplus
1408 extern "C" {
1409 #endif
1410
1411 /* How to access Py_None */
1412 #if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
1413 # ifndef SWIG_PYTHON_NO_BUILD_NONE
1414 # ifndef SWIG_PYTHON_BUILD_NONE
1415 # define SWIG_PYTHON_BUILD_NONE
1416 # endif
1417 # endif
1418 #endif
1419
1420 #ifdef SWIG_PYTHON_BUILD_NONE
1421 # ifdef Py_None
1422 # undef Py_None
1423 # define Py_None SWIG_Py_None()
1424 # endif
1425 SWIGRUNTIMEINLINE PyObject *
1426 _SWIG_Py_None(void)
1427 {
1428 PyObject *none = Py_BuildValue((char*)"");
1429 Py_DECREF(none);
1430 return none;
1431 }
1432 SWIGRUNTIME PyObject *
1433 SWIG_Py_None(void)
1434 {
1435 static PyObject *SWIG_STATIC_POINTER(none) = _SWIG_Py_None();
1436 return none;
1437 }
1438 #endif
1439
1440 /* The python void return value */
1441
1442 SWIGRUNTIMEINLINE PyObject *
1443 SWIG_Py_Void(void)
1444 {
1445 PyObject *none = Py_None;
1446 Py_INCREF(none);
1447 return none;
1448 }
1449
1450 /* SwigPyClientData */
1451
1452 typedef struct {
1453 PyObject *klass;
1454 PyObject *newraw;
1455 PyObject *newargs;
1456 PyObject *destroy;
1457 int delargs;
1458 int implicitconv;
1459 PyTypeObject *pytype;
1460 } SwigPyClientData;
1461
1462 SWIGRUNTIMEINLINE int
1463 SWIG_Python_CheckImplicit(swig_type_info *ty)
1464 {
1465 SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
1466 return data ? data->implicitconv : 0;
1467 }
1468
1469 SWIGRUNTIMEINLINE PyObject *
1470 SWIG_Python_ExceptionType(swig_type_info *desc) {
1471 SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
1472 PyObject *klass = data ? data->klass : 0;
1473 return (klass ? klass : PyExc_RuntimeError);
1474 }
1475
1476
1477 SWIGRUNTIME SwigPyClientData *
1478 SwigPyClientData_New(PyObject* obj)
1479 {
1480 if (!obj) {
1481 return 0;
1482 } else {
1483 SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
1484 /* the klass element */
1485 data->klass = obj;
1486 Py_INCREF(data->klass);
1487 /* the newraw method and newargs arguments used to create a new raw instance */
1488 if (PyClass_Check(obj)) {
1489 data->newraw = 0;
1490 data->newargs = obj;
1491 Py_INCREF(obj);
1492 } else {
1493 #if (PY_VERSION_HEX < 0x02020000)
1494 data->newraw = 0;
1495 #else
1496 data->newraw = PyObject_GetAttrString(data->klass, (char *)"__new__");
1497 #endif
1498 if (data->newraw) {
1499 Py_INCREF(data->newraw);
1500 data->newargs = PyTuple_New(1);
1501 PyTuple_SetItem(data->newargs, 0, obj);
1502 } else {
1503 data->newargs = obj;
1504 }
1505 Py_INCREF(data->newargs);
1506 }
1507 /* the destroy method, aka as the C++ delete method */
1508 data->destroy = PyObject_GetAttrString(data->klass, (char *)"__swig_destroy__");
1509 if (PyErr_Occurred()) {
1510 PyErr_Clear();
1511 data->destroy = 0;
1512 }
1513 if (data->destroy) {
1514 int flags;
1515 Py_INCREF(data->destroy);
1516 flags = PyCFunction_GET_FLAGS(data->destroy);
1517 #ifdef METH_O
1518 data->delargs = !(flags & (METH_O));
1519 #else
1520 data->delargs = 0;
1521 #endif
1522 } else {
1523 data->delargs = 0;
1524 }
1525 data->implicitconv = 0;
1526 data->pytype = 0;
1527 return data;
1528 }
1529 }
1530
1531 SWIGRUNTIME void
1532 SwigPyClientData_Del(SwigPyClientData *data) {
1533 Py_XDECREF(data->newraw);
1534 Py_XDECREF(data->newargs);
1535 Py_XDECREF(data->destroy);
1536 }
1537
1538 /* =============== SwigPyObject =====================*/
1539
1540 typedef struct {
1541 PyObject_HEAD
1542 void *ptr;
1543 swig_type_info *ty;
1544 int own;
1545 PyObject *next;
1546 #ifdef SWIGPYTHON_BUILTIN
1547 PyObject *dict;
1548 #endif
1549 } SwigPyObject;
1550
1551
1552 #ifdef SWIGPYTHON_BUILTIN
1553
1554 SWIGRUNTIME PyObject *
1555 SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
1556 {
1557 SwigPyObject *sobj = (SwigPyObject *)v;
1558
1559 if (!sobj->dict)
1560 sobj->dict = PyDict_New();
1561
1562 Py_INCREF(sobj->dict);
1563 return sobj->dict;
1564 }
1565
1566 #endif
1567
1568 SWIGRUNTIME PyObject *
1569 SwigPyObject_long(SwigPyObject *v)
1570 {
1571 return PyLong_FromVoidPtr(v->ptr);
1572 }
1573
1574 SWIGRUNTIME PyObject *
1575 SwigPyObject_format(const char* fmt, SwigPyObject *v)
1576 {
1577 PyObject *res = NULL;
1578 PyObject *args = PyTuple_New(1);
1579 if (args) {
1580 if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
1581 PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
1582 if (ofmt) {
1583 #if PY_VERSION_HEX >= 0x03000000
1584 res = PyUnicode_Format(ofmt,args);
1585 #else
1586 res = PyString_Format(ofmt,args);
1587 #endif
1588 Py_DECREF(ofmt);
1589 }
1590 Py_DECREF(args);
1591 }
1592 }
1593 return res;
1594 }
1595
1596 SWIGRUNTIME PyObject *
1597 SwigPyObject_oct(SwigPyObject *v)
1598 {
1599 return SwigPyObject_format("%o",v);
1600 }
1601
1602 SWIGRUNTIME PyObject *
1603 SwigPyObject_hex(SwigPyObject *v)
1604 {
1605 return SwigPyObject_format("%x",v);
1606 }
1607
1608 SWIGRUNTIME PyObject *
1609 #ifdef METH_NOARGS
1610 SwigPyObject_repr(SwigPyObject *v)
1611 #else
1612 SwigPyObject_repr(SwigPyObject *v, PyObject *args)
1613 #endif
1614 {
1615 const char *name = SWIG_TypePrettyName(v->ty);
1616 PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
1617 if (v->next) {
1618 # ifdef METH_NOARGS
1619 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
1620 # else
1621 PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next, args);
1622 # endif
1623 # if PY_VERSION_HEX >= 0x03000000
1624 PyObject *joined = PyUnicode_Concat(repr, nrep);
1625 Py_DecRef(repr);
1626 Py_DecRef(nrep);
1627 repr = joined;
1628 # else
1629 PyString_ConcatAndDel(&repr,nrep);
1630 # endif
1631 }
1632 return repr;
1633 }
1634
1635 SWIGRUNTIME int
1636 SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
1637 {
1638 void *i = v->ptr;
1639 void *j = w->ptr;
1640 return (i < j) ? -1 : ((i > j) ? 1 : 0);
1641 }
1642
1643 /* Added for Python 3.x, would it also be useful for Python 2.x? */
1644 SWIGRUNTIME PyObject*
1645 SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
1646 {
1647 PyObject* res;
1648 if( op != Py_EQ && op != Py_NE ) {
1649 Py_INCREF(Py_NotImplemented);
1650 return Py_NotImplemented;
1651 }
1652 res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
1653 return res;
1654 }
1655
1656
1657 SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);
1658
1659 #ifdef SWIGPYTHON_BUILTIN
1660 static swig_type_info *SwigPyObject_stype = 0;
1661 SWIGRUNTIME PyTypeObject*
1662 SwigPyObject_type(void) {
1663 SwigPyClientData *cd;
1664 assert(SwigPyObject_stype);
1665 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
1666 assert(cd);
1667 assert(cd->pytype);
1668 return cd->pytype;
1669 }
1670 #else
1671 SWIGRUNTIME PyTypeObject*
1672 SwigPyObject_type(void) {
1673 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
1674 return type;
1675 }
1676 #endif
1677
1678 SWIGRUNTIMEINLINE int
1679 SwigPyObject_Check(PyObject *op) {
1680 #ifdef SWIGPYTHON_BUILTIN
1681 PyTypeObject *target_tp = SwigPyObject_type();
1682 if (PyType_IsSubtype(op->ob_type, target_tp))
1683 return 1;
1684 return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
1685 #else
1686 return (Py_TYPE(op) == SwigPyObject_type())
1687 || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
1688 #endif
1689 }
1690
1691 SWIGRUNTIME PyObject *
1692 SwigPyObject_New(void *ptr, swig_type_info *ty, int own);
1693
1694 SWIGRUNTIME void
1695 SwigPyObject_dealloc(PyObject *v)
1696 {
1697 SwigPyObject *sobj = (SwigPyObject *) v;
1698 PyObject *next = sobj->next;
1699 if (sobj->own == SWIG_POINTER_OWN) {
1700 swig_type_info *ty = sobj->ty;
1701 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
1702 PyObject *destroy = data ? data->destroy : 0;
1703 if (destroy) {
1704 /* destroy is always a VARARGS method */
1705 PyObject *res;
1706
1707 /* PyObject_CallFunction() has the potential to silently drop
1708 the active active exception. In cases of unnamed temporary
1709 variable or where we just finished iterating over a generator
1710 StopIteration will be active right now, and this needs to
1711 remain true upon return from SwigPyObject_dealloc. So save
1712 and restore. */
1713
1714 PyObject *val = NULL, *type = NULL, *tb = NULL;
1715 PyErr_Fetch(&val, &type, &tb);
1716
1717 if (data->delargs) {
1718 /* we need to create a temporary object to carry the destroy operation */
1719 PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
1720 res = SWIG_Python_CallFunctor(destroy, tmp);
1721 Py_DECREF(tmp);
1722 } else {
1723 PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
1724 PyObject *mself = PyCFunction_GET_SELF(destroy);
1725 res = ((*meth)(mself, v));
1726 }
1727 if (!res)
1728 PyErr_WriteUnraisable(destroy);
1729
1730 PyErr_Restore(val, type, tb);
1731
1732 Py_XDECREF(res);
1733 }
1734 #if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
1735 else {
1736 const char *name = SWIG_TypePrettyName(ty);
1737 printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
1738 }
1739 #endif
1740 }
1741 Py_XDECREF(next);
1742 PyObject_DEL(v);
1743 }
1744
1745 SWIGRUNTIME PyObject*
1746 SwigPyObject_append(PyObject* v, PyObject* next)
1747 {
1748 SwigPyObject *sobj = (SwigPyObject *) v;
1749 #ifndef METH_O
1750 PyObject *tmp = 0;
1751 if (!PyArg_ParseTuple(next,(char *)"O:append", &tmp)) return NULL;
1752 next = tmp;
1753 #endif
1754 if (!SwigPyObject_Check(next)) {
1755 PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
1756 return NULL;
1757 }
1758 sobj->next = next;
1759 Py_INCREF(next);
1760 return SWIG_Py_Void();
1761 }
1762
1763 SWIGRUNTIME PyObject*
1764 #ifdef METH_NOARGS
1765 SwigPyObject_next(PyObject* v)
1766 #else
1767 SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1768 #endif
1769 {
1770 SwigPyObject *sobj = (SwigPyObject *) v;
1771 if (sobj->next) {
1772 Py_INCREF(sobj->next);
1773 return sobj->next;
1774 } else {
1775 return SWIG_Py_Void();
1776 }
1777 }
1778
1779 SWIGINTERN PyObject*
1780 #ifdef METH_NOARGS
1781 SwigPyObject_disown(PyObject *v)
1782 #else
1783 SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1784 #endif
1785 {
1786 SwigPyObject *sobj = (SwigPyObject *)v;
1787 sobj->own = 0;
1788 return SWIG_Py_Void();
1789 }
1790
1791 SWIGINTERN PyObject*
1792 #ifdef METH_NOARGS
1793 SwigPyObject_acquire(PyObject *v)
1794 #else
1795 SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
1796 #endif
1797 {
1798 SwigPyObject *sobj = (SwigPyObject *)v;
1799 sobj->own = SWIG_POINTER_OWN;
1800 return SWIG_Py_Void();
1801 }
1802
1803 SWIGINTERN PyObject*
1804 SwigPyObject_own(PyObject *v, PyObject *args)
1805 {
1806 PyObject *val = 0;
1807 #if (PY_VERSION_HEX < 0x02020000)
1808 if (!PyArg_ParseTuple(args,(char *)"|O:own",&val))
1809 #elif (PY_VERSION_HEX < 0x02050000)
1810 if (!PyArg_UnpackTuple(args, (char *)"own", 0, 1, &val))
1811 #else
1812 if (!PyArg_UnpackTuple(args, "own", 0, 1, &val))
1813 #endif
1814 {
1815 return NULL;
1816 }
1817 else
1818 {
1819 SwigPyObject *sobj = (SwigPyObject *)v;
1820 PyObject *obj = PyBool_FromLong(sobj->own);
1821 if (val) {
1822 #ifdef METH_NOARGS
1823 if (PyObject_IsTrue(val)) {
1824 SwigPyObject_acquire(v);
1825 } else {
1826 SwigPyObject_disown(v);
1827 }
1828 #else
1829 if (PyObject_IsTrue(val)) {
1830 SwigPyObject_acquire(v,args);
1831 } else {
1832 SwigPyObject_disown(v,args);
1833 }
1834 #endif
1835 }
1836 return obj;
1837 }
1838 }
1839
1840 #ifdef METH_O
1841 static PyMethodDef
1842 swigobject_methods[] = {
1843 {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_NOARGS, (char *)"releases ownership of the pointer"},
1844 {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_NOARGS, (char *)"acquires ownership of the pointer"},
1845 {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1846 {(char *)"append", (PyCFunction)SwigPyObject_append, METH_O, (char *)"appends another 'this' object"},
1847 {(char *)"next", (PyCFunction)SwigPyObject_next, METH_NOARGS, (char *)"returns the next 'this' object"},
1848 {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_NOARGS, (char *)"returns object representation"},
1849 {0, 0, 0, 0}
1850 };
1851 #else
1852 static PyMethodDef
1853 swigobject_methods[] = {
1854 {(char *)"disown", (PyCFunction)SwigPyObject_disown, METH_VARARGS, (char *)"releases ownership of the pointer"},
1855 {(char *)"acquire", (PyCFunction)SwigPyObject_acquire, METH_VARARGS, (char *)"acquires ownership of the pointer"},
1856 {(char *)"own", (PyCFunction)SwigPyObject_own, METH_VARARGS, (char *)"returns/sets ownership of the pointer"},
1857 {(char *)"append", (PyCFunction)SwigPyObject_append, METH_VARARGS, (char *)"appends another 'this' object"},
1858 {(char *)"next", (PyCFunction)SwigPyObject_next, METH_VARARGS, (char *)"returns the next 'this' object"},
1859 {(char *)"__repr__",(PyCFunction)SwigPyObject_repr, METH_VARARGS, (char *)"returns object representation"},
1860 {0, 0, 0, 0}
1861 };
1862 #endif
1863
1864 #if PY_VERSION_HEX < 0x02020000
1865 SWIGINTERN PyObject *
1866 SwigPyObject_getattr(SwigPyObject *sobj,char *name)
1867 {
1868 return Py_FindMethod(swigobject_methods, (PyObject *)sobj, name);
1869 }
1870 #endif
1871
1872 SWIGRUNTIME PyTypeObject*
1873 SwigPyObject_TypeOnce(void) {
1874 static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";
1875
1876 static PyNumberMethods SwigPyObject_as_number = {
1877 (binaryfunc)0, /*nb_add*/
1878 (binaryfunc)0, /*nb_subtract*/
1879 (binaryfunc)0, /*nb_multiply*/
1880 /* nb_divide removed in Python 3 */
1881 #if PY_VERSION_HEX < 0x03000000
1882 (binaryfunc)0, /*nb_divide*/
1883 #endif
1884 (binaryfunc)0, /*nb_remainder*/
1885 (binaryfunc)0, /*nb_divmod*/
1886 (ternaryfunc)0,/*nb_power*/
1887 (unaryfunc)0, /*nb_negative*/
1888 (unaryfunc)0, /*nb_positive*/
1889 (unaryfunc)0, /*nb_absolute*/
1890 (inquiry)0, /*nb_nonzero*/
1891 0, /*nb_invert*/
1892 0, /*nb_lshift*/
1893 0, /*nb_rshift*/
1894 0, /*nb_and*/
1895 0, /*nb_xor*/
1896 0, /*nb_or*/
1897 #if PY_VERSION_HEX < 0x03000000
1898 0, /*nb_coerce*/
1899 #endif
1900 (unaryfunc)SwigPyObject_long, /*nb_int*/
1901 #if PY_VERSION_HEX < 0x03000000
1902 (unaryfunc)SwigPyObject_long, /*nb_long*/
1903 #else
1904 0, /*nb_reserved*/
1905 #endif
1906 (unaryfunc)0, /*nb_float*/
1907 #if PY_VERSION_HEX < 0x03000000
1908 (unaryfunc)SwigPyObject_oct, /*nb_oct*/
1909 (unaryfunc)SwigPyObject_hex, /*nb_hex*/
1910 #endif
1911 #if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
1912 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
1913 #elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
1914 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
1915 #elif PY_VERSION_HEX >= 0x02050000 /* 2.5.0 */
1916 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
1917 #elif PY_VERSION_HEX >= 0x02020000 /* 2.2.0 */
1918 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_true_divide */
1919 #elif PY_VERSION_HEX >= 0x02000000 /* 2.0.0 */
1920 0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_or */
1921 #endif
1922 };
1923
1924 static PyTypeObject swigpyobject_type;
1925 static int type_init = 0;
1926 if (!type_init) {
1927 const PyTypeObject tmp = {
1928 #if PY_VERSION_HEX >= 0x03000000
1929 PyVarObject_HEAD_INIT(NULL, 0)
1930 #else
1931 PyObject_HEAD_INIT(NULL)
1932 0, /* ob_size */
1933 #endif
1934 (char *)"SwigPyObject", /* tp_name */
1935 sizeof(SwigPyObject), /* tp_basicsize */
1936 0, /* tp_itemsize */
1937 (destructor)SwigPyObject_dealloc, /* tp_dealloc */
1938 0, /* tp_print */
1939 #if PY_VERSION_HEX < 0x02020000
1940 (getattrfunc)SwigPyObject_getattr, /* tp_getattr */
1941 #else
1942 (getattrfunc)0, /* tp_getattr */
1943 #endif
1944 (setattrfunc)0, /* tp_setattr */
1945 #if PY_VERSION_HEX >= 0x03000000
1946 0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
1947 #else
1948 (cmpfunc)SwigPyObject_compare, /* tp_compare */
1949 #endif
1950 (reprfunc)SwigPyObject_repr, /* tp_repr */
1951 &SwigPyObject_as_number, /* tp_as_number */
1952 0, /* tp_as_sequence */
1953 0, /* tp_as_mapping */
1954 (hashfunc)0, /* tp_hash */
1955 (ternaryfunc)0, /* tp_call */
1956 0, /* tp_str */
1957 PyObject_GenericGetAttr, /* tp_getattro */
1958 0, /* tp_setattro */
1959 0, /* tp_as_buffer */
1960 Py_TPFLAGS_DEFAULT, /* tp_flags */
1961 swigobject_doc, /* tp_doc */
1962 0, /* tp_traverse */
1963 0, /* tp_clear */
1964 (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
1965 0, /* tp_weaklistoffset */
1966 #if PY_VERSION_HEX >= 0x02020000
1967 0, /* tp_iter */
1968 0, /* tp_iternext */
1969 swigobject_methods, /* tp_methods */
1970 0, /* tp_members */
1971 0, /* tp_getset */
1972 0, /* tp_base */
1973 0, /* tp_dict */
1974 0, /* tp_descr_get */
1975 0, /* tp_descr_set */
1976 0, /* tp_dictoffset */
1977 0, /* tp_init */
1978 0, /* tp_alloc */
1979 0, /* tp_new */
1980 0, /* tp_free */
1981 0, /* tp_is_gc */
1982 0, /* tp_bases */
1983 0, /* tp_mro */
1984 0, /* tp_cache */
1985 0, /* tp_subclasses */
1986 0, /* tp_weaklist */
1987 #endif
1988 #if PY_VERSION_HEX >= 0x02030000
1989 0, /* tp_del */
1990 #endif
1991 #if PY_VERSION_HEX >= 0x02060000
1992 0, /* tp_version_tag */
1993 #endif
1994 #if PY_VERSION_HEX >= 0x03040000
1995 0, /* tp_finalize */
1996 #endif
1997 #ifdef COUNT_ALLOCS
1998 0, /* tp_allocs */
1999 0, /* tp_frees */
2000 0, /* tp_maxalloc */
2001 #if PY_VERSION_HEX >= 0x02050000
2002 0, /* tp_prev */
2003 #endif
2004 0 /* tp_next */
2005 #endif
2006 };
2007 swigpyobject_type = tmp;
2008 type_init = 1;
2009 #if PY_VERSION_HEX < 0x02020000
2010 swigpyobject_type.ob_type = &PyType_Type;
2011 #else
2012 if (PyType_Ready(&swigpyobject_type) < 0)
2013 return NULL;
2014 #endif
2015 }
2016 return &swigpyobject_type;
2017 }
2018
2019 SWIGRUNTIME PyObject *
2020 SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
2021 {
2022 SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
2023 if (sobj) {
2024 sobj->ptr = ptr;
2025 sobj->ty = ty;
2026 sobj->own = own;
2027 sobj->next = 0;
2028 }
2029 return (PyObject *)sobj;
2030 }
2031
2032 /* -----------------------------------------------------------------------------
2033 * Implements a simple Swig Packed type, and use it instead of string
2034 * ----------------------------------------------------------------------------- */
2035
2036 typedef struct {
2037 PyObject_HEAD
2038 void *pack;
2039 swig_type_info *ty;
2040 size_t size;
2041 } SwigPyPacked;
2042
2043 SWIGRUNTIME int
2044 SwigPyPacked_print(SwigPyPacked *v, FILE *fp, int SWIGUNUSEDPARM(flags))
2045 {
2046 char result[SWIG_BUFFER_SIZE];
2047 fputs("<Swig Packed ", fp);
2048 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2049 fputs("at ", fp);
2050 fputs(result, fp);
2051 }
2052 fputs(v->ty->name,fp);
2053 fputs(">", fp);
2054 return 0;
2055 }
2056
2057 SWIGRUNTIME PyObject *
2058 SwigPyPacked_repr(SwigPyPacked *v)
2059 {
2060 char result[SWIG_BUFFER_SIZE];
2061 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
2062 return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
2063 } else {
2064 return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
2065 }
2066 }
2067
2068 SWIGRUNTIME PyObject *
2069 SwigPyPacked_str(SwigPyPacked *v)
2070 {
2071 char result[SWIG_BUFFER_SIZE];
2072 if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
2073 return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
2074 } else {
2075 return SWIG_Python_str_FromChar(v->ty->name);
2076 }
2077 }
2078
2079 SWIGRUNTIME int
2080 SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
2081 {
2082 size_t i = v->size;
2083 size_t j = w->size;
2084 int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
2085 return s ? s : strncmp((char *)v->pack, (char *)w->pack, 2*v->size);
2086 }
2087
2088 SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);
2089
2090 SWIGRUNTIME PyTypeObject*
2091 SwigPyPacked_type(void) {
2092 static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
2093 return type;
2094 }
2095
2096 SWIGRUNTIMEINLINE int
2097 SwigPyPacked_Check(PyObject *op) {
2098 return ((op)->ob_type == SwigPyPacked_TypeOnce())
2099 || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
2100 }
2101
2102 SWIGRUNTIME void
2103 SwigPyPacked_dealloc(PyObject *v)
2104 {
2105 if (SwigPyPacked_Check(v)) {
2106 SwigPyPacked *sobj = (SwigPyPacked *) v;
2107 free(sobj->pack);
2108 }
2109 PyObject_DEL(v);
2110 }
2111
2112 SWIGRUNTIME PyTypeObject*
2113 SwigPyPacked_TypeOnce(void) {
2114 static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
2115 static PyTypeObject swigpypacked_type;
2116 static int type_init = 0;
2117 if (!type_init) {
2118 const PyTypeObject tmp = {
2119 #if PY_VERSION_HEX>=0x03000000
2120 PyVarObject_HEAD_INIT(NULL, 0)
2121 #else
2122 PyObject_HEAD_INIT(NULL)
2123 0, /* ob_size */
2124 #endif
2125 (char *)"SwigPyPacked", /* tp_name */
2126 sizeof(SwigPyPacked), /* tp_basicsize */
2127 0, /* tp_itemsize */
2128 (destructor)SwigPyPacked_dealloc, /* tp_dealloc */
2129 (printfunc)SwigPyPacked_print, /* tp_print */
2130 (getattrfunc)0, /* tp_getattr */
2131 (setattrfunc)0, /* tp_setattr */
2132 #if PY_VERSION_HEX>=0x03000000
2133 0, /* tp_reserved in 3.0.1 */
2134 #else
2135 (cmpfunc)SwigPyPacked_compare, /* tp_compare */
2136 #endif
2137 (reprfunc)SwigPyPacked_repr, /* tp_repr */
2138 0, /* tp_as_number */
2139 0, /* tp_as_sequence */
2140 0, /* tp_as_mapping */
2141 (hashfunc)0, /* tp_hash */
2142 (ternaryfunc)0, /* tp_call */
2143 (reprfunc)SwigPyPacked_str, /* tp_str */
2144 PyObject_GenericGetAttr, /* tp_getattro */
2145 0, /* tp_setattro */
2146 0, /* tp_as_buffer */
2147 Py_TPFLAGS_DEFAULT, /* tp_flags */
2148 swigpacked_doc, /* tp_doc */
2149 0, /* tp_traverse */
2150 0, /* tp_clear */
2151 0, /* tp_richcompare */
2152 0, /* tp_weaklistoffset */
2153 #if PY_VERSION_HEX >= 0x02020000
2154 0, /* tp_iter */
2155 0, /* tp_iternext */
2156 0, /* tp_methods */
2157 0, /* tp_members */
2158 0, /* tp_getset */
2159 0, /* tp_base */
2160 0, /* tp_dict */
2161 0, /* tp_descr_get */
2162 0, /* tp_descr_set */
2163 0, /* tp_dictoffset */
2164 0, /* tp_init */
2165 0, /* tp_alloc */
2166 0, /* tp_new */
2167 0, /* tp_free */
2168 0, /* tp_is_gc */
2169 0, /* tp_bases */
2170 0, /* tp_mro */
2171 0, /* tp_cache */
2172 0, /* tp_subclasses */
2173 0, /* tp_weaklist */
2174 #endif
2175 #if PY_VERSION_HEX >= 0x02030000
2176 0, /* tp_del */
2177 #endif
2178 #if PY_VERSION_HEX >= 0x02060000
2179 0, /* tp_version_tag */
2180 #endif
2181 #if PY_VERSION_HEX >= 0x03040000
2182 0, /* tp_finalize */
2183 #endif
2184 #ifdef COUNT_ALLOCS
2185 0, /* tp_allocs */
2186 0, /* tp_frees */
2187 0, /* tp_maxalloc */
2188 #if PY_VERSION_HEX >= 0x02050000
2189 0, /* tp_prev */
2190 #endif
2191 0 /* tp_next */
2192 #endif
2193 };
2194 swigpypacked_type = tmp;
2195 type_init = 1;
2196 #if PY_VERSION_HEX < 0x02020000
2197 swigpypacked_type.ob_type = &PyType_Type;
2198 #else
2199 if (PyType_Ready(&swigpypacked_type) < 0)
2200 return NULL;
2201 #endif
2202 }
2203 return &swigpypacked_type;
2204 }
2205
2206 SWIGRUNTIME PyObject *
2207 SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
2208 {
2209 SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
2210 if (sobj) {
2211 void *pack = malloc(size);
2212 if (pack) {
2213 memcpy(pack, ptr, size);
2214 sobj->pack = pack;
2215 sobj->ty = ty;
2216 sobj->size = size;
2217 } else {
2218 PyObject_DEL((PyObject *) sobj);
2219 sobj = 0;
2220 }
2221 }
2222 return (PyObject *) sobj;
2223 }
2224
2225 SWIGRUNTIME swig_type_info *
2226 SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
2227 {
2228 if (SwigPyPacked_Check(obj)) {
2229 SwigPyPacked *sobj = (SwigPyPacked *)obj;
2230 if (sobj->size != size) return 0;
2231 memcpy(ptr, sobj->pack, size);
2232 return sobj->ty;
2233 } else {
2234 return 0;
2235 }
2236 }
2237
2238 /* -----------------------------------------------------------------------------
2239 * pointers/data manipulation
2240 * ----------------------------------------------------------------------------- */
2241
2242 SWIGRUNTIMEINLINE PyObject *
2243 _SWIG_This(void)
2244 {
2245 return SWIG_Python_str_FromChar("this");
2246 }
2247
2248 static PyObject *swig_this = NULL;
2249
2250 SWIGRUNTIME PyObject *
2251 SWIG_This(void)
2252 {
2253 if (swig_this == NULL)
2254 swig_this = _SWIG_This();
2255 return swig_this;
2256 }
2257
2258 /* #define SWIG_PYTHON_SLOW_GETSET_THIS */
2259
2260 /* TODO: I don't know how to implement the fast getset in Python 3 right now */
2261 #if PY_VERSION_HEX>=0x03000000
2262 #define SWIG_PYTHON_SLOW_GETSET_THIS
2263 #endif
2264
2265 SWIGRUNTIME SwigPyObject *
2266 SWIG_Python_GetSwigThis(PyObject *pyobj)
2267 {
2268 PyObject *obj;
2269
2270 if (SwigPyObject_Check(pyobj))
2271 return (SwigPyObject *) pyobj;
2272
2273 #ifdef SWIGPYTHON_BUILTIN
2274 (void)obj;
2275 # ifdef PyWeakref_CheckProxy
2276 if (PyWeakref_CheckProxy(pyobj)) {
2277 pyobj = PyWeakref_GET_OBJECT(pyobj);
2278 if (pyobj && SwigPyObject_Check(pyobj))
2279 return (SwigPyObject*) pyobj;
2280 }
2281 # endif
2282 return NULL;
2283 #else
2284
2285 obj = 0;
2286
2287 #if (!defined(SWIG_PYTHON_SLOW_GETSET_THIS) && (PY_VERSION_HEX >= 0x02030000))
2288 if (PyInstance_Check(pyobj)) {
2289 obj = _PyInstance_Lookup(pyobj, SWIG_This());
2290 } else {
2291 PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
2292 if (dictptr != NULL) {
2293 PyObject *dict = *dictptr;
2294 obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
2295 } else {
2296 #ifdef PyWeakref_CheckProxy
2297 if (PyWeakref_CheckProxy(pyobj)) {
2298 PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
2299 return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
2300 }
2301 #endif
2302 obj = PyObject_GetAttr(pyobj,SWIG_This());
2303 if (obj) {
2304 Py_DECREF(obj);
2305 } else {
2306 if (PyErr_Occurred()) PyErr_Clear();
2307 return 0;
2308 }
2309 }
2310 }
2311 #else
2312 obj = PyObject_GetAttr(pyobj,SWIG_This());
2313 if (obj) {
2314 Py_DECREF(obj);
2315 } else {
2316 if (PyErr_Occurred()) PyErr_Clear();
2317 return 0;
2318 }
2319 #endif
2320 if (obj && !SwigPyObject_Check(obj)) {
2321 /* a PyObject is called 'this', try to get the 'real this'
2322 SwigPyObject from it */
2323 return SWIG_Python_GetSwigThis(obj);
2324 }
2325 return (SwigPyObject *)obj;
2326 #endif
2327 }
2328
2329 /* Acquire a pointer value */
2330
2331 SWIGRUNTIME int
2332 SWIG_Python_AcquirePtr(PyObject *obj, int own) {
2333 if (own == SWIG_POINTER_OWN) {
2334 SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
2335 if (sobj) {
2336 int oldown = sobj->own;
2337 sobj->own = own;
2338 return oldown;
2339 }
2340 }
2341 return 0;
2342 }
2343
2344 /* Convert a pointer value */
2345
2346 SWIGRUNTIME int
2347 SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
2348 int res;
2349 SwigPyObject *sobj;
2350 int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;
2351
2352 if (!obj)
2353 return SWIG_ERROR;
2354 if (obj == Py_None && !implicit_conv) {
2355 if (ptr)
2356 *ptr = 0;
2357 return SWIG_OK;
2358 }
2359
2360 res = SWIG_ERROR;
2361
2362 sobj = SWIG_Python_GetSwigThis(obj);
2363 if (own)
2364 *own = 0;
2365 while (sobj) {
2366 void *vptr = sobj->ptr;
2367 if (ty) {
2368 swig_type_info *to = sobj->ty;
2369 if (to == ty) {
2370 /* no type cast needed */
2371 if (ptr) *ptr = vptr;
2372 break;
2373 } else {
2374 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2375 if (!tc) {
2376 sobj = (SwigPyObject *)sobj->next;
2377 } else {
2378 if (ptr) {
2379 int newmemory = 0;
2380 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2381 if (newmemory == SWIG_CAST_NEW_MEMORY) {
2382 assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
2383 if (own)
2384 *own = *own | SWIG_CAST_NEW_MEMORY;
2385 }
2386 }
2387 break;
2388 }
2389 }
2390 } else {
2391 if (ptr) *ptr = vptr;
2392 break;
2393 }
2394 }
2395 if (sobj) {
2396 if (own)
2397 *own = *own | sobj->own;
2398 if (flags & SWIG_POINTER_DISOWN) {
2399 sobj->own = 0;
2400 }
2401 res = SWIG_OK;
2402 } else {
2403 if (implicit_conv) {
2404 SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
2405 if (data && !data->implicitconv) {
2406 PyObject *klass = data->klass;
2407 if (klass) {
2408 PyObject *impconv;
2409 data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
2410 impconv = SWIG_Python_CallFunctor(klass, obj);
2411 data->implicitconv = 0;
2412 if (PyErr_Occurred()) {
2413 PyErr_Clear();
2414 impconv = 0;
2415 }
2416 if (impconv) {
2417 SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
2418 if (iobj) {
2419 void *vptr;
2420 res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
2421 if (SWIG_IsOK(res)) {
2422 if (ptr) {
2423 *ptr = vptr;
2424 /* transfer the ownership to 'ptr' */
2425 iobj->own = 0;
2426 res = SWIG_AddCast(res);
2427 res = SWIG_AddNewMask(res);
2428 } else {
2429 res = SWIG_AddCast(res);
2430 }
2431 }
2432 }
2433 Py_DECREF(impconv);
2434 }
2435 }
2436 }
2437 }
2438 if (!SWIG_IsOK(res) && obj == Py_None) {
2439 if (ptr)
2440 *ptr = 0;
2441 if (PyErr_Occurred())
2442 PyErr_Clear();
2443 res = SWIG_OK;
2444 }
2445 }
2446 return res;
2447 }
2448
2449 /* Convert a function ptr value */
2450
2451 SWIGRUNTIME int
2452 SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
2453 if (!PyCFunction_Check(obj)) {
2454 return SWIG_ConvertPtr(obj, ptr, ty, 0);
2455 } else {
2456 void *vptr = 0;
2457
2458 /* here we get the method pointer for callbacks */
2459 const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
2460 const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
2461 if (desc)
2462 desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
2463 if (!desc)
2464 return SWIG_ERROR;
2465 if (ty) {
2466 swig_cast_info *tc = SWIG_TypeCheck(desc,ty);
2467 if (tc) {
2468 int newmemory = 0;
2469 *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
2470 assert(!newmemory); /* newmemory handling not yet implemented */
2471 } else {
2472 return SWIG_ERROR;
2473 }
2474 } else {
2475 *ptr = vptr;
2476 }
2477 return SWIG_OK;
2478 }
2479 }
2480
2481 /* Convert a packed value value */
2482
2483 SWIGRUNTIME int
2484 SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
2485 swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
2486 if (!to) return SWIG_ERROR;
2487 if (ty) {
2488 if (to != ty) {
2489 /* check type cast? */
2490 swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
2491 if (!tc) return SWIG_ERROR;
2492 }
2493 }
2494 return SWIG_OK;
2495 }
2496
2497 /* -----------------------------------------------------------------------------
2498 * Create a new pointer object
2499 * ----------------------------------------------------------------------------- */
2500
2501 /*
2502 Create a new instance object, without calling __init__, and set the
2503 'this' attribute.
2504 */
2505
2506 SWIGRUNTIME PyObject*
2507 SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
2508 {
2509 #if (PY_VERSION_HEX >= 0x02020000)
2510 PyObject *inst = 0;
2511 PyObject *newraw = data->newraw;
2512 if (newraw) {
2513 inst = PyObject_Call(newraw, data->newargs, NULL);
2514 if (inst) {
2515 #if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2516 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2517 if (dictptr != NULL) {
2518 PyObject *dict = *dictptr;
2519 if (dict == NULL) {
2520 dict = PyDict_New();
2521 *dictptr = dict;
2522 PyDict_SetItem(dict, SWIG_This(), swig_this);
2523 }
2524 }
2525 #else
2526 PyObject *key = SWIG_This();
2527 PyObject_SetAttr(inst, key, swig_this);
2528 #endif
2529 }
2530 } else {
2531 #if PY_VERSION_HEX >= 0x03000000
2532 inst = ((PyTypeObject*) data->newargs)->tp_new((PyTypeObject*) data->newargs, Py_None, Py_None);
2533 if (inst) {
2534 PyObject_SetAttr(inst, SWIG_This(), swig_this);
2535 Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
2536 }
2537 #else
2538 PyObject *dict = PyDict_New();
2539 if (dict) {
2540 PyDict_SetItem(dict, SWIG_This(), swig_this);
2541 inst = PyInstance_NewRaw(data->newargs, dict);
2542 Py_DECREF(dict);
2543 }
2544 #endif
2545 }
2546 return inst;
2547 #else
2548 #if (PY_VERSION_HEX >= 0x02010000)
2549 PyObject *inst = 0;
2550 PyObject *dict = PyDict_New();
2551 if (dict) {
2552 PyDict_SetItem(dict, SWIG_This(), swig_this);
2553 inst = PyInstance_NewRaw(data->newargs, dict);
2554 Py_DECREF(dict);
2555 }
2556 return (PyObject *) inst;
2557 #else
2558 PyInstanceObject *inst = PyObject_NEW(PyInstanceObject, &PyInstance_Type);
2559 if (inst == NULL) {
2560 return NULL;
2561 }
2562 inst->in_class = (PyClassObject *)data->newargs;
2563 Py_INCREF(inst->in_class);
2564 inst->in_dict = PyDict_New();
2565 if (inst->in_dict == NULL) {
2566 Py_DECREF(inst);
2567 return NULL;
2568 }
2569 #ifdef Py_TPFLAGS_HAVE_WEAKREFS
2570 inst->in_weakreflist = NULL;
2571 #endif
2572 #ifdef Py_TPFLAGS_GC
2573 PyObject_GC_Init(inst);
2574 #endif
2575 PyDict_SetItem(inst->in_dict, SWIG_This(), swig_this);
2576 return (PyObject *) inst;
2577 #endif
2578 #endif
2579 }
2580
2581 SWIGRUNTIME void
2582 SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
2583 {
2584 PyObject *dict;
2585 #if (PY_VERSION_HEX >= 0x02020000) && !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
2586 PyObject **dictptr = _PyObject_GetDictPtr(inst);
2587 if (dictptr != NULL) {
2588 dict = *dictptr;
2589 if (dict == NULL) {
2590 dict = PyDict_New();
2591 *dictptr = dict;
2592 }
2593 PyDict_SetItem(dict, SWIG_This(), swig_this);
2594 return;
2595 }
2596 #endif
2597 dict = PyObject_GetAttrString(inst, (char*)"__dict__");
2598 PyDict_SetItem(dict, SWIG_This(), swig_this);
2599 Py_DECREF(dict);
2600 }
2601
2602
2603 SWIGINTERN PyObject *
2604 SWIG_Python_InitShadowInstance(PyObject *args) {
2605 PyObject *obj[2];
2606 if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
2607 return NULL;
2608 } else {
2609 SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
2610 if (sthis) {
2611 SwigPyObject_append((PyObject*) sthis, obj[1]);
2612 } else {
2613 SWIG_Python_SetSwigThis(obj[0], obj[1]);
2614 }
2615 return SWIG_Py_Void();
2616 }
2617 }
2618
2619 /* Create a new pointer object */
2620
2621 SWIGRUNTIME PyObject *
2622 SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
2623 SwigPyClientData *clientdata;
2624 PyObject * robj;
2625 int own;
2626
2627 if (!ptr)
2628 return SWIG_Py_Void();
2629
2630 clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
2631 own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
2632 if (clientdata && clientdata->pytype) {
2633 SwigPyObject *newobj;
2634 if (flags & SWIG_BUILTIN_TP_INIT) {
2635 newobj = (SwigPyObject*) self;
2636 if (newobj->ptr) {
2637 PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
2638 while (newobj->next)
2639 newobj = (SwigPyObject *) newobj->next;
2640 newobj->next = next_self;
2641 newobj = (SwigPyObject *)next_self;
2642 #ifdef SWIGPYTHON_BUILTIN
2643 newobj->dict = 0;
2644 #endif
2645 }
2646 } else {
2647 newobj = PyObject_New(SwigPyObject, clientdata->pytype);
2648 #ifdef SWIGPYTHON_BUILTIN
2649 newobj->dict = 0;
2650 #endif
2651 }
2652 if (newobj) {
2653 newobj->ptr = ptr;
2654 newobj->ty = type;
2655 newobj->own = own;
2656 newobj->next = 0;
2657 return (PyObject*) newobj;
2658 }
2659 return SWIG_Py_Void();
2660 }
2661
2662 assert(!(flags & SWIG_BUILTIN_TP_INIT));
2663
2664 robj = SwigPyObject_New(ptr, type, own);
2665 if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
2666 PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
2667 Py_DECREF(robj);
2668 robj = inst;
2669 }
2670 return robj;
2671 }
2672
2673 /* Create a new packed object */
2674
2675 SWIGRUNTIMEINLINE PyObject *
2676 SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
2677 return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
2678 }
2679
2680 /* -----------------------------------------------------------------------------*
2681 * Get type list
2682 * -----------------------------------------------------------------------------*/
2683
2684 #ifdef SWIG_LINK_RUNTIME
2685 void *SWIG_ReturnGlobalTypeList(void *);
2686 #endif
2687
2688 SWIGRUNTIME swig_module_info *
2689 SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
2690 static void *type_pointer = (void *)0;
2691 /* first check if module already created */
2692 if (!type_pointer) {
2693 #ifdef SWIG_LINK_RUNTIME
2694 type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
2695 #else
2696 # ifdef SWIGPY_USE_CAPSULE
2697 type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
2698 # else
2699 type_pointer = PyCObject_Import((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION,
2700 (char*)"type_pointer" SWIG_TYPE_TABLE_NAME);
2701 # endif
2702 if (PyErr_Occurred()) {
2703 PyErr_Clear();
2704 type_pointer = (void *)0;
2705 }
2706 #endif
2707 }
2708 return (swig_module_info *) type_pointer;
2709 }
2710
2711 #if PY_MAJOR_VERSION < 2
2712 /* PyModule_AddObject function was introduced in Python 2.0. The following function
2713 is copied out of Python/modsupport.c in python version 2.3.4 */
2714 SWIGINTERN int
2715 PyModule_AddObject(PyObject *m, char *name, PyObject *o)
2716 {
2717 PyObject *dict;
2718 if (!PyModule_Check(m)) {
2719 PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs module as first arg");
2720 return SWIG_ERROR;
2721 }
2722 if (!o) {
2723 PyErr_SetString(PyExc_TypeError, "PyModule_AddObject() needs non-NULL value");
2724 return SWIG_ERROR;
2725 }
2726
2727 dict = PyModule_GetDict(m);
2728 if (dict == NULL) {
2729 /* Internal error -- modules must have a dict! */
2730 PyErr_Format(PyExc_SystemError, "module '%s' has no __dict__",
2731 PyModule_GetName(m));
2732 return SWIG_ERROR;
2733 }
2734 if (PyDict_SetItemString(dict, name, o))
2735 return SWIG_ERROR;
2736 Py_DECREF(o);
2737 return SWIG_OK;
2738 }
2739 #endif
2740
2741 SWIGRUNTIME void
2742 #ifdef SWIGPY_USE_CAPSULE
2743 SWIG_Python_DestroyModule(PyObject *obj)
2744 #else
2745 SWIG_Python_DestroyModule(void *vptr)
2746 #endif
2747 {
2748 #ifdef SWIGPY_USE_CAPSULE
2749 swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
2750 #else
2751 swig_module_info *swig_module = (swig_module_info *) vptr;
2752 #endif
2753 swig_type_info **types = swig_module->types;
2754 size_t i;
2755 for (i =0; i < swig_module->size; ++i) {
2756 swig_type_info *ty = types[i];
2757 if (ty->owndata) {
2758 SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
2759 if (data) SwigPyClientData_Del(data);
2760 }
2761 }
2762 Py_DECREF(SWIG_This());
2763 swig_this = NULL;
2764 }
2765
2766 SWIGRUNTIME void
2767 SWIG_Python_SetModule(swig_module_info *swig_module) {
2768 #if PY_VERSION_HEX >= 0x03000000
2769 /* Add a dummy module object into sys.modules */
2770 PyObject *module = PyImport_AddModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION);
2771 #else
2772 static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
2773 PyObject *module = Py_InitModule((char*)"swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
2774 #endif
2775 #ifdef SWIGPY_USE_CAPSULE
2776 PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
2777 if (pointer && module) {
2778 PyModule_AddObject(module, (char*)"type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
2779 } else {
2780 Py_XDECREF(pointer);
2781 }
2782 #else
2783 PyObject *pointer = PyCObject_FromVoidPtr((void *) swig_module, SWIG_Python_DestroyModule);
2784 if (pointer && module) {
2785 PyModule_AddObject(module, (char*)"type_pointer" SWIG_TYPE_TABLE_NAME, pointer);
2786 } else {
2787 Py_XDECREF(pointer);
2788 }
2789 #endif
2790 }
2791
2792 /* The python cached type query */
2793 SWIGRUNTIME PyObject *
2794 SWIG_Python_TypeCache(void) {
2795 static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
2796 return cache;
2797 }
2798
2799 SWIGRUNTIME swig_type_info *
2800 SWIG_Python_TypeQuery(const char *type)
2801 {
2802 PyObject *cache = SWIG_Python_TypeCache();
2803 PyObject *key = SWIG_Python_str_FromChar(type);
2804 PyObject *obj = PyDict_GetItem(cache, key);
2805 swig_type_info *descriptor;
2806 if (obj) {
2807 #ifdef SWIGPY_USE_CAPSULE
2808 descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
2809 #else
2810 descriptor = (swig_type_info *) PyCObject_AsVoidPtr(obj);
2811 #endif
2812 } else {
2813 swig_module_info *swig_module = SWIG_GetModule(0);
2814 descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
2815 if (descriptor) {
2816 #ifdef SWIGPY_USE_CAPSULE
2817 obj = PyCapsule_New((void*) descriptor, NULL, NULL);
2818 #else
2819 obj = PyCObject_FromVoidPtr(descriptor, NULL);
2820 #endif
2821 PyDict_SetItem(cache, key, obj);
2822 Py_DECREF(obj);
2823 }
2824 }
2825 Py_DECREF(key);
2826 return descriptor;
2827 }
2828
2829 /*
2830 For backward compatibility only
2831 */
2832 #define SWIG_POINTER_EXCEPTION 0
2833 #define SWIG_arg_fail(arg) SWIG_Python_ArgFail(arg)
2834 #define SWIG_MustGetPtr(p, type, argnum, flags) SWIG_Python_MustGetPtr(p, type, argnum, flags)
2835
2836 SWIGRUNTIME int
2837 SWIG_Python_AddErrMesg(const char* mesg, int infront)
2838 {
2839 if (PyErr_Occurred()) {
2840 PyObject *type = 0;
2841 PyObject *value = 0;
2842 PyObject *traceback = 0;
2843 PyErr_Fetch(&type, &value, &traceback);
2844 if (value) {
2845 char *tmp;
2846 PyObject *old_str = PyObject_Str(value);
2847 Py_XINCREF(type);
2848 PyErr_Clear();
2849 if (infront) {
2850 PyErr_Format(type, "%s %s", mesg, tmp = SWIG_Python_str_AsChar(old_str));
2851 } else {
2852 PyErr_Format(type, "%s %s", tmp = SWIG_Python_str_AsChar(old_str), mesg);
2853 }
2854 SWIG_Python_str_DelForPy3(tmp);
2855 Py_DECREF(old_str);
2856 }
2857 return 1;
2858 } else {
2859 return 0;
2860 }
2861 }
2862
2863 SWIGRUNTIME int
2864 SWIG_Python_ArgFail(int argnum)
2865 {
2866 if (PyErr_Occurred()) {
2867 /* add information about failing argument */
2868 char mesg[256];
2869 PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
2870 return SWIG_Python_AddErrMesg(mesg, 1);
2871 } else {
2872 return 0;
2873 }
2874 }
2875
2876 SWIGRUNTIMEINLINE const char *
2877 SwigPyObject_GetDesc(PyObject *self)
2878 {
2879 SwigPyObject *v = (SwigPyObject *)self;
2880 swig_type_info *ty = v ? v->ty : 0;
2881 return ty ? ty->str : "";
2882 }
2883
2884 SWIGRUNTIME void
2885 SWIG_Python_TypeError(const char *type, PyObject *obj)
2886 {
2887 if (type) {
2888 #if defined(SWIG_COBJECT_TYPES)
2889 if (obj && SwigPyObject_Check(obj)) {
2890 const char *otype = (const char *) SwigPyObject_GetDesc(obj);
2891 if (otype) {
2892 PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
2893 type, otype);
2894 return;
2895 }
2896 } else
2897 #endif
2898 {
2899 const char *otype = (obj ? obj->ob_type->tp_name : 0);
2900 if (otype) {
2901 PyObject *str = PyObject_Str(obj);
2902 const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
2903 if (cstr) {
2904 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
2905 type, otype, cstr);
2906 SWIG_Python_str_DelForPy3(cstr);
2907 } else {
2908 PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
2909 type, otype);
2910 }
2911 Py_XDECREF(str);
2912 return;
2913 }
2914 }
2915 PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
2916 } else {
2917 PyErr_Format(PyExc_TypeError, "unexpected type is received");
2918 }
2919 }
2920
2921
2922 /* Convert a pointer value, signal an exception on a type mismatch */
2923 SWIGRUNTIME void *
2924 SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
2925 void *result;
2926 if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
2927 PyErr_Clear();
2928 #if SWIG_POINTER_EXCEPTION
2929 if (flags) {
2930 SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
2931 SWIG_Python_ArgFail(argnum);
2932 }
2933 #endif
2934 }
2935 return result;
2936 }
2937
2938 #ifdef SWIGPYTHON_BUILTIN
2939 SWIGRUNTIME int
2940 SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
2941 PyTypeObject *tp = obj->ob_type;
2942 PyObject *descr;
2943 PyObject *encoded_name;
2944 descrsetfunc f;
2945 int res = -1;
2946
2947 # ifdef Py_USING_UNICODE
2948 if (PyString_Check(name)) {
2949 name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
2950 if (!name)
2951 return -1;
2952 } else if (!PyUnicode_Check(name))
2953 # else
2954 if (!PyString_Check(name))
2955 # endif
2956 {
2957 PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
2958 return -1;
2959 } else {
2960 Py_INCREF(name);
2961 }
2962
2963 if (!tp->tp_dict) {
2964 if (PyType_Ready(tp) < 0)
2965 goto done;
2966 }
2967
2968 descr = _PyType_Lookup(tp, name);
2969 f = NULL;
2970 if (descr != NULL)
2971 f = descr->ob_type->tp_descr_set;
2972 if (!f) {
2973 if (PyString_Check(name)) {
2974 encoded_name = name;
2975 Py_INCREF(name);
2976 } else {
2977 encoded_name = PyUnicode_AsUTF8String(name);
2978 }
2979 PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
2980 Py_DECREF(encoded_name);
2981 } else {
2982 res = f(descr, obj, value);
2983 }
2984
2985 done:
2986 Py_DECREF(name);
2987 return res;
2988 }
2989 #endif
2990
2991
2992 #ifdef __cplusplus
2993 }
2994 #endif
2995
2996
2997
2998 #define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0)
2999
3000 #define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else
3001
3002
3003
3004 /* -------- TYPES TABLE (BEGIN) -------- */
3005
3006 #define SWIGTYPE_p_Crev swig_types[0]
3007 #define SWIGTYPE_p_FILE swig_types[1]
3008 #define SWIGTYPE_p_MapLong2Long swig_types[2]
3009 #define SWIGTYPE_p_Node swig_types[3]
3010 #define SWIGTYPE_p_T swig_types[4]
3011 #define SWIGTYPE_p_TI swig_types[5]
3012 #define SWIGTYPE_p_char swig_types[6]
3013 #define SWIGTYPE_p_double swig_types[7]
3014 #define SWIGTYPE_p_faiss__ArrayInvertedLists swig_types[8]
3015 #define SWIGTYPE_p_faiss__AutoTuneCriterion swig_types[9]
3016 #define SWIGTYPE_p_faiss__BinaryInvertedListScanner swig_types[10]
3017 #define SWIGTYPE_p_faiss__BufferList swig_types[11]
3018 #define SWIGTYPE_p_faiss__Cloner swig_types[12]
3019 #define SWIGTYPE_p_faiss__Clustering swig_types[13]
3020 #define SWIGTYPE_p_faiss__ClusteringParameters swig_types[14]
3021 #define SWIGTYPE_p_faiss__ConcatenatedInvertedLists swig_types[15]
3022 #define SWIGTYPE_p_faiss__GenHammingComputer16 swig_types[16]
3023 #define SWIGTYPE_p_faiss__GenHammingComputer32 swig_types[17]
3024 #define SWIGTYPE_p_faiss__GenHammingComputer8 swig_types[18]
3025 #define SWIGTYPE_p_faiss__GenHammingComputerM8 swig_types[19]
3026 #define SWIGTYPE_p_faiss__HNSW swig_types[20]
3027 #define SWIGTYPE_p_faiss__HNSWStats swig_types[21]
3028 #define SWIGTYPE_p_faiss__HNSW__DistanceComputer swig_types[22]
3029 #define SWIGTYPE_p_faiss__HNSW__MinimaxHeap swig_types[23]
3030 #define SWIGTYPE_p_faiss__HammingComputer16 swig_types[24]
3031 #define SWIGTYPE_p_faiss__HammingComputer20 swig_types[25]
3032 #define SWIGTYPE_p_faiss__HammingComputer32 swig_types[26]
3033 #define SWIGTYPE_p_faiss__HammingComputer4 swig_types[27]
3034 #define SWIGTYPE_p_faiss__HammingComputer64 swig_types[28]
3035 #define SWIGTYPE_p_faiss__HammingComputer8 swig_types[29]
3036 #define SWIGTYPE_p_faiss__HammingComputerDefault swig_types[30]
3037 #define SWIGTYPE_p_faiss__HammingComputerM4 swig_types[31]
3038 #define SWIGTYPE_p_faiss__HammingComputerM8 swig_types[32]
3039 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t swig_types[33]
3040 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t swig_types[34]
3041 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t swig_types[35]
3042 #define SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t swig_types[36]
3043 #define SWIGTYPE_p_faiss__IDSelector swig_types[37]
3044 #define SWIGTYPE_p_faiss__IDSelectorBatch swig_types[38]
3045 #define SWIGTYPE_p_faiss__IDSelectorRange swig_types[39]
3046 #define SWIGTYPE_p_faiss__IOReader swig_types[40]
3047 #define SWIGTYPE_p_faiss__IOWriter swig_types[41]
3048 #define SWIGTYPE_p_faiss__IVFPQSearchParameters swig_types[42]
3049 #define SWIGTYPE_p_faiss__IVFSearchParameters swig_types[43]
3050 #define SWIGTYPE_p_faiss__Index swig_types[44]
3051 #define SWIGTYPE_p_faiss__Index2Layer swig_types[45]
3052 #define SWIGTYPE_p_faiss__IndexBinary swig_types[46]
3053 #define SWIGTYPE_p_faiss__IndexBinaryFlat swig_types[47]
3054 #define SWIGTYPE_p_faiss__IndexBinaryFromFloat swig_types[48]
3055 #define SWIGTYPE_p_faiss__IndexBinaryHNSW swig_types[49]
3056 #define SWIGTYPE_p_faiss__IndexBinaryIVF swig_types[50]
3057 #define SWIGTYPE_p_faiss__IndexFlat swig_types[51]
3058 #define SWIGTYPE_p_faiss__IndexFlat1D swig_types[52]
3059 #define SWIGTYPE_p_faiss__IndexFlatIP swig_types[53]
3060 #define SWIGTYPE_p_faiss__IndexFlatL2 swig_types[54]
3061 #define SWIGTYPE_p_faiss__IndexFlatL2BaseShift swig_types[55]
3062 #define SWIGTYPE_p_faiss__IndexHNSW swig_types[56]
3063 #define SWIGTYPE_p_faiss__IndexHNSW2Level swig_types[57]
3064 #define SWIGTYPE_p_faiss__IndexHNSWFlat swig_types[58]
3065 #define SWIGTYPE_p_faiss__IndexHNSWPQ swig_types[59]
3066 #define SWIGTYPE_p_faiss__IndexHNSWSQ swig_types[60]
3067 #define SWIGTYPE_p_faiss__IndexIDMap swig_types[61]
3068 #define SWIGTYPE_p_faiss__IndexIDMap2 swig_types[62]
3069 #define SWIGTYPE_p_faiss__IndexIVF swig_types[63]
3070 #define SWIGTYPE_p_faiss__IndexIVFFlat swig_types[64]
3071 #define SWIGTYPE_p_faiss__IndexIVFFlatDedup swig_types[65]
3072 #define SWIGTYPE_p_faiss__IndexIVFPQ swig_types[66]
3073 #define SWIGTYPE_p_faiss__IndexIVFPQR swig_types[67]
3074 #define SWIGTYPE_p_faiss__IndexIVFPQStats swig_types[68]
3075 #define SWIGTYPE_p_faiss__IndexIVFScalarQuantizer swig_types[69]
3076 #define SWIGTYPE_p_faiss__IndexIVFStats swig_types[70]
3077 #define SWIGTYPE_p_faiss__IndexLSH swig_types[71]
3078 #define SWIGTYPE_p_faiss__IndexPQ swig_types[72]
3079 #define SWIGTYPE_p_faiss__IndexPQStats swig_types[73]
3080 #define SWIGTYPE_p_faiss__IndexPreTransform swig_types[74]
3081 #define SWIGTYPE_p_faiss__IndexRefineFlat swig_types[75]
3082 #define SWIGTYPE_p_faiss__IndexScalarQuantizer swig_types[76]
3083 #define SWIGTYPE_p_faiss__IndexShards swig_types[77]
3084 #define SWIGTYPE_p_faiss__IndexSplitVectors swig_types[78]
3085 #define SWIGTYPE_p_faiss__IntersectionCriterion swig_types[79]
3086 #define SWIGTYPE_p_faiss__InvertedListScanner swig_types[80]
3087 #define SWIGTYPE_p_faiss__InvertedLists swig_types[81]
3088 #define SWIGTYPE_p_faiss__Level1Quantizer swig_types[82]
3089 #define SWIGTYPE_p_faiss__LinearTransform swig_types[83]
3090 #define SWIGTYPE_p_faiss__LockLevels swig_types[84]
3091 #define SWIGTYPE_p_faiss__MultiIndexQuantizer swig_types[85]
3092 #define SWIGTYPE_p_faiss__MultiIndexQuantizer2 swig_types[86]
3093 #define SWIGTYPE_p_faiss__NormalizationTransform swig_types[87]
3094 #define SWIGTYPE_p_faiss__OPQMatrix swig_types[88]
3095 #define SWIGTYPE_p_faiss__OnDiskInvertedLists swig_types[89]
3096 #define SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch swig_types[90]
3097 #define SWIGTYPE_p_faiss__OneRecallAtRCriterion swig_types[91]
3098 #define SWIGTYPE_p_faiss__OperatingPoint swig_types[92]
3099 #define SWIGTYPE_p_faiss__OperatingPoints swig_types[93]
3100 #define SWIGTYPE_p_faiss__PCAMatrix swig_types[94]
3101 #define SWIGTYPE_p_faiss__ParameterRange swig_types[95]
3102 #define SWIGTYPE_p_faiss__ParameterSpace swig_types[96]
3103 #define SWIGTYPE_p_faiss__PermutationObjective swig_types[97]
3104 #define SWIGTYPE_p_faiss__PolysemousTraining swig_types[98]
3105 #define SWIGTYPE_p_faiss__ProductQuantizer swig_types[99]
3106 #define SWIGTYPE_p_faiss__RandomGenerator swig_types[100]
3107 #define SWIGTYPE_p_faiss__RandomRotationMatrix swig_types[101]
3108 #define SWIGTYPE_p_faiss__RangeSearchPartialResult swig_types[102]
3109 #define SWIGTYPE_p_faiss__RangeSearchPartialResult__QueryResult swig_types[103]
3110 #define SWIGTYPE_p_faiss__RangeSearchResult swig_types[104]
3111 #define SWIGTYPE_p_faiss__ReconstructFromNeighbors swig_types[105]
3112 #define SWIGTYPE_p_faiss__RemapDimensionsTransform swig_types[106]
3113 #define SWIGTYPE_p_faiss__ReproduceDistancesObjective swig_types[107]
3114 #define SWIGTYPE_p_faiss__ScalarQuantizer swig_types[108]
3115 #define SWIGTYPE_p_faiss__ScalarQuantizer__DistanceComputer swig_types[109]
3116 #define SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer swig_types[110]
3117 #define SWIGTYPE_p_faiss__SimulatedAnnealingParameters swig_types[111]
3118 #define SWIGTYPE_p_faiss__VectorIOReader swig_types[112]
3119 #define SWIGTYPE_p_faiss__VectorIOWriter swig_types[113]
3120 #define SWIGTYPE_p_faiss__VectorTransform swig_types[114]
3121 #define SWIGTYPE_p_faiss__VisitedTable swig_types[115]
3122 #define SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow swig_types[116]
3123 #define SWIGTYPE_p_float swig_types[117]
3124 #define SWIGTYPE_p_idx_t swig_types[118]
3125 #define SWIGTYPE_p_int swig_types[119]
3126 #define SWIGTYPE_p_long swig_types[120]
3127 #define SWIGTYPE_p_omp_lock_t swig_types[121]
3128 #define SWIGTYPE_p_p_faiss__ArrayInvertedLists swig_types[122]
3129 #define SWIGTYPE_p_p_faiss__ConcatenatedInvertedLists swig_types[123]
3130 #define SWIGTYPE_p_p_faiss__Index swig_types[124]
3131 #define SWIGTYPE_p_p_faiss__Index2Layer swig_types[125]
3132 #define SWIGTYPE_p_p_faiss__IndexFlat swig_types[126]
3133 #define SWIGTYPE_p_p_faiss__IndexFlat1D swig_types[127]
3134 #define SWIGTYPE_p_p_faiss__IndexFlatIP swig_types[128]
3135 #define SWIGTYPE_p_p_faiss__IndexFlatL2 swig_types[129]
3136 #define SWIGTYPE_p_p_faiss__IndexFlatL2BaseShift swig_types[130]
3137 #define SWIGTYPE_p_p_faiss__IndexHNSW swig_types[131]
3138 #define SWIGTYPE_p_p_faiss__IndexHNSW2Level swig_types[132]
3139 #define SWIGTYPE_p_p_faiss__IndexHNSWFlat swig_types[133]
3140 #define SWIGTYPE_p_p_faiss__IndexHNSWPQ swig_types[134]
3141 #define SWIGTYPE_p_p_faiss__IndexHNSWSQ swig_types[135]
3142 #define SWIGTYPE_p_p_faiss__IndexIDMap swig_types[136]
3143 #define SWIGTYPE_p_p_faiss__IndexIDMap2 swig_types[137]
3144 #define SWIGTYPE_p_p_faiss__IndexIVF swig_types[138]
3145 #define SWIGTYPE_p_p_faiss__IndexIVFFlat swig_types[139]
3146 #define SWIGTYPE_p_p_faiss__IndexIVFFlatDedup swig_types[140]
3147 #define SWIGTYPE_p_p_faiss__IndexIVFPQ swig_types[141]
3148 #define SWIGTYPE_p_p_faiss__IndexIVFPQR swig_types[142]
3149 #define SWIGTYPE_p_p_faiss__IndexIVFScalarQuantizer swig_types[143]
3150 #define SWIGTYPE_p_p_faiss__IndexLSH swig_types[144]
3151 #define SWIGTYPE_p_p_faiss__IndexPQ swig_types[145]
3152 #define SWIGTYPE_p_p_faiss__IndexPreTransform swig_types[146]
3153 #define SWIGTYPE_p_p_faiss__IndexRefineFlat swig_types[147]
3154 #define SWIGTYPE_p_p_faiss__IndexScalarQuantizer swig_types[148]
3155 #define SWIGTYPE_p_p_faiss__IndexShards swig_types[149]
3156 #define SWIGTYPE_p_p_faiss__IndexSplitVectors swig_types[150]
3157 #define SWIGTYPE_p_p_faiss__InvertedLists swig_types[151]
3158 #define SWIGTYPE_p_p_faiss__LinearTransform swig_types[152]
3159 #define SWIGTYPE_p_p_faiss__MultiIndexQuantizer swig_types[153]
3160 #define SWIGTYPE_p_p_faiss__MultiIndexQuantizer2 swig_types[154]
3161 #define SWIGTYPE_p_p_faiss__NormalizationTransform swig_types[155]
3162 #define SWIGTYPE_p_p_faiss__OPQMatrix swig_types[156]
3163 #define SWIGTYPE_p_p_faiss__OnDiskInvertedLists swig_types[157]
3164 #define SWIGTYPE_p_p_faiss__PCAMatrix swig_types[158]
3165 #define SWIGTYPE_p_p_faiss__RandomRotationMatrix swig_types[159]
3166 #define SWIGTYPE_p_p_faiss__RemapDimensionsTransform swig_types[160]
3167 #define SWIGTYPE_p_p_faiss__VectorTransform swig_types[161]
3168 #define SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t swig_types[162]
3169 #define SWIGTYPE_p_std__mt19937 swig_types[163]
3170 #define SWIGTYPE_p_std__pairT_float_int_t swig_types[164]
3171 #define SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t swig_types[165]
3172 #define SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t swig_types[166]
3173 #define SWIGTYPE_p_std__unordered_mapT_long_long_t swig_types[167]
3174 #define SWIGTYPE_p_std__unordered_multimapT_long_long_t swig_types[168]
3175 #define SWIGTYPE_p_std__vectorT_char_t swig_types[169]
3176 #define SWIGTYPE_p_std__vectorT_double_t swig_types[170]
3177 #define SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t swig_types[171]
3178 #define SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t swig_types[172]
3179 #define SWIGTYPE_p_std__vectorT_faiss__Index_p_t swig_types[173]
3180 #define SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t swig_types[174]
3181 #define SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t swig_types[175]
3182 #define SWIGTYPE_p_std__vectorT_faiss__OnDiskInvertedLists__List_t swig_types[176]
3183 #define SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t swig_types[177]
3184 #define SWIGTYPE_p_std__vectorT_faiss__ParameterRange_t swig_types[178]
3185 #define SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t swig_types[179]
3186 #define SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t swig_types[180]
3187 #define SWIGTYPE_p_std__vectorT_float_t swig_types[181]
3188 #define SWIGTYPE_p_std__vectorT_int_t swig_types[182]
3189 #define SWIGTYPE_p_std__vectorT_long_t swig_types[183]
3190 #define SWIGTYPE_p_std__vectorT_omp_lock_t_t swig_types[184]
3191 #define SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t swig_types[185]
3192 #define SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t swig_types[186]
3193 #define SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t swig_types[187]
3194 #define SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_long_t_t swig_types[188]
3195 #define SWIGTYPE_p_std__vectorT_unsigned_char_t swig_types[189]
3196 #define SWIGTYPE_p_std__vectorT_unsigned_long_t swig_types[190]
3197 #define SWIGTYPE_p_storage_idx_t swig_types[191]
3198 #define SWIGTYPE_p_uint32_t swig_types[192]
3199 #define SWIGTYPE_p_unsigned_char swig_types[193]
3200 #define SWIGTYPE_p_unsigned_long swig_types[194]
3201 #define SWIGTYPE_p_void swig_types[195]
3202 static swig_type_info *swig_types[197];
3203 static swig_module_info swig_module = {swig_types, 196, 0, 0, 0, 0};
3204 #define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
3205 #define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)
3206
3207 /* -------- TYPES TABLE (END) -------- */
3208
3209 #if (PY_VERSION_HEX <= 0x02000000)
3210 # if !defined(SWIG_PYTHON_CLASSIC)
3211 # error "This python version requires swig to be run with the '-classic' option"
3212 # endif
3213 #endif
3214
3215 /*-----------------------------------------------
3216 @(target):= _swigfaiss.so
3217 ------------------------------------------------*/
3218 #if PY_VERSION_HEX >= 0x03000000
3219 # define SWIG_init PyInit__swigfaiss
3220
3221 #else
3222 # define SWIG_init init_swigfaiss
3223
3224 #endif
3225 #define SWIG_name "_swigfaiss"
3226
3227 #define SWIGVERSION 0x030012
3228 #define SWIG_VERSION SWIGVERSION
3229
3230
3231 #define SWIG_as_voidptr(a) const_cast< void * >(static_cast< const void * >(a))
3232 #define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),reinterpret_cast< void** >(a))
3233
3234
3235 #include <stdexcept>
3236
3237
3238 namespace swig {
3239 class SwigPtr_PyObject {
3240 protected:
3241 PyObject *_obj;
3242
3243 public:
3244 SwigPtr_PyObject() :_obj(0)
3245 {
3246 }
3247
3248 SwigPtr_PyObject(const SwigPtr_PyObject& item) : _obj(item._obj)
3249 {
3250 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3251 Py_XINCREF(_obj);
3252 SWIG_PYTHON_THREAD_END_BLOCK;
3253 }
3254
3255 SwigPtr_PyObject(PyObject *obj, bool initial_ref = true) :_obj(obj)
3256 {
3257 if (initial_ref) {
3258 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3259 Py_XINCREF(_obj);
3260 SWIG_PYTHON_THREAD_END_BLOCK;
3261 }
3262 }
3263
3264 SwigPtr_PyObject & operator=(const SwigPtr_PyObject& item)
3265 {
3266 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3267 Py_XINCREF(item._obj);
3268 Py_XDECREF(_obj);
3269 _obj = item._obj;
3270 SWIG_PYTHON_THREAD_END_BLOCK;
3271 return *this;
3272 }
3273
3274 ~SwigPtr_PyObject()
3275 {
3276 SWIG_PYTHON_THREAD_BEGIN_BLOCK;
3277 Py_XDECREF(_obj);
3278 SWIG_PYTHON_THREAD_END_BLOCK;
3279 }
3280
3281 operator PyObject *() const
3282 {
3283 return _obj;
3284 }
3285
3286 PyObject *operator->() const
3287 {
3288 return _obj;
3289 }
3290 };
3291 }
3292
3293
3294 namespace swig {
3295 struct SwigVar_PyObject : SwigPtr_PyObject {
3296 SwigVar_PyObject(PyObject* obj = 0) : SwigPtr_PyObject(obj, false) { }
3297
3298 SwigVar_PyObject & operator = (PyObject* obj)
3299 {
3300 Py_XDECREF(_obj);
3301 _obj = obj;
3302 return *this;
3303 }
3304 };
3305 }
3306
3307
3308
3309
3310 #include <stdint.h>
3311 #include <omp.h>
3312
3313
3314 #ifdef SWIGLUA
3315
3316 #include <pthread.h>
3317
3318 extern "C" {
3319
3320 #include <TH/TH.h>
3321 #include <luaT.h>
3322 #undef THTensor
3323
3324 }
3325
3326 #endif
3327
3328
3329 #ifdef SWIGPYTHON
3330
3331 #undef popcount64
3332
3333 #define SWIG_FILE_WITH_INIT
3334 #define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
3335 #include <numpy/arrayobject.h>
3336
3337 #endif
3338
3339
3340 #include "IndexFlat.h"
3341 #include "VectorTransform.h"
3342 #include "IndexLSH.h"
3343 #include "IndexPQ.h"
3344 #include "IndexIVF.h"
3345 #include "IndexIVFPQ.h"
3346 #include "IndexIVFFlat.h"
3347 #include "IndexScalarQuantizer.h"
3348 #include "HNSW.h"
3349 #include "IndexHNSW.h"
3350 #include "MetaIndexes.h"
3351 #include "FaissAssert.h"
3352
3353 #include "IndexBinaryFlat.h"
3354 #include "IndexBinaryIVF.h"
3355 #include "IndexBinaryFromFloat.h"
3356 #include "IndexBinaryHNSW.h"
3357
3358 #include "index_io.h"
3359
3360 #include "IVFlib.h"
3361 #include "utils.h"
3362 #include "Heap.h"
3363 #include "AuxIndexStructures.h"
3364 #include "OnDiskInvertedLists.h"
3365
3366 #include "Clustering.h"
3367
3368 #include "hamming.h"
3369
3370 #include "AutoTune.h"
3371
3372
3373
3374
3375
3376 #include <float.h>
3377
3378
3379 #include <math.h>
3380
3381
3382 /* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
3383 #ifndef SWIG_isfinite
3384 /* isfinite() is a macro for C99 */
3385 # if defined(isfinite)
3386 # define SWIG_isfinite(X) (isfinite(X))
3387 # elif defined __cplusplus && __cplusplus >= 201103L
3388 /* Use a template so that this works whether isfinite() is std::isfinite() or
3389 * in the global namespace. The reality seems to vary between compiler
3390 * versions.
3391 *
3392 * Make sure namespace std exists to avoid compiler warnings.
3393 *
3394 * extern "C++" is required as this fragment can end up inside an extern "C" { } block
3395 */
3396 namespace std { }
3397 extern "C++" template<typename T>
3398 inline int SWIG_isfinite_func(T x) {
3399 using namespace std;
3400 return isfinite(x);
3401 }
3402 # define SWIG_isfinite(X) (SWIG_isfinite_func(X))
3403 # elif defined(_MSC_VER)
3404 # define SWIG_isfinite(X) (_finite(X))
3405 # elif defined(__sun) && defined(__SVR4)
3406 # include <ieeefp.h>
3407 # define SWIG_isfinite(X) (finite(X))
3408 # endif
3409 #endif
3410
3411
3412 /* Accept infinite as a valid float value unless we are unable to check if a value is finite */
3413 #ifdef SWIG_isfinite
3414 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
3415 #else
3416 # define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
3417 #endif
3418
3419
3420 SWIGINTERN int
3421 SWIG_AsVal_double (PyObject *obj, double *val)
3422 {
3423 int res = SWIG_TypeError;
3424 if (PyFloat_Check(obj)) {
3425 if (val) *val = PyFloat_AsDouble(obj);
3426 return SWIG_OK;
3427 #if PY_VERSION_HEX < 0x03000000
3428 } else if (PyInt_Check(obj)) {
3429 if (val) *val = (double) PyInt_AsLong(obj);
3430 return SWIG_OK;
3431 #endif
3432 } else if (PyLong_Check(obj)) {
3433 double v = PyLong_AsDouble(obj);
3434 if (!PyErr_Occurred()) {
3435 if (val) *val = v;
3436 return SWIG_OK;
3437 } else {
3438 PyErr_Clear();
3439 }
3440 }
3441 #ifdef SWIG_PYTHON_CAST_MODE
3442 {
3443 int dispatch = 0;
3444 double d = PyFloat_AsDouble(obj);
3445 if (!PyErr_Occurred()) {
3446 if (val) *val = d;
3447 return SWIG_AddCast(SWIG_OK);
3448 } else {
3449 PyErr_Clear();
3450 }
3451 if (!dispatch) {
3452 long v = PyLong_AsLong(obj);
3453 if (!PyErr_Occurred()) {
3454 if (val) *val = v;
3455 return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
3456 } else {
3457 PyErr_Clear();
3458 }
3459 }
3460 }
3461 #endif
3462 return res;
3463 }
3464
3465
3466 SWIGINTERN int
3467 SWIG_AsVal_float (PyObject * obj, float *val)
3468 {
3469 double v;
3470 int res = SWIG_AsVal_double (obj, &v);
3471 if (SWIG_IsOK(res)) {
3472 if (SWIG_Float_Overflow_Check(v)) {
3473 return SWIG_OverflowError;
3474 } else {
3475 if (val) *val = static_cast< float >(v);
3476 }
3477 }
3478 return res;
3479 }
3480
3481
3482 #define SWIG_From_long PyInt_FromLong
3483
3484
3485 SWIGINTERNINLINE PyObject*
3486 SWIG_From_unsigned_SS_long (unsigned long value)
3487 {
3488 return (value > LONG_MAX) ?
3489 PyLong_FromUnsignedLong(value) : PyInt_FromLong(static_cast< long >(value));
3490 }
3491
3492
3493 #include <limits.h>
3494 #if !defined(SWIG_NO_LLONG_MAX)
3495 # if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
3496 # define LLONG_MAX __LONG_LONG_MAX__
3497 # define LLONG_MIN (-LLONG_MAX - 1LL)
3498 # define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
3499 # endif
3500 #endif
3501
3502
3503 #if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
3504 # define SWIG_LONG_LONG_AVAILABLE
3505 #endif
3506
3507
3508 #ifdef SWIG_LONG_LONG_AVAILABLE
3509 SWIGINTERNINLINE PyObject*
3510 SWIG_From_unsigned_SS_long_SS_long (unsigned long long value)
3511 {
3512 return (value > LONG_MAX) ?
3513 PyLong_FromUnsignedLongLong(value) : PyInt_FromLong(static_cast< long >(value));
3514 }
3515 #endif
3516
3517
3518 SWIGINTERNINLINE PyObject *
3519 SWIG_From_size_t (size_t value)
3520 {
3521 #ifdef SWIG_LONG_LONG_AVAILABLE
3522 if (sizeof(size_t) <= sizeof(unsigned long)) {
3523 #endif
3524 return SWIG_From_unsigned_SS_long (static_cast< unsigned long >(value));
3525 #ifdef SWIG_LONG_LONG_AVAILABLE
3526 } else {
3527 /* assume sizeof(size_t) <= sizeof(unsigned long long) */
3528 return SWIG_From_unsigned_SS_long_SS_long (static_cast< unsigned long long >(value));
3529 }
3530 #endif
3531 }
3532
3533
3534 SWIGINTERNINLINE int
3535 SWIG_CanCastAsInteger(double *d, double min, double max) {
3536 double x = *d;
3537 if ((min <= x && x <= max)) {
3538 double fx = floor(x);
3539 double cx = ceil(x);
3540 double rd = ((x - fx) < 0.5) ? fx : cx; /* simple rint */
3541 if ((errno == EDOM) || (errno == ERANGE)) {
3542 errno = 0;
3543 } else {
3544 double summ, reps, diff;
3545 if (rd < x) {
3546 diff = x - rd;
3547 } else if (rd > x) {
3548 diff = rd - x;
3549 } else {
3550 return 1;
3551 }
3552 summ = rd + x;
3553 reps = diff/summ;
3554 if (reps < 8*DBL_EPSILON) {
3555 *d = rd;
3556 return 1;
3557 }
3558 }
3559 }
3560 return 0;
3561 }
3562
3563
3564 SWIGINTERN int
3565 SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val)
3566 {
3567 #if PY_VERSION_HEX < 0x03000000
3568 if (PyInt_Check(obj)) {
3569 long v = PyInt_AsLong(obj);
3570 if (v >= 0) {
3571 if (val) *val = v;
3572 return SWIG_OK;
3573 } else {
3574 return SWIG_OverflowError;
3575 }
3576 } else
3577 #endif
3578 if (PyLong_Check(obj)) {
3579 unsigned long v = PyLong_AsUnsignedLong(obj);
3580 if (!PyErr_Occurred()) {
3581 if (val) *val = v;
3582 return SWIG_OK;
3583 } else {
3584 PyErr_Clear();
3585 return SWIG_OverflowError;
3586 }
3587 }
3588 #ifdef SWIG_PYTHON_CAST_MODE
3589 {
3590 int dispatch = 0;
3591 unsigned long v = PyLong_AsUnsignedLong(obj);
3592 if (!PyErr_Occurred()) {
3593 if (val) *val = v;
3594 return SWIG_AddCast(SWIG_OK);
3595 } else {
3596 PyErr_Clear();
3597 }
3598 if (!dispatch) {
3599 double d;
3600 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3601 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
3602 if (val) *val = (unsigned long)(d);
3603 return res;
3604 }
3605 }
3606 }
3607 #endif
3608 return SWIG_TypeError;
3609 }
3610
3611
3612 #ifdef SWIG_LONG_LONG_AVAILABLE
3613 SWIGINTERN int
3614 SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
3615 {
3616 int res = SWIG_TypeError;
3617 if (PyLong_Check(obj)) {
3618 unsigned long long v = PyLong_AsUnsignedLongLong(obj);
3619 if (!PyErr_Occurred()) {
3620 if (val) *val = v;
3621 return SWIG_OK;
3622 } else {
3623 PyErr_Clear();
3624 res = SWIG_OverflowError;
3625 }
3626 } else {
3627 unsigned long v;
3628 res = SWIG_AsVal_unsigned_SS_long (obj,&v);
3629 if (SWIG_IsOK(res)) {
3630 if (val) *val = v;
3631 return res;
3632 }
3633 }
3634 #ifdef SWIG_PYTHON_CAST_MODE
3635 {
3636 const double mant_max = 1LL << DBL_MANT_DIG;
3637 double d;
3638 res = SWIG_AsVal_double (obj,&d);
3639 if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
3640 return SWIG_OverflowError;
3641 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
3642 if (val) *val = (unsigned long long)(d);
3643 return SWIG_AddCast(res);
3644 }
3645 res = SWIG_TypeError;
3646 }
3647 #endif
3648 return res;
3649 }
3650 #endif
3651
3652
3653 SWIGINTERNINLINE int
3654 SWIG_AsVal_size_t (PyObject * obj, size_t *val)
3655 {
3656 int res = SWIG_TypeError;
3657 #ifdef SWIG_LONG_LONG_AVAILABLE
3658 if (sizeof(size_t) <= sizeof(unsigned long)) {
3659 #endif
3660 unsigned long v;
3661 res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
3662 if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3663 #ifdef SWIG_LONG_LONG_AVAILABLE
3664 } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
3665 unsigned long long v;
3666 res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
3667 if (SWIG_IsOK(res) && val) *val = static_cast< size_t >(v);
3668 }
3669 #endif
3670 return res;
3671 }
3672
3673
3674 #define SWIG_From_double PyFloat_FromDouble
3675
3676
3677 SWIGINTERNINLINE PyObject *
3678 SWIG_From_float (float value)
3679 {
3680 return SWIG_From_double (value);
3681 }
3682
3683
3684 SWIGINTERN int
3685 SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
3686 {
3687 unsigned long v;
3688 int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
3689 if (SWIG_IsOK(res)) {
3690 if ((v > UCHAR_MAX)) {
3691 return SWIG_OverflowError;
3692 } else {
3693 if (val) *val = static_cast< unsigned char >(v);
3694 }
3695 }
3696 return res;
3697 }
3698
3699
3700 SWIGINTERNINLINE PyObject *
3701 SWIG_From_unsigned_SS_char (unsigned char value)
3702 {
3703 return SWIG_From_unsigned_SS_long (value);
3704 }
3705
3706
3707 SWIGINTERN swig_type_info*
3708 SWIG_pchar_descriptor(void)
3709 {
3710 static int init = 0;
3711 static swig_type_info* info = 0;
3712 if (!init) {
3713 info = SWIG_TypeQuery("_p_char");
3714 init = 1;
3715 }
3716 return info;
3717 }
3718
3719
3720 SWIGINTERN int
3721 SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
3722 {
3723 #if PY_VERSION_HEX>=0x03000000
3724 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3725 if (PyBytes_Check(obj))
3726 #else
3727 if (PyUnicode_Check(obj))
3728 #endif
3729 #else
3730 if (PyString_Check(obj))
3731 #endif
3732 {
3733 char *cstr; Py_ssize_t len;
3734 #if PY_VERSION_HEX>=0x03000000
3735 #if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3736 if (!alloc && cptr) {
3737 /* We can't allow converting without allocation, since the internal
3738 representation of string in Python 3 is UCS-2/UCS-4 but we require
3739 a UTF-8 representation.
3740 TODO(bhy) More detailed explanation */
3741 return SWIG_RuntimeError;
3742 }
3743 obj = PyUnicode_AsUTF8String(obj);
3744 if(alloc) *alloc = SWIG_NEWOBJ;
3745 #endif
3746 PyBytes_AsStringAndSize(obj, &cstr, &len);
3747 #else
3748 PyString_AsStringAndSize(obj, &cstr, &len);
3749 #endif
3750 if (cptr) {
3751 if (alloc) {
3752 /*
3753 In python the user should not be able to modify the inner
3754 string representation. To warranty that, if you define
3755 SWIG_PYTHON_SAFE_CSTRINGS, a new/copy of the python string
3756 buffer is always returned.
3757
3758 The default behavior is just to return the pointer value,
3759 so, be careful.
3760 */
3761 #if defined(SWIG_PYTHON_SAFE_CSTRINGS)
3762 if (*alloc != SWIG_OLDOBJ)
3763 #else
3764 if (*alloc == SWIG_NEWOBJ)
3765 #endif
3766 {
3767 *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3768 *alloc = SWIG_NEWOBJ;
3769 } else {
3770 *cptr = cstr;
3771 *alloc = SWIG_OLDOBJ;
3772 }
3773 } else {
3774 #if PY_VERSION_HEX>=0x03000000
3775 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3776 *cptr = PyBytes_AsString(obj);
3777 #else
3778 assert(0); /* Should never reach here with Unicode strings in Python 3 */
3779 #endif
3780 #else
3781 *cptr = SWIG_Python_str_AsChar(obj);
3782 #endif
3783 }
3784 }
3785 if (psize) *psize = len + 1;
3786 #if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3787 Py_XDECREF(obj);
3788 #endif
3789 return SWIG_OK;
3790 } else {
3791 #if defined(SWIG_PYTHON_2_UNICODE)
3792 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3793 #error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
3794 #endif
3795 #if PY_VERSION_HEX<0x03000000
3796 if (PyUnicode_Check(obj)) {
3797 char *cstr; Py_ssize_t len;
3798 if (!alloc && cptr) {
3799 return SWIG_RuntimeError;
3800 }
3801 obj = PyUnicode_AsUTF8String(obj);
3802 if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
3803 if (cptr) {
3804 if (alloc) *alloc = SWIG_NEWOBJ;
3805 *cptr = reinterpret_cast< char* >(memcpy(new char[len + 1], cstr, sizeof(char)*(len + 1)));
3806 }
3807 if (psize) *psize = len + 1;
3808
3809 Py_XDECREF(obj);
3810 return SWIG_OK;
3811 } else {
3812 Py_XDECREF(obj);
3813 }
3814 }
3815 #endif
3816 #endif
3817
3818 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3819 if (pchar_descriptor) {
3820 void* vptr = 0;
3821 if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
3822 if (cptr) *cptr = (char *) vptr;
3823 if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
3824 if (alloc) *alloc = SWIG_OLDOBJ;
3825 return SWIG_OK;
3826 }
3827 }
3828 }
3829 return SWIG_TypeError;
3830 }
3831
3832
3833 SWIGINTERN int
3834 SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
3835 {
3836 char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
3837 int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
3838 if (SWIG_IsOK(res)) {
3839 /* special case of single char conversion when we don't need space for NUL */
3840 if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize;
3841 if (csize <= size) {
3842 if (val) {
3843 if (csize) memcpy(val, cptr, csize*sizeof(char));
3844 if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
3845 }
3846 if (alloc == SWIG_NEWOBJ) {
3847 delete[] cptr;
3848 res = SWIG_DelNewMask(res);
3849 }
3850 return res;
3851 }
3852 if (alloc == SWIG_NEWOBJ) delete[] cptr;
3853 }
3854 return SWIG_TypeError;
3855 }
3856
3857
3858 SWIGINTERN int
3859 SWIG_AsVal_long (PyObject *obj, long* val)
3860 {
3861 #if PY_VERSION_HEX < 0x03000000
3862 if (PyInt_Check(obj)) {
3863 if (val) *val = PyInt_AsLong(obj);
3864 return SWIG_OK;
3865 } else
3866 #endif
3867 if (PyLong_Check(obj)) {
3868 long v = PyLong_AsLong(obj);
3869 if (!PyErr_Occurred()) {
3870 if (val) *val = v;
3871 return SWIG_OK;
3872 } else {
3873 PyErr_Clear();
3874 return SWIG_OverflowError;
3875 }
3876 }
3877 #ifdef SWIG_PYTHON_CAST_MODE
3878 {
3879 int dispatch = 0;
3880 long v = PyInt_AsLong(obj);
3881 if (!PyErr_Occurred()) {
3882 if (val) *val = v;
3883 return SWIG_AddCast(SWIG_OK);
3884 } else {
3885 PyErr_Clear();
3886 }
3887 if (!dispatch) {
3888 double d;
3889 int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
3890 if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
3891 if (val) *val = (long)(d);
3892 return res;
3893 }
3894 }
3895 }
3896 #endif
3897 return SWIG_TypeError;
3898 }
3899
3900
3901 SWIGINTERN int
3902 SWIG_AsVal_char (PyObject * obj, char *val)
3903 {
3904 int res = SWIG_AsCharArray(obj, val, 1);
3905 if (!SWIG_IsOK(res)) {
3906 long v;
3907 res = SWIG_AddCast(SWIG_AsVal_long (obj, &v));
3908 if (SWIG_IsOK(res)) {
3909 if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) {
3910 if (val) *val = static_cast< char >(v);
3911 } else {
3912 res = SWIG_OverflowError;
3913 }
3914 }
3915 }
3916 return res;
3917 }
3918
3919
3920 SWIGINTERNINLINE PyObject *
3921 SWIG_FromCharPtrAndSize(const char* carray, size_t size)
3922 {
3923 if (carray) {
3924 if (size > INT_MAX) {
3925 swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
3926 return pchar_descriptor ?
3927 SWIG_InternalNewPointerObj(const_cast< char * >(carray), pchar_descriptor, 0) : SWIG_Py_Void();
3928 } else {
3929 #if PY_VERSION_HEX >= 0x03000000
3930 #if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
3931 return PyBytes_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3932 #else
3933 #if PY_VERSION_HEX >= 0x03010000
3934 return PyUnicode_DecodeUTF8(carray, static_cast< Py_ssize_t >(size), "surrogateescape");
3935 #else
3936 return PyUnicode_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3937 #endif
3938 #endif
3939 #else
3940 return PyString_FromStringAndSize(carray, static_cast< Py_ssize_t >(size));
3941 #endif
3942 }
3943 } else {
3944 return SWIG_Py_Void();
3945 }
3946 }
3947
3948
3949 SWIGINTERNINLINE PyObject *
3950 SWIG_FromCharPtr(const char *cptr)
3951 {
3952 return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
3953 }
3954
3955
3956 SWIGINTERNINLINE PyObject *
3957 SWIG_From_char (char c)
3958 {
3959 return SWIG_FromCharPtrAndSize(&c,1);
3960 }
3961
3962
3963 SWIGINTERN int
3964 SWIG_AsVal_int (PyObject * obj, int *val)
3965 {
3966 long v;
3967 int res = SWIG_AsVal_long (obj, &v);
3968 if (SWIG_IsOK(res)) {
3969 if ((v < INT_MIN || v > INT_MAX)) {
3970 return SWIG_OverflowError;
3971 } else {
3972 if (val) *val = static_cast< int >(v);
3973 }
3974 }
3975 return res;
3976 }
3977
3978
3979 SWIGINTERNINLINE PyObject*
3980 SWIG_From_int (int value)
3981 {
3982 return PyInt_FromLong((long) value);
3983 }
3984
3985
3986 #include <string>
3987
3988
3989 int get_num_gpus()
3990 {
3991 return 0;
3992 }
3993
3994
3995 SWIGINTERN int
3996 SWIG_AsVal_bool (PyObject *obj, bool *val)
3997 {
3998 int r;
3999 if (!PyBool_Check(obj))
4000 return SWIG_ERROR;
4001 r = PyObject_IsTrue(obj);
4002 if (r == -1)
4003 return SWIG_ERROR;
4004 if (val) *val = r ? true : false;
4005 return SWIG_OK;
4006 }
4007
4008
4009 SWIGINTERNINLINE PyObject*
4010 SWIG_From_bool (bool value)
4011 {
4012 return PyBool_FromLong(value ? 1 : 0);
4013 }
4014
4015
4016 SWIGINTERN int
4017 SWIG_AsPtr_std_string (PyObject * obj, std::string **val)
4018 {
4019 char* buf = 0 ; size_t size = 0; int alloc = SWIG_OLDOBJ;
4020 if (SWIG_IsOK((SWIG_AsCharPtrAndSize(obj, &buf, &size, &alloc)))) {
4021 if (buf) {
4022 if (val) *val = new std::string(buf, size - 1);
4023 if (alloc == SWIG_NEWOBJ) delete[] buf;
4024 return SWIG_NEWOBJ;
4025 } else {
4026 if (val) *val = 0;
4027 return SWIG_OLDOBJ;
4028 }
4029 } else {
4030 static int init = 0;
4031 static swig_type_info* descriptor = 0;
4032 if (!init) {
4033 descriptor = SWIG_TypeQuery("std::string" " *");
4034 init = 1;
4035 }
4036 if (descriptor) {
4037 std::string *vptr;
4038 int res = SWIG_ConvertPtr(obj, (void**)&vptr, descriptor, 0);
4039 if (SWIG_IsOK(res) && val) *val = vptr;
4040 return res;
4041 }
4042 }
4043 return SWIG_ERROR;
4044 }
4045
4046
4047 SWIGINTERNINLINE PyObject *
4048 SWIG_From_std_string (const std::string& s)
4049 {
4050 return SWIG_FromCharPtrAndSize(s.data(), s.size());
4051 }
4052
4053
4054
4055
4056
4057 faiss::Index * downcast_index (faiss::Index *index)
4058 {
4059 return index;
4060 }
4061 faiss::VectorTransform * downcast_VectorTransform (faiss::VectorTransform *vt)
4062 {
4063 return vt;
4064 }
4065 faiss::IndexBinary * downcast_IndexBinary (faiss::IndexBinary *index)
4066 {
4067 return index;
4068 }
4069
4070
4071 PyObject *swig_ptr (PyObject *a)
4072 {
4073 if(!PyArray_Check(a)) {
4074 PyErr_SetString(PyExc_ValueError, "input not a numpy array");
4075 return NULL;
4076 }
4077 PyArrayObject *ao = (PyArrayObject *)a;
4078
4079 if(!PyArray_ISCONTIGUOUS(ao)) {
4080 PyErr_SetString(PyExc_ValueError, "array is not C-contiguous");
4081 return NULL;
4082 }
4083 void * data = PyArray_DATA(ao);
4084 if(PyArray_TYPE(ao) == NPY_FLOAT32) {
4085 return SWIG_NewPointerObj(data, SWIGTYPE_p_float, 0);
4086 }
4087 if(PyArray_TYPE(ao) == NPY_FLOAT64) {
4088 return SWIG_NewPointerObj(data, SWIGTYPE_p_double, 0);
4089 }
4090 if(PyArray_TYPE(ao) == NPY_INT32) {
4091 return SWIG_NewPointerObj(data, SWIGTYPE_p_int, 0);
4092 }
4093 if(PyArray_TYPE(ao) == NPY_UINT8) {
4094 return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_char, 0);
4095 }
4096 if(PyArray_TYPE(ao) == NPY_INT8) {
4097 return SWIG_NewPointerObj(data, SWIGTYPE_p_char, 0);
4098 }
4099 if(PyArray_TYPE(ao) == NPY_UINT64) {
4100 return SWIG_NewPointerObj(data, SWIGTYPE_p_unsigned_long, 0);
4101 }
4102 if(PyArray_TYPE(ao) == NPY_INT64) {
4103 return SWIG_NewPointerObj(data, SWIGTYPE_p_long, 0);
4104 }
4105 PyErr_SetString(PyExc_ValueError, "did not recognize array type");
4106 return NULL;
4107 }
4108
4109
4110
4111
4112 PyObject * rev_swig_ptr(float *src, npy_intp size) {
4113 return PyArray_SimpleNewFromData(1, &size, NPY_FLOAT32, src);
4114 }
4115
4116
4117 PyObject * rev_swig_ptr(int *src, npy_intp size) {
4118 return PyArray_SimpleNewFromData(1, &size, NPY_INT32, src);
4119 }
4120
4121
4122 PyObject * rev_swig_ptr(unsigned char *src, npy_intp size) {
4123 return PyArray_SimpleNewFromData(1, &size, NPY_UINT8, src);
4124 }
4125
4126
4127 PyObject * rev_swig_ptr(unsigned long *src, npy_intp size) {
4128 return PyArray_SimpleNewFromData(1, &size, NPY_UINT64, src);
4129 }
4130
4131
4132 PyObject * rev_swig_ptr(long *src, npy_intp size) {
4133 return PyArray_SimpleNewFromData(1, &size, NPY_INT64, src);
4134 }
4135
4136
4137 float * cast_integer_to_float_ptr (long x) {
4138 return (float*)x;
4139 }
4140
4141 long * cast_integer_to_long_ptr (long x) {
4142 return (long*)x;
4143 }
4144
4145 int * cast_integer_to_int_ptr (long x) {
4146 return (int*)x;
4147 }
4148
4149
4150
4151 // may be useful for lua code launched in background from shell
4152
4153 #include <signal.h>
4154 void ignore_SIGTTIN() {
4155 signal(SIGTTIN, SIG_IGN);
4156 }
4157
4158
4159
4160 // numpy misses a hash table implementation, hence this class. It
4161 // represents not found values as -1 like in the Index implementation
4162
4163 struct MapLong2Long {
4164 std::unordered_map<long, long> map;
4165
4166 void add(size_t n, const long *keys, const long *vals) {
4167 map.reserve(map.size() + n);
4168 for (size_t i = 0; i < n; i++) {
4169 map[keys[i]] = vals[i];
4170 }
4171 }
4172
4173 long search(long key) {
4174 if (map.count(key) == 0) {
4175 return -1;
4176 } else {
4177 return map[key];
4178 }
4179 }
4180
4181 void search_multiple(size_t n, const long *keys, long * vals) {
4182 for (size_t i = 0; i < n; i++) {
4183 vals[i] = search(keys[i]);
4184 }
4185 }
4186 };
4187
4188
4189 #ifdef __cplusplus
4190 extern "C" {
4191 #endif
4192 SWIGINTERN PyObject *_wrap_new_FloatVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4193 PyObject *resultobj = 0;
4194 std::vector< float > *result = 0 ;
4195
4196 if (!PyArg_ParseTuple(args,(char *)":new_FloatVector")) SWIG_fail;
4197 result = (std::vector< float > *)new std::vector< float >();
4198 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_NEW | 0 );
4199 return resultobj;
4200 fail:
4201 return NULL;
4202 }
4203
4204
4205 SWIGINTERN PyObject *_wrap_FloatVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4206 PyObject *resultobj = 0;
4207 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4208 float arg2 ;
4209 void *argp1 = 0 ;
4210 int res1 = 0 ;
4211 float val2 ;
4212 int ecode2 = 0 ;
4213 PyObject * obj0 = 0 ;
4214 PyObject * obj1 = 0 ;
4215
4216 if (!PyArg_ParseTuple(args,(char *)"OO:FloatVector_push_back",&obj0,&obj1)) SWIG_fail;
4217 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4218 if (!SWIG_IsOK(res1)) {
4219 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_push_back" "', argument " "1"" of type '" "std::vector< float > *""'");
4220 }
4221 arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4222 ecode2 = SWIG_AsVal_float(obj1, &val2);
4223 if (!SWIG_IsOK(ecode2)) {
4224 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_push_back" "', argument " "2"" of type '" "float""'");
4225 }
4226 arg2 = static_cast< float >(val2);
4227 (arg1)->push_back(arg2);
4228 resultobj = SWIG_Py_Void();
4229 return resultobj;
4230 fail:
4231 return NULL;
4232 }
4233
4234
4235 SWIGINTERN PyObject *_wrap_FloatVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4236 PyObject *resultobj = 0;
4237 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4238 void *argp1 = 0 ;
4239 int res1 = 0 ;
4240 PyObject * obj0 = 0 ;
4241
4242 if (!PyArg_ParseTuple(args,(char *)"O:FloatVector_clear",&obj0)) SWIG_fail;
4243 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4244 if (!SWIG_IsOK(res1)) {
4245 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_clear" "', argument " "1"" of type '" "std::vector< float > *""'");
4246 }
4247 arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4248 (arg1)->clear();
4249 resultobj = SWIG_Py_Void();
4250 return resultobj;
4251 fail:
4252 return NULL;
4253 }
4254
4255
4256 SWIGINTERN PyObject *_wrap_FloatVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4257 PyObject *resultobj = 0;
4258 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4259 void *argp1 = 0 ;
4260 int res1 = 0 ;
4261 PyObject * obj0 = 0 ;
4262 float *result = 0 ;
4263
4264 if (!PyArg_ParseTuple(args,(char *)"O:FloatVector_data",&obj0)) SWIG_fail;
4265 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4266 if (!SWIG_IsOK(res1)) {
4267 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_data" "', argument " "1"" of type '" "std::vector< float > *""'");
4268 }
4269 arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4270 result = (float *)(arg1)->data();
4271 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
4272 return resultobj;
4273 fail:
4274 return NULL;
4275 }
4276
4277
4278 SWIGINTERN PyObject *_wrap_FloatVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4279 PyObject *resultobj = 0;
4280 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4281 void *argp1 = 0 ;
4282 int res1 = 0 ;
4283 PyObject * obj0 = 0 ;
4284 size_t result;
4285
4286 if (!PyArg_ParseTuple(args,(char *)"O:FloatVector_size",&obj0)) SWIG_fail;
4287 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4288 if (!SWIG_IsOK(res1)) {
4289 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_size" "', argument " "1"" of type '" "std::vector< float > *""'");
4290 }
4291 arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4292 result = (size_t)(arg1)->size();
4293 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4294 return resultobj;
4295 fail:
4296 return NULL;
4297 }
4298
4299
4300 SWIGINTERN PyObject *_wrap_FloatVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4301 PyObject *resultobj = 0;
4302 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4303 size_t arg2 ;
4304 void *argp1 = 0 ;
4305 int res1 = 0 ;
4306 size_t val2 ;
4307 int ecode2 = 0 ;
4308 PyObject * obj0 = 0 ;
4309 PyObject * obj1 = 0 ;
4310 float result;
4311
4312 if (!PyArg_ParseTuple(args,(char *)"OO:FloatVector_at",&obj0,&obj1)) SWIG_fail;
4313 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4314 if (!SWIG_IsOK(res1)) {
4315 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_at" "', argument " "1"" of type '" "std::vector< float > const *""'");
4316 }
4317 arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4318 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4319 if (!SWIG_IsOK(ecode2)) {
4320 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_at" "', argument " "2"" of type '" "size_t""'");
4321 }
4322 arg2 = static_cast< size_t >(val2);
4323 result = (float)((std::vector< float > const *)arg1)->at(arg2);
4324 resultobj = SWIG_From_float(static_cast< float >(result));
4325 return resultobj;
4326 fail:
4327 return NULL;
4328 }
4329
4330
4331 SWIGINTERN PyObject *_wrap_FloatVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4332 PyObject *resultobj = 0;
4333 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4334 size_t arg2 ;
4335 void *argp1 = 0 ;
4336 int res1 = 0 ;
4337 size_t val2 ;
4338 int ecode2 = 0 ;
4339 PyObject * obj0 = 0 ;
4340 PyObject * obj1 = 0 ;
4341
4342 if (!PyArg_ParseTuple(args,(char *)"OO:FloatVector_resize",&obj0,&obj1)) SWIG_fail;
4343 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4344 if (!SWIG_IsOK(res1)) {
4345 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_resize" "', argument " "1"" of type '" "std::vector< float > *""'");
4346 }
4347 arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4348 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4349 if (!SWIG_IsOK(ecode2)) {
4350 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVector_resize" "', argument " "2"" of type '" "size_t""'");
4351 }
4352 arg2 = static_cast< size_t >(val2);
4353 (arg1)->resize(arg2);
4354 resultobj = SWIG_Py_Void();
4355 return resultobj;
4356 fail:
4357 return NULL;
4358 }
4359
4360
4361 SWIGINTERN PyObject *_wrap_FloatVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4362 PyObject *resultobj = 0;
4363 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4364 std::vector< float > *arg2 = 0 ;
4365 void *argp1 = 0 ;
4366 int res1 = 0 ;
4367 void *argp2 = 0 ;
4368 int res2 = 0 ;
4369 PyObject * obj0 = 0 ;
4370 PyObject * obj1 = 0 ;
4371
4372 if (!PyArg_ParseTuple(args,(char *)"OO:FloatVector_swap",&obj0,&obj1)) SWIG_fail;
4373 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
4374 if (!SWIG_IsOK(res1)) {
4375 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVector_swap" "', argument " "1"" of type '" "std::vector< float > *""'");
4376 }
4377 arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4378 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_float_t, 0 );
4379 if (!SWIG_IsOK(res2)) {
4380 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatVector_swap" "', argument " "2"" of type '" "std::vector< float > &""'");
4381 }
4382 if (!argp2) {
4383 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVector_swap" "', argument " "2"" of type '" "std::vector< float > &""'");
4384 }
4385 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
4386 (arg1)->swap(*arg2);
4387 resultobj = SWIG_Py_Void();
4388 return resultobj;
4389 fail:
4390 return NULL;
4391 }
4392
4393
4394 SWIGINTERN PyObject *_wrap_delete_FloatVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4395 PyObject *resultobj = 0;
4396 std::vector< float > *arg1 = (std::vector< float > *) 0 ;
4397 void *argp1 = 0 ;
4398 int res1 = 0 ;
4399 PyObject * obj0 = 0 ;
4400
4401 if (!PyArg_ParseTuple(args,(char *)"O:delete_FloatVector",&obj0)) SWIG_fail;
4402 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_DISOWN | 0 );
4403 if (!SWIG_IsOK(res1)) {
4404 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatVector" "', argument " "1"" of type '" "std::vector< float > *""'");
4405 }
4406 arg1 = reinterpret_cast< std::vector< float > * >(argp1);
4407 delete arg1;
4408 resultobj = SWIG_Py_Void();
4409 return resultobj;
4410 fail:
4411 return NULL;
4412 }
4413
4414
4415 SWIGINTERN PyObject *FloatVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4416 PyObject *obj;
4417 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
4418 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_float_t, SWIG_NewClientData(obj));
4419 return SWIG_Py_Void();
4420 }
4421
4422 SWIGINTERN PyObject *_wrap_new_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4423 PyObject *resultobj = 0;
4424 std::vector< double > *result = 0 ;
4425
4426 if (!PyArg_ParseTuple(args,(char *)":new_DoubleVector")) SWIG_fail;
4427 result = (std::vector< double > *)new std::vector< double >();
4428 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_NEW | 0 );
4429 return resultobj;
4430 fail:
4431 return NULL;
4432 }
4433
4434
4435 SWIGINTERN PyObject *_wrap_DoubleVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4436 PyObject *resultobj = 0;
4437 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4438 double arg2 ;
4439 void *argp1 = 0 ;
4440 int res1 = 0 ;
4441 double val2 ;
4442 int ecode2 = 0 ;
4443 PyObject * obj0 = 0 ;
4444 PyObject * obj1 = 0 ;
4445
4446 if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_push_back",&obj0,&obj1)) SWIG_fail;
4447 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4448 if (!SWIG_IsOK(res1)) {
4449 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_push_back" "', argument " "1"" of type '" "std::vector< double > *""'");
4450 }
4451 arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4452 ecode2 = SWIG_AsVal_double(obj1, &val2);
4453 if (!SWIG_IsOK(ecode2)) {
4454 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_push_back" "', argument " "2"" of type '" "double""'");
4455 }
4456 arg2 = static_cast< double >(val2);
4457 (arg1)->push_back(arg2);
4458 resultobj = SWIG_Py_Void();
4459 return resultobj;
4460 fail:
4461 return NULL;
4462 }
4463
4464
4465 SWIGINTERN PyObject *_wrap_DoubleVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4466 PyObject *resultobj = 0;
4467 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4468 void *argp1 = 0 ;
4469 int res1 = 0 ;
4470 PyObject * obj0 = 0 ;
4471
4472 if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_clear",&obj0)) SWIG_fail;
4473 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4474 if (!SWIG_IsOK(res1)) {
4475 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_clear" "', argument " "1"" of type '" "std::vector< double > *""'");
4476 }
4477 arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4478 (arg1)->clear();
4479 resultobj = SWIG_Py_Void();
4480 return resultobj;
4481 fail:
4482 return NULL;
4483 }
4484
4485
4486 SWIGINTERN PyObject *_wrap_DoubleVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4487 PyObject *resultobj = 0;
4488 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4489 void *argp1 = 0 ;
4490 int res1 = 0 ;
4491 PyObject * obj0 = 0 ;
4492 double *result = 0 ;
4493
4494 if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_data",&obj0)) SWIG_fail;
4495 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4496 if (!SWIG_IsOK(res1)) {
4497 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_data" "', argument " "1"" of type '" "std::vector< double > *""'");
4498 }
4499 arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4500 result = (double *)(arg1)->data();
4501 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
4502 return resultobj;
4503 fail:
4504 return NULL;
4505 }
4506
4507
4508 SWIGINTERN PyObject *_wrap_DoubleVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4509 PyObject *resultobj = 0;
4510 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4511 void *argp1 = 0 ;
4512 int res1 = 0 ;
4513 PyObject * obj0 = 0 ;
4514 size_t result;
4515
4516 if (!PyArg_ParseTuple(args,(char *)"O:DoubleVector_size",&obj0)) SWIG_fail;
4517 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4518 if (!SWIG_IsOK(res1)) {
4519 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_size" "', argument " "1"" of type '" "std::vector< double > *""'");
4520 }
4521 arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4522 result = (size_t)(arg1)->size();
4523 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4524 return resultobj;
4525 fail:
4526 return NULL;
4527 }
4528
4529
4530 SWIGINTERN PyObject *_wrap_DoubleVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4531 PyObject *resultobj = 0;
4532 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4533 size_t arg2 ;
4534 void *argp1 = 0 ;
4535 int res1 = 0 ;
4536 size_t val2 ;
4537 int ecode2 = 0 ;
4538 PyObject * obj0 = 0 ;
4539 PyObject * obj1 = 0 ;
4540 double result;
4541
4542 if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_at",&obj0,&obj1)) SWIG_fail;
4543 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4544 if (!SWIG_IsOK(res1)) {
4545 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_at" "', argument " "1"" of type '" "std::vector< double > const *""'");
4546 }
4547 arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4548 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4549 if (!SWIG_IsOK(ecode2)) {
4550 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_at" "', argument " "2"" of type '" "size_t""'");
4551 }
4552 arg2 = static_cast< size_t >(val2);
4553 result = (double)((std::vector< double > const *)arg1)->at(arg2);
4554 resultobj = SWIG_From_double(static_cast< double >(result));
4555 return resultobj;
4556 fail:
4557 return NULL;
4558 }
4559
4560
4561 SWIGINTERN PyObject *_wrap_DoubleVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4562 PyObject *resultobj = 0;
4563 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4564 size_t arg2 ;
4565 void *argp1 = 0 ;
4566 int res1 = 0 ;
4567 size_t val2 ;
4568 int ecode2 = 0 ;
4569 PyObject * obj0 = 0 ;
4570 PyObject * obj1 = 0 ;
4571
4572 if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_resize",&obj0,&obj1)) SWIG_fail;
4573 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4574 if (!SWIG_IsOK(res1)) {
4575 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_resize" "', argument " "1"" of type '" "std::vector< double > *""'");
4576 }
4577 arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4578 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4579 if (!SWIG_IsOK(ecode2)) {
4580 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "DoubleVector_resize" "', argument " "2"" of type '" "size_t""'");
4581 }
4582 arg2 = static_cast< size_t >(val2);
4583 (arg1)->resize(arg2);
4584 resultobj = SWIG_Py_Void();
4585 return resultobj;
4586 fail:
4587 return NULL;
4588 }
4589
4590
4591 SWIGINTERN PyObject *_wrap_DoubleVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4592 PyObject *resultobj = 0;
4593 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4594 std::vector< double > *arg2 = 0 ;
4595 void *argp1 = 0 ;
4596 int res1 = 0 ;
4597 void *argp2 = 0 ;
4598 int res2 = 0 ;
4599 PyObject * obj0 = 0 ;
4600 PyObject * obj1 = 0 ;
4601
4602 if (!PyArg_ParseTuple(args,(char *)"OO:DoubleVector_swap",&obj0,&obj1)) SWIG_fail;
4603 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
4604 if (!SWIG_IsOK(res1)) {
4605 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "DoubleVector_swap" "', argument " "1"" of type '" "std::vector< double > *""'");
4606 }
4607 arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4608 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_double_t, 0 );
4609 if (!SWIG_IsOK(res2)) {
4610 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
4611 }
4612 if (!argp2) {
4613 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "DoubleVector_swap" "', argument " "2"" of type '" "std::vector< double > &""'");
4614 }
4615 arg2 = reinterpret_cast< std::vector< double > * >(argp2);
4616 (arg1)->swap(*arg2);
4617 resultobj = SWIG_Py_Void();
4618 return resultobj;
4619 fail:
4620 return NULL;
4621 }
4622
4623
4624 SWIGINTERN PyObject *_wrap_delete_DoubleVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4625 PyObject *resultobj = 0;
4626 std::vector< double > *arg1 = (std::vector< double > *) 0 ;
4627 void *argp1 = 0 ;
4628 int res1 = 0 ;
4629 PyObject * obj0 = 0 ;
4630
4631 if (!PyArg_ParseTuple(args,(char *)"O:delete_DoubleVector",&obj0)) SWIG_fail;
4632 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_double_t, SWIG_POINTER_DISOWN | 0 );
4633 if (!SWIG_IsOK(res1)) {
4634 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_DoubleVector" "', argument " "1"" of type '" "std::vector< double > *""'");
4635 }
4636 arg1 = reinterpret_cast< std::vector< double > * >(argp1);
4637 delete arg1;
4638 resultobj = SWIG_Py_Void();
4639 return resultobj;
4640 fail:
4641 return NULL;
4642 }
4643
4644
4645 SWIGINTERN PyObject *DoubleVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4646 PyObject *obj;
4647 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
4648 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_double_t, SWIG_NewClientData(obj));
4649 return SWIG_Py_Void();
4650 }
4651
4652 SWIGINTERN PyObject *_wrap_new_ByteVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4653 PyObject *resultobj = 0;
4654 std::vector< uint8_t > *result = 0 ;
4655
4656 if (!PyArg_ParseTuple(args,(char *)":new_ByteVector")) SWIG_fail;
4657 result = (std::vector< uint8_t > *)new std::vector< uint8_t >();
4658 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_NEW | 0 );
4659 return resultobj;
4660 fail:
4661 return NULL;
4662 }
4663
4664
4665 SWIGINTERN PyObject *_wrap_ByteVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4666 PyObject *resultobj = 0;
4667 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4668 unsigned char arg2 ;
4669 void *argp1 = 0 ;
4670 int res1 = 0 ;
4671 unsigned char val2 ;
4672 int ecode2 = 0 ;
4673 PyObject * obj0 = 0 ;
4674 PyObject * obj1 = 0 ;
4675
4676 if (!PyArg_ParseTuple(args,(char *)"OO:ByteVector_push_back",&obj0,&obj1)) SWIG_fail;
4677 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4678 if (!SWIG_IsOK(res1)) {
4679 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_push_back" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4680 }
4681 arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4682 ecode2 = SWIG_AsVal_unsigned_SS_char(obj1, &val2);
4683 if (!SWIG_IsOK(ecode2)) {
4684 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVector_push_back" "', argument " "2"" of type '" "unsigned char""'");
4685 }
4686 arg2 = static_cast< unsigned char >(val2);
4687 (arg1)->push_back(arg2);
4688 resultobj = SWIG_Py_Void();
4689 return resultobj;
4690 fail:
4691 return NULL;
4692 }
4693
4694
4695 SWIGINTERN PyObject *_wrap_ByteVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4696 PyObject *resultobj = 0;
4697 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4698 void *argp1 = 0 ;
4699 int res1 = 0 ;
4700 PyObject * obj0 = 0 ;
4701
4702 if (!PyArg_ParseTuple(args,(char *)"O:ByteVector_clear",&obj0)) SWIG_fail;
4703 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4704 if (!SWIG_IsOK(res1)) {
4705 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_clear" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4706 }
4707 arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4708 (arg1)->clear();
4709 resultobj = SWIG_Py_Void();
4710 return resultobj;
4711 fail:
4712 return NULL;
4713 }
4714
4715
4716 SWIGINTERN PyObject *_wrap_ByteVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4717 PyObject *resultobj = 0;
4718 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4719 void *argp1 = 0 ;
4720 int res1 = 0 ;
4721 PyObject * obj0 = 0 ;
4722 unsigned char *result = 0 ;
4723
4724 if (!PyArg_ParseTuple(args,(char *)"O:ByteVector_data",&obj0)) SWIG_fail;
4725 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4726 if (!SWIG_IsOK(res1)) {
4727 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_data" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4728 }
4729 arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4730 result = (unsigned char *)(arg1)->data();
4731 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
4732 return resultobj;
4733 fail:
4734 return NULL;
4735 }
4736
4737
4738 SWIGINTERN PyObject *_wrap_ByteVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4739 PyObject *resultobj = 0;
4740 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4741 void *argp1 = 0 ;
4742 int res1 = 0 ;
4743 PyObject * obj0 = 0 ;
4744 size_t result;
4745
4746 if (!PyArg_ParseTuple(args,(char *)"O:ByteVector_size",&obj0)) SWIG_fail;
4747 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4748 if (!SWIG_IsOK(res1)) {
4749 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_size" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4750 }
4751 arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4752 result = (size_t)(arg1)->size();
4753 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4754 return resultobj;
4755 fail:
4756 return NULL;
4757 }
4758
4759
4760 SWIGINTERN PyObject *_wrap_ByteVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4761 PyObject *resultobj = 0;
4762 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4763 size_t arg2 ;
4764 void *argp1 = 0 ;
4765 int res1 = 0 ;
4766 size_t val2 ;
4767 int ecode2 = 0 ;
4768 PyObject * obj0 = 0 ;
4769 PyObject * obj1 = 0 ;
4770 unsigned char result;
4771
4772 if (!PyArg_ParseTuple(args,(char *)"OO:ByteVector_at",&obj0,&obj1)) SWIG_fail;
4773 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4774 if (!SWIG_IsOK(res1)) {
4775 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_at" "', argument " "1"" of type '" "std::vector< uint8_t > const *""'");
4776 }
4777 arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4778 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4779 if (!SWIG_IsOK(ecode2)) {
4780 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVector_at" "', argument " "2"" of type '" "size_t""'");
4781 }
4782 arg2 = static_cast< size_t >(val2);
4783 result = (unsigned char)((std::vector< uint8_t > const *)arg1)->at(arg2);
4784 resultobj = SWIG_From_unsigned_SS_char(static_cast< unsigned char >(result));
4785 return resultobj;
4786 fail:
4787 return NULL;
4788 }
4789
4790
4791 SWIGINTERN PyObject *_wrap_ByteVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4792 PyObject *resultobj = 0;
4793 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4794 size_t arg2 ;
4795 void *argp1 = 0 ;
4796 int res1 = 0 ;
4797 size_t val2 ;
4798 int ecode2 = 0 ;
4799 PyObject * obj0 = 0 ;
4800 PyObject * obj1 = 0 ;
4801
4802 if (!PyArg_ParseTuple(args,(char *)"OO:ByteVector_resize",&obj0,&obj1)) SWIG_fail;
4803 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4804 if (!SWIG_IsOK(res1)) {
4805 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_resize" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4806 }
4807 arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4808 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
4809 if (!SWIG_IsOK(ecode2)) {
4810 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVector_resize" "', argument " "2"" of type '" "size_t""'");
4811 }
4812 arg2 = static_cast< size_t >(val2);
4813 (arg1)->resize(arg2);
4814 resultobj = SWIG_Py_Void();
4815 return resultobj;
4816 fail:
4817 return NULL;
4818 }
4819
4820
4821 SWIGINTERN PyObject *_wrap_ByteVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4822 PyObject *resultobj = 0;
4823 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4824 std::vector< unsigned char > *arg2 = 0 ;
4825 void *argp1 = 0 ;
4826 int res1 = 0 ;
4827 void *argp2 = 0 ;
4828 int res2 = 0 ;
4829 PyObject * obj0 = 0 ;
4830 PyObject * obj1 = 0 ;
4831
4832 if (!PyArg_ParseTuple(args,(char *)"OO:ByteVector_swap",&obj0,&obj1)) SWIG_fail;
4833 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
4834 if (!SWIG_IsOK(res1)) {
4835 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVector_swap" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4836 }
4837 arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4838 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 );
4839 if (!SWIG_IsOK(res2)) {
4840 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ByteVector_swap" "', argument " "2"" of type '" "std::vector< unsigned char > &""'");
4841 }
4842 if (!argp2) {
4843 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ByteVector_swap" "', argument " "2"" of type '" "std::vector< unsigned char > &""'");
4844 }
4845 arg2 = reinterpret_cast< std::vector< unsigned char > * >(argp2);
4846 (arg1)->swap(*arg2);
4847 resultobj = SWIG_Py_Void();
4848 return resultobj;
4849 fail:
4850 return NULL;
4851 }
4852
4853
4854 SWIGINTERN PyObject *_wrap_delete_ByteVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4855 PyObject *resultobj = 0;
4856 std::vector< uint8_t > *arg1 = (std::vector< uint8_t > *) 0 ;
4857 void *argp1 = 0 ;
4858 int res1 = 0 ;
4859 PyObject * obj0 = 0 ;
4860
4861 if (!PyArg_ParseTuple(args,(char *)"O:delete_ByteVector",&obj0)) SWIG_fail;
4862 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_DISOWN | 0 );
4863 if (!SWIG_IsOK(res1)) {
4864 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ByteVector" "', argument " "1"" of type '" "std::vector< uint8_t > *""'");
4865 }
4866 arg1 = reinterpret_cast< std::vector< uint8_t > * >(argp1);
4867 delete arg1;
4868 resultobj = SWIG_Py_Void();
4869 return resultobj;
4870 fail:
4871 return NULL;
4872 }
4873
4874
4875 SWIGINTERN PyObject *ByteVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4876 PyObject *obj;
4877 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
4878 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_NewClientData(obj));
4879 return SWIG_Py_Void();
4880 }
4881
4882 SWIGINTERN PyObject *_wrap_new_CharVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4883 PyObject *resultobj = 0;
4884 std::vector< char > *result = 0 ;
4885
4886 if (!PyArg_ParseTuple(args,(char *)":new_CharVector")) SWIG_fail;
4887 result = (std::vector< char > *)new std::vector< char >();
4888 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_char_t, SWIG_POINTER_NEW | 0 );
4889 return resultobj;
4890 fail:
4891 return NULL;
4892 }
4893
4894
4895 SWIGINTERN PyObject *_wrap_CharVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4896 PyObject *resultobj = 0;
4897 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4898 char arg2 ;
4899 void *argp1 = 0 ;
4900 int res1 = 0 ;
4901 char val2 ;
4902 int ecode2 = 0 ;
4903 PyObject * obj0 = 0 ;
4904 PyObject * obj1 = 0 ;
4905
4906 if (!PyArg_ParseTuple(args,(char *)"OO:CharVector_push_back",&obj0,&obj1)) SWIG_fail;
4907 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4908 if (!SWIG_IsOK(res1)) {
4909 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_push_back" "', argument " "1"" of type '" "std::vector< char > *""'");
4910 }
4911 arg1 = reinterpret_cast< std::vector< char > * >(argp1);
4912 ecode2 = SWIG_AsVal_char(obj1, &val2);
4913 if (!SWIG_IsOK(ecode2)) {
4914 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CharVector_push_back" "', argument " "2"" of type '" "char""'");
4915 }
4916 arg2 = static_cast< char >(val2);
4917 (arg1)->push_back(arg2);
4918 resultobj = SWIG_Py_Void();
4919 return resultobj;
4920 fail:
4921 return NULL;
4922 }
4923
4924
4925 SWIGINTERN PyObject *_wrap_CharVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4926 PyObject *resultobj = 0;
4927 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4928 void *argp1 = 0 ;
4929 int res1 = 0 ;
4930 PyObject * obj0 = 0 ;
4931
4932 if (!PyArg_ParseTuple(args,(char *)"O:CharVector_clear",&obj0)) SWIG_fail;
4933 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4934 if (!SWIG_IsOK(res1)) {
4935 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_clear" "', argument " "1"" of type '" "std::vector< char > *""'");
4936 }
4937 arg1 = reinterpret_cast< std::vector< char > * >(argp1);
4938 (arg1)->clear();
4939 resultobj = SWIG_Py_Void();
4940 return resultobj;
4941 fail:
4942 return NULL;
4943 }
4944
4945
4946 SWIGINTERN PyObject *_wrap_CharVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4947 PyObject *resultobj = 0;
4948 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4949 void *argp1 = 0 ;
4950 int res1 = 0 ;
4951 PyObject * obj0 = 0 ;
4952 char *result = 0 ;
4953
4954 if (!PyArg_ParseTuple(args,(char *)"O:CharVector_data",&obj0)) SWIG_fail;
4955 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4956 if (!SWIG_IsOK(res1)) {
4957 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_data" "', argument " "1"" of type '" "std::vector< char > *""'");
4958 }
4959 arg1 = reinterpret_cast< std::vector< char > * >(argp1);
4960 result = (char *)(arg1)->data();
4961 resultobj = SWIG_FromCharPtr((const char *)result);
4962 return resultobj;
4963 fail:
4964 return NULL;
4965 }
4966
4967
4968 SWIGINTERN PyObject *_wrap_CharVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4969 PyObject *resultobj = 0;
4970 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4971 void *argp1 = 0 ;
4972 int res1 = 0 ;
4973 PyObject * obj0 = 0 ;
4974 size_t result;
4975
4976 if (!PyArg_ParseTuple(args,(char *)"O:CharVector_size",&obj0)) SWIG_fail;
4977 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
4978 if (!SWIG_IsOK(res1)) {
4979 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_size" "', argument " "1"" of type '" "std::vector< char > *""'");
4980 }
4981 arg1 = reinterpret_cast< std::vector< char > * >(argp1);
4982 result = (size_t)(arg1)->size();
4983 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
4984 return resultobj;
4985 fail:
4986 return NULL;
4987 }
4988
4989
4990 SWIGINTERN PyObject *_wrap_CharVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
4991 PyObject *resultobj = 0;
4992 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
4993 size_t arg2 ;
4994 void *argp1 = 0 ;
4995 int res1 = 0 ;
4996 size_t val2 ;
4997 int ecode2 = 0 ;
4998 PyObject * obj0 = 0 ;
4999 PyObject * obj1 = 0 ;
5000 char result;
5001
5002 if (!PyArg_ParseTuple(args,(char *)"OO:CharVector_at",&obj0,&obj1)) SWIG_fail;
5003 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5004 if (!SWIG_IsOK(res1)) {
5005 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_at" "', argument " "1"" of type '" "std::vector< char > const *""'");
5006 }
5007 arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5008 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5009 if (!SWIG_IsOK(ecode2)) {
5010 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CharVector_at" "', argument " "2"" of type '" "size_t""'");
5011 }
5012 arg2 = static_cast< size_t >(val2);
5013 result = (char)((std::vector< char > const *)arg1)->at(arg2);
5014 resultobj = SWIG_From_char(static_cast< char >(result));
5015 return resultobj;
5016 fail:
5017 return NULL;
5018 }
5019
5020
5021 SWIGINTERN PyObject *_wrap_CharVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5022 PyObject *resultobj = 0;
5023 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5024 size_t arg2 ;
5025 void *argp1 = 0 ;
5026 int res1 = 0 ;
5027 size_t val2 ;
5028 int ecode2 = 0 ;
5029 PyObject * obj0 = 0 ;
5030 PyObject * obj1 = 0 ;
5031
5032 if (!PyArg_ParseTuple(args,(char *)"OO:CharVector_resize",&obj0,&obj1)) SWIG_fail;
5033 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5034 if (!SWIG_IsOK(res1)) {
5035 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_resize" "', argument " "1"" of type '" "std::vector< char > *""'");
5036 }
5037 arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5038 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5039 if (!SWIG_IsOK(ecode2)) {
5040 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "CharVector_resize" "', argument " "2"" of type '" "size_t""'");
5041 }
5042 arg2 = static_cast< size_t >(val2);
5043 (arg1)->resize(arg2);
5044 resultobj = SWIG_Py_Void();
5045 return resultobj;
5046 fail:
5047 return NULL;
5048 }
5049
5050
5051 SWIGINTERN PyObject *_wrap_CharVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5052 PyObject *resultobj = 0;
5053 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5054 std::vector< char > *arg2 = 0 ;
5055 void *argp1 = 0 ;
5056 int res1 = 0 ;
5057 void *argp2 = 0 ;
5058 int res2 = 0 ;
5059 PyObject * obj0 = 0 ;
5060 PyObject * obj1 = 0 ;
5061
5062 if (!PyArg_ParseTuple(args,(char *)"OO:CharVector_swap",&obj0,&obj1)) SWIG_fail;
5063 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, 0 | 0 );
5064 if (!SWIG_IsOK(res1)) {
5065 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "CharVector_swap" "', argument " "1"" of type '" "std::vector< char > *""'");
5066 }
5067 arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5068 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_char_t, 0 );
5069 if (!SWIG_IsOK(res2)) {
5070 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "CharVector_swap" "', argument " "2"" of type '" "std::vector< char > &""'");
5071 }
5072 if (!argp2) {
5073 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "CharVector_swap" "', argument " "2"" of type '" "std::vector< char > &""'");
5074 }
5075 arg2 = reinterpret_cast< std::vector< char > * >(argp2);
5076 (arg1)->swap(*arg2);
5077 resultobj = SWIG_Py_Void();
5078 return resultobj;
5079 fail:
5080 return NULL;
5081 }
5082
5083
5084 SWIGINTERN PyObject *_wrap_delete_CharVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5085 PyObject *resultobj = 0;
5086 std::vector< char > *arg1 = (std::vector< char > *) 0 ;
5087 void *argp1 = 0 ;
5088 int res1 = 0 ;
5089 PyObject * obj0 = 0 ;
5090
5091 if (!PyArg_ParseTuple(args,(char *)"O:delete_CharVector",&obj0)) SWIG_fail;
5092 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_char_t, SWIG_POINTER_DISOWN | 0 );
5093 if (!SWIG_IsOK(res1)) {
5094 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_CharVector" "', argument " "1"" of type '" "std::vector< char > *""'");
5095 }
5096 arg1 = reinterpret_cast< std::vector< char > * >(argp1);
5097 delete arg1;
5098 resultobj = SWIG_Py_Void();
5099 return resultobj;
5100 fail:
5101 return NULL;
5102 }
5103
5104
5105 SWIGINTERN PyObject *CharVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5106 PyObject *obj;
5107 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
5108 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_char_t, SWIG_NewClientData(obj));
5109 return SWIG_Py_Void();
5110 }
5111
5112 SWIGINTERN PyObject *_wrap_new_Uint64Vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5113 PyObject *resultobj = 0;
5114 std::vector< unsigned long > *result = 0 ;
5115
5116 if (!PyArg_ParseTuple(args,(char *)":new_Uint64Vector")) SWIG_fail;
5117 result = (std::vector< unsigned long > *)new std::vector< unsigned long >();
5118 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_POINTER_NEW | 0 );
5119 return resultobj;
5120 fail:
5121 return NULL;
5122 }
5123
5124
5125 SWIGINTERN PyObject *_wrap_Uint64Vector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5126 PyObject *resultobj = 0;
5127 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5128 unsigned long arg2 ;
5129 void *argp1 = 0 ;
5130 int res1 = 0 ;
5131 unsigned long val2 ;
5132 int ecode2 = 0 ;
5133 PyObject * obj0 = 0 ;
5134 PyObject * obj1 = 0 ;
5135
5136 if (!PyArg_ParseTuple(args,(char *)"OO:Uint64Vector_push_back",&obj0,&obj1)) SWIG_fail;
5137 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5138 if (!SWIG_IsOK(res1)) {
5139 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_push_back" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5140 }
5141 arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5142 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
5143 if (!SWIG_IsOK(ecode2)) {
5144 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Uint64Vector_push_back" "', argument " "2"" of type '" "unsigned long""'");
5145 }
5146 arg2 = static_cast< unsigned long >(val2);
5147 (arg1)->push_back(arg2);
5148 resultobj = SWIG_Py_Void();
5149 return resultobj;
5150 fail:
5151 return NULL;
5152 }
5153
5154
5155 SWIGINTERN PyObject *_wrap_Uint64Vector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5156 PyObject *resultobj = 0;
5157 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5158 void *argp1 = 0 ;
5159 int res1 = 0 ;
5160 PyObject * obj0 = 0 ;
5161
5162 if (!PyArg_ParseTuple(args,(char *)"O:Uint64Vector_clear",&obj0)) SWIG_fail;
5163 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5164 if (!SWIG_IsOK(res1)) {
5165 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_clear" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5166 }
5167 arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5168 (arg1)->clear();
5169 resultobj = SWIG_Py_Void();
5170 return resultobj;
5171 fail:
5172 return NULL;
5173 }
5174
5175
5176 SWIGINTERN PyObject *_wrap_Uint64Vector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5177 PyObject *resultobj = 0;
5178 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5179 void *argp1 = 0 ;
5180 int res1 = 0 ;
5181 PyObject * obj0 = 0 ;
5182 unsigned long *result = 0 ;
5183
5184 if (!PyArg_ParseTuple(args,(char *)"O:Uint64Vector_data",&obj0)) SWIG_fail;
5185 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5186 if (!SWIG_IsOK(res1)) {
5187 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_data" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5188 }
5189 arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5190 result = (unsigned long *)(arg1)->data();
5191 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
5192 return resultobj;
5193 fail:
5194 return NULL;
5195 }
5196
5197
5198 SWIGINTERN PyObject *_wrap_Uint64Vector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5199 PyObject *resultobj = 0;
5200 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5201 void *argp1 = 0 ;
5202 int res1 = 0 ;
5203 PyObject * obj0 = 0 ;
5204 size_t result;
5205
5206 if (!PyArg_ParseTuple(args,(char *)"O:Uint64Vector_size",&obj0)) SWIG_fail;
5207 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5208 if (!SWIG_IsOK(res1)) {
5209 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_size" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5210 }
5211 arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5212 result = (size_t)(arg1)->size();
5213 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5214 return resultobj;
5215 fail:
5216 return NULL;
5217 }
5218
5219
5220 SWIGINTERN PyObject *_wrap_Uint64Vector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5221 PyObject *resultobj = 0;
5222 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5223 size_t arg2 ;
5224 void *argp1 = 0 ;
5225 int res1 = 0 ;
5226 size_t val2 ;
5227 int ecode2 = 0 ;
5228 PyObject * obj0 = 0 ;
5229 PyObject * obj1 = 0 ;
5230 unsigned long result;
5231
5232 if (!PyArg_ParseTuple(args,(char *)"OO:Uint64Vector_at",&obj0,&obj1)) SWIG_fail;
5233 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5234 if (!SWIG_IsOK(res1)) {
5235 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_at" "', argument " "1"" of type '" "std::vector< unsigned long > const *""'");
5236 }
5237 arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5238 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5239 if (!SWIG_IsOK(ecode2)) {
5240 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Uint64Vector_at" "', argument " "2"" of type '" "size_t""'");
5241 }
5242 arg2 = static_cast< size_t >(val2);
5243 result = (unsigned long)((std::vector< unsigned long > const *)arg1)->at(arg2);
5244 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
5245 return resultobj;
5246 fail:
5247 return NULL;
5248 }
5249
5250
5251 SWIGINTERN PyObject *_wrap_Uint64Vector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5252 PyObject *resultobj = 0;
5253 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5254 size_t arg2 ;
5255 void *argp1 = 0 ;
5256 int res1 = 0 ;
5257 size_t val2 ;
5258 int ecode2 = 0 ;
5259 PyObject * obj0 = 0 ;
5260 PyObject * obj1 = 0 ;
5261
5262 if (!PyArg_ParseTuple(args,(char *)"OO:Uint64Vector_resize",&obj0,&obj1)) SWIG_fail;
5263 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5264 if (!SWIG_IsOK(res1)) {
5265 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_resize" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5266 }
5267 arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5268 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5269 if (!SWIG_IsOK(ecode2)) {
5270 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Uint64Vector_resize" "', argument " "2"" of type '" "size_t""'");
5271 }
5272 arg2 = static_cast< size_t >(val2);
5273 (arg1)->resize(arg2);
5274 resultobj = SWIG_Py_Void();
5275 return resultobj;
5276 fail:
5277 return NULL;
5278 }
5279
5280
5281 SWIGINTERN PyObject *_wrap_Uint64Vector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5282 PyObject *resultobj = 0;
5283 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5284 std::vector< unsigned long > *arg2 = 0 ;
5285 void *argp1 = 0 ;
5286 int res1 = 0 ;
5287 void *argp2 = 0 ;
5288 int res2 = 0 ;
5289 PyObject * obj0 = 0 ;
5290 PyObject * obj1 = 0 ;
5291
5292 if (!PyArg_ParseTuple(args,(char *)"OO:Uint64Vector_swap",&obj0,&obj1)) SWIG_fail;
5293 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
5294 if (!SWIG_IsOK(res1)) {
5295 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Uint64Vector_swap" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5296 }
5297 arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5298 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 );
5299 if (!SWIG_IsOK(res2)) {
5300 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Uint64Vector_swap" "', argument " "2"" of type '" "std::vector< unsigned long > &""'");
5301 }
5302 if (!argp2) {
5303 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Uint64Vector_swap" "', argument " "2"" of type '" "std::vector< unsigned long > &""'");
5304 }
5305 arg2 = reinterpret_cast< std::vector< unsigned long > * >(argp2);
5306 (arg1)->swap(*arg2);
5307 resultobj = SWIG_Py_Void();
5308 return resultobj;
5309 fail:
5310 return NULL;
5311 }
5312
5313
5314 SWIGINTERN PyObject *_wrap_delete_Uint64Vector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5315 PyObject *resultobj = 0;
5316 std::vector< unsigned long > *arg1 = (std::vector< unsigned long > *) 0 ;
5317 void *argp1 = 0 ;
5318 int res1 = 0 ;
5319 PyObject * obj0 = 0 ;
5320
5321 if (!PyArg_ParseTuple(args,(char *)"O:delete_Uint64Vector",&obj0)) SWIG_fail;
5322 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_POINTER_DISOWN | 0 );
5323 if (!SWIG_IsOK(res1)) {
5324 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Uint64Vector" "', argument " "1"" of type '" "std::vector< unsigned long > *""'");
5325 }
5326 arg1 = reinterpret_cast< std::vector< unsigned long > * >(argp1);
5327 delete arg1;
5328 resultobj = SWIG_Py_Void();
5329 return resultobj;
5330 fail:
5331 return NULL;
5332 }
5333
5334
5335 SWIGINTERN PyObject *Uint64Vector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5336 PyObject *obj;
5337 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
5338 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_unsigned_long_t, SWIG_NewClientData(obj));
5339 return SWIG_Py_Void();
5340 }
5341
5342 SWIGINTERN PyObject *_wrap_new_LongVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5343 PyObject *resultobj = 0;
5344 std::vector< long > *result = 0 ;
5345
5346 if (!PyArg_ParseTuple(args,(char *)":new_LongVector")) SWIG_fail;
5347 result = (std::vector< long > *)new std::vector< long >();
5348 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_NEW | 0 );
5349 return resultobj;
5350 fail:
5351 return NULL;
5352 }
5353
5354
5355 SWIGINTERN PyObject *_wrap_LongVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5356 PyObject *resultobj = 0;
5357 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5358 long arg2 ;
5359 void *argp1 = 0 ;
5360 int res1 = 0 ;
5361 long val2 ;
5362 int ecode2 = 0 ;
5363 PyObject * obj0 = 0 ;
5364 PyObject * obj1 = 0 ;
5365
5366 if (!PyArg_ParseTuple(args,(char *)"OO:LongVector_push_back",&obj0,&obj1)) SWIG_fail;
5367 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5368 if (!SWIG_IsOK(res1)) {
5369 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_push_back" "', argument " "1"" of type '" "std::vector< long > *""'");
5370 }
5371 arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5372 ecode2 = SWIG_AsVal_long(obj1, &val2);
5373 if (!SWIG_IsOK(ecode2)) {
5374 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVector_push_back" "', argument " "2"" of type '" "long""'");
5375 }
5376 arg2 = static_cast< long >(val2);
5377 (arg1)->push_back(arg2);
5378 resultobj = SWIG_Py_Void();
5379 return resultobj;
5380 fail:
5381 return NULL;
5382 }
5383
5384
5385 SWIGINTERN PyObject *_wrap_LongVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5386 PyObject *resultobj = 0;
5387 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5388 void *argp1 = 0 ;
5389 int res1 = 0 ;
5390 PyObject * obj0 = 0 ;
5391
5392 if (!PyArg_ParseTuple(args,(char *)"O:LongVector_clear",&obj0)) SWIG_fail;
5393 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5394 if (!SWIG_IsOK(res1)) {
5395 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_clear" "', argument " "1"" of type '" "std::vector< long > *""'");
5396 }
5397 arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5398 (arg1)->clear();
5399 resultobj = SWIG_Py_Void();
5400 return resultobj;
5401 fail:
5402 return NULL;
5403 }
5404
5405
5406 SWIGINTERN PyObject *_wrap_LongVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5407 PyObject *resultobj = 0;
5408 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5409 void *argp1 = 0 ;
5410 int res1 = 0 ;
5411 PyObject * obj0 = 0 ;
5412 long *result = 0 ;
5413
5414 if (!PyArg_ParseTuple(args,(char *)"O:LongVector_data",&obj0)) SWIG_fail;
5415 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5416 if (!SWIG_IsOK(res1)) {
5417 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_data" "', argument " "1"" of type '" "std::vector< long > *""'");
5418 }
5419 arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5420 result = (long *)(arg1)->data();
5421 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
5422 return resultobj;
5423 fail:
5424 return NULL;
5425 }
5426
5427
5428 SWIGINTERN PyObject *_wrap_LongVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5429 PyObject *resultobj = 0;
5430 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5431 void *argp1 = 0 ;
5432 int res1 = 0 ;
5433 PyObject * obj0 = 0 ;
5434 size_t result;
5435
5436 if (!PyArg_ParseTuple(args,(char *)"O:LongVector_size",&obj0)) SWIG_fail;
5437 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5438 if (!SWIG_IsOK(res1)) {
5439 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_size" "', argument " "1"" of type '" "std::vector< long > *""'");
5440 }
5441 arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5442 result = (size_t)(arg1)->size();
5443 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5444 return resultobj;
5445 fail:
5446 return NULL;
5447 }
5448
5449
5450 SWIGINTERN PyObject *_wrap_LongVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5451 PyObject *resultobj = 0;
5452 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5453 size_t arg2 ;
5454 void *argp1 = 0 ;
5455 int res1 = 0 ;
5456 size_t val2 ;
5457 int ecode2 = 0 ;
5458 PyObject * obj0 = 0 ;
5459 PyObject * obj1 = 0 ;
5460 long result;
5461
5462 if (!PyArg_ParseTuple(args,(char *)"OO:LongVector_at",&obj0,&obj1)) SWIG_fail;
5463 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5464 if (!SWIG_IsOK(res1)) {
5465 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_at" "', argument " "1"" of type '" "std::vector< long > const *""'");
5466 }
5467 arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5468 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5469 if (!SWIG_IsOK(ecode2)) {
5470 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVector_at" "', argument " "2"" of type '" "size_t""'");
5471 }
5472 arg2 = static_cast< size_t >(val2);
5473 result = (long)((std::vector< long > const *)arg1)->at(arg2);
5474 resultobj = SWIG_From_long(static_cast< long >(result));
5475 return resultobj;
5476 fail:
5477 return NULL;
5478 }
5479
5480
5481 SWIGINTERN PyObject *_wrap_LongVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5482 PyObject *resultobj = 0;
5483 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5484 size_t arg2 ;
5485 void *argp1 = 0 ;
5486 int res1 = 0 ;
5487 size_t val2 ;
5488 int ecode2 = 0 ;
5489 PyObject * obj0 = 0 ;
5490 PyObject * obj1 = 0 ;
5491
5492 if (!PyArg_ParseTuple(args,(char *)"OO:LongVector_resize",&obj0,&obj1)) SWIG_fail;
5493 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5494 if (!SWIG_IsOK(res1)) {
5495 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_resize" "', argument " "1"" of type '" "std::vector< long > *""'");
5496 }
5497 arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5498 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5499 if (!SWIG_IsOK(ecode2)) {
5500 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVector_resize" "', argument " "2"" of type '" "size_t""'");
5501 }
5502 arg2 = static_cast< size_t >(val2);
5503 (arg1)->resize(arg2);
5504 resultobj = SWIG_Py_Void();
5505 return resultobj;
5506 fail:
5507 return NULL;
5508 }
5509
5510
5511 SWIGINTERN PyObject *_wrap_LongVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5512 PyObject *resultobj = 0;
5513 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5514 std::vector< long > *arg2 = 0 ;
5515 void *argp1 = 0 ;
5516 int res1 = 0 ;
5517 void *argp2 = 0 ;
5518 int res2 = 0 ;
5519 PyObject * obj0 = 0 ;
5520 PyObject * obj1 = 0 ;
5521
5522 if (!PyArg_ParseTuple(args,(char *)"OO:LongVector_swap",&obj0,&obj1)) SWIG_fail;
5523 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
5524 if (!SWIG_IsOK(res1)) {
5525 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVector_swap" "', argument " "1"" of type '" "std::vector< long > *""'");
5526 }
5527 arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5528 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_long_t, 0 );
5529 if (!SWIG_IsOK(res2)) {
5530 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LongVector_swap" "', argument " "2"" of type '" "std::vector< long > &""'");
5531 }
5532 if (!argp2) {
5533 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LongVector_swap" "', argument " "2"" of type '" "std::vector< long > &""'");
5534 }
5535 arg2 = reinterpret_cast< std::vector< long > * >(argp2);
5536 (arg1)->swap(*arg2);
5537 resultobj = SWIG_Py_Void();
5538 return resultobj;
5539 fail:
5540 return NULL;
5541 }
5542
5543
5544 SWIGINTERN PyObject *_wrap_delete_LongVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5545 PyObject *resultobj = 0;
5546 std::vector< long > *arg1 = (std::vector< long > *) 0 ;
5547 void *argp1 = 0 ;
5548 int res1 = 0 ;
5549 PyObject * obj0 = 0 ;
5550
5551 if (!PyArg_ParseTuple(args,(char *)"O:delete_LongVector",&obj0)) SWIG_fail;
5552 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_DISOWN | 0 );
5553 if (!SWIG_IsOK(res1)) {
5554 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LongVector" "', argument " "1"" of type '" "std::vector< long > *""'");
5555 }
5556 arg1 = reinterpret_cast< std::vector< long > * >(argp1);
5557 delete arg1;
5558 resultobj = SWIG_Py_Void();
5559 return resultobj;
5560 fail:
5561 return NULL;
5562 }
5563
5564
5565 SWIGINTERN PyObject *LongVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5566 PyObject *obj;
5567 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
5568 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_long_t, SWIG_NewClientData(obj));
5569 return SWIG_Py_Void();
5570 }
5571
5572 SWIGINTERN PyObject *_wrap_new_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5573 PyObject *resultobj = 0;
5574 std::vector< int > *result = 0 ;
5575
5576 if (!PyArg_ParseTuple(args,(char *)":new_IntVector")) SWIG_fail;
5577 result = (std::vector< int > *)new std::vector< int >();
5578 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_NEW | 0 );
5579 return resultobj;
5580 fail:
5581 return NULL;
5582 }
5583
5584
5585 SWIGINTERN PyObject *_wrap_IntVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5586 PyObject *resultobj = 0;
5587 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5588 int arg2 ;
5589 void *argp1 = 0 ;
5590 int res1 = 0 ;
5591 int val2 ;
5592 int ecode2 = 0 ;
5593 PyObject * obj0 = 0 ;
5594 PyObject * obj1 = 0 ;
5595
5596 if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_push_back",&obj0,&obj1)) SWIG_fail;
5597 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5598 if (!SWIG_IsOK(res1)) {
5599 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_push_back" "', argument " "1"" of type '" "std::vector< int > *""'");
5600 }
5601 arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5602 ecode2 = SWIG_AsVal_int(obj1, &val2);
5603 if (!SWIG_IsOK(ecode2)) {
5604 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_push_back" "', argument " "2"" of type '" "int""'");
5605 }
5606 arg2 = static_cast< int >(val2);
5607 (arg1)->push_back(arg2);
5608 resultobj = SWIG_Py_Void();
5609 return resultobj;
5610 fail:
5611 return NULL;
5612 }
5613
5614
5615 SWIGINTERN PyObject *_wrap_IntVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5616 PyObject *resultobj = 0;
5617 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5618 void *argp1 = 0 ;
5619 int res1 = 0 ;
5620 PyObject * obj0 = 0 ;
5621
5622 if (!PyArg_ParseTuple(args,(char *)"O:IntVector_clear",&obj0)) SWIG_fail;
5623 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5624 if (!SWIG_IsOK(res1)) {
5625 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_clear" "', argument " "1"" of type '" "std::vector< int > *""'");
5626 }
5627 arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5628 (arg1)->clear();
5629 resultobj = SWIG_Py_Void();
5630 return resultobj;
5631 fail:
5632 return NULL;
5633 }
5634
5635
5636 SWIGINTERN PyObject *_wrap_IntVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5637 PyObject *resultobj = 0;
5638 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5639 void *argp1 = 0 ;
5640 int res1 = 0 ;
5641 PyObject * obj0 = 0 ;
5642 int *result = 0 ;
5643
5644 if (!PyArg_ParseTuple(args,(char *)"O:IntVector_data",&obj0)) SWIG_fail;
5645 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5646 if (!SWIG_IsOK(res1)) {
5647 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_data" "', argument " "1"" of type '" "std::vector< int > *""'");
5648 }
5649 arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5650 result = (int *)(arg1)->data();
5651 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
5652 return resultobj;
5653 fail:
5654 return NULL;
5655 }
5656
5657
5658 SWIGINTERN PyObject *_wrap_IntVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5659 PyObject *resultobj = 0;
5660 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5661 void *argp1 = 0 ;
5662 int res1 = 0 ;
5663 PyObject * obj0 = 0 ;
5664 size_t result;
5665
5666 if (!PyArg_ParseTuple(args,(char *)"O:IntVector_size",&obj0)) SWIG_fail;
5667 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5668 if (!SWIG_IsOK(res1)) {
5669 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_size" "', argument " "1"" of type '" "std::vector< int > *""'");
5670 }
5671 arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5672 result = (size_t)(arg1)->size();
5673 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5674 return resultobj;
5675 fail:
5676 return NULL;
5677 }
5678
5679
5680 SWIGINTERN PyObject *_wrap_IntVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5681 PyObject *resultobj = 0;
5682 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5683 size_t arg2 ;
5684 void *argp1 = 0 ;
5685 int res1 = 0 ;
5686 size_t val2 ;
5687 int ecode2 = 0 ;
5688 PyObject * obj0 = 0 ;
5689 PyObject * obj1 = 0 ;
5690 int result;
5691
5692 if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_at",&obj0,&obj1)) SWIG_fail;
5693 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5694 if (!SWIG_IsOK(res1)) {
5695 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_at" "', argument " "1"" of type '" "std::vector< int > const *""'");
5696 }
5697 arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5698 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5699 if (!SWIG_IsOK(ecode2)) {
5700 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_at" "', argument " "2"" of type '" "size_t""'");
5701 }
5702 arg2 = static_cast< size_t >(val2);
5703 result = (int)((std::vector< int > const *)arg1)->at(arg2);
5704 resultobj = SWIG_From_int(static_cast< int >(result));
5705 return resultobj;
5706 fail:
5707 return NULL;
5708 }
5709
5710
5711 SWIGINTERN PyObject *_wrap_IntVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5712 PyObject *resultobj = 0;
5713 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5714 size_t arg2 ;
5715 void *argp1 = 0 ;
5716 int res1 = 0 ;
5717 size_t val2 ;
5718 int ecode2 = 0 ;
5719 PyObject * obj0 = 0 ;
5720 PyObject * obj1 = 0 ;
5721
5722 if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_resize",&obj0,&obj1)) SWIG_fail;
5723 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5724 if (!SWIG_IsOK(res1)) {
5725 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_resize" "', argument " "1"" of type '" "std::vector< int > *""'");
5726 }
5727 arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5728 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5729 if (!SWIG_IsOK(ecode2)) {
5730 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntVector_resize" "', argument " "2"" of type '" "size_t""'");
5731 }
5732 arg2 = static_cast< size_t >(val2);
5733 (arg1)->resize(arg2);
5734 resultobj = SWIG_Py_Void();
5735 return resultobj;
5736 fail:
5737 return NULL;
5738 }
5739
5740
5741 SWIGINTERN PyObject *_wrap_IntVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5742 PyObject *resultobj = 0;
5743 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5744 std::vector< int > *arg2 = 0 ;
5745 void *argp1 = 0 ;
5746 int res1 = 0 ;
5747 void *argp2 = 0 ;
5748 int res2 = 0 ;
5749 PyObject * obj0 = 0 ;
5750 PyObject * obj1 = 0 ;
5751
5752 if (!PyArg_ParseTuple(args,(char *)"OO:IntVector_swap",&obj0,&obj1)) SWIG_fail;
5753 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
5754 if (!SWIG_IsOK(res1)) {
5755 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntVector_swap" "', argument " "1"" of type '" "std::vector< int > *""'");
5756 }
5757 arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5758 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_int_t, 0 );
5759 if (!SWIG_IsOK(res2)) {
5760 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
5761 }
5762 if (!argp2) {
5763 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IntVector_swap" "', argument " "2"" of type '" "std::vector< int > &""'");
5764 }
5765 arg2 = reinterpret_cast< std::vector< int > * >(argp2);
5766 (arg1)->swap(*arg2);
5767 resultobj = SWIG_Py_Void();
5768 return resultobj;
5769 fail:
5770 return NULL;
5771 }
5772
5773
5774 SWIGINTERN PyObject *_wrap_delete_IntVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5775 PyObject *resultobj = 0;
5776 std::vector< int > *arg1 = (std::vector< int > *) 0 ;
5777 void *argp1 = 0 ;
5778 int res1 = 0 ;
5779 PyObject * obj0 = 0 ;
5780
5781 if (!PyArg_ParseTuple(args,(char *)"O:delete_IntVector",&obj0)) SWIG_fail;
5782 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_int_t, SWIG_POINTER_DISOWN | 0 );
5783 if (!SWIG_IsOK(res1)) {
5784 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntVector" "', argument " "1"" of type '" "std::vector< int > *""'");
5785 }
5786 arg1 = reinterpret_cast< std::vector< int > * >(argp1);
5787 delete arg1;
5788 resultobj = SWIG_Py_Void();
5789 return resultobj;
5790 fail:
5791 return NULL;
5792 }
5793
5794
5795 SWIGINTERN PyObject *IntVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5796 PyObject *obj;
5797 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
5798 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_int_t, SWIG_NewClientData(obj));
5799 return SWIG_Py_Void();
5800 }
5801
5802 SWIGINTERN PyObject *_wrap_new_VectorTransformVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5803 PyObject *resultobj = 0;
5804 std::vector< faiss::VectorTransform * > *result = 0 ;
5805
5806 if (!PyArg_ParseTuple(args,(char *)":new_VectorTransformVector")) SWIG_fail;
5807 result = (std::vector< faiss::VectorTransform * > *)new std::vector< faiss::VectorTransform * >();
5808 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_POINTER_NEW | 0 );
5809 return resultobj;
5810 fail:
5811 return NULL;
5812 }
5813
5814
5815 SWIGINTERN PyObject *_wrap_VectorTransformVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5816 PyObject *resultobj = 0;
5817 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5818 faiss::VectorTransform *arg2 = (faiss::VectorTransform *) 0 ;
5819 void *argp1 = 0 ;
5820 int res1 = 0 ;
5821 void *argp2 = 0 ;
5822 int res2 = 0 ;
5823 PyObject * obj0 = 0 ;
5824 PyObject * obj1 = 0 ;
5825
5826 if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransformVector_push_back",&obj0,&obj1)) SWIG_fail;
5827 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5828 if (!SWIG_IsOK(res1)) {
5829 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5830 }
5831 arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5832 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
5833 if (!SWIG_IsOK(res2)) {
5834 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorTransformVector_push_back" "', argument " "2"" of type '" "faiss::VectorTransform *""'");
5835 }
5836 arg2 = reinterpret_cast< faiss::VectorTransform * >(argp2);
5837 (arg1)->push_back(arg2);
5838 resultobj = SWIG_Py_Void();
5839 return resultobj;
5840 fail:
5841 return NULL;
5842 }
5843
5844
5845 SWIGINTERN PyObject *_wrap_VectorTransformVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5846 PyObject *resultobj = 0;
5847 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5848 void *argp1 = 0 ;
5849 int res1 = 0 ;
5850 PyObject * obj0 = 0 ;
5851
5852 if (!PyArg_ParseTuple(args,(char *)"O:VectorTransformVector_clear",&obj0)) SWIG_fail;
5853 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5854 if (!SWIG_IsOK(res1)) {
5855 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_clear" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5856 }
5857 arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5858 (arg1)->clear();
5859 resultobj = SWIG_Py_Void();
5860 return resultobj;
5861 fail:
5862 return NULL;
5863 }
5864
5865
5866 SWIGINTERN PyObject *_wrap_VectorTransformVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5867 PyObject *resultobj = 0;
5868 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5869 void *argp1 = 0 ;
5870 int res1 = 0 ;
5871 PyObject * obj0 = 0 ;
5872 faiss::VectorTransform **result = 0 ;
5873
5874 if (!PyArg_ParseTuple(args,(char *)"O:VectorTransformVector_data",&obj0)) SWIG_fail;
5875 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5876 if (!SWIG_IsOK(res1)) {
5877 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_data" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5878 }
5879 arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5880 result = (faiss::VectorTransform **)(arg1)->data();
5881 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_faiss__VectorTransform, 0 | 0 );
5882 return resultobj;
5883 fail:
5884 return NULL;
5885 }
5886
5887
5888 SWIGINTERN PyObject *_wrap_VectorTransformVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5889 PyObject *resultobj = 0;
5890 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5891 void *argp1 = 0 ;
5892 int res1 = 0 ;
5893 PyObject * obj0 = 0 ;
5894 size_t result;
5895
5896 if (!PyArg_ParseTuple(args,(char *)"O:VectorTransformVector_size",&obj0)) SWIG_fail;
5897 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5898 if (!SWIG_IsOK(res1)) {
5899 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_size" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5900 }
5901 arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5902 result = (size_t)(arg1)->size();
5903 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
5904 return resultobj;
5905 fail:
5906 return NULL;
5907 }
5908
5909
5910 SWIGINTERN PyObject *_wrap_VectorTransformVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5911 PyObject *resultobj = 0;
5912 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5913 size_t arg2 ;
5914 void *argp1 = 0 ;
5915 int res1 = 0 ;
5916 size_t val2 ;
5917 int ecode2 = 0 ;
5918 PyObject * obj0 = 0 ;
5919 PyObject * obj1 = 0 ;
5920 faiss::VectorTransform *result = 0 ;
5921
5922 if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransformVector_at",&obj0,&obj1)) SWIG_fail;
5923 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5924 if (!SWIG_IsOK(res1)) {
5925 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_at" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > const *""'");
5926 }
5927 arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5928 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5929 if (!SWIG_IsOK(ecode2)) {
5930 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransformVector_at" "', argument " "2"" of type '" "size_t""'");
5931 }
5932 arg2 = static_cast< size_t >(val2);
5933 result = (faiss::VectorTransform *)((std::vector< faiss::VectorTransform * > const *)arg1)->at(arg2);
5934 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
5935 return resultobj;
5936 fail:
5937 return NULL;
5938 }
5939
5940
5941 SWIGINTERN PyObject *_wrap_VectorTransformVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5942 PyObject *resultobj = 0;
5943 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5944 size_t arg2 ;
5945 void *argp1 = 0 ;
5946 int res1 = 0 ;
5947 size_t val2 ;
5948 int ecode2 = 0 ;
5949 PyObject * obj0 = 0 ;
5950 PyObject * obj1 = 0 ;
5951
5952 if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransformVector_resize",&obj0,&obj1)) SWIG_fail;
5953 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5954 if (!SWIG_IsOK(res1)) {
5955 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_resize" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5956 }
5957 arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5958 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
5959 if (!SWIG_IsOK(ecode2)) {
5960 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransformVector_resize" "', argument " "2"" of type '" "size_t""'");
5961 }
5962 arg2 = static_cast< size_t >(val2);
5963 (arg1)->resize(arg2);
5964 resultobj = SWIG_Py_Void();
5965 return resultobj;
5966 fail:
5967 return NULL;
5968 }
5969
5970
5971 SWIGINTERN PyObject *_wrap_VectorTransformVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
5972 PyObject *resultobj = 0;
5973 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
5974 std::vector< faiss::VectorTransform * > *arg2 = 0 ;
5975 void *argp1 = 0 ;
5976 int res1 = 0 ;
5977 void *argp2 = 0 ;
5978 int res2 = 0 ;
5979 PyObject * obj0 = 0 ;
5980 PyObject * obj1 = 0 ;
5981
5982 if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransformVector_swap",&obj0,&obj1)) SWIG_fail;
5983 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
5984 if (!SWIG_IsOK(res1)) {
5985 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransformVector_swap" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
5986 }
5987 arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
5988 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 );
5989 if (!SWIG_IsOK(res2)) {
5990 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorTransformVector_swap" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > &""'");
5991 }
5992 if (!argp2) {
5993 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "VectorTransformVector_swap" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > &""'");
5994 }
5995 arg2 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp2);
5996 (arg1)->swap(*arg2);
5997 resultobj = SWIG_Py_Void();
5998 return resultobj;
5999 fail:
6000 return NULL;
6001 }
6002
6003
6004 SWIGINTERN PyObject *_wrap_delete_VectorTransformVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6005 PyObject *resultobj = 0;
6006 std::vector< faiss::VectorTransform * > *arg1 = (std::vector< faiss::VectorTransform * > *) 0 ;
6007 void *argp1 = 0 ;
6008 int res1 = 0 ;
6009 PyObject * obj0 = 0 ;
6010
6011 if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorTransformVector",&obj0)) SWIG_fail;
6012 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_POINTER_DISOWN | 0 );
6013 if (!SWIG_IsOK(res1)) {
6014 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorTransformVector" "', argument " "1"" of type '" "std::vector< faiss::VectorTransform * > *""'");
6015 }
6016 arg1 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp1);
6017 delete arg1;
6018 resultobj = SWIG_Py_Void();
6019 return resultobj;
6020 fail:
6021 return NULL;
6022 }
6023
6024
6025 SWIGINTERN PyObject *VectorTransformVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6026 PyObject *obj;
6027 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6028 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, SWIG_NewClientData(obj));
6029 return SWIG_Py_Void();
6030 }
6031
6032 SWIGINTERN PyObject *_wrap_new_OperatingPointVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6033 PyObject *resultobj = 0;
6034 std::vector< faiss::OperatingPoint > *result = 0 ;
6035
6036 if (!PyArg_ParseTuple(args,(char *)":new_OperatingPointVector")) SWIG_fail;
6037 result = (std::vector< faiss::OperatingPoint > *)new std::vector< faiss::OperatingPoint >();
6038 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_POINTER_NEW | 0 );
6039 return resultobj;
6040 fail:
6041 return NULL;
6042 }
6043
6044
6045 SWIGINTERN PyObject *_wrap_OperatingPointVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6046 PyObject *resultobj = 0;
6047 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6048 faiss::OperatingPoint arg2 ;
6049 void *argp1 = 0 ;
6050 int res1 = 0 ;
6051 void *argp2 ;
6052 int res2 = 0 ;
6053 PyObject * obj0 = 0 ;
6054 PyObject * obj1 = 0 ;
6055
6056 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPointVector_push_back",&obj0,&obj1)) SWIG_fail;
6057 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6058 if (!SWIG_IsOK(res1)) {
6059 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6060 }
6061 arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6062 {
6063 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__OperatingPoint, 0 | 0);
6064 if (!SWIG_IsOK(res2)) {
6065 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPointVector_push_back" "', argument " "2"" of type '" "faiss::OperatingPoint""'");
6066 }
6067 if (!argp2) {
6068 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPointVector_push_back" "', argument " "2"" of type '" "faiss::OperatingPoint""'");
6069 } else {
6070 faiss::OperatingPoint * temp = reinterpret_cast< faiss::OperatingPoint * >(argp2);
6071 arg2 = *temp;
6072 if (SWIG_IsNewObj(res2)) delete temp;
6073 }
6074 }
6075 (arg1)->push_back(arg2);
6076 resultobj = SWIG_Py_Void();
6077 return resultobj;
6078 fail:
6079 return NULL;
6080 }
6081
6082
6083 SWIGINTERN PyObject *_wrap_OperatingPointVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6084 PyObject *resultobj = 0;
6085 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6086 void *argp1 = 0 ;
6087 int res1 = 0 ;
6088 PyObject * obj0 = 0 ;
6089
6090 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPointVector_clear",&obj0)) SWIG_fail;
6091 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6092 if (!SWIG_IsOK(res1)) {
6093 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_clear" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6094 }
6095 arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6096 (arg1)->clear();
6097 resultobj = SWIG_Py_Void();
6098 return resultobj;
6099 fail:
6100 return NULL;
6101 }
6102
6103
6104 SWIGINTERN PyObject *_wrap_OperatingPointVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6105 PyObject *resultobj = 0;
6106 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6107 void *argp1 = 0 ;
6108 int res1 = 0 ;
6109 PyObject * obj0 = 0 ;
6110 faiss::OperatingPoint *result = 0 ;
6111
6112 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPointVector_data",&obj0)) SWIG_fail;
6113 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6114 if (!SWIG_IsOK(res1)) {
6115 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_data" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6116 }
6117 arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6118 result = (faiss::OperatingPoint *)(arg1)->data();
6119 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
6120 return resultobj;
6121 fail:
6122 return NULL;
6123 }
6124
6125
6126 SWIGINTERN PyObject *_wrap_OperatingPointVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6127 PyObject *resultobj = 0;
6128 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6129 void *argp1 = 0 ;
6130 int res1 = 0 ;
6131 PyObject * obj0 = 0 ;
6132 size_t result;
6133
6134 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPointVector_size",&obj0)) SWIG_fail;
6135 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6136 if (!SWIG_IsOK(res1)) {
6137 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_size" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6138 }
6139 arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6140 result = (size_t)(arg1)->size();
6141 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6142 return resultobj;
6143 fail:
6144 return NULL;
6145 }
6146
6147
6148 SWIGINTERN PyObject *_wrap_OperatingPointVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6149 PyObject *resultobj = 0;
6150 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6151 size_t arg2 ;
6152 void *argp1 = 0 ;
6153 int res1 = 0 ;
6154 size_t val2 ;
6155 int ecode2 = 0 ;
6156 PyObject * obj0 = 0 ;
6157 PyObject * obj1 = 0 ;
6158 faiss::OperatingPoint result;
6159
6160 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPointVector_at",&obj0,&obj1)) SWIG_fail;
6161 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6162 if (!SWIG_IsOK(res1)) {
6163 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_at" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > const *""'");
6164 }
6165 arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6166 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6167 if (!SWIG_IsOK(ecode2)) {
6168 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPointVector_at" "', argument " "2"" of type '" "size_t""'");
6169 }
6170 arg2 = static_cast< size_t >(val2);
6171 result = ((std::vector< faiss::OperatingPoint > const *)arg1)->at(arg2);
6172 resultobj = SWIG_NewPointerObj((new faiss::OperatingPoint(static_cast< const faiss::OperatingPoint& >(result))), SWIGTYPE_p_faiss__OperatingPoint, SWIG_POINTER_OWN | 0 );
6173 return resultobj;
6174 fail:
6175 return NULL;
6176 }
6177
6178
6179 SWIGINTERN PyObject *_wrap_OperatingPointVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6180 PyObject *resultobj = 0;
6181 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6182 size_t arg2 ;
6183 void *argp1 = 0 ;
6184 int res1 = 0 ;
6185 size_t val2 ;
6186 int ecode2 = 0 ;
6187 PyObject * obj0 = 0 ;
6188 PyObject * obj1 = 0 ;
6189
6190 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPointVector_resize",&obj0,&obj1)) SWIG_fail;
6191 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6192 if (!SWIG_IsOK(res1)) {
6193 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_resize" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6194 }
6195 arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6196 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6197 if (!SWIG_IsOK(ecode2)) {
6198 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPointVector_resize" "', argument " "2"" of type '" "size_t""'");
6199 }
6200 arg2 = static_cast< size_t >(val2);
6201 (arg1)->resize(arg2);
6202 resultobj = SWIG_Py_Void();
6203 return resultobj;
6204 fail:
6205 return NULL;
6206 }
6207
6208
6209 SWIGINTERN PyObject *_wrap_OperatingPointVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6210 PyObject *resultobj = 0;
6211 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6212 std::vector< faiss::OperatingPoint > *arg2 = 0 ;
6213 void *argp1 = 0 ;
6214 int res1 = 0 ;
6215 void *argp2 = 0 ;
6216 int res2 = 0 ;
6217 PyObject * obj0 = 0 ;
6218 PyObject * obj1 = 0 ;
6219
6220 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPointVector_swap",&obj0,&obj1)) SWIG_fail;
6221 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
6222 if (!SWIG_IsOK(res1)) {
6223 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPointVector_swap" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6224 }
6225 arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6226 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 );
6227 if (!SWIG_IsOK(res2)) {
6228 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPointVector_swap" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > &""'");
6229 }
6230 if (!argp2) {
6231 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPointVector_swap" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > &""'");
6232 }
6233 arg2 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp2);
6234 (arg1)->swap(*arg2);
6235 resultobj = SWIG_Py_Void();
6236 return resultobj;
6237 fail:
6238 return NULL;
6239 }
6240
6241
6242 SWIGINTERN PyObject *_wrap_delete_OperatingPointVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6243 PyObject *resultobj = 0;
6244 std::vector< faiss::OperatingPoint > *arg1 = (std::vector< faiss::OperatingPoint > *) 0 ;
6245 void *argp1 = 0 ;
6246 int res1 = 0 ;
6247 PyObject * obj0 = 0 ;
6248
6249 if (!PyArg_ParseTuple(args,(char *)"O:delete_OperatingPointVector",&obj0)) SWIG_fail;
6250 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_POINTER_DISOWN | 0 );
6251 if (!SWIG_IsOK(res1)) {
6252 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OperatingPointVector" "', argument " "1"" of type '" "std::vector< faiss::OperatingPoint > *""'");
6253 }
6254 arg1 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp1);
6255 delete arg1;
6256 resultobj = SWIG_Py_Void();
6257 return resultobj;
6258 fail:
6259 return NULL;
6260 }
6261
6262
6263 SWIGINTERN PyObject *OperatingPointVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6264 PyObject *obj;
6265 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6266 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, SWIG_NewClientData(obj));
6267 return SWIG_Py_Void();
6268 }
6269
6270 SWIGINTERN PyObject *_wrap_new_InvertedListsPtrVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6271 PyObject *resultobj = 0;
6272 std::vector< faiss::InvertedLists * > *result = 0 ;
6273
6274 if (!PyArg_ParseTuple(args,(char *)":new_InvertedListsPtrVector")) SWIG_fail;
6275 result = (std::vector< faiss::InvertedLists * > *)new std::vector< faiss::InvertedLists * >();
6276 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_POINTER_NEW | 0 );
6277 return resultobj;
6278 fail:
6279 return NULL;
6280 }
6281
6282
6283 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6284 PyObject *resultobj = 0;
6285 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6286 faiss::InvertedLists *arg2 = (faiss::InvertedLists *) 0 ;
6287 void *argp1 = 0 ;
6288 int res1 = 0 ;
6289 void *argp2 = 0 ;
6290 int res2 = 0 ;
6291 PyObject * obj0 = 0 ;
6292 PyObject * obj1 = 0 ;
6293
6294 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedListsPtrVector_push_back",&obj0,&obj1)) SWIG_fail;
6295 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6296 if (!SWIG_IsOK(res1)) {
6297 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_push_back" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6298 }
6299 arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6300 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
6301 if (!SWIG_IsOK(res2)) {
6302 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedListsPtrVector_push_back" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
6303 }
6304 arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
6305 (arg1)->push_back(arg2);
6306 resultobj = SWIG_Py_Void();
6307 return resultobj;
6308 fail:
6309 return NULL;
6310 }
6311
6312
6313 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6314 PyObject *resultobj = 0;
6315 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6316 void *argp1 = 0 ;
6317 int res1 = 0 ;
6318 PyObject * obj0 = 0 ;
6319
6320 if (!PyArg_ParseTuple(args,(char *)"O:InvertedListsPtrVector_clear",&obj0)) SWIG_fail;
6321 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6322 if (!SWIG_IsOK(res1)) {
6323 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_clear" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6324 }
6325 arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6326 (arg1)->clear();
6327 resultobj = SWIG_Py_Void();
6328 return resultobj;
6329 fail:
6330 return NULL;
6331 }
6332
6333
6334 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6335 PyObject *resultobj = 0;
6336 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6337 void *argp1 = 0 ;
6338 int res1 = 0 ;
6339 PyObject * obj0 = 0 ;
6340 faiss::InvertedLists **result = 0 ;
6341
6342 if (!PyArg_ParseTuple(args,(char *)"O:InvertedListsPtrVector_data",&obj0)) SWIG_fail;
6343 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6344 if (!SWIG_IsOK(res1)) {
6345 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_data" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6346 }
6347 arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6348 result = (faiss::InvertedLists **)(arg1)->data();
6349 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_p_faiss__InvertedLists, 0 | 0 );
6350 return resultobj;
6351 fail:
6352 return NULL;
6353 }
6354
6355
6356 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6357 PyObject *resultobj = 0;
6358 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6359 void *argp1 = 0 ;
6360 int res1 = 0 ;
6361 PyObject * obj0 = 0 ;
6362 size_t result;
6363
6364 if (!PyArg_ParseTuple(args,(char *)"O:InvertedListsPtrVector_size",&obj0)) SWIG_fail;
6365 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6366 if (!SWIG_IsOK(res1)) {
6367 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_size" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6368 }
6369 arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6370 result = (size_t)(arg1)->size();
6371 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6372 return resultobj;
6373 fail:
6374 return NULL;
6375 }
6376
6377
6378 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6379 PyObject *resultobj = 0;
6380 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6381 size_t arg2 ;
6382 void *argp1 = 0 ;
6383 int res1 = 0 ;
6384 size_t val2 ;
6385 int ecode2 = 0 ;
6386 PyObject * obj0 = 0 ;
6387 PyObject * obj1 = 0 ;
6388 faiss::InvertedLists *result = 0 ;
6389
6390 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedListsPtrVector_at",&obj0,&obj1)) SWIG_fail;
6391 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6392 if (!SWIG_IsOK(res1)) {
6393 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_at" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > const *""'");
6394 }
6395 arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6396 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6397 if (!SWIG_IsOK(ecode2)) {
6398 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedListsPtrVector_at" "', argument " "2"" of type '" "size_t""'");
6399 }
6400 arg2 = static_cast< size_t >(val2);
6401 result = (faiss::InvertedLists *)((std::vector< faiss::InvertedLists * > const *)arg1)->at(arg2);
6402 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
6403 return resultobj;
6404 fail:
6405 return NULL;
6406 }
6407
6408
6409 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6410 PyObject *resultobj = 0;
6411 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6412 size_t arg2 ;
6413 void *argp1 = 0 ;
6414 int res1 = 0 ;
6415 size_t val2 ;
6416 int ecode2 = 0 ;
6417 PyObject * obj0 = 0 ;
6418 PyObject * obj1 = 0 ;
6419
6420 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedListsPtrVector_resize",&obj0,&obj1)) SWIG_fail;
6421 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6422 if (!SWIG_IsOK(res1)) {
6423 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_resize" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6424 }
6425 arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6426 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6427 if (!SWIG_IsOK(ecode2)) {
6428 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedListsPtrVector_resize" "', argument " "2"" of type '" "size_t""'");
6429 }
6430 arg2 = static_cast< size_t >(val2);
6431 (arg1)->resize(arg2);
6432 resultobj = SWIG_Py_Void();
6433 return resultobj;
6434 fail:
6435 return NULL;
6436 }
6437
6438
6439 SWIGINTERN PyObject *_wrap_InvertedListsPtrVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6440 PyObject *resultobj = 0;
6441 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6442 std::vector< faiss::InvertedLists * > *arg2 = 0 ;
6443 void *argp1 = 0 ;
6444 int res1 = 0 ;
6445 void *argp2 = 0 ;
6446 int res2 = 0 ;
6447 PyObject * obj0 = 0 ;
6448 PyObject * obj1 = 0 ;
6449
6450 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedListsPtrVector_swap",&obj0,&obj1)) SWIG_fail;
6451 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 | 0 );
6452 if (!SWIG_IsOK(res1)) {
6453 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedListsPtrVector_swap" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6454 }
6455 arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6456 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, 0 );
6457 if (!SWIG_IsOK(res2)) {
6458 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedListsPtrVector_swap" "', argument " "2"" of type '" "std::vector< faiss::InvertedLists * > &""'");
6459 }
6460 if (!argp2) {
6461 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "InvertedListsPtrVector_swap" "', argument " "2"" of type '" "std::vector< faiss::InvertedLists * > &""'");
6462 }
6463 arg2 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp2);
6464 (arg1)->swap(*arg2);
6465 resultobj = SWIG_Py_Void();
6466 return resultobj;
6467 fail:
6468 return NULL;
6469 }
6470
6471
6472 SWIGINTERN PyObject *_wrap_delete_InvertedListsPtrVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6473 PyObject *resultobj = 0;
6474 std::vector< faiss::InvertedLists * > *arg1 = (std::vector< faiss::InvertedLists * > *) 0 ;
6475 void *argp1 = 0 ;
6476 int res1 = 0 ;
6477 PyObject * obj0 = 0 ;
6478
6479 if (!PyArg_ParseTuple(args,(char *)"O:delete_InvertedListsPtrVector",&obj0)) SWIG_fail;
6480 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_POINTER_DISOWN | 0 );
6481 if (!SWIG_IsOK(res1)) {
6482 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvertedListsPtrVector" "', argument " "1"" of type '" "std::vector< faiss::InvertedLists * > *""'");
6483 }
6484 arg1 = reinterpret_cast< std::vector< faiss::InvertedLists * > * >(argp1);
6485 delete arg1;
6486 resultobj = SWIG_Py_Void();
6487 return resultobj;
6488 fail:
6489 return NULL;
6490 }
6491
6492
6493 SWIGINTERN PyObject *InvertedListsPtrVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6494 PyObject *obj;
6495 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6496 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_faiss__InvertedLists_p_t, SWIG_NewClientData(obj));
6497 return SWIG_Py_Void();
6498 }
6499
6500 SWIGINTERN PyObject *_wrap_new_FloatVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6501 PyObject *resultobj = 0;
6502 std::vector< std::vector< float > > *result = 0 ;
6503
6504 if (!PyArg_ParseTuple(args,(char *)":new_FloatVectorVector")) SWIG_fail;
6505 result = (std::vector< std::vector< float > > *)new std::vector< std::vector< float > >();
6506 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_POINTER_NEW | 0 );
6507 return resultobj;
6508 fail:
6509 return NULL;
6510 }
6511
6512
6513 SWIGINTERN PyObject *_wrap_FloatVectorVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6514 PyObject *resultobj = 0;
6515 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6516 std::vector< float > arg2 ;
6517 void *argp1 = 0 ;
6518 int res1 = 0 ;
6519 void *argp2 ;
6520 int res2 = 0 ;
6521 PyObject * obj0 = 0 ;
6522 PyObject * obj1 = 0 ;
6523
6524 if (!PyArg_ParseTuple(args,(char *)"OO:FloatVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
6525 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6526 if (!SWIG_IsOK(res1)) {
6527 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6528 }
6529 arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6530 {
6531 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_float_t, 0 | 0);
6532 if (!SWIG_IsOK(res2)) {
6533 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatVectorVector_push_back" "', argument " "2"" of type '" "std::vector< float >""'");
6534 }
6535 if (!argp2) {
6536 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVectorVector_push_back" "', argument " "2"" of type '" "std::vector< float >""'");
6537 } else {
6538 std::vector< float > * temp = reinterpret_cast< std::vector< float > * >(argp2);
6539 arg2 = *temp;
6540 if (SWIG_IsNewObj(res2)) delete temp;
6541 }
6542 }
6543 (arg1)->push_back(arg2);
6544 resultobj = SWIG_Py_Void();
6545 return resultobj;
6546 fail:
6547 return NULL;
6548 }
6549
6550
6551 SWIGINTERN PyObject *_wrap_FloatVectorVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6552 PyObject *resultobj = 0;
6553 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6554 void *argp1 = 0 ;
6555 int res1 = 0 ;
6556 PyObject * obj0 = 0 ;
6557
6558 if (!PyArg_ParseTuple(args,(char *)"O:FloatVectorVector_clear",&obj0)) SWIG_fail;
6559 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6560 if (!SWIG_IsOK(res1)) {
6561 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6562 }
6563 arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6564 (arg1)->clear();
6565 resultobj = SWIG_Py_Void();
6566 return resultobj;
6567 fail:
6568 return NULL;
6569 }
6570
6571
6572 SWIGINTERN PyObject *_wrap_FloatVectorVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6573 PyObject *resultobj = 0;
6574 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6575 void *argp1 = 0 ;
6576 int res1 = 0 ;
6577 PyObject * obj0 = 0 ;
6578 std::vector< float > *result = 0 ;
6579
6580 if (!PyArg_ParseTuple(args,(char *)"O:FloatVectorVector_data",&obj0)) SWIG_fail;
6581 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6582 if (!SWIG_IsOK(res1)) {
6583 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6584 }
6585 arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6586 result = (std::vector< float > *)(arg1)->data();
6587 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
6588 return resultobj;
6589 fail:
6590 return NULL;
6591 }
6592
6593
6594 SWIGINTERN PyObject *_wrap_FloatVectorVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6595 PyObject *resultobj = 0;
6596 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6597 void *argp1 = 0 ;
6598 int res1 = 0 ;
6599 PyObject * obj0 = 0 ;
6600 size_t result;
6601
6602 if (!PyArg_ParseTuple(args,(char *)"O:FloatVectorVector_size",&obj0)) SWIG_fail;
6603 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6604 if (!SWIG_IsOK(res1)) {
6605 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6606 }
6607 arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6608 result = (size_t)(arg1)->size();
6609 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6610 return resultobj;
6611 fail:
6612 return NULL;
6613 }
6614
6615
6616 SWIGINTERN PyObject *_wrap_FloatVectorVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6617 PyObject *resultobj = 0;
6618 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6619 size_t arg2 ;
6620 void *argp1 = 0 ;
6621 int res1 = 0 ;
6622 size_t val2 ;
6623 int ecode2 = 0 ;
6624 PyObject * obj0 = 0 ;
6625 PyObject * obj1 = 0 ;
6626 std::vector< float > result;
6627
6628 if (!PyArg_ParseTuple(args,(char *)"OO:FloatVectorVector_at",&obj0,&obj1)) SWIG_fail;
6629 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6630 if (!SWIG_IsOK(res1)) {
6631 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< float > > const *""'");
6632 }
6633 arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6634 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6635 if (!SWIG_IsOK(ecode2)) {
6636 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVectorVector_at" "', argument " "2"" of type '" "size_t""'");
6637 }
6638 arg2 = static_cast< size_t >(val2);
6639 result = ((std::vector< std::vector< float > > const *)arg1)->at(arg2);
6640 resultobj = SWIG_NewPointerObj((new std::vector< float >(static_cast< const std::vector< float >& >(result))), SWIGTYPE_p_std__vectorT_float_t, SWIG_POINTER_OWN | 0 );
6641 return resultobj;
6642 fail:
6643 return NULL;
6644 }
6645
6646
6647 SWIGINTERN PyObject *_wrap_FloatVectorVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6648 PyObject *resultobj = 0;
6649 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6650 size_t arg2 ;
6651 void *argp1 = 0 ;
6652 int res1 = 0 ;
6653 size_t val2 ;
6654 int ecode2 = 0 ;
6655 PyObject * obj0 = 0 ;
6656 PyObject * obj1 = 0 ;
6657
6658 if (!PyArg_ParseTuple(args,(char *)"OO:FloatVectorVector_resize",&obj0,&obj1)) SWIG_fail;
6659 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6660 if (!SWIG_IsOK(res1)) {
6661 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6662 }
6663 arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6664 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6665 if (!SWIG_IsOK(ecode2)) {
6666 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "FloatVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
6667 }
6668 arg2 = static_cast< size_t >(val2);
6669 (arg1)->resize(arg2);
6670 resultobj = SWIG_Py_Void();
6671 return resultobj;
6672 fail:
6673 return NULL;
6674 }
6675
6676
6677 SWIGINTERN PyObject *_wrap_FloatVectorVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6678 PyObject *resultobj = 0;
6679 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6680 std::vector< std::vector< float > > *arg2 = 0 ;
6681 void *argp1 = 0 ;
6682 int res1 = 0 ;
6683 void *argp2 = 0 ;
6684 int res2 = 0 ;
6685 PyObject * obj0 = 0 ;
6686 PyObject * obj1 = 0 ;
6687
6688 if (!PyArg_ParseTuple(args,(char *)"OO:FloatVectorVector_swap",&obj0,&obj1)) SWIG_fail;
6689 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 | 0 );
6690 if (!SWIG_IsOK(res1)) {
6691 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "FloatVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6692 }
6693 arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6694 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, 0 );
6695 if (!SWIG_IsOK(res2)) {
6696 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "FloatVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< float > > &""'");
6697 }
6698 if (!argp2) {
6699 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "FloatVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< float > > &""'");
6700 }
6701 arg2 = reinterpret_cast< std::vector< std::vector< float > > * >(argp2);
6702 (arg1)->swap(*arg2);
6703 resultobj = SWIG_Py_Void();
6704 return resultobj;
6705 fail:
6706 return NULL;
6707 }
6708
6709
6710 SWIGINTERN PyObject *_wrap_delete_FloatVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6711 PyObject *resultobj = 0;
6712 std::vector< std::vector< float > > *arg1 = (std::vector< std::vector< float > > *) 0 ;
6713 void *argp1 = 0 ;
6714 int res1 = 0 ;
6715 PyObject * obj0 = 0 ;
6716
6717 if (!PyArg_ParseTuple(args,(char *)"O:delete_FloatVectorVector",&obj0)) SWIG_fail;
6718 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_POINTER_DISOWN | 0 );
6719 if (!SWIG_IsOK(res1)) {
6720 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_FloatVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< float > > *""'");
6721 }
6722 arg1 = reinterpret_cast< std::vector< std::vector< float > > * >(argp1);
6723 delete arg1;
6724 resultobj = SWIG_Py_Void();
6725 return resultobj;
6726 fail:
6727 return NULL;
6728 }
6729
6730
6731 SWIGINTERN PyObject *FloatVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6732 PyObject *obj;
6733 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6734 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_float_t_t, SWIG_NewClientData(obj));
6735 return SWIG_Py_Void();
6736 }
6737
6738 SWIGINTERN PyObject *_wrap_new_ByteVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6739 PyObject *resultobj = 0;
6740 std::vector< std::vector< unsigned char > > *result = 0 ;
6741
6742 if (!PyArg_ParseTuple(args,(char *)":new_ByteVectorVector")) SWIG_fail;
6743 result = (std::vector< std::vector< unsigned char > > *)new std::vector< std::vector< unsigned char > >();
6744 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_POINTER_NEW | 0 );
6745 return resultobj;
6746 fail:
6747 return NULL;
6748 }
6749
6750
6751 SWIGINTERN PyObject *_wrap_ByteVectorVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6752 PyObject *resultobj = 0;
6753 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6754 std::vector< unsigned char > arg2 ;
6755 void *argp1 = 0 ;
6756 int res1 = 0 ;
6757 void *argp2 ;
6758 int res2 = 0 ;
6759 PyObject * obj0 = 0 ;
6760 PyObject * obj1 = 0 ;
6761
6762 if (!PyArg_ParseTuple(args,(char *)"OO:ByteVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
6763 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6764 if (!SWIG_IsOK(res1)) {
6765 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6766 }
6767 arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6768 {
6769 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0);
6770 if (!SWIG_IsOK(res2)) {
6771 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ByteVectorVector_push_back" "', argument " "2"" of type '" "std::vector< unsigned char >""'");
6772 }
6773 if (!argp2) {
6774 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ByteVectorVector_push_back" "', argument " "2"" of type '" "std::vector< unsigned char >""'");
6775 } else {
6776 std::vector< unsigned char > * temp = reinterpret_cast< std::vector< unsigned char > * >(argp2);
6777 arg2 = *temp;
6778 if (SWIG_IsNewObj(res2)) delete temp;
6779 }
6780 }
6781 (arg1)->push_back(arg2);
6782 resultobj = SWIG_Py_Void();
6783 return resultobj;
6784 fail:
6785 return NULL;
6786 }
6787
6788
6789 SWIGINTERN PyObject *_wrap_ByteVectorVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6790 PyObject *resultobj = 0;
6791 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6792 void *argp1 = 0 ;
6793 int res1 = 0 ;
6794 PyObject * obj0 = 0 ;
6795
6796 if (!PyArg_ParseTuple(args,(char *)"O:ByteVectorVector_clear",&obj0)) SWIG_fail;
6797 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6798 if (!SWIG_IsOK(res1)) {
6799 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6800 }
6801 arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6802 (arg1)->clear();
6803 resultobj = SWIG_Py_Void();
6804 return resultobj;
6805 fail:
6806 return NULL;
6807 }
6808
6809
6810 SWIGINTERN PyObject *_wrap_ByteVectorVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6811 PyObject *resultobj = 0;
6812 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6813 void *argp1 = 0 ;
6814 int res1 = 0 ;
6815 PyObject * obj0 = 0 ;
6816 std::vector< unsigned char > *result = 0 ;
6817
6818 if (!PyArg_ParseTuple(args,(char *)"O:ByteVectorVector_data",&obj0)) SWIG_fail;
6819 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6820 if (!SWIG_IsOK(res1)) {
6821 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6822 }
6823 arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6824 result = (std::vector< unsigned char > *)(arg1)->data();
6825 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
6826 return resultobj;
6827 fail:
6828 return NULL;
6829 }
6830
6831
6832 SWIGINTERN PyObject *_wrap_ByteVectorVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6833 PyObject *resultobj = 0;
6834 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6835 void *argp1 = 0 ;
6836 int res1 = 0 ;
6837 PyObject * obj0 = 0 ;
6838 size_t result;
6839
6840 if (!PyArg_ParseTuple(args,(char *)"O:ByteVectorVector_size",&obj0)) SWIG_fail;
6841 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6842 if (!SWIG_IsOK(res1)) {
6843 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6844 }
6845 arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6846 result = (size_t)(arg1)->size();
6847 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
6848 return resultobj;
6849 fail:
6850 return NULL;
6851 }
6852
6853
6854 SWIGINTERN PyObject *_wrap_ByteVectorVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6855 PyObject *resultobj = 0;
6856 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6857 size_t arg2 ;
6858 void *argp1 = 0 ;
6859 int res1 = 0 ;
6860 size_t val2 ;
6861 int ecode2 = 0 ;
6862 PyObject * obj0 = 0 ;
6863 PyObject * obj1 = 0 ;
6864 std::vector< unsigned char > result;
6865
6866 if (!PyArg_ParseTuple(args,(char *)"OO:ByteVectorVector_at",&obj0,&obj1)) SWIG_fail;
6867 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6868 if (!SWIG_IsOK(res1)) {
6869 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > const *""'");
6870 }
6871 arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6872 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6873 if (!SWIG_IsOK(ecode2)) {
6874 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVectorVector_at" "', argument " "2"" of type '" "size_t""'");
6875 }
6876 arg2 = static_cast< size_t >(val2);
6877 result = ((std::vector< std::vector< unsigned char > > const *)arg1)->at(arg2);
6878 resultobj = SWIG_NewPointerObj((new std::vector< unsigned char >(static_cast< const std::vector< unsigned char >& >(result))), SWIGTYPE_p_std__vectorT_unsigned_char_t, SWIG_POINTER_OWN | 0 );
6879 return resultobj;
6880 fail:
6881 return NULL;
6882 }
6883
6884
6885 SWIGINTERN PyObject *_wrap_ByteVectorVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6886 PyObject *resultobj = 0;
6887 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6888 size_t arg2 ;
6889 void *argp1 = 0 ;
6890 int res1 = 0 ;
6891 size_t val2 ;
6892 int ecode2 = 0 ;
6893 PyObject * obj0 = 0 ;
6894 PyObject * obj1 = 0 ;
6895
6896 if (!PyArg_ParseTuple(args,(char *)"OO:ByteVectorVector_resize",&obj0,&obj1)) SWIG_fail;
6897 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6898 if (!SWIG_IsOK(res1)) {
6899 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6900 }
6901 arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6902 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
6903 if (!SWIG_IsOK(ecode2)) {
6904 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ByteVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
6905 }
6906 arg2 = static_cast< size_t >(val2);
6907 (arg1)->resize(arg2);
6908 resultobj = SWIG_Py_Void();
6909 return resultobj;
6910 fail:
6911 return NULL;
6912 }
6913
6914
6915 SWIGINTERN PyObject *_wrap_ByteVectorVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6916 PyObject *resultobj = 0;
6917 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6918 std::vector< std::vector< unsigned char > > *arg2 = 0 ;
6919 void *argp1 = 0 ;
6920 int res1 = 0 ;
6921 void *argp2 = 0 ;
6922 int res2 = 0 ;
6923 PyObject * obj0 = 0 ;
6924 PyObject * obj1 = 0 ;
6925
6926 if (!PyArg_ParseTuple(args,(char *)"OO:ByteVectorVector_swap",&obj0,&obj1)) SWIG_fail;
6927 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
6928 if (!SWIG_IsOK(res1)) {
6929 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ByteVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6930 }
6931 arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6932 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 );
6933 if (!SWIG_IsOK(res2)) {
6934 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ByteVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< unsigned char > > &""'");
6935 }
6936 if (!argp2) {
6937 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ByteVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< unsigned char > > &""'");
6938 }
6939 arg2 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp2);
6940 (arg1)->swap(*arg2);
6941 resultobj = SWIG_Py_Void();
6942 return resultobj;
6943 fail:
6944 return NULL;
6945 }
6946
6947
6948 SWIGINTERN PyObject *_wrap_delete_ByteVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6949 PyObject *resultobj = 0;
6950 std::vector< std::vector< unsigned char > > *arg1 = (std::vector< std::vector< unsigned char > > *) 0 ;
6951 void *argp1 = 0 ;
6952 int res1 = 0 ;
6953 PyObject * obj0 = 0 ;
6954
6955 if (!PyArg_ParseTuple(args,(char *)"O:delete_ByteVectorVector",&obj0)) SWIG_fail;
6956 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_POINTER_DISOWN | 0 );
6957 if (!SWIG_IsOK(res1)) {
6958 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ByteVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< unsigned char > > *""'");
6959 }
6960 arg1 = reinterpret_cast< std::vector< std::vector< unsigned char > > * >(argp1);
6961 delete arg1;
6962 resultobj = SWIG_Py_Void();
6963 return resultobj;
6964 fail:
6965 return NULL;
6966 }
6967
6968
6969 SWIGINTERN PyObject *ByteVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6970 PyObject *obj;
6971 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
6972 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, SWIG_NewClientData(obj));
6973 return SWIG_Py_Void();
6974 }
6975
6976 SWIGINTERN PyObject *_wrap_new_LongVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6977 PyObject *resultobj = 0;
6978 std::vector< std::vector< long > > *result = 0 ;
6979
6980 if (!PyArg_ParseTuple(args,(char *)":new_LongVectorVector")) SWIG_fail;
6981 result = (std::vector< std::vector< long > > *)new std::vector< std::vector< long > >();
6982 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_POINTER_NEW | 0 );
6983 return resultobj;
6984 fail:
6985 return NULL;
6986 }
6987
6988
6989 SWIGINTERN PyObject *_wrap_LongVectorVector_push_back(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
6990 PyObject *resultobj = 0;
6991 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
6992 std::vector< long > arg2 ;
6993 void *argp1 = 0 ;
6994 int res1 = 0 ;
6995 void *argp2 ;
6996 int res2 = 0 ;
6997 PyObject * obj0 = 0 ;
6998 PyObject * obj1 = 0 ;
6999
7000 if (!PyArg_ParseTuple(args,(char *)"OO:LongVectorVector_push_back",&obj0,&obj1)) SWIG_fail;
7001 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7002 if (!SWIG_IsOK(res1)) {
7003 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_push_back" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7004 }
7005 arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7006 {
7007 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_long_t, 0 | 0);
7008 if (!SWIG_IsOK(res2)) {
7009 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LongVectorVector_push_back" "', argument " "2"" of type '" "std::vector< long >""'");
7010 }
7011 if (!argp2) {
7012 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LongVectorVector_push_back" "', argument " "2"" of type '" "std::vector< long >""'");
7013 } else {
7014 std::vector< long > * temp = reinterpret_cast< std::vector< long > * >(argp2);
7015 arg2 = *temp;
7016 if (SWIG_IsNewObj(res2)) delete temp;
7017 }
7018 }
7019 (arg1)->push_back(arg2);
7020 resultobj = SWIG_Py_Void();
7021 return resultobj;
7022 fail:
7023 return NULL;
7024 }
7025
7026
7027 SWIGINTERN PyObject *_wrap_LongVectorVector_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7028 PyObject *resultobj = 0;
7029 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7030 void *argp1 = 0 ;
7031 int res1 = 0 ;
7032 PyObject * obj0 = 0 ;
7033
7034 if (!PyArg_ParseTuple(args,(char *)"O:LongVectorVector_clear",&obj0)) SWIG_fail;
7035 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7036 if (!SWIG_IsOK(res1)) {
7037 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_clear" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7038 }
7039 arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7040 (arg1)->clear();
7041 resultobj = SWIG_Py_Void();
7042 return resultobj;
7043 fail:
7044 return NULL;
7045 }
7046
7047
7048 SWIGINTERN PyObject *_wrap_LongVectorVector_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7049 PyObject *resultobj = 0;
7050 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7051 void *argp1 = 0 ;
7052 int res1 = 0 ;
7053 PyObject * obj0 = 0 ;
7054 std::vector< long > *result = 0 ;
7055
7056 if (!PyArg_ParseTuple(args,(char *)"O:LongVectorVector_data",&obj0)) SWIG_fail;
7057 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7058 if (!SWIG_IsOK(res1)) {
7059 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_data" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7060 }
7061 arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7062 result = (std::vector< long > *)(arg1)->data();
7063 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
7064 return resultobj;
7065 fail:
7066 return NULL;
7067 }
7068
7069
7070 SWIGINTERN PyObject *_wrap_LongVectorVector_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7071 PyObject *resultobj = 0;
7072 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7073 void *argp1 = 0 ;
7074 int res1 = 0 ;
7075 PyObject * obj0 = 0 ;
7076 size_t result;
7077
7078 if (!PyArg_ParseTuple(args,(char *)"O:LongVectorVector_size",&obj0)) SWIG_fail;
7079 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7080 if (!SWIG_IsOK(res1)) {
7081 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_size" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7082 }
7083 arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7084 result = (size_t)(arg1)->size();
7085 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
7086 return resultobj;
7087 fail:
7088 return NULL;
7089 }
7090
7091
7092 SWIGINTERN PyObject *_wrap_LongVectorVector_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7093 PyObject *resultobj = 0;
7094 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7095 size_t arg2 ;
7096 void *argp1 = 0 ;
7097 int res1 = 0 ;
7098 size_t val2 ;
7099 int ecode2 = 0 ;
7100 PyObject * obj0 = 0 ;
7101 PyObject * obj1 = 0 ;
7102 std::vector< long > result;
7103
7104 if (!PyArg_ParseTuple(args,(char *)"OO:LongVectorVector_at",&obj0,&obj1)) SWIG_fail;
7105 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7106 if (!SWIG_IsOK(res1)) {
7107 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_at" "', argument " "1"" of type '" "std::vector< std::vector< long > > const *""'");
7108 }
7109 arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7110 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7111 if (!SWIG_IsOK(ecode2)) {
7112 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVectorVector_at" "', argument " "2"" of type '" "size_t""'");
7113 }
7114 arg2 = static_cast< size_t >(val2);
7115 result = ((std::vector< std::vector< long > > const *)arg1)->at(arg2);
7116 resultobj = SWIG_NewPointerObj((new std::vector< long >(static_cast< const std::vector< long >& >(result))), SWIGTYPE_p_std__vectorT_long_t, SWIG_POINTER_OWN | 0 );
7117 return resultobj;
7118 fail:
7119 return NULL;
7120 }
7121
7122
7123 SWIGINTERN PyObject *_wrap_LongVectorVector_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7124 PyObject *resultobj = 0;
7125 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7126 size_t arg2 ;
7127 void *argp1 = 0 ;
7128 int res1 = 0 ;
7129 size_t val2 ;
7130 int ecode2 = 0 ;
7131 PyObject * obj0 = 0 ;
7132 PyObject * obj1 = 0 ;
7133
7134 if (!PyArg_ParseTuple(args,(char *)"OO:LongVectorVector_resize",&obj0,&obj1)) SWIG_fail;
7135 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7136 if (!SWIG_IsOK(res1)) {
7137 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_resize" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7138 }
7139 arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7140 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7141 if (!SWIG_IsOK(ecode2)) {
7142 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LongVectorVector_resize" "', argument " "2"" of type '" "size_t""'");
7143 }
7144 arg2 = static_cast< size_t >(val2);
7145 (arg1)->resize(arg2);
7146 resultobj = SWIG_Py_Void();
7147 return resultobj;
7148 fail:
7149 return NULL;
7150 }
7151
7152
7153 SWIGINTERN PyObject *_wrap_LongVectorVector_swap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7154 PyObject *resultobj = 0;
7155 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7156 std::vector< std::vector< long > > *arg2 = 0 ;
7157 void *argp1 = 0 ;
7158 int res1 = 0 ;
7159 void *argp2 = 0 ;
7160 int res2 = 0 ;
7161 PyObject * obj0 = 0 ;
7162 PyObject * obj1 = 0 ;
7163
7164 if (!PyArg_ParseTuple(args,(char *)"OO:LongVectorVector_swap",&obj0,&obj1)) SWIG_fail;
7165 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
7166 if (!SWIG_IsOK(res1)) {
7167 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LongVectorVector_swap" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7168 }
7169 arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7170 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 );
7171 if (!SWIG_IsOK(res2)) {
7172 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LongVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< long > > &""'");
7173 }
7174 if (!argp2) {
7175 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "LongVectorVector_swap" "', argument " "2"" of type '" "std::vector< std::vector< long > > &""'");
7176 }
7177 arg2 = reinterpret_cast< std::vector< std::vector< long > > * >(argp2);
7178 (arg1)->swap(*arg2);
7179 resultobj = SWIG_Py_Void();
7180 return resultobj;
7181 fail:
7182 return NULL;
7183 }
7184
7185
7186 SWIGINTERN PyObject *_wrap_delete_LongVectorVector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7187 PyObject *resultobj = 0;
7188 std::vector< std::vector< long > > *arg1 = (std::vector< std::vector< long > > *) 0 ;
7189 void *argp1 = 0 ;
7190 int res1 = 0 ;
7191 PyObject * obj0 = 0 ;
7192
7193 if (!PyArg_ParseTuple(args,(char *)"O:delete_LongVectorVector",&obj0)) SWIG_fail;
7194 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_POINTER_DISOWN | 0 );
7195 if (!SWIG_IsOK(res1)) {
7196 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LongVectorVector" "', argument " "1"" of type '" "std::vector< std::vector< long > > *""'");
7197 }
7198 arg1 = reinterpret_cast< std::vector< std::vector< long > > * >(argp1);
7199 delete arg1;
7200 resultobj = SWIG_Py_Void();
7201 return resultobj;
7202 fail:
7203 return NULL;
7204 }
7205
7206
7207 SWIGINTERN PyObject *LongVectorVector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7208 PyObject *obj;
7209 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
7210 SWIG_TypeNewClientData(SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, SWIG_NewClientData(obj));
7211 return SWIG_Py_Void();
7212 }
7213
7214 SWIGINTERN int Swig_var_hamming_batch_size_set(PyObject *_val) {
7215 {
7216 size_t val;
7217 int res = SWIG_AsVal_size_t(_val, &val);
7218 if (!SWIG_IsOK(res)) {
7219 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::hamming_batch_size""' of type '""size_t""'");
7220 }
7221 faiss::hamming_batch_size = static_cast< size_t >(val);
7222 }
7223 return 0;
7224 fail:
7225 return 1;
7226 }
7227
7228
7229 SWIGINTERN PyObject *Swig_var_hamming_batch_size_get(void) {
7230 PyObject *pyobj = 0;
7231
7232 pyobj = SWIG_From_size_t(static_cast< size_t >(faiss::hamming_batch_size));
7233 return pyobj;
7234 }
7235
7236
7237 SWIGINTERN PyObject *_wrap_popcount64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7238 PyObject *resultobj = 0;
7239 uint64_t arg1 ;
7240 unsigned long val1 ;
7241 int ecode1 = 0 ;
7242 PyObject * obj0 = 0 ;
7243 int result;
7244
7245 if (!PyArg_ParseTuple(args,(char *)"O:popcount64",&obj0)) SWIG_fail;
7246 ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
7247 if (!SWIG_IsOK(ecode1)) {
7248 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "popcount64" "', argument " "1"" of type '" "uint64_t""'");
7249 }
7250 arg1 = static_cast< uint64_t >(val1);
7251 {
7252 Py_BEGIN_ALLOW_THREADS
7253 try {
7254 result = (int)faiss::popcount64(arg1);
7255 } catch(faiss::FaissException & e) {
7256 PyEval_RestoreThread(_save);
7257 PyErr_SetString(PyExc_RuntimeError, e.what());
7258 SWIG_fail;
7259 }
7260 Py_END_ALLOW_THREADS
7261 }
7262 resultobj = SWIG_From_int(static_cast< int >(result));
7263 return resultobj;
7264 fail:
7265 return NULL;
7266 }
7267
7268
7269 SWIGINTERN PyObject *_wrap_hammings(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7270 PyObject *resultobj = 0;
7271 uint8_t *arg1 = (uint8_t *) 0 ;
7272 uint8_t *arg2 = (uint8_t *) 0 ;
7273 size_t arg3 ;
7274 size_t arg4 ;
7275 size_t arg5 ;
7276 hamdis_t *arg6 = (hamdis_t *) 0 ;
7277 void *argp1 = 0 ;
7278 int res1 = 0 ;
7279 void *argp2 = 0 ;
7280 int res2 = 0 ;
7281 size_t val3 ;
7282 int ecode3 = 0 ;
7283 size_t val4 ;
7284 int ecode4 = 0 ;
7285 size_t val5 ;
7286 int ecode5 = 0 ;
7287 void *argp6 = 0 ;
7288 int res6 = 0 ;
7289 PyObject * obj0 = 0 ;
7290 PyObject * obj1 = 0 ;
7291 PyObject * obj2 = 0 ;
7292 PyObject * obj3 = 0 ;
7293 PyObject * obj4 = 0 ;
7294 PyObject * obj5 = 0 ;
7295
7296 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:hammings",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7297 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7298 if (!SWIG_IsOK(res1)) {
7299 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hammings" "', argument " "1"" of type '" "uint8_t const *""'");
7300 }
7301 arg1 = reinterpret_cast< uint8_t * >(argp1);
7302 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7303 if (!SWIG_IsOK(res2)) {
7304 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hammings" "', argument " "2"" of type '" "uint8_t const *""'");
7305 }
7306 arg2 = reinterpret_cast< uint8_t * >(argp2);
7307 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7308 if (!SWIG_IsOK(ecode3)) {
7309 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hammings" "', argument " "3"" of type '" "size_t""'");
7310 }
7311 arg3 = static_cast< size_t >(val3);
7312 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7313 if (!SWIG_IsOK(ecode4)) {
7314 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hammings" "', argument " "4"" of type '" "size_t""'");
7315 }
7316 arg4 = static_cast< size_t >(val4);
7317 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7318 if (!SWIG_IsOK(ecode5)) {
7319 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hammings" "', argument " "5"" of type '" "size_t""'");
7320 }
7321 arg5 = static_cast< size_t >(val5);
7322 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 | 0 );
7323 if (!SWIG_IsOK(res6)) {
7324 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "hammings" "', argument " "6"" of type '" "hamdis_t *""'");
7325 }
7326 arg6 = reinterpret_cast< hamdis_t * >(argp6);
7327 {
7328 Py_BEGIN_ALLOW_THREADS
7329 try {
7330 faiss::hammings((unsigned char const *)arg1,(unsigned char const *)arg2,arg3,arg4,arg5,arg6);
7331 } catch(faiss::FaissException & e) {
7332 PyEval_RestoreThread(_save);
7333 PyErr_SetString(PyExc_RuntimeError, e.what());
7334 SWIG_fail;
7335 }
7336 Py_END_ALLOW_THREADS
7337 }
7338 resultobj = SWIG_Py_Void();
7339 return resultobj;
7340 fail:
7341 return NULL;
7342 }
7343
7344
7345 SWIGINTERN PyObject *_wrap_bitvec_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7346 PyObject *resultobj = 0;
7347 uint8_t *arg1 = (uint8_t *) 0 ;
7348 size_t arg2 ;
7349 void *argp1 = 0 ;
7350 int res1 = 0 ;
7351 size_t val2 ;
7352 int ecode2 = 0 ;
7353 PyObject * obj0 = 0 ;
7354 PyObject * obj1 = 0 ;
7355
7356 if (!PyArg_ParseTuple(args,(char *)"OO:bitvec_print",&obj0,&obj1)) SWIG_fail;
7357 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7358 if (!SWIG_IsOK(res1)) {
7359 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "bitvec_print" "', argument " "1"" of type '" "uint8_t const *""'");
7360 }
7361 arg1 = reinterpret_cast< uint8_t * >(argp1);
7362 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7363 if (!SWIG_IsOK(ecode2)) {
7364 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bitvec_print" "', argument " "2"" of type '" "size_t""'");
7365 }
7366 arg2 = static_cast< size_t >(val2);
7367 {
7368 Py_BEGIN_ALLOW_THREADS
7369 try {
7370 faiss::bitvec_print((unsigned char const *)arg1,arg2);
7371 } catch(faiss::FaissException & e) {
7372 PyEval_RestoreThread(_save);
7373 PyErr_SetString(PyExc_RuntimeError, e.what());
7374 SWIG_fail;
7375 }
7376 Py_END_ALLOW_THREADS
7377 }
7378 resultobj = SWIG_Py_Void();
7379 return resultobj;
7380 fail:
7381 return NULL;
7382 }
7383
7384
7385 SWIGINTERN PyObject *_wrap_fvecs2bitvecs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7386 PyObject *resultobj = 0;
7387 float *arg1 = (float *) 0 ;
7388 uint8_t *arg2 = (uint8_t *) 0 ;
7389 size_t arg3 ;
7390 size_t arg4 ;
7391 void *argp1 = 0 ;
7392 int res1 = 0 ;
7393 void *argp2 = 0 ;
7394 int res2 = 0 ;
7395 size_t val3 ;
7396 int ecode3 = 0 ;
7397 size_t val4 ;
7398 int ecode4 = 0 ;
7399 PyObject * obj0 = 0 ;
7400 PyObject * obj1 = 0 ;
7401 PyObject * obj2 = 0 ;
7402 PyObject * obj3 = 0 ;
7403
7404 if (!PyArg_ParseTuple(args,(char *)"OOOO:fvecs2bitvecs",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
7405 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
7406 if (!SWIG_IsOK(res1)) {
7407 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvecs2bitvecs" "', argument " "1"" of type '" "float const *""'");
7408 }
7409 arg1 = reinterpret_cast< float * >(argp1);
7410 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7411 if (!SWIG_IsOK(res2)) {
7412 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvecs2bitvecs" "', argument " "2"" of type '" "uint8_t *""'");
7413 }
7414 arg2 = reinterpret_cast< uint8_t * >(argp2);
7415 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7416 if (!SWIG_IsOK(ecode3)) {
7417 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvecs2bitvecs" "', argument " "3"" of type '" "size_t""'");
7418 }
7419 arg3 = static_cast< size_t >(val3);
7420 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7421 if (!SWIG_IsOK(ecode4)) {
7422 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvecs2bitvecs" "', argument " "4"" of type '" "size_t""'");
7423 }
7424 arg4 = static_cast< size_t >(val4);
7425 {
7426 Py_BEGIN_ALLOW_THREADS
7427 try {
7428 faiss::fvecs2bitvecs((float const *)arg1,arg2,arg3,arg4);
7429 } catch(faiss::FaissException & e) {
7430 PyEval_RestoreThread(_save);
7431 PyErr_SetString(PyExc_RuntimeError, e.what());
7432 SWIG_fail;
7433 }
7434 Py_END_ALLOW_THREADS
7435 }
7436 resultobj = SWIG_Py_Void();
7437 return resultobj;
7438 fail:
7439 return NULL;
7440 }
7441
7442
7443 SWIGINTERN PyObject *_wrap_fvec2bitvec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7444 PyObject *resultobj = 0;
7445 float *arg1 = (float *) 0 ;
7446 uint8_t *arg2 = (uint8_t *) 0 ;
7447 size_t arg3 ;
7448 void *argp1 = 0 ;
7449 int res1 = 0 ;
7450 void *argp2 = 0 ;
7451 int res2 = 0 ;
7452 size_t val3 ;
7453 int ecode3 = 0 ;
7454 PyObject * obj0 = 0 ;
7455 PyObject * obj1 = 0 ;
7456 PyObject * obj2 = 0 ;
7457
7458 if (!PyArg_ParseTuple(args,(char *)"OOO:fvec2bitvec",&obj0,&obj1,&obj2)) SWIG_fail;
7459 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
7460 if (!SWIG_IsOK(res1)) {
7461 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec2bitvec" "', argument " "1"" of type '" "float const *""'");
7462 }
7463 arg1 = reinterpret_cast< float * >(argp1);
7464 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7465 if (!SWIG_IsOK(res2)) {
7466 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec2bitvec" "', argument " "2"" of type '" "uint8_t *""'");
7467 }
7468 arg2 = reinterpret_cast< uint8_t * >(argp2);
7469 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7470 if (!SWIG_IsOK(ecode3)) {
7471 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec2bitvec" "', argument " "3"" of type '" "size_t""'");
7472 }
7473 arg3 = static_cast< size_t >(val3);
7474 {
7475 Py_BEGIN_ALLOW_THREADS
7476 try {
7477 faiss::fvec2bitvec((float const *)arg1,arg2,arg3);
7478 } catch(faiss::FaissException & e) {
7479 PyEval_RestoreThread(_save);
7480 PyErr_SetString(PyExc_RuntimeError, e.what());
7481 SWIG_fail;
7482 }
7483 Py_END_ALLOW_THREADS
7484 }
7485 resultobj = SWIG_Py_Void();
7486 return resultobj;
7487 fail:
7488 return NULL;
7489 }
7490
7491
7492 SWIGINTERN PyObject *_wrap_hammings_knn_hc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7493 PyObject *resultobj = 0;
7494 faiss::int_maxheap_array_t *arg1 = (faiss::int_maxheap_array_t *) 0 ;
7495 uint8_t *arg2 = (uint8_t *) 0 ;
7496 uint8_t *arg3 = (uint8_t *) 0 ;
7497 size_t arg4 ;
7498 size_t arg5 ;
7499 int arg6 ;
7500 void *argp1 = 0 ;
7501 int res1 = 0 ;
7502 void *argp2 = 0 ;
7503 int res2 = 0 ;
7504 void *argp3 = 0 ;
7505 int res3 = 0 ;
7506 size_t val4 ;
7507 int ecode4 = 0 ;
7508 size_t val5 ;
7509 int ecode5 = 0 ;
7510 int val6 ;
7511 int ecode6 = 0 ;
7512 PyObject * obj0 = 0 ;
7513 PyObject * obj1 = 0 ;
7514 PyObject * obj2 = 0 ;
7515 PyObject * obj3 = 0 ;
7516 PyObject * obj4 = 0 ;
7517 PyObject * obj5 = 0 ;
7518
7519 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7520 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
7521 if (!SWIG_IsOK(res1)) {
7522 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
7523 }
7524 arg1 = reinterpret_cast< faiss::int_maxheap_array_t * >(argp1);
7525 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7526 if (!SWIG_IsOK(res2)) {
7527 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
7528 }
7529 arg2 = reinterpret_cast< uint8_t * >(argp2);
7530 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
7531 if (!SWIG_IsOK(res3)) {
7532 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
7533 }
7534 arg3 = reinterpret_cast< uint8_t * >(argp3);
7535 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7536 if (!SWIG_IsOK(ecode4)) {
7537 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
7538 }
7539 arg4 = static_cast< size_t >(val4);
7540 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7541 if (!SWIG_IsOK(ecode5)) {
7542 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
7543 }
7544 arg5 = static_cast< size_t >(val5);
7545 ecode6 = SWIG_AsVal_int(obj5, &val6);
7546 if (!SWIG_IsOK(ecode6)) {
7547 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hammings_knn_hc" "', argument " "6"" of type '" "int""'");
7548 }
7549 arg6 = static_cast< int >(val6);
7550 {
7551 Py_BEGIN_ALLOW_THREADS
7552 try {
7553 faiss::hammings_knn_hc(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,arg4,arg5,arg6);
7554 } catch(faiss::FaissException & e) {
7555 PyEval_RestoreThread(_save);
7556 PyErr_SetString(PyExc_RuntimeError, e.what());
7557 SWIG_fail;
7558 }
7559 Py_END_ALLOW_THREADS
7560 }
7561 resultobj = SWIG_Py_Void();
7562 return resultobj;
7563 fail:
7564 return NULL;
7565 }
7566
7567
7568 SWIGINTERN PyObject *_wrap_hammings_knn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7569 PyObject *resultobj = 0;
7570 faiss::int_maxheap_array_t *arg1 = (faiss::int_maxheap_array_t *) 0 ;
7571 uint8_t *arg2 = (uint8_t *) 0 ;
7572 uint8_t *arg3 = (uint8_t *) 0 ;
7573 size_t arg4 ;
7574 size_t arg5 ;
7575 int arg6 ;
7576 void *argp1 = 0 ;
7577 int res1 = 0 ;
7578 void *argp2 = 0 ;
7579 int res2 = 0 ;
7580 void *argp3 = 0 ;
7581 int res3 = 0 ;
7582 size_t val4 ;
7583 int ecode4 = 0 ;
7584 size_t val5 ;
7585 int ecode5 = 0 ;
7586 int val6 ;
7587 int ecode6 = 0 ;
7588 PyObject * obj0 = 0 ;
7589 PyObject * obj1 = 0 ;
7590 PyObject * obj2 = 0 ;
7591 PyObject * obj3 = 0 ;
7592 PyObject * obj4 = 0 ;
7593 PyObject * obj5 = 0 ;
7594
7595 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:hammings_knn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
7596 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
7597 if (!SWIG_IsOK(res1)) {
7598 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hammings_knn" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
7599 }
7600 arg1 = reinterpret_cast< faiss::int_maxheap_array_t * >(argp1);
7601 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7602 if (!SWIG_IsOK(res2)) {
7603 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hammings_knn" "', argument " "2"" of type '" "uint8_t const *""'");
7604 }
7605 arg2 = reinterpret_cast< uint8_t * >(argp2);
7606 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
7607 if (!SWIG_IsOK(res3)) {
7608 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "hammings_knn" "', argument " "3"" of type '" "uint8_t const *""'");
7609 }
7610 arg3 = reinterpret_cast< uint8_t * >(argp3);
7611 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7612 if (!SWIG_IsOK(ecode4)) {
7613 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hammings_knn" "', argument " "4"" of type '" "size_t""'");
7614 }
7615 arg4 = static_cast< size_t >(val4);
7616 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7617 if (!SWIG_IsOK(ecode5)) {
7618 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hammings_knn" "', argument " "5"" of type '" "size_t""'");
7619 }
7620 arg5 = static_cast< size_t >(val5);
7621 ecode6 = SWIG_AsVal_int(obj5, &val6);
7622 if (!SWIG_IsOK(ecode6)) {
7623 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hammings_knn" "', argument " "6"" of type '" "int""'");
7624 }
7625 arg6 = static_cast< int >(val6);
7626 {
7627 Py_BEGIN_ALLOW_THREADS
7628 try {
7629 faiss::hammings_knn(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,arg4,arg5,arg6);
7630 } catch(faiss::FaissException & e) {
7631 PyEval_RestoreThread(_save);
7632 PyErr_SetString(PyExc_RuntimeError, e.what());
7633 SWIG_fail;
7634 }
7635 Py_END_ALLOW_THREADS
7636 }
7637 resultobj = SWIG_Py_Void();
7638 return resultobj;
7639 fail:
7640 return NULL;
7641 }
7642
7643
7644 SWIGINTERN PyObject *_wrap_hammings_knn_mc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7645 PyObject *resultobj = 0;
7646 uint8_t *arg1 = (uint8_t *) 0 ;
7647 uint8_t *arg2 = (uint8_t *) 0 ;
7648 size_t arg3 ;
7649 size_t arg4 ;
7650 size_t arg5 ;
7651 size_t arg6 ;
7652 int32_t *arg7 = (int32_t *) 0 ;
7653 long *arg8 = (long *) 0 ;
7654 void *argp1 = 0 ;
7655 int res1 = 0 ;
7656 void *argp2 = 0 ;
7657 int res2 = 0 ;
7658 size_t val3 ;
7659 int ecode3 = 0 ;
7660 size_t val4 ;
7661 int ecode4 = 0 ;
7662 size_t val5 ;
7663 int ecode5 = 0 ;
7664 size_t val6 ;
7665 int ecode6 = 0 ;
7666 void *argp7 = 0 ;
7667 int res7 = 0 ;
7668 void *argp8 = 0 ;
7669 int res8 = 0 ;
7670 PyObject * obj0 = 0 ;
7671 PyObject * obj1 = 0 ;
7672 PyObject * obj2 = 0 ;
7673 PyObject * obj3 = 0 ;
7674 PyObject * obj4 = 0 ;
7675 PyObject * obj5 = 0 ;
7676 PyObject * obj6 = 0 ;
7677 PyObject * obj7 = 0 ;
7678
7679 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:hammings_knn_mc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7680 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7681 if (!SWIG_IsOK(res1)) {
7682 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hammings_knn_mc" "', argument " "1"" of type '" "uint8_t const *""'");
7683 }
7684 arg1 = reinterpret_cast< uint8_t * >(argp1);
7685 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7686 if (!SWIG_IsOK(res2)) {
7687 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hammings_knn_mc" "', argument " "2"" of type '" "uint8_t const *""'");
7688 }
7689 arg2 = reinterpret_cast< uint8_t * >(argp2);
7690 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7691 if (!SWIG_IsOK(ecode3)) {
7692 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hammings_knn_mc" "', argument " "3"" of type '" "size_t""'");
7693 }
7694 arg3 = static_cast< size_t >(val3);
7695 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7696 if (!SWIG_IsOK(ecode4)) {
7697 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hammings_knn_mc" "', argument " "4"" of type '" "size_t""'");
7698 }
7699 arg4 = static_cast< size_t >(val4);
7700 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
7701 if (!SWIG_IsOK(ecode5)) {
7702 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hammings_knn_mc" "', argument " "5"" of type '" "size_t""'");
7703 }
7704 arg5 = static_cast< size_t >(val5);
7705 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
7706 if (!SWIG_IsOK(ecode6)) {
7707 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hammings_knn_mc" "', argument " "6"" of type '" "size_t""'");
7708 }
7709 arg6 = static_cast< size_t >(val6);
7710 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 | 0 );
7711 if (!SWIG_IsOK(res7)) {
7712 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "hammings_knn_mc" "', argument " "7"" of type '" "int32_t *""'");
7713 }
7714 arg7 = reinterpret_cast< int32_t * >(argp7);
7715 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
7716 if (!SWIG_IsOK(res8)) {
7717 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "hammings_knn_mc" "', argument " "8"" of type '" "long *""'");
7718 }
7719 arg8 = reinterpret_cast< long * >(argp8);
7720 {
7721 Py_BEGIN_ALLOW_THREADS
7722 try {
7723 faiss::hammings_knn_mc((unsigned char const *)arg1,(unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7724 } catch(faiss::FaissException & e) {
7725 PyEval_RestoreThread(_save);
7726 PyErr_SetString(PyExc_RuntimeError, e.what());
7727 SWIG_fail;
7728 }
7729 Py_END_ALLOW_THREADS
7730 }
7731 resultobj = SWIG_Py_Void();
7732 return resultobj;
7733 fail:
7734 return NULL;
7735 }
7736
7737
7738 SWIGINTERN PyObject *_wrap_hamming_count_thres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7739 PyObject *resultobj = 0;
7740 uint8_t *arg1 = (uint8_t *) 0 ;
7741 uint8_t *arg2 = (uint8_t *) 0 ;
7742 size_t arg3 ;
7743 size_t arg4 ;
7744 hamdis_t arg5 ;
7745 size_t arg6 ;
7746 size_t *arg7 = (size_t *) 0 ;
7747 void *argp1 = 0 ;
7748 int res1 = 0 ;
7749 void *argp2 = 0 ;
7750 int res2 = 0 ;
7751 size_t val3 ;
7752 int ecode3 = 0 ;
7753 size_t val4 ;
7754 int ecode4 = 0 ;
7755 int val5 ;
7756 int ecode5 = 0 ;
7757 size_t val6 ;
7758 int ecode6 = 0 ;
7759 void *argp7 = 0 ;
7760 int res7 = 0 ;
7761 PyObject * obj0 = 0 ;
7762 PyObject * obj1 = 0 ;
7763 PyObject * obj2 = 0 ;
7764 PyObject * obj3 = 0 ;
7765 PyObject * obj4 = 0 ;
7766 PyObject * obj5 = 0 ;
7767 PyObject * obj6 = 0 ;
7768
7769 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:hamming_count_thres",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
7770 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7771 if (!SWIG_IsOK(res1)) {
7772 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "hamming_count_thres" "', argument " "1"" of type '" "uint8_t const *""'");
7773 }
7774 arg1 = reinterpret_cast< uint8_t * >(argp1);
7775 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7776 if (!SWIG_IsOK(res2)) {
7777 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "hamming_count_thres" "', argument " "2"" of type '" "uint8_t const *""'");
7778 }
7779 arg2 = reinterpret_cast< uint8_t * >(argp2);
7780 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7781 if (!SWIG_IsOK(ecode3)) {
7782 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hamming_count_thres" "', argument " "3"" of type '" "size_t""'");
7783 }
7784 arg3 = static_cast< size_t >(val3);
7785 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7786 if (!SWIG_IsOK(ecode4)) {
7787 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "hamming_count_thres" "', argument " "4"" of type '" "size_t""'");
7788 }
7789 arg4 = static_cast< size_t >(val4);
7790 ecode5 = SWIG_AsVal_int(obj4, &val5);
7791 if (!SWIG_IsOK(ecode5)) {
7792 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "hamming_count_thres" "', argument " "5"" of type '" "hamdis_t""'");
7793 }
7794 arg5 = static_cast< hamdis_t >(val5);
7795 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
7796 if (!SWIG_IsOK(ecode6)) {
7797 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "hamming_count_thres" "', argument " "6"" of type '" "size_t""'");
7798 }
7799 arg6 = static_cast< size_t >(val6);
7800 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_unsigned_long, 0 | 0 );
7801 if (!SWIG_IsOK(res7)) {
7802 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "hamming_count_thres" "', argument " "7"" of type '" "size_t *""'");
7803 }
7804 arg7 = reinterpret_cast< size_t * >(argp7);
7805 {
7806 Py_BEGIN_ALLOW_THREADS
7807 try {
7808 faiss::hamming_count_thres((unsigned char const *)arg1,(unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7);
7809 } catch(faiss::FaissException & e) {
7810 PyEval_RestoreThread(_save);
7811 PyErr_SetString(PyExc_RuntimeError, e.what());
7812 SWIG_fail;
7813 }
7814 Py_END_ALLOW_THREADS
7815 }
7816 resultobj = SWIG_Py_Void();
7817 return resultobj;
7818 fail:
7819 return NULL;
7820 }
7821
7822
7823 SWIGINTERN PyObject *_wrap_match_hamming_thres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7824 PyObject *resultobj = 0;
7825 uint8_t *arg1 = (uint8_t *) 0 ;
7826 uint8_t *arg2 = (uint8_t *) 0 ;
7827 size_t arg3 ;
7828 size_t arg4 ;
7829 hamdis_t arg5 ;
7830 size_t arg6 ;
7831 long *arg7 = (long *) 0 ;
7832 hamdis_t *arg8 = (hamdis_t *) 0 ;
7833 void *argp1 = 0 ;
7834 int res1 = 0 ;
7835 void *argp2 = 0 ;
7836 int res2 = 0 ;
7837 size_t val3 ;
7838 int ecode3 = 0 ;
7839 size_t val4 ;
7840 int ecode4 = 0 ;
7841 int val5 ;
7842 int ecode5 = 0 ;
7843 size_t val6 ;
7844 int ecode6 = 0 ;
7845 void *argp7 = 0 ;
7846 int res7 = 0 ;
7847 void *argp8 = 0 ;
7848 int res8 = 0 ;
7849 PyObject * obj0 = 0 ;
7850 PyObject * obj1 = 0 ;
7851 PyObject * obj2 = 0 ;
7852 PyObject * obj3 = 0 ;
7853 PyObject * obj4 = 0 ;
7854 PyObject * obj5 = 0 ;
7855 PyObject * obj6 = 0 ;
7856 PyObject * obj7 = 0 ;
7857 size_t result;
7858
7859 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:match_hamming_thres",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
7860 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7861 if (!SWIG_IsOK(res1)) {
7862 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "match_hamming_thres" "', argument " "1"" of type '" "uint8_t const *""'");
7863 }
7864 arg1 = reinterpret_cast< uint8_t * >(argp1);
7865 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
7866 if (!SWIG_IsOK(res2)) {
7867 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "match_hamming_thres" "', argument " "2"" of type '" "uint8_t const *""'");
7868 }
7869 arg2 = reinterpret_cast< uint8_t * >(argp2);
7870 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
7871 if (!SWIG_IsOK(ecode3)) {
7872 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "match_hamming_thres" "', argument " "3"" of type '" "size_t""'");
7873 }
7874 arg3 = static_cast< size_t >(val3);
7875 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7876 if (!SWIG_IsOK(ecode4)) {
7877 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "match_hamming_thres" "', argument " "4"" of type '" "size_t""'");
7878 }
7879 arg4 = static_cast< size_t >(val4);
7880 ecode5 = SWIG_AsVal_int(obj4, &val5);
7881 if (!SWIG_IsOK(ecode5)) {
7882 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "match_hamming_thres" "', argument " "5"" of type '" "hamdis_t""'");
7883 }
7884 arg5 = static_cast< hamdis_t >(val5);
7885 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
7886 if (!SWIG_IsOK(ecode6)) {
7887 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "match_hamming_thres" "', argument " "6"" of type '" "size_t""'");
7888 }
7889 arg6 = static_cast< size_t >(val6);
7890 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_long, 0 | 0 );
7891 if (!SWIG_IsOK(res7)) {
7892 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "match_hamming_thres" "', argument " "7"" of type '" "long *""'");
7893 }
7894 arg7 = reinterpret_cast< long * >(argp7);
7895 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_int, 0 | 0 );
7896 if (!SWIG_IsOK(res8)) {
7897 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "match_hamming_thres" "', argument " "8"" of type '" "hamdis_t *""'");
7898 }
7899 arg8 = reinterpret_cast< hamdis_t * >(argp8);
7900 {
7901 Py_BEGIN_ALLOW_THREADS
7902 try {
7903 result = (size_t)faiss::match_hamming_thres((unsigned char const *)arg1,(unsigned char const *)arg2,arg3,arg4,arg5,arg6,arg7,arg8);
7904 } catch(faiss::FaissException & e) {
7905 PyEval_RestoreThread(_save);
7906 PyErr_SetString(PyExc_RuntimeError, e.what());
7907 SWIG_fail;
7908 }
7909 Py_END_ALLOW_THREADS
7910 }
7911 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
7912 return resultobj;
7913 fail:
7914 return NULL;
7915 }
7916
7917
7918 SWIGINTERN PyObject *_wrap_crosshamming_count_thres(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7919 PyObject *resultobj = 0;
7920 uint8_t *arg1 = (uint8_t *) 0 ;
7921 size_t arg2 ;
7922 hamdis_t arg3 ;
7923 size_t arg4 ;
7924 size_t *arg5 = (size_t *) 0 ;
7925 void *argp1 = 0 ;
7926 int res1 = 0 ;
7927 size_t val2 ;
7928 int ecode2 = 0 ;
7929 int val3 ;
7930 int ecode3 = 0 ;
7931 size_t val4 ;
7932 int ecode4 = 0 ;
7933 void *argp5 = 0 ;
7934 int res5 = 0 ;
7935 PyObject * obj0 = 0 ;
7936 PyObject * obj1 = 0 ;
7937 PyObject * obj2 = 0 ;
7938 PyObject * obj3 = 0 ;
7939 PyObject * obj4 = 0 ;
7940
7941 if (!PyArg_ParseTuple(args,(char *)"OOOOO:crosshamming_count_thres",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
7942 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
7943 if (!SWIG_IsOK(res1)) {
7944 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "crosshamming_count_thres" "', argument " "1"" of type '" "uint8_t const *""'");
7945 }
7946 arg1 = reinterpret_cast< uint8_t * >(argp1);
7947 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
7948 if (!SWIG_IsOK(ecode2)) {
7949 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "crosshamming_count_thres" "', argument " "2"" of type '" "size_t""'");
7950 }
7951 arg2 = static_cast< size_t >(val2);
7952 ecode3 = SWIG_AsVal_int(obj2, &val3);
7953 if (!SWIG_IsOK(ecode3)) {
7954 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "crosshamming_count_thres" "', argument " "3"" of type '" "hamdis_t""'");
7955 }
7956 arg3 = static_cast< hamdis_t >(val3);
7957 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
7958 if (!SWIG_IsOK(ecode4)) {
7959 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "crosshamming_count_thres" "', argument " "4"" of type '" "size_t""'");
7960 }
7961 arg4 = static_cast< size_t >(val4);
7962 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_long, 0 | 0 );
7963 if (!SWIG_IsOK(res5)) {
7964 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "crosshamming_count_thres" "', argument " "5"" of type '" "size_t *""'");
7965 }
7966 arg5 = reinterpret_cast< size_t * >(argp5);
7967 {
7968 Py_BEGIN_ALLOW_THREADS
7969 try {
7970 faiss::crosshamming_count_thres((unsigned char const *)arg1,arg2,arg3,arg4,arg5);
7971 } catch(faiss::FaissException & e) {
7972 PyEval_RestoreThread(_save);
7973 PyErr_SetString(PyExc_RuntimeError, e.what());
7974 SWIG_fail;
7975 }
7976 Py_END_ALLOW_THREADS
7977 }
7978 resultobj = SWIG_Py_Void();
7979 return resultobj;
7980 fail:
7981 return NULL;
7982 }
7983
7984
7985 SWIGINTERN PyObject *_wrap_HammingComputer4_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
7986 PyObject *resultobj = 0;
7987 faiss::HammingComputer4 *arg1 = (faiss::HammingComputer4 *) 0 ;
7988 uint32_t arg2 ;
7989 void *argp1 = 0 ;
7990 int res1 = 0 ;
7991 void *argp2 ;
7992 int res2 = 0 ;
7993 PyObject * obj0 = 0 ;
7994 PyObject * obj1 = 0 ;
7995
7996 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer4_a0_set",&obj0,&obj1)) SWIG_fail;
7997 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
7998 if (!SWIG_IsOK(res1)) {
7999 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer4_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8000 }
8001 arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8002 {
8003 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_uint32_t, 0 | 0);
8004 if (!SWIG_IsOK(res2)) {
8005 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer4_a0_set" "', argument " "2"" of type '" "uint32_t""'");
8006 }
8007 if (!argp2) {
8008 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HammingComputer4_a0_set" "', argument " "2"" of type '" "uint32_t""'");
8009 } else {
8010 uint32_t * temp = reinterpret_cast< uint32_t * >(argp2);
8011 arg2 = *temp;
8012 if (SWIG_IsNewObj(res2)) delete temp;
8013 }
8014 }
8015 if (arg1) (arg1)->a0 = arg2;
8016 resultobj = SWIG_Py_Void();
8017 return resultobj;
8018 fail:
8019 return NULL;
8020 }
8021
8022
8023 SWIGINTERN PyObject *_wrap_HammingComputer4_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8024 PyObject *resultobj = 0;
8025 faiss::HammingComputer4 *arg1 = (faiss::HammingComputer4 *) 0 ;
8026 void *argp1 = 0 ;
8027 int res1 = 0 ;
8028 PyObject * obj0 = 0 ;
8029 uint32_t result;
8030
8031 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer4_a0_get",&obj0)) SWIG_fail;
8032 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8033 if (!SWIG_IsOK(res1)) {
8034 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer4_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8035 }
8036 arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8037 result = ((arg1)->a0);
8038 resultobj = SWIG_NewPointerObj((new uint32_t(static_cast< const uint32_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 );
8039 return resultobj;
8040 fail:
8041 return NULL;
8042 }
8043
8044
8045 SWIGINTERN PyObject *_wrap_new_HammingComputer4__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8046 PyObject *resultobj = 0;
8047 faiss::HammingComputer4 *result = 0 ;
8048
8049 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer4")) SWIG_fail;
8050 {
8051 Py_BEGIN_ALLOW_THREADS
8052 try {
8053 result = (faiss::HammingComputer4 *)new faiss::HammingComputer4();
8054 } catch(faiss::FaissException & e) {
8055 PyEval_RestoreThread(_save);
8056 PyErr_SetString(PyExc_RuntimeError, e.what());
8057 SWIG_fail;
8058 }
8059 Py_END_ALLOW_THREADS
8060 }
8061 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_NEW | 0 );
8062 return resultobj;
8063 fail:
8064 return NULL;
8065 }
8066
8067
8068 SWIGINTERN PyObject *_wrap_new_HammingComputer4__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8069 PyObject *resultobj = 0;
8070 uint8_t *arg1 = (uint8_t *) 0 ;
8071 int arg2 ;
8072 void *argp1 = 0 ;
8073 int res1 = 0 ;
8074 int val2 ;
8075 int ecode2 = 0 ;
8076 PyObject * obj0 = 0 ;
8077 PyObject * obj1 = 0 ;
8078 faiss::HammingComputer4 *result = 0 ;
8079
8080 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer4",&obj0,&obj1)) SWIG_fail;
8081 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8082 if (!SWIG_IsOK(res1)) {
8083 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer4" "', argument " "1"" of type '" "uint8_t const *""'");
8084 }
8085 arg1 = reinterpret_cast< uint8_t * >(argp1);
8086 ecode2 = SWIG_AsVal_int(obj1, &val2);
8087 if (!SWIG_IsOK(ecode2)) {
8088 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer4" "', argument " "2"" of type '" "int""'");
8089 }
8090 arg2 = static_cast< int >(val2);
8091 {
8092 Py_BEGIN_ALLOW_THREADS
8093 try {
8094 result = (faiss::HammingComputer4 *)new faiss::HammingComputer4((uint8_t const *)arg1,arg2);
8095 } catch(faiss::FaissException & e) {
8096 PyEval_RestoreThread(_save);
8097 PyErr_SetString(PyExc_RuntimeError, e.what());
8098 SWIG_fail;
8099 }
8100 Py_END_ALLOW_THREADS
8101 }
8102 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_NEW | 0 );
8103 return resultobj;
8104 fail:
8105 return NULL;
8106 }
8107
8108
8109 SWIGINTERN PyObject *_wrap_new_HammingComputer4(PyObject *self, PyObject *args) {
8110 Py_ssize_t argc;
8111 PyObject *argv[3] = {
8112 0
8113 };
8114 Py_ssize_t ii;
8115
8116 if (!PyTuple_Check(args)) SWIG_fail;
8117 argc = args ? PyObject_Length(args) : 0;
8118 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
8119 argv[ii] = PyTuple_GET_ITEM(args,ii);
8120 }
8121 if (argc == 0) {
8122 return _wrap_new_HammingComputer4__SWIG_0(self, args);
8123 }
8124 if (argc == 2) {
8125 int _v;
8126 void *vptr = 0;
8127 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
8128 _v = SWIG_CheckState(res);
8129 if (_v) {
8130 {
8131 int res = SWIG_AsVal_int(argv[1], NULL);
8132 _v = SWIG_CheckState(res);
8133 }
8134 if (_v) {
8135 return _wrap_new_HammingComputer4__SWIG_1(self, args);
8136 }
8137 }
8138 }
8139
8140 fail:
8141 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer4'.\n"
8142 " Possible C/C++ prototypes are:\n"
8143 " faiss::HammingComputer4::HammingComputer4()\n"
8144 " faiss::HammingComputer4::HammingComputer4(uint8_t const *,int)\n");
8145 return 0;
8146 }
8147
8148
8149 SWIGINTERN PyObject *_wrap_HammingComputer4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8150 PyObject *resultobj = 0;
8151 faiss::HammingComputer4 *arg1 = (faiss::HammingComputer4 *) 0 ;
8152 uint8_t *arg2 = (uint8_t *) 0 ;
8153 int arg3 ;
8154 void *argp1 = 0 ;
8155 int res1 = 0 ;
8156 void *argp2 = 0 ;
8157 int res2 = 0 ;
8158 int val3 ;
8159 int ecode3 = 0 ;
8160 PyObject * obj0 = 0 ;
8161 PyObject * obj1 = 0 ;
8162 PyObject * obj2 = 0 ;
8163
8164 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer4_set",&obj0,&obj1,&obj2)) SWIG_fail;
8165 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8166 if (!SWIG_IsOK(res1)) {
8167 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer4_set" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8168 }
8169 arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8170 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8171 if (!SWIG_IsOK(res2)) {
8172 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer4_set" "', argument " "2"" of type '" "uint8_t const *""'");
8173 }
8174 arg2 = reinterpret_cast< uint8_t * >(argp2);
8175 ecode3 = SWIG_AsVal_int(obj2, &val3);
8176 if (!SWIG_IsOK(ecode3)) {
8177 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer4_set" "', argument " "3"" of type '" "int""'");
8178 }
8179 arg3 = static_cast< int >(val3);
8180 {
8181 Py_BEGIN_ALLOW_THREADS
8182 try {
8183 (arg1)->set((uint8_t const *)arg2,arg3);
8184 } catch(faiss::FaissException & e) {
8185 PyEval_RestoreThread(_save);
8186 PyErr_SetString(PyExc_RuntimeError, e.what());
8187 SWIG_fail;
8188 }
8189 Py_END_ALLOW_THREADS
8190 }
8191 resultobj = SWIG_Py_Void();
8192 return resultobj;
8193 fail:
8194 return NULL;
8195 }
8196
8197
8198 SWIGINTERN PyObject *_wrap_HammingComputer4_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8199 PyObject *resultobj = 0;
8200 faiss::HammingComputer4 *arg1 = (faiss::HammingComputer4 *) 0 ;
8201 uint8_t *arg2 = (uint8_t *) 0 ;
8202 void *argp1 = 0 ;
8203 int res1 = 0 ;
8204 void *argp2 = 0 ;
8205 int res2 = 0 ;
8206 PyObject * obj0 = 0 ;
8207 PyObject * obj1 = 0 ;
8208 int result;
8209
8210 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer4_hamming",&obj0,&obj1)) SWIG_fail;
8211 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, 0 | 0 );
8212 if (!SWIG_IsOK(res1)) {
8213 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer4_hamming" "', argument " "1"" of type '" "faiss::HammingComputer4 const *""'");
8214 }
8215 arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8216 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8217 if (!SWIG_IsOK(res2)) {
8218 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer4_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
8219 }
8220 arg2 = reinterpret_cast< uint8_t * >(argp2);
8221 {
8222 Py_BEGIN_ALLOW_THREADS
8223 try {
8224 result = (int)((faiss::HammingComputer4 const *)arg1)->hamming((uint8_t const *)arg2);
8225 } catch(faiss::FaissException & e) {
8226 PyEval_RestoreThread(_save);
8227 PyErr_SetString(PyExc_RuntimeError, e.what());
8228 SWIG_fail;
8229 }
8230 Py_END_ALLOW_THREADS
8231 }
8232 resultobj = SWIG_From_int(static_cast< int >(result));
8233 return resultobj;
8234 fail:
8235 return NULL;
8236 }
8237
8238
8239 SWIGINTERN PyObject *_wrap_delete_HammingComputer4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8240 PyObject *resultobj = 0;
8241 faiss::HammingComputer4 *arg1 = (faiss::HammingComputer4 *) 0 ;
8242 void *argp1 = 0 ;
8243 int res1 = 0 ;
8244 PyObject * obj0 = 0 ;
8245
8246 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer4",&obj0)) SWIG_fail;
8247 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer4, SWIG_POINTER_DISOWN | 0 );
8248 if (!SWIG_IsOK(res1)) {
8249 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer4" "', argument " "1"" of type '" "faiss::HammingComputer4 *""'");
8250 }
8251 arg1 = reinterpret_cast< faiss::HammingComputer4 * >(argp1);
8252 delete arg1;
8253 resultobj = SWIG_Py_Void();
8254 return resultobj;
8255 fail:
8256 return NULL;
8257 }
8258
8259
8260 SWIGINTERN PyObject *HammingComputer4_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8261 PyObject *obj;
8262 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
8263 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer4, SWIG_NewClientData(obj));
8264 return SWIG_Py_Void();
8265 }
8266
8267 SWIGINTERN PyObject *_wrap_HammingComputer8_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8268 PyObject *resultobj = 0;
8269 faiss::HammingComputer8 *arg1 = (faiss::HammingComputer8 *) 0 ;
8270 uint64_t arg2 ;
8271 void *argp1 = 0 ;
8272 int res1 = 0 ;
8273 unsigned long val2 ;
8274 int ecode2 = 0 ;
8275 PyObject * obj0 = 0 ;
8276 PyObject * obj1 = 0 ;
8277
8278 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer8_a0_set",&obj0,&obj1)) SWIG_fail;
8279 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8280 if (!SWIG_IsOK(res1)) {
8281 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer8_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8282 }
8283 arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8284 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8285 if (!SWIG_IsOK(ecode2)) {
8286 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer8_a0_set" "', argument " "2"" of type '" "uint64_t""'");
8287 }
8288 arg2 = static_cast< uint64_t >(val2);
8289 if (arg1) (arg1)->a0 = arg2;
8290 resultobj = SWIG_Py_Void();
8291 return resultobj;
8292 fail:
8293 return NULL;
8294 }
8295
8296
8297 SWIGINTERN PyObject *_wrap_HammingComputer8_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8298 PyObject *resultobj = 0;
8299 faiss::HammingComputer8 *arg1 = (faiss::HammingComputer8 *) 0 ;
8300 void *argp1 = 0 ;
8301 int res1 = 0 ;
8302 PyObject * obj0 = 0 ;
8303 uint64_t result;
8304
8305 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer8_a0_get",&obj0)) SWIG_fail;
8306 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8307 if (!SWIG_IsOK(res1)) {
8308 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer8_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8309 }
8310 arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8311 result = (uint64_t) ((arg1)->a0);
8312 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8313 return resultobj;
8314 fail:
8315 return NULL;
8316 }
8317
8318
8319 SWIGINTERN PyObject *_wrap_new_HammingComputer8__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8320 PyObject *resultobj = 0;
8321 faiss::HammingComputer8 *result = 0 ;
8322
8323 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer8")) SWIG_fail;
8324 {
8325 Py_BEGIN_ALLOW_THREADS
8326 try {
8327 result = (faiss::HammingComputer8 *)new faiss::HammingComputer8();
8328 } catch(faiss::FaissException & e) {
8329 PyEval_RestoreThread(_save);
8330 PyErr_SetString(PyExc_RuntimeError, e.what());
8331 SWIG_fail;
8332 }
8333 Py_END_ALLOW_THREADS
8334 }
8335 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_NEW | 0 );
8336 return resultobj;
8337 fail:
8338 return NULL;
8339 }
8340
8341
8342 SWIGINTERN PyObject *_wrap_new_HammingComputer8__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8343 PyObject *resultobj = 0;
8344 uint8_t *arg1 = (uint8_t *) 0 ;
8345 int arg2 ;
8346 void *argp1 = 0 ;
8347 int res1 = 0 ;
8348 int val2 ;
8349 int ecode2 = 0 ;
8350 PyObject * obj0 = 0 ;
8351 PyObject * obj1 = 0 ;
8352 faiss::HammingComputer8 *result = 0 ;
8353
8354 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer8",&obj0,&obj1)) SWIG_fail;
8355 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8356 if (!SWIG_IsOK(res1)) {
8357 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer8" "', argument " "1"" of type '" "uint8_t const *""'");
8358 }
8359 arg1 = reinterpret_cast< uint8_t * >(argp1);
8360 ecode2 = SWIG_AsVal_int(obj1, &val2);
8361 if (!SWIG_IsOK(ecode2)) {
8362 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer8" "', argument " "2"" of type '" "int""'");
8363 }
8364 arg2 = static_cast< int >(val2);
8365 {
8366 Py_BEGIN_ALLOW_THREADS
8367 try {
8368 result = (faiss::HammingComputer8 *)new faiss::HammingComputer8((uint8_t const *)arg1,arg2);
8369 } catch(faiss::FaissException & e) {
8370 PyEval_RestoreThread(_save);
8371 PyErr_SetString(PyExc_RuntimeError, e.what());
8372 SWIG_fail;
8373 }
8374 Py_END_ALLOW_THREADS
8375 }
8376 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_NEW | 0 );
8377 return resultobj;
8378 fail:
8379 return NULL;
8380 }
8381
8382
8383 SWIGINTERN PyObject *_wrap_new_HammingComputer8(PyObject *self, PyObject *args) {
8384 Py_ssize_t argc;
8385 PyObject *argv[3] = {
8386 0
8387 };
8388 Py_ssize_t ii;
8389
8390 if (!PyTuple_Check(args)) SWIG_fail;
8391 argc = args ? PyObject_Length(args) : 0;
8392 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
8393 argv[ii] = PyTuple_GET_ITEM(args,ii);
8394 }
8395 if (argc == 0) {
8396 return _wrap_new_HammingComputer8__SWIG_0(self, args);
8397 }
8398 if (argc == 2) {
8399 int _v;
8400 void *vptr = 0;
8401 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
8402 _v = SWIG_CheckState(res);
8403 if (_v) {
8404 {
8405 int res = SWIG_AsVal_int(argv[1], NULL);
8406 _v = SWIG_CheckState(res);
8407 }
8408 if (_v) {
8409 return _wrap_new_HammingComputer8__SWIG_1(self, args);
8410 }
8411 }
8412 }
8413
8414 fail:
8415 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer8'.\n"
8416 " Possible C/C++ prototypes are:\n"
8417 " faiss::HammingComputer8::HammingComputer8()\n"
8418 " faiss::HammingComputer8::HammingComputer8(uint8_t const *,int)\n");
8419 return 0;
8420 }
8421
8422
8423 SWIGINTERN PyObject *_wrap_HammingComputer8_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8424 PyObject *resultobj = 0;
8425 faiss::HammingComputer8 *arg1 = (faiss::HammingComputer8 *) 0 ;
8426 uint8_t *arg2 = (uint8_t *) 0 ;
8427 int arg3 ;
8428 void *argp1 = 0 ;
8429 int res1 = 0 ;
8430 void *argp2 = 0 ;
8431 int res2 = 0 ;
8432 int val3 ;
8433 int ecode3 = 0 ;
8434 PyObject * obj0 = 0 ;
8435 PyObject * obj1 = 0 ;
8436 PyObject * obj2 = 0 ;
8437
8438 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer8_set",&obj0,&obj1,&obj2)) SWIG_fail;
8439 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8440 if (!SWIG_IsOK(res1)) {
8441 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer8_set" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8442 }
8443 arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8444 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8445 if (!SWIG_IsOK(res2)) {
8446 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer8_set" "', argument " "2"" of type '" "uint8_t const *""'");
8447 }
8448 arg2 = reinterpret_cast< uint8_t * >(argp2);
8449 ecode3 = SWIG_AsVal_int(obj2, &val3);
8450 if (!SWIG_IsOK(ecode3)) {
8451 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer8_set" "', argument " "3"" of type '" "int""'");
8452 }
8453 arg3 = static_cast< int >(val3);
8454 {
8455 Py_BEGIN_ALLOW_THREADS
8456 try {
8457 (arg1)->set((uint8_t const *)arg2,arg3);
8458 } catch(faiss::FaissException & e) {
8459 PyEval_RestoreThread(_save);
8460 PyErr_SetString(PyExc_RuntimeError, e.what());
8461 SWIG_fail;
8462 }
8463 Py_END_ALLOW_THREADS
8464 }
8465 resultobj = SWIG_Py_Void();
8466 return resultobj;
8467 fail:
8468 return NULL;
8469 }
8470
8471
8472 SWIGINTERN PyObject *_wrap_HammingComputer8_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8473 PyObject *resultobj = 0;
8474 faiss::HammingComputer8 *arg1 = (faiss::HammingComputer8 *) 0 ;
8475 uint8_t *arg2 = (uint8_t *) 0 ;
8476 void *argp1 = 0 ;
8477 int res1 = 0 ;
8478 void *argp2 = 0 ;
8479 int res2 = 0 ;
8480 PyObject * obj0 = 0 ;
8481 PyObject * obj1 = 0 ;
8482 int result;
8483
8484 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer8_hamming",&obj0,&obj1)) SWIG_fail;
8485 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, 0 | 0 );
8486 if (!SWIG_IsOK(res1)) {
8487 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer8_hamming" "', argument " "1"" of type '" "faiss::HammingComputer8 const *""'");
8488 }
8489 arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8490 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8491 if (!SWIG_IsOK(res2)) {
8492 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
8493 }
8494 arg2 = reinterpret_cast< uint8_t * >(argp2);
8495 {
8496 Py_BEGIN_ALLOW_THREADS
8497 try {
8498 result = (int)((faiss::HammingComputer8 const *)arg1)->hamming((uint8_t const *)arg2);
8499 } catch(faiss::FaissException & e) {
8500 PyEval_RestoreThread(_save);
8501 PyErr_SetString(PyExc_RuntimeError, e.what());
8502 SWIG_fail;
8503 }
8504 Py_END_ALLOW_THREADS
8505 }
8506 resultobj = SWIG_From_int(static_cast< int >(result));
8507 return resultobj;
8508 fail:
8509 return NULL;
8510 }
8511
8512
8513 SWIGINTERN PyObject *_wrap_delete_HammingComputer8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8514 PyObject *resultobj = 0;
8515 faiss::HammingComputer8 *arg1 = (faiss::HammingComputer8 *) 0 ;
8516 void *argp1 = 0 ;
8517 int res1 = 0 ;
8518 PyObject * obj0 = 0 ;
8519
8520 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer8",&obj0)) SWIG_fail;
8521 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer8, SWIG_POINTER_DISOWN | 0 );
8522 if (!SWIG_IsOK(res1)) {
8523 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer8" "', argument " "1"" of type '" "faiss::HammingComputer8 *""'");
8524 }
8525 arg1 = reinterpret_cast< faiss::HammingComputer8 * >(argp1);
8526 delete arg1;
8527 resultobj = SWIG_Py_Void();
8528 return resultobj;
8529 fail:
8530 return NULL;
8531 }
8532
8533
8534 SWIGINTERN PyObject *HammingComputer8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8535 PyObject *obj;
8536 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
8537 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer8, SWIG_NewClientData(obj));
8538 return SWIG_Py_Void();
8539 }
8540
8541 SWIGINTERN PyObject *_wrap_HammingComputer16_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8542 PyObject *resultobj = 0;
8543 faiss::HammingComputer16 *arg1 = (faiss::HammingComputer16 *) 0 ;
8544 uint64_t arg2 ;
8545 void *argp1 = 0 ;
8546 int res1 = 0 ;
8547 unsigned long val2 ;
8548 int ecode2 = 0 ;
8549 PyObject * obj0 = 0 ;
8550 PyObject * obj1 = 0 ;
8551
8552 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer16_a0_set",&obj0,&obj1)) SWIG_fail;
8553 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8554 if (!SWIG_IsOK(res1)) {
8555 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8556 }
8557 arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8558 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8559 if (!SWIG_IsOK(ecode2)) {
8560 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer16_a0_set" "', argument " "2"" of type '" "uint64_t""'");
8561 }
8562 arg2 = static_cast< uint64_t >(val2);
8563 if (arg1) (arg1)->a0 = arg2;
8564 resultobj = SWIG_Py_Void();
8565 return resultobj;
8566 fail:
8567 return NULL;
8568 }
8569
8570
8571 SWIGINTERN PyObject *_wrap_HammingComputer16_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8572 PyObject *resultobj = 0;
8573 faiss::HammingComputer16 *arg1 = (faiss::HammingComputer16 *) 0 ;
8574 void *argp1 = 0 ;
8575 int res1 = 0 ;
8576 PyObject * obj0 = 0 ;
8577 uint64_t result;
8578
8579 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer16_a0_get",&obj0)) SWIG_fail;
8580 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8581 if (!SWIG_IsOK(res1)) {
8582 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8583 }
8584 arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8585 result = (uint64_t) ((arg1)->a0);
8586 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8587 return resultobj;
8588 fail:
8589 return NULL;
8590 }
8591
8592
8593 SWIGINTERN PyObject *_wrap_HammingComputer16_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8594 PyObject *resultobj = 0;
8595 faiss::HammingComputer16 *arg1 = (faiss::HammingComputer16 *) 0 ;
8596 uint64_t arg2 ;
8597 void *argp1 = 0 ;
8598 int res1 = 0 ;
8599 unsigned long val2 ;
8600 int ecode2 = 0 ;
8601 PyObject * obj0 = 0 ;
8602 PyObject * obj1 = 0 ;
8603
8604 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer16_a1_set",&obj0,&obj1)) SWIG_fail;
8605 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8606 if (!SWIG_IsOK(res1)) {
8607 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8608 }
8609 arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8610 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8611 if (!SWIG_IsOK(ecode2)) {
8612 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer16_a1_set" "', argument " "2"" of type '" "uint64_t""'");
8613 }
8614 arg2 = static_cast< uint64_t >(val2);
8615 if (arg1) (arg1)->a1 = arg2;
8616 resultobj = SWIG_Py_Void();
8617 return resultobj;
8618 fail:
8619 return NULL;
8620 }
8621
8622
8623 SWIGINTERN PyObject *_wrap_HammingComputer16_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8624 PyObject *resultobj = 0;
8625 faiss::HammingComputer16 *arg1 = (faiss::HammingComputer16 *) 0 ;
8626 void *argp1 = 0 ;
8627 int res1 = 0 ;
8628 PyObject * obj0 = 0 ;
8629 uint64_t result;
8630
8631 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer16_a1_get",&obj0)) SWIG_fail;
8632 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8633 if (!SWIG_IsOK(res1)) {
8634 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8635 }
8636 arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8637 result = (uint64_t) ((arg1)->a1);
8638 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8639 return resultobj;
8640 fail:
8641 return NULL;
8642 }
8643
8644
8645 SWIGINTERN PyObject *_wrap_new_HammingComputer16__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8646 PyObject *resultobj = 0;
8647 faiss::HammingComputer16 *result = 0 ;
8648
8649 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer16")) SWIG_fail;
8650 {
8651 Py_BEGIN_ALLOW_THREADS
8652 try {
8653 result = (faiss::HammingComputer16 *)new faiss::HammingComputer16();
8654 } catch(faiss::FaissException & e) {
8655 PyEval_RestoreThread(_save);
8656 PyErr_SetString(PyExc_RuntimeError, e.what());
8657 SWIG_fail;
8658 }
8659 Py_END_ALLOW_THREADS
8660 }
8661 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_NEW | 0 );
8662 return resultobj;
8663 fail:
8664 return NULL;
8665 }
8666
8667
8668 SWIGINTERN PyObject *_wrap_new_HammingComputer16__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8669 PyObject *resultobj = 0;
8670 uint8_t *arg1 = (uint8_t *) 0 ;
8671 int arg2 ;
8672 void *argp1 = 0 ;
8673 int res1 = 0 ;
8674 int val2 ;
8675 int ecode2 = 0 ;
8676 PyObject * obj0 = 0 ;
8677 PyObject * obj1 = 0 ;
8678 faiss::HammingComputer16 *result = 0 ;
8679
8680 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer16",&obj0,&obj1)) SWIG_fail;
8681 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
8682 if (!SWIG_IsOK(res1)) {
8683 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer16" "', argument " "1"" of type '" "uint8_t const *""'");
8684 }
8685 arg1 = reinterpret_cast< uint8_t * >(argp1);
8686 ecode2 = SWIG_AsVal_int(obj1, &val2);
8687 if (!SWIG_IsOK(ecode2)) {
8688 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer16" "', argument " "2"" of type '" "int""'");
8689 }
8690 arg2 = static_cast< int >(val2);
8691 {
8692 Py_BEGIN_ALLOW_THREADS
8693 try {
8694 result = (faiss::HammingComputer16 *)new faiss::HammingComputer16((uint8_t const *)arg1,arg2);
8695 } catch(faiss::FaissException & e) {
8696 PyEval_RestoreThread(_save);
8697 PyErr_SetString(PyExc_RuntimeError, e.what());
8698 SWIG_fail;
8699 }
8700 Py_END_ALLOW_THREADS
8701 }
8702 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_NEW | 0 );
8703 return resultobj;
8704 fail:
8705 return NULL;
8706 }
8707
8708
8709 SWIGINTERN PyObject *_wrap_new_HammingComputer16(PyObject *self, PyObject *args) {
8710 Py_ssize_t argc;
8711 PyObject *argv[3] = {
8712 0
8713 };
8714 Py_ssize_t ii;
8715
8716 if (!PyTuple_Check(args)) SWIG_fail;
8717 argc = args ? PyObject_Length(args) : 0;
8718 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
8719 argv[ii] = PyTuple_GET_ITEM(args,ii);
8720 }
8721 if (argc == 0) {
8722 return _wrap_new_HammingComputer16__SWIG_0(self, args);
8723 }
8724 if (argc == 2) {
8725 int _v;
8726 void *vptr = 0;
8727 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
8728 _v = SWIG_CheckState(res);
8729 if (_v) {
8730 {
8731 int res = SWIG_AsVal_int(argv[1], NULL);
8732 _v = SWIG_CheckState(res);
8733 }
8734 if (_v) {
8735 return _wrap_new_HammingComputer16__SWIG_1(self, args);
8736 }
8737 }
8738 }
8739
8740 fail:
8741 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer16'.\n"
8742 " Possible C/C++ prototypes are:\n"
8743 " faiss::HammingComputer16::HammingComputer16()\n"
8744 " faiss::HammingComputer16::HammingComputer16(uint8_t const *,int)\n");
8745 return 0;
8746 }
8747
8748
8749 SWIGINTERN PyObject *_wrap_HammingComputer16_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8750 PyObject *resultobj = 0;
8751 faiss::HammingComputer16 *arg1 = (faiss::HammingComputer16 *) 0 ;
8752 uint8_t *arg2 = (uint8_t *) 0 ;
8753 int arg3 ;
8754 void *argp1 = 0 ;
8755 int res1 = 0 ;
8756 void *argp2 = 0 ;
8757 int res2 = 0 ;
8758 int val3 ;
8759 int ecode3 = 0 ;
8760 PyObject * obj0 = 0 ;
8761 PyObject * obj1 = 0 ;
8762 PyObject * obj2 = 0 ;
8763
8764 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer16_set",&obj0,&obj1,&obj2)) SWIG_fail;
8765 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8766 if (!SWIG_IsOK(res1)) {
8767 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_set" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8768 }
8769 arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8770 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8771 if (!SWIG_IsOK(res2)) {
8772 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer16_set" "', argument " "2"" of type '" "uint8_t const *""'");
8773 }
8774 arg2 = reinterpret_cast< uint8_t * >(argp2);
8775 ecode3 = SWIG_AsVal_int(obj2, &val3);
8776 if (!SWIG_IsOK(ecode3)) {
8777 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer16_set" "', argument " "3"" of type '" "int""'");
8778 }
8779 arg3 = static_cast< int >(val3);
8780 {
8781 Py_BEGIN_ALLOW_THREADS
8782 try {
8783 (arg1)->set((uint8_t const *)arg2,arg3);
8784 } catch(faiss::FaissException & e) {
8785 PyEval_RestoreThread(_save);
8786 PyErr_SetString(PyExc_RuntimeError, e.what());
8787 SWIG_fail;
8788 }
8789 Py_END_ALLOW_THREADS
8790 }
8791 resultobj = SWIG_Py_Void();
8792 return resultobj;
8793 fail:
8794 return NULL;
8795 }
8796
8797
8798 SWIGINTERN PyObject *_wrap_HammingComputer16_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8799 PyObject *resultobj = 0;
8800 faiss::HammingComputer16 *arg1 = (faiss::HammingComputer16 *) 0 ;
8801 uint8_t *arg2 = (uint8_t *) 0 ;
8802 void *argp1 = 0 ;
8803 int res1 = 0 ;
8804 void *argp2 = 0 ;
8805 int res2 = 0 ;
8806 PyObject * obj0 = 0 ;
8807 PyObject * obj1 = 0 ;
8808 int result;
8809
8810 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer16_hamming",&obj0,&obj1)) SWIG_fail;
8811 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, 0 | 0 );
8812 if (!SWIG_IsOK(res1)) {
8813 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer16_hamming" "', argument " "1"" of type '" "faiss::HammingComputer16 const *""'");
8814 }
8815 arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8816 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
8817 if (!SWIG_IsOK(res2)) {
8818 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer16_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
8819 }
8820 arg2 = reinterpret_cast< uint8_t * >(argp2);
8821 {
8822 Py_BEGIN_ALLOW_THREADS
8823 try {
8824 result = (int)((faiss::HammingComputer16 const *)arg1)->hamming((uint8_t const *)arg2);
8825 } catch(faiss::FaissException & e) {
8826 PyEval_RestoreThread(_save);
8827 PyErr_SetString(PyExc_RuntimeError, e.what());
8828 SWIG_fail;
8829 }
8830 Py_END_ALLOW_THREADS
8831 }
8832 resultobj = SWIG_From_int(static_cast< int >(result));
8833 return resultobj;
8834 fail:
8835 return NULL;
8836 }
8837
8838
8839 SWIGINTERN PyObject *_wrap_delete_HammingComputer16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8840 PyObject *resultobj = 0;
8841 faiss::HammingComputer16 *arg1 = (faiss::HammingComputer16 *) 0 ;
8842 void *argp1 = 0 ;
8843 int res1 = 0 ;
8844 PyObject * obj0 = 0 ;
8845
8846 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer16",&obj0)) SWIG_fail;
8847 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer16, SWIG_POINTER_DISOWN | 0 );
8848 if (!SWIG_IsOK(res1)) {
8849 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer16" "', argument " "1"" of type '" "faiss::HammingComputer16 *""'");
8850 }
8851 arg1 = reinterpret_cast< faiss::HammingComputer16 * >(argp1);
8852 delete arg1;
8853 resultobj = SWIG_Py_Void();
8854 return resultobj;
8855 fail:
8856 return NULL;
8857 }
8858
8859
8860 SWIGINTERN PyObject *HammingComputer16_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8861 PyObject *obj;
8862 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
8863 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer16, SWIG_NewClientData(obj));
8864 return SWIG_Py_Void();
8865 }
8866
8867 SWIGINTERN PyObject *_wrap_HammingComputer20_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8868 PyObject *resultobj = 0;
8869 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
8870 uint64_t arg2 ;
8871 void *argp1 = 0 ;
8872 int res1 = 0 ;
8873 unsigned long val2 ;
8874 int ecode2 = 0 ;
8875 PyObject * obj0 = 0 ;
8876 PyObject * obj1 = 0 ;
8877
8878 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer20_a0_set",&obj0,&obj1)) SWIG_fail;
8879 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
8880 if (!SWIG_IsOK(res1)) {
8881 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
8882 }
8883 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
8884 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8885 if (!SWIG_IsOK(ecode2)) {
8886 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer20_a0_set" "', argument " "2"" of type '" "uint64_t""'");
8887 }
8888 arg2 = static_cast< uint64_t >(val2);
8889 if (arg1) (arg1)->a0 = arg2;
8890 resultobj = SWIG_Py_Void();
8891 return resultobj;
8892 fail:
8893 return NULL;
8894 }
8895
8896
8897 SWIGINTERN PyObject *_wrap_HammingComputer20_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8898 PyObject *resultobj = 0;
8899 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
8900 void *argp1 = 0 ;
8901 int res1 = 0 ;
8902 PyObject * obj0 = 0 ;
8903 uint64_t result;
8904
8905 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer20_a0_get",&obj0)) SWIG_fail;
8906 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
8907 if (!SWIG_IsOK(res1)) {
8908 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
8909 }
8910 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
8911 result = (uint64_t) ((arg1)->a0);
8912 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8913 return resultobj;
8914 fail:
8915 return NULL;
8916 }
8917
8918
8919 SWIGINTERN PyObject *_wrap_HammingComputer20_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8920 PyObject *resultobj = 0;
8921 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
8922 uint64_t arg2 ;
8923 void *argp1 = 0 ;
8924 int res1 = 0 ;
8925 unsigned long val2 ;
8926 int ecode2 = 0 ;
8927 PyObject * obj0 = 0 ;
8928 PyObject * obj1 = 0 ;
8929
8930 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer20_a1_set",&obj0,&obj1)) SWIG_fail;
8931 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
8932 if (!SWIG_IsOK(res1)) {
8933 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
8934 }
8935 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
8936 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
8937 if (!SWIG_IsOK(ecode2)) {
8938 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer20_a1_set" "', argument " "2"" of type '" "uint64_t""'");
8939 }
8940 arg2 = static_cast< uint64_t >(val2);
8941 if (arg1) (arg1)->a1 = arg2;
8942 resultobj = SWIG_Py_Void();
8943 return resultobj;
8944 fail:
8945 return NULL;
8946 }
8947
8948
8949 SWIGINTERN PyObject *_wrap_HammingComputer20_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8950 PyObject *resultobj = 0;
8951 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
8952 void *argp1 = 0 ;
8953 int res1 = 0 ;
8954 PyObject * obj0 = 0 ;
8955 uint64_t result;
8956
8957 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer20_a1_get",&obj0)) SWIG_fail;
8958 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
8959 if (!SWIG_IsOK(res1)) {
8960 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
8961 }
8962 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
8963 result = (uint64_t) ((arg1)->a1);
8964 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
8965 return resultobj;
8966 fail:
8967 return NULL;
8968 }
8969
8970
8971 SWIGINTERN PyObject *_wrap_HammingComputer20_a2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
8972 PyObject *resultobj = 0;
8973 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
8974 uint32_t arg2 ;
8975 void *argp1 = 0 ;
8976 int res1 = 0 ;
8977 void *argp2 ;
8978 int res2 = 0 ;
8979 PyObject * obj0 = 0 ;
8980 PyObject * obj1 = 0 ;
8981
8982 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer20_a2_set",&obj0,&obj1)) SWIG_fail;
8983 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
8984 if (!SWIG_IsOK(res1)) {
8985 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
8986 }
8987 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
8988 {
8989 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_uint32_t, 0 | 0);
8990 if (!SWIG_IsOK(res2)) {
8991 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer20_a2_set" "', argument " "2"" of type '" "uint32_t""'");
8992 }
8993 if (!argp2) {
8994 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HammingComputer20_a2_set" "', argument " "2"" of type '" "uint32_t""'");
8995 } else {
8996 uint32_t * temp = reinterpret_cast< uint32_t * >(argp2);
8997 arg2 = *temp;
8998 if (SWIG_IsNewObj(res2)) delete temp;
8999 }
9000 }
9001 if (arg1) (arg1)->a2 = arg2;
9002 resultobj = SWIG_Py_Void();
9003 return resultobj;
9004 fail:
9005 return NULL;
9006 }
9007
9008
9009 SWIGINTERN PyObject *_wrap_HammingComputer20_a2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9010 PyObject *resultobj = 0;
9011 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
9012 void *argp1 = 0 ;
9013 int res1 = 0 ;
9014 PyObject * obj0 = 0 ;
9015 uint32_t result;
9016
9017 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer20_a2_get",&obj0)) SWIG_fail;
9018 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9019 if (!SWIG_IsOK(res1)) {
9020 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9021 }
9022 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9023 result = ((arg1)->a2);
9024 resultobj = SWIG_NewPointerObj((new uint32_t(static_cast< const uint32_t& >(result))), SWIGTYPE_p_uint32_t, SWIG_POINTER_OWN | 0 );
9025 return resultobj;
9026 fail:
9027 return NULL;
9028 }
9029
9030
9031 SWIGINTERN PyObject *_wrap_new_HammingComputer20__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9032 PyObject *resultobj = 0;
9033 faiss::HammingComputer20 *result = 0 ;
9034
9035 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer20")) SWIG_fail;
9036 {
9037 Py_BEGIN_ALLOW_THREADS
9038 try {
9039 result = (faiss::HammingComputer20 *)new faiss::HammingComputer20();
9040 } catch(faiss::FaissException & e) {
9041 PyEval_RestoreThread(_save);
9042 PyErr_SetString(PyExc_RuntimeError, e.what());
9043 SWIG_fail;
9044 }
9045 Py_END_ALLOW_THREADS
9046 }
9047 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_NEW | 0 );
9048 return resultobj;
9049 fail:
9050 return NULL;
9051 }
9052
9053
9054 SWIGINTERN PyObject *_wrap_new_HammingComputer20__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9055 PyObject *resultobj = 0;
9056 uint8_t *arg1 = (uint8_t *) 0 ;
9057 int arg2 ;
9058 void *argp1 = 0 ;
9059 int res1 = 0 ;
9060 int val2 ;
9061 int ecode2 = 0 ;
9062 PyObject * obj0 = 0 ;
9063 PyObject * obj1 = 0 ;
9064 faiss::HammingComputer20 *result = 0 ;
9065
9066 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer20",&obj0,&obj1)) SWIG_fail;
9067 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
9068 if (!SWIG_IsOK(res1)) {
9069 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer20" "', argument " "1"" of type '" "uint8_t const *""'");
9070 }
9071 arg1 = reinterpret_cast< uint8_t * >(argp1);
9072 ecode2 = SWIG_AsVal_int(obj1, &val2);
9073 if (!SWIG_IsOK(ecode2)) {
9074 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer20" "', argument " "2"" of type '" "int""'");
9075 }
9076 arg2 = static_cast< int >(val2);
9077 {
9078 Py_BEGIN_ALLOW_THREADS
9079 try {
9080 result = (faiss::HammingComputer20 *)new faiss::HammingComputer20((uint8_t const *)arg1,arg2);
9081 } catch(faiss::FaissException & e) {
9082 PyEval_RestoreThread(_save);
9083 PyErr_SetString(PyExc_RuntimeError, e.what());
9084 SWIG_fail;
9085 }
9086 Py_END_ALLOW_THREADS
9087 }
9088 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_NEW | 0 );
9089 return resultobj;
9090 fail:
9091 return NULL;
9092 }
9093
9094
9095 SWIGINTERN PyObject *_wrap_new_HammingComputer20(PyObject *self, PyObject *args) {
9096 Py_ssize_t argc;
9097 PyObject *argv[3] = {
9098 0
9099 };
9100 Py_ssize_t ii;
9101
9102 if (!PyTuple_Check(args)) SWIG_fail;
9103 argc = args ? PyObject_Length(args) : 0;
9104 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
9105 argv[ii] = PyTuple_GET_ITEM(args,ii);
9106 }
9107 if (argc == 0) {
9108 return _wrap_new_HammingComputer20__SWIG_0(self, args);
9109 }
9110 if (argc == 2) {
9111 int _v;
9112 void *vptr = 0;
9113 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
9114 _v = SWIG_CheckState(res);
9115 if (_v) {
9116 {
9117 int res = SWIG_AsVal_int(argv[1], NULL);
9118 _v = SWIG_CheckState(res);
9119 }
9120 if (_v) {
9121 return _wrap_new_HammingComputer20__SWIG_1(self, args);
9122 }
9123 }
9124 }
9125
9126 fail:
9127 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer20'.\n"
9128 " Possible C/C++ prototypes are:\n"
9129 " faiss::HammingComputer20::HammingComputer20()\n"
9130 " faiss::HammingComputer20::HammingComputer20(uint8_t const *,int)\n");
9131 return 0;
9132 }
9133
9134
9135 SWIGINTERN PyObject *_wrap_HammingComputer20_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9136 PyObject *resultobj = 0;
9137 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
9138 uint8_t *arg2 = (uint8_t *) 0 ;
9139 int arg3 ;
9140 void *argp1 = 0 ;
9141 int res1 = 0 ;
9142 void *argp2 = 0 ;
9143 int res2 = 0 ;
9144 int val3 ;
9145 int ecode3 = 0 ;
9146 PyObject * obj0 = 0 ;
9147 PyObject * obj1 = 0 ;
9148 PyObject * obj2 = 0 ;
9149
9150 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer20_set",&obj0,&obj1,&obj2)) SWIG_fail;
9151 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9152 if (!SWIG_IsOK(res1)) {
9153 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_set" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9154 }
9155 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9156 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9157 if (!SWIG_IsOK(res2)) {
9158 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer20_set" "', argument " "2"" of type '" "uint8_t const *""'");
9159 }
9160 arg2 = reinterpret_cast< uint8_t * >(argp2);
9161 ecode3 = SWIG_AsVal_int(obj2, &val3);
9162 if (!SWIG_IsOK(ecode3)) {
9163 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer20_set" "', argument " "3"" of type '" "int""'");
9164 }
9165 arg3 = static_cast< int >(val3);
9166 {
9167 Py_BEGIN_ALLOW_THREADS
9168 try {
9169 (arg1)->set((uint8_t const *)arg2,arg3);
9170 } catch(faiss::FaissException & e) {
9171 PyEval_RestoreThread(_save);
9172 PyErr_SetString(PyExc_RuntimeError, e.what());
9173 SWIG_fail;
9174 }
9175 Py_END_ALLOW_THREADS
9176 }
9177 resultobj = SWIG_Py_Void();
9178 return resultobj;
9179 fail:
9180 return NULL;
9181 }
9182
9183
9184 SWIGINTERN PyObject *_wrap_HammingComputer20_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9185 PyObject *resultobj = 0;
9186 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
9187 uint8_t *arg2 = (uint8_t *) 0 ;
9188 void *argp1 = 0 ;
9189 int res1 = 0 ;
9190 void *argp2 = 0 ;
9191 int res2 = 0 ;
9192 PyObject * obj0 = 0 ;
9193 PyObject * obj1 = 0 ;
9194 int result;
9195
9196 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer20_hamming",&obj0,&obj1)) SWIG_fail;
9197 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, 0 | 0 );
9198 if (!SWIG_IsOK(res1)) {
9199 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer20_hamming" "', argument " "1"" of type '" "faiss::HammingComputer20 const *""'");
9200 }
9201 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9202 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9203 if (!SWIG_IsOK(res2)) {
9204 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer20_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
9205 }
9206 arg2 = reinterpret_cast< uint8_t * >(argp2);
9207 {
9208 Py_BEGIN_ALLOW_THREADS
9209 try {
9210 result = (int)((faiss::HammingComputer20 const *)arg1)->hamming((uint8_t const *)arg2);
9211 } catch(faiss::FaissException & e) {
9212 PyEval_RestoreThread(_save);
9213 PyErr_SetString(PyExc_RuntimeError, e.what());
9214 SWIG_fail;
9215 }
9216 Py_END_ALLOW_THREADS
9217 }
9218 resultobj = SWIG_From_int(static_cast< int >(result));
9219 return resultobj;
9220 fail:
9221 return NULL;
9222 }
9223
9224
9225 SWIGINTERN PyObject *_wrap_delete_HammingComputer20(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9226 PyObject *resultobj = 0;
9227 faiss::HammingComputer20 *arg1 = (faiss::HammingComputer20 *) 0 ;
9228 void *argp1 = 0 ;
9229 int res1 = 0 ;
9230 PyObject * obj0 = 0 ;
9231
9232 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer20",&obj0)) SWIG_fail;
9233 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer20, SWIG_POINTER_DISOWN | 0 );
9234 if (!SWIG_IsOK(res1)) {
9235 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer20" "', argument " "1"" of type '" "faiss::HammingComputer20 *""'");
9236 }
9237 arg1 = reinterpret_cast< faiss::HammingComputer20 * >(argp1);
9238 delete arg1;
9239 resultobj = SWIG_Py_Void();
9240 return resultobj;
9241 fail:
9242 return NULL;
9243 }
9244
9245
9246 SWIGINTERN PyObject *HammingComputer20_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9247 PyObject *obj;
9248 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
9249 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer20, SWIG_NewClientData(obj));
9250 return SWIG_Py_Void();
9251 }
9252
9253 SWIGINTERN PyObject *_wrap_HammingComputer32_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9254 PyObject *resultobj = 0;
9255 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9256 uint64_t arg2 ;
9257 void *argp1 = 0 ;
9258 int res1 = 0 ;
9259 unsigned long val2 ;
9260 int ecode2 = 0 ;
9261 PyObject * obj0 = 0 ;
9262 PyObject * obj1 = 0 ;
9263
9264 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_a0_set",&obj0,&obj1)) SWIG_fail;
9265 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9266 if (!SWIG_IsOK(res1)) {
9267 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9268 }
9269 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9270 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9271 if (!SWIG_IsOK(ecode2)) {
9272 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer32_a0_set" "', argument " "2"" of type '" "uint64_t""'");
9273 }
9274 arg2 = static_cast< uint64_t >(val2);
9275 if (arg1) (arg1)->a0 = arg2;
9276 resultobj = SWIG_Py_Void();
9277 return resultobj;
9278 fail:
9279 return NULL;
9280 }
9281
9282
9283 SWIGINTERN PyObject *_wrap_HammingComputer32_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9284 PyObject *resultobj = 0;
9285 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9286 void *argp1 = 0 ;
9287 int res1 = 0 ;
9288 PyObject * obj0 = 0 ;
9289 uint64_t result;
9290
9291 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer32_a0_get",&obj0)) SWIG_fail;
9292 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9293 if (!SWIG_IsOK(res1)) {
9294 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9295 }
9296 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9297 result = (uint64_t) ((arg1)->a0);
9298 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9299 return resultobj;
9300 fail:
9301 return NULL;
9302 }
9303
9304
9305 SWIGINTERN PyObject *_wrap_HammingComputer32_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9306 PyObject *resultobj = 0;
9307 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9308 uint64_t arg2 ;
9309 void *argp1 = 0 ;
9310 int res1 = 0 ;
9311 unsigned long val2 ;
9312 int ecode2 = 0 ;
9313 PyObject * obj0 = 0 ;
9314 PyObject * obj1 = 0 ;
9315
9316 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_a1_set",&obj0,&obj1)) SWIG_fail;
9317 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9318 if (!SWIG_IsOK(res1)) {
9319 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9320 }
9321 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9322 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9323 if (!SWIG_IsOK(ecode2)) {
9324 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer32_a1_set" "', argument " "2"" of type '" "uint64_t""'");
9325 }
9326 arg2 = static_cast< uint64_t >(val2);
9327 if (arg1) (arg1)->a1 = arg2;
9328 resultobj = SWIG_Py_Void();
9329 return resultobj;
9330 fail:
9331 return NULL;
9332 }
9333
9334
9335 SWIGINTERN PyObject *_wrap_HammingComputer32_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9336 PyObject *resultobj = 0;
9337 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9338 void *argp1 = 0 ;
9339 int res1 = 0 ;
9340 PyObject * obj0 = 0 ;
9341 uint64_t result;
9342
9343 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer32_a1_get",&obj0)) SWIG_fail;
9344 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9345 if (!SWIG_IsOK(res1)) {
9346 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9347 }
9348 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9349 result = (uint64_t) ((arg1)->a1);
9350 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9351 return resultobj;
9352 fail:
9353 return NULL;
9354 }
9355
9356
9357 SWIGINTERN PyObject *_wrap_HammingComputer32_a2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9358 PyObject *resultobj = 0;
9359 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9360 uint64_t arg2 ;
9361 void *argp1 = 0 ;
9362 int res1 = 0 ;
9363 unsigned long val2 ;
9364 int ecode2 = 0 ;
9365 PyObject * obj0 = 0 ;
9366 PyObject * obj1 = 0 ;
9367
9368 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_a2_set",&obj0,&obj1)) SWIG_fail;
9369 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9370 if (!SWIG_IsOK(res1)) {
9371 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9372 }
9373 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9374 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9375 if (!SWIG_IsOK(ecode2)) {
9376 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer32_a2_set" "', argument " "2"" of type '" "uint64_t""'");
9377 }
9378 arg2 = static_cast< uint64_t >(val2);
9379 if (arg1) (arg1)->a2 = arg2;
9380 resultobj = SWIG_Py_Void();
9381 return resultobj;
9382 fail:
9383 return NULL;
9384 }
9385
9386
9387 SWIGINTERN PyObject *_wrap_HammingComputer32_a2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9388 PyObject *resultobj = 0;
9389 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9390 void *argp1 = 0 ;
9391 int res1 = 0 ;
9392 PyObject * obj0 = 0 ;
9393 uint64_t result;
9394
9395 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer32_a2_get",&obj0)) SWIG_fail;
9396 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9397 if (!SWIG_IsOK(res1)) {
9398 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9399 }
9400 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9401 result = (uint64_t) ((arg1)->a2);
9402 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9403 return resultobj;
9404 fail:
9405 return NULL;
9406 }
9407
9408
9409 SWIGINTERN PyObject *_wrap_HammingComputer32_a3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9410 PyObject *resultobj = 0;
9411 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9412 uint64_t arg2 ;
9413 void *argp1 = 0 ;
9414 int res1 = 0 ;
9415 unsigned long val2 ;
9416 int ecode2 = 0 ;
9417 PyObject * obj0 = 0 ;
9418 PyObject * obj1 = 0 ;
9419
9420 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_a3_set",&obj0,&obj1)) SWIG_fail;
9421 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9422 if (!SWIG_IsOK(res1)) {
9423 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a3_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9424 }
9425 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9426 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9427 if (!SWIG_IsOK(ecode2)) {
9428 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer32_a3_set" "', argument " "2"" of type '" "uint64_t""'");
9429 }
9430 arg2 = static_cast< uint64_t >(val2);
9431 if (arg1) (arg1)->a3 = arg2;
9432 resultobj = SWIG_Py_Void();
9433 return resultobj;
9434 fail:
9435 return NULL;
9436 }
9437
9438
9439 SWIGINTERN PyObject *_wrap_HammingComputer32_a3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9440 PyObject *resultobj = 0;
9441 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9442 void *argp1 = 0 ;
9443 int res1 = 0 ;
9444 PyObject * obj0 = 0 ;
9445 uint64_t result;
9446
9447 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer32_a3_get",&obj0)) SWIG_fail;
9448 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9449 if (!SWIG_IsOK(res1)) {
9450 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_a3_get" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9451 }
9452 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9453 result = (uint64_t) ((arg1)->a3);
9454 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9455 return resultobj;
9456 fail:
9457 return NULL;
9458 }
9459
9460
9461 SWIGINTERN PyObject *_wrap_new_HammingComputer32__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9462 PyObject *resultobj = 0;
9463 faiss::HammingComputer32 *result = 0 ;
9464
9465 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer32")) SWIG_fail;
9466 {
9467 Py_BEGIN_ALLOW_THREADS
9468 try {
9469 result = (faiss::HammingComputer32 *)new faiss::HammingComputer32();
9470 } catch(faiss::FaissException & e) {
9471 PyEval_RestoreThread(_save);
9472 PyErr_SetString(PyExc_RuntimeError, e.what());
9473 SWIG_fail;
9474 }
9475 Py_END_ALLOW_THREADS
9476 }
9477 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_NEW | 0 );
9478 return resultobj;
9479 fail:
9480 return NULL;
9481 }
9482
9483
9484 SWIGINTERN PyObject *_wrap_new_HammingComputer32__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9485 PyObject *resultobj = 0;
9486 uint8_t *arg1 = (uint8_t *) 0 ;
9487 int arg2 ;
9488 void *argp1 = 0 ;
9489 int res1 = 0 ;
9490 int val2 ;
9491 int ecode2 = 0 ;
9492 PyObject * obj0 = 0 ;
9493 PyObject * obj1 = 0 ;
9494 faiss::HammingComputer32 *result = 0 ;
9495
9496 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer32",&obj0,&obj1)) SWIG_fail;
9497 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
9498 if (!SWIG_IsOK(res1)) {
9499 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer32" "', argument " "1"" of type '" "uint8_t const *""'");
9500 }
9501 arg1 = reinterpret_cast< uint8_t * >(argp1);
9502 ecode2 = SWIG_AsVal_int(obj1, &val2);
9503 if (!SWIG_IsOK(ecode2)) {
9504 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer32" "', argument " "2"" of type '" "int""'");
9505 }
9506 arg2 = static_cast< int >(val2);
9507 {
9508 Py_BEGIN_ALLOW_THREADS
9509 try {
9510 result = (faiss::HammingComputer32 *)new faiss::HammingComputer32((uint8_t const *)arg1,arg2);
9511 } catch(faiss::FaissException & e) {
9512 PyEval_RestoreThread(_save);
9513 PyErr_SetString(PyExc_RuntimeError, e.what());
9514 SWIG_fail;
9515 }
9516 Py_END_ALLOW_THREADS
9517 }
9518 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_NEW | 0 );
9519 return resultobj;
9520 fail:
9521 return NULL;
9522 }
9523
9524
9525 SWIGINTERN PyObject *_wrap_new_HammingComputer32(PyObject *self, PyObject *args) {
9526 Py_ssize_t argc;
9527 PyObject *argv[3] = {
9528 0
9529 };
9530 Py_ssize_t ii;
9531
9532 if (!PyTuple_Check(args)) SWIG_fail;
9533 argc = args ? PyObject_Length(args) : 0;
9534 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
9535 argv[ii] = PyTuple_GET_ITEM(args,ii);
9536 }
9537 if (argc == 0) {
9538 return _wrap_new_HammingComputer32__SWIG_0(self, args);
9539 }
9540 if (argc == 2) {
9541 int _v;
9542 void *vptr = 0;
9543 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
9544 _v = SWIG_CheckState(res);
9545 if (_v) {
9546 {
9547 int res = SWIG_AsVal_int(argv[1], NULL);
9548 _v = SWIG_CheckState(res);
9549 }
9550 if (_v) {
9551 return _wrap_new_HammingComputer32__SWIG_1(self, args);
9552 }
9553 }
9554 }
9555
9556 fail:
9557 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer32'.\n"
9558 " Possible C/C++ prototypes are:\n"
9559 " faiss::HammingComputer32::HammingComputer32()\n"
9560 " faiss::HammingComputer32::HammingComputer32(uint8_t const *,int)\n");
9561 return 0;
9562 }
9563
9564
9565 SWIGINTERN PyObject *_wrap_HammingComputer32_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9566 PyObject *resultobj = 0;
9567 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9568 uint8_t *arg2 = (uint8_t *) 0 ;
9569 int arg3 ;
9570 void *argp1 = 0 ;
9571 int res1 = 0 ;
9572 void *argp2 = 0 ;
9573 int res2 = 0 ;
9574 int val3 ;
9575 int ecode3 = 0 ;
9576 PyObject * obj0 = 0 ;
9577 PyObject * obj1 = 0 ;
9578 PyObject * obj2 = 0 ;
9579
9580 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer32_set",&obj0,&obj1,&obj2)) SWIG_fail;
9581 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9582 if (!SWIG_IsOK(res1)) {
9583 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_set" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9584 }
9585 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9586 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9587 if (!SWIG_IsOK(res2)) {
9588 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer32_set" "', argument " "2"" of type '" "uint8_t const *""'");
9589 }
9590 arg2 = reinterpret_cast< uint8_t * >(argp2);
9591 ecode3 = SWIG_AsVal_int(obj2, &val3);
9592 if (!SWIG_IsOK(ecode3)) {
9593 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer32_set" "', argument " "3"" of type '" "int""'");
9594 }
9595 arg3 = static_cast< int >(val3);
9596 {
9597 Py_BEGIN_ALLOW_THREADS
9598 try {
9599 (arg1)->set((uint8_t const *)arg2,arg3);
9600 } catch(faiss::FaissException & e) {
9601 PyEval_RestoreThread(_save);
9602 PyErr_SetString(PyExc_RuntimeError, e.what());
9603 SWIG_fail;
9604 }
9605 Py_END_ALLOW_THREADS
9606 }
9607 resultobj = SWIG_Py_Void();
9608 return resultobj;
9609 fail:
9610 return NULL;
9611 }
9612
9613
9614 SWIGINTERN PyObject *_wrap_HammingComputer32_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9615 PyObject *resultobj = 0;
9616 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9617 uint8_t *arg2 = (uint8_t *) 0 ;
9618 void *argp1 = 0 ;
9619 int res1 = 0 ;
9620 void *argp2 = 0 ;
9621 int res2 = 0 ;
9622 PyObject * obj0 = 0 ;
9623 PyObject * obj1 = 0 ;
9624 int result;
9625
9626 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer32_hamming",&obj0,&obj1)) SWIG_fail;
9627 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, 0 | 0 );
9628 if (!SWIG_IsOK(res1)) {
9629 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer32_hamming" "', argument " "1"" of type '" "faiss::HammingComputer32 const *""'");
9630 }
9631 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9632 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
9633 if (!SWIG_IsOK(res2)) {
9634 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer32_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
9635 }
9636 arg2 = reinterpret_cast< uint8_t * >(argp2);
9637 {
9638 Py_BEGIN_ALLOW_THREADS
9639 try {
9640 result = (int)((faiss::HammingComputer32 const *)arg1)->hamming((uint8_t const *)arg2);
9641 } catch(faiss::FaissException & e) {
9642 PyEval_RestoreThread(_save);
9643 PyErr_SetString(PyExc_RuntimeError, e.what());
9644 SWIG_fail;
9645 }
9646 Py_END_ALLOW_THREADS
9647 }
9648 resultobj = SWIG_From_int(static_cast< int >(result));
9649 return resultobj;
9650 fail:
9651 return NULL;
9652 }
9653
9654
9655 SWIGINTERN PyObject *_wrap_delete_HammingComputer32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9656 PyObject *resultobj = 0;
9657 faiss::HammingComputer32 *arg1 = (faiss::HammingComputer32 *) 0 ;
9658 void *argp1 = 0 ;
9659 int res1 = 0 ;
9660 PyObject * obj0 = 0 ;
9661
9662 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer32",&obj0)) SWIG_fail;
9663 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer32, SWIG_POINTER_DISOWN | 0 );
9664 if (!SWIG_IsOK(res1)) {
9665 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer32" "', argument " "1"" of type '" "faiss::HammingComputer32 *""'");
9666 }
9667 arg1 = reinterpret_cast< faiss::HammingComputer32 * >(argp1);
9668 delete arg1;
9669 resultobj = SWIG_Py_Void();
9670 return resultobj;
9671 fail:
9672 return NULL;
9673 }
9674
9675
9676 SWIGINTERN PyObject *HammingComputer32_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9677 PyObject *obj;
9678 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
9679 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer32, SWIG_NewClientData(obj));
9680 return SWIG_Py_Void();
9681 }
9682
9683 SWIGINTERN PyObject *_wrap_HammingComputer64_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9684 PyObject *resultobj = 0;
9685 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9686 uint64_t arg2 ;
9687 void *argp1 = 0 ;
9688 int res1 = 0 ;
9689 unsigned long val2 ;
9690 int ecode2 = 0 ;
9691 PyObject * obj0 = 0 ;
9692 PyObject * obj1 = 0 ;
9693
9694 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a0_set",&obj0,&obj1)) SWIG_fail;
9695 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9696 if (!SWIG_IsOK(res1)) {
9697 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a0_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9698 }
9699 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9700 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9701 if (!SWIG_IsOK(ecode2)) {
9702 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a0_set" "', argument " "2"" of type '" "uint64_t""'");
9703 }
9704 arg2 = static_cast< uint64_t >(val2);
9705 if (arg1) (arg1)->a0 = arg2;
9706 resultobj = SWIG_Py_Void();
9707 return resultobj;
9708 fail:
9709 return NULL;
9710 }
9711
9712
9713 SWIGINTERN PyObject *_wrap_HammingComputer64_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9714 PyObject *resultobj = 0;
9715 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9716 void *argp1 = 0 ;
9717 int res1 = 0 ;
9718 PyObject * obj0 = 0 ;
9719 uint64_t result;
9720
9721 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a0_get",&obj0)) SWIG_fail;
9722 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9723 if (!SWIG_IsOK(res1)) {
9724 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a0_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9725 }
9726 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9727 result = (uint64_t) ((arg1)->a0);
9728 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9729 return resultobj;
9730 fail:
9731 return NULL;
9732 }
9733
9734
9735 SWIGINTERN PyObject *_wrap_HammingComputer64_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9736 PyObject *resultobj = 0;
9737 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9738 uint64_t arg2 ;
9739 void *argp1 = 0 ;
9740 int res1 = 0 ;
9741 unsigned long val2 ;
9742 int ecode2 = 0 ;
9743 PyObject * obj0 = 0 ;
9744 PyObject * obj1 = 0 ;
9745
9746 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a1_set",&obj0,&obj1)) SWIG_fail;
9747 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9748 if (!SWIG_IsOK(res1)) {
9749 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a1_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9750 }
9751 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9752 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9753 if (!SWIG_IsOK(ecode2)) {
9754 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a1_set" "', argument " "2"" of type '" "uint64_t""'");
9755 }
9756 arg2 = static_cast< uint64_t >(val2);
9757 if (arg1) (arg1)->a1 = arg2;
9758 resultobj = SWIG_Py_Void();
9759 return resultobj;
9760 fail:
9761 return NULL;
9762 }
9763
9764
9765 SWIGINTERN PyObject *_wrap_HammingComputer64_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9766 PyObject *resultobj = 0;
9767 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9768 void *argp1 = 0 ;
9769 int res1 = 0 ;
9770 PyObject * obj0 = 0 ;
9771 uint64_t result;
9772
9773 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a1_get",&obj0)) SWIG_fail;
9774 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9775 if (!SWIG_IsOK(res1)) {
9776 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a1_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9777 }
9778 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9779 result = (uint64_t) ((arg1)->a1);
9780 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9781 return resultobj;
9782 fail:
9783 return NULL;
9784 }
9785
9786
9787 SWIGINTERN PyObject *_wrap_HammingComputer64_a2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9788 PyObject *resultobj = 0;
9789 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9790 uint64_t arg2 ;
9791 void *argp1 = 0 ;
9792 int res1 = 0 ;
9793 unsigned long val2 ;
9794 int ecode2 = 0 ;
9795 PyObject * obj0 = 0 ;
9796 PyObject * obj1 = 0 ;
9797
9798 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a2_set",&obj0,&obj1)) SWIG_fail;
9799 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9800 if (!SWIG_IsOK(res1)) {
9801 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a2_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9802 }
9803 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9804 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9805 if (!SWIG_IsOK(ecode2)) {
9806 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a2_set" "', argument " "2"" of type '" "uint64_t""'");
9807 }
9808 arg2 = static_cast< uint64_t >(val2);
9809 if (arg1) (arg1)->a2 = arg2;
9810 resultobj = SWIG_Py_Void();
9811 return resultobj;
9812 fail:
9813 return NULL;
9814 }
9815
9816
9817 SWIGINTERN PyObject *_wrap_HammingComputer64_a2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9818 PyObject *resultobj = 0;
9819 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9820 void *argp1 = 0 ;
9821 int res1 = 0 ;
9822 PyObject * obj0 = 0 ;
9823 uint64_t result;
9824
9825 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a2_get",&obj0)) SWIG_fail;
9826 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9827 if (!SWIG_IsOK(res1)) {
9828 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a2_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9829 }
9830 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9831 result = (uint64_t) ((arg1)->a2);
9832 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9833 return resultobj;
9834 fail:
9835 return NULL;
9836 }
9837
9838
9839 SWIGINTERN PyObject *_wrap_HammingComputer64_a3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9840 PyObject *resultobj = 0;
9841 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9842 uint64_t arg2 ;
9843 void *argp1 = 0 ;
9844 int res1 = 0 ;
9845 unsigned long val2 ;
9846 int ecode2 = 0 ;
9847 PyObject * obj0 = 0 ;
9848 PyObject * obj1 = 0 ;
9849
9850 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a3_set",&obj0,&obj1)) SWIG_fail;
9851 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9852 if (!SWIG_IsOK(res1)) {
9853 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a3_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9854 }
9855 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9856 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9857 if (!SWIG_IsOK(ecode2)) {
9858 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a3_set" "', argument " "2"" of type '" "uint64_t""'");
9859 }
9860 arg2 = static_cast< uint64_t >(val2);
9861 if (arg1) (arg1)->a3 = arg2;
9862 resultobj = SWIG_Py_Void();
9863 return resultobj;
9864 fail:
9865 return NULL;
9866 }
9867
9868
9869 SWIGINTERN PyObject *_wrap_HammingComputer64_a3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9870 PyObject *resultobj = 0;
9871 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9872 void *argp1 = 0 ;
9873 int res1 = 0 ;
9874 PyObject * obj0 = 0 ;
9875 uint64_t result;
9876
9877 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a3_get",&obj0)) SWIG_fail;
9878 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9879 if (!SWIG_IsOK(res1)) {
9880 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a3_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9881 }
9882 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9883 result = (uint64_t) ((arg1)->a3);
9884 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9885 return resultobj;
9886 fail:
9887 return NULL;
9888 }
9889
9890
9891 SWIGINTERN PyObject *_wrap_HammingComputer64_a4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9892 PyObject *resultobj = 0;
9893 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9894 uint64_t arg2 ;
9895 void *argp1 = 0 ;
9896 int res1 = 0 ;
9897 unsigned long val2 ;
9898 int ecode2 = 0 ;
9899 PyObject * obj0 = 0 ;
9900 PyObject * obj1 = 0 ;
9901
9902 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a4_set",&obj0,&obj1)) SWIG_fail;
9903 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9904 if (!SWIG_IsOK(res1)) {
9905 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a4_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9906 }
9907 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9908 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9909 if (!SWIG_IsOK(ecode2)) {
9910 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a4_set" "', argument " "2"" of type '" "uint64_t""'");
9911 }
9912 arg2 = static_cast< uint64_t >(val2);
9913 if (arg1) (arg1)->a4 = arg2;
9914 resultobj = SWIG_Py_Void();
9915 return resultobj;
9916 fail:
9917 return NULL;
9918 }
9919
9920
9921 SWIGINTERN PyObject *_wrap_HammingComputer64_a4_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9922 PyObject *resultobj = 0;
9923 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9924 void *argp1 = 0 ;
9925 int res1 = 0 ;
9926 PyObject * obj0 = 0 ;
9927 uint64_t result;
9928
9929 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a4_get",&obj0)) SWIG_fail;
9930 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9931 if (!SWIG_IsOK(res1)) {
9932 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a4_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9933 }
9934 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9935 result = (uint64_t) ((arg1)->a4);
9936 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9937 return resultobj;
9938 fail:
9939 return NULL;
9940 }
9941
9942
9943 SWIGINTERN PyObject *_wrap_HammingComputer64_a5_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9944 PyObject *resultobj = 0;
9945 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9946 uint64_t arg2 ;
9947 void *argp1 = 0 ;
9948 int res1 = 0 ;
9949 unsigned long val2 ;
9950 int ecode2 = 0 ;
9951 PyObject * obj0 = 0 ;
9952 PyObject * obj1 = 0 ;
9953
9954 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a5_set",&obj0,&obj1)) SWIG_fail;
9955 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9956 if (!SWIG_IsOK(res1)) {
9957 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a5_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9958 }
9959 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9960 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
9961 if (!SWIG_IsOK(ecode2)) {
9962 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a5_set" "', argument " "2"" of type '" "uint64_t""'");
9963 }
9964 arg2 = static_cast< uint64_t >(val2);
9965 if (arg1) (arg1)->a5 = arg2;
9966 resultobj = SWIG_Py_Void();
9967 return resultobj;
9968 fail:
9969 return NULL;
9970 }
9971
9972
9973 SWIGINTERN PyObject *_wrap_HammingComputer64_a5_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9974 PyObject *resultobj = 0;
9975 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9976 void *argp1 = 0 ;
9977 int res1 = 0 ;
9978 PyObject * obj0 = 0 ;
9979 uint64_t result;
9980
9981 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a5_get",&obj0)) SWIG_fail;
9982 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
9983 if (!SWIG_IsOK(res1)) {
9984 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a5_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
9985 }
9986 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
9987 result = (uint64_t) ((arg1)->a5);
9988 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
9989 return resultobj;
9990 fail:
9991 return NULL;
9992 }
9993
9994
9995 SWIGINTERN PyObject *_wrap_HammingComputer64_a6_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
9996 PyObject *resultobj = 0;
9997 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
9998 uint64_t arg2 ;
9999 void *argp1 = 0 ;
10000 int res1 = 0 ;
10001 unsigned long val2 ;
10002 int ecode2 = 0 ;
10003 PyObject * obj0 = 0 ;
10004 PyObject * obj1 = 0 ;
10005
10006 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a6_set",&obj0,&obj1)) SWIG_fail;
10007 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10008 if (!SWIG_IsOK(res1)) {
10009 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a6_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10010 }
10011 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10012 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10013 if (!SWIG_IsOK(ecode2)) {
10014 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a6_set" "', argument " "2"" of type '" "uint64_t""'");
10015 }
10016 arg2 = static_cast< uint64_t >(val2);
10017 if (arg1) (arg1)->a6 = arg2;
10018 resultobj = SWIG_Py_Void();
10019 return resultobj;
10020 fail:
10021 return NULL;
10022 }
10023
10024
10025 SWIGINTERN PyObject *_wrap_HammingComputer64_a6_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10026 PyObject *resultobj = 0;
10027 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
10028 void *argp1 = 0 ;
10029 int res1 = 0 ;
10030 PyObject * obj0 = 0 ;
10031 uint64_t result;
10032
10033 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a6_get",&obj0)) SWIG_fail;
10034 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10035 if (!SWIG_IsOK(res1)) {
10036 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a6_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10037 }
10038 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10039 result = (uint64_t) ((arg1)->a6);
10040 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10041 return resultobj;
10042 fail:
10043 return NULL;
10044 }
10045
10046
10047 SWIGINTERN PyObject *_wrap_HammingComputer64_a7_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10048 PyObject *resultobj = 0;
10049 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
10050 uint64_t arg2 ;
10051 void *argp1 = 0 ;
10052 int res1 = 0 ;
10053 unsigned long val2 ;
10054 int ecode2 = 0 ;
10055 PyObject * obj0 = 0 ;
10056 PyObject * obj1 = 0 ;
10057
10058 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_a7_set",&obj0,&obj1)) SWIG_fail;
10059 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10060 if (!SWIG_IsOK(res1)) {
10061 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a7_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10062 }
10063 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10064 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
10065 if (!SWIG_IsOK(ecode2)) {
10066 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputer64_a7_set" "', argument " "2"" of type '" "uint64_t""'");
10067 }
10068 arg2 = static_cast< uint64_t >(val2);
10069 if (arg1) (arg1)->a7 = arg2;
10070 resultobj = SWIG_Py_Void();
10071 return resultobj;
10072 fail:
10073 return NULL;
10074 }
10075
10076
10077 SWIGINTERN PyObject *_wrap_HammingComputer64_a7_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10078 PyObject *resultobj = 0;
10079 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
10080 void *argp1 = 0 ;
10081 int res1 = 0 ;
10082 PyObject * obj0 = 0 ;
10083 uint64_t result;
10084
10085 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputer64_a7_get",&obj0)) SWIG_fail;
10086 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10087 if (!SWIG_IsOK(res1)) {
10088 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_a7_get" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10089 }
10090 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10091 result = (uint64_t) ((arg1)->a7);
10092 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
10093 return resultobj;
10094 fail:
10095 return NULL;
10096 }
10097
10098
10099 SWIGINTERN PyObject *_wrap_new_HammingComputer64__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10100 PyObject *resultobj = 0;
10101 faiss::HammingComputer64 *result = 0 ;
10102
10103 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputer64")) SWIG_fail;
10104 {
10105 Py_BEGIN_ALLOW_THREADS
10106 try {
10107 result = (faiss::HammingComputer64 *)new faiss::HammingComputer64();
10108 } catch(faiss::FaissException & e) {
10109 PyEval_RestoreThread(_save);
10110 PyErr_SetString(PyExc_RuntimeError, e.what());
10111 SWIG_fail;
10112 }
10113 Py_END_ALLOW_THREADS
10114 }
10115 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_NEW | 0 );
10116 return resultobj;
10117 fail:
10118 return NULL;
10119 }
10120
10121
10122 SWIGINTERN PyObject *_wrap_new_HammingComputer64__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10123 PyObject *resultobj = 0;
10124 uint8_t *arg1 = (uint8_t *) 0 ;
10125 int arg2 ;
10126 void *argp1 = 0 ;
10127 int res1 = 0 ;
10128 int val2 ;
10129 int ecode2 = 0 ;
10130 PyObject * obj0 = 0 ;
10131 PyObject * obj1 = 0 ;
10132 faiss::HammingComputer64 *result = 0 ;
10133
10134 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputer64",&obj0,&obj1)) SWIG_fail;
10135 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
10136 if (!SWIG_IsOK(res1)) {
10137 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputer64" "', argument " "1"" of type '" "uint8_t const *""'");
10138 }
10139 arg1 = reinterpret_cast< uint8_t * >(argp1);
10140 ecode2 = SWIG_AsVal_int(obj1, &val2);
10141 if (!SWIG_IsOK(ecode2)) {
10142 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputer64" "', argument " "2"" of type '" "int""'");
10143 }
10144 arg2 = static_cast< int >(val2);
10145 {
10146 Py_BEGIN_ALLOW_THREADS
10147 try {
10148 result = (faiss::HammingComputer64 *)new faiss::HammingComputer64((uint8_t const *)arg1,arg2);
10149 } catch(faiss::FaissException & e) {
10150 PyEval_RestoreThread(_save);
10151 PyErr_SetString(PyExc_RuntimeError, e.what());
10152 SWIG_fail;
10153 }
10154 Py_END_ALLOW_THREADS
10155 }
10156 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_NEW | 0 );
10157 return resultobj;
10158 fail:
10159 return NULL;
10160 }
10161
10162
10163 SWIGINTERN PyObject *_wrap_new_HammingComputer64(PyObject *self, PyObject *args) {
10164 Py_ssize_t argc;
10165 PyObject *argv[3] = {
10166 0
10167 };
10168 Py_ssize_t ii;
10169
10170 if (!PyTuple_Check(args)) SWIG_fail;
10171 argc = args ? PyObject_Length(args) : 0;
10172 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
10173 argv[ii] = PyTuple_GET_ITEM(args,ii);
10174 }
10175 if (argc == 0) {
10176 return _wrap_new_HammingComputer64__SWIG_0(self, args);
10177 }
10178 if (argc == 2) {
10179 int _v;
10180 void *vptr = 0;
10181 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
10182 _v = SWIG_CheckState(res);
10183 if (_v) {
10184 {
10185 int res = SWIG_AsVal_int(argv[1], NULL);
10186 _v = SWIG_CheckState(res);
10187 }
10188 if (_v) {
10189 return _wrap_new_HammingComputer64__SWIG_1(self, args);
10190 }
10191 }
10192 }
10193
10194 fail:
10195 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputer64'.\n"
10196 " Possible C/C++ prototypes are:\n"
10197 " faiss::HammingComputer64::HammingComputer64()\n"
10198 " faiss::HammingComputer64::HammingComputer64(uint8_t const *,int)\n");
10199 return 0;
10200 }
10201
10202
10203 SWIGINTERN PyObject *_wrap_HammingComputer64_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10204 PyObject *resultobj = 0;
10205 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
10206 uint8_t *arg2 = (uint8_t *) 0 ;
10207 int arg3 ;
10208 void *argp1 = 0 ;
10209 int res1 = 0 ;
10210 void *argp2 = 0 ;
10211 int res2 = 0 ;
10212 int val3 ;
10213 int ecode3 = 0 ;
10214 PyObject * obj0 = 0 ;
10215 PyObject * obj1 = 0 ;
10216 PyObject * obj2 = 0 ;
10217
10218 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputer64_set",&obj0,&obj1,&obj2)) SWIG_fail;
10219 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10220 if (!SWIG_IsOK(res1)) {
10221 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_set" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10222 }
10223 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10224 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10225 if (!SWIG_IsOK(res2)) {
10226 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer64_set" "', argument " "2"" of type '" "uint8_t const *""'");
10227 }
10228 arg2 = reinterpret_cast< uint8_t * >(argp2);
10229 ecode3 = SWIG_AsVal_int(obj2, &val3);
10230 if (!SWIG_IsOK(ecode3)) {
10231 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputer64_set" "', argument " "3"" of type '" "int""'");
10232 }
10233 arg3 = static_cast< int >(val3);
10234 {
10235 Py_BEGIN_ALLOW_THREADS
10236 try {
10237 (arg1)->set((uint8_t const *)arg2,arg3);
10238 } catch(faiss::FaissException & e) {
10239 PyEval_RestoreThread(_save);
10240 PyErr_SetString(PyExc_RuntimeError, e.what());
10241 SWIG_fail;
10242 }
10243 Py_END_ALLOW_THREADS
10244 }
10245 resultobj = SWIG_Py_Void();
10246 return resultobj;
10247 fail:
10248 return NULL;
10249 }
10250
10251
10252 SWIGINTERN PyObject *_wrap_HammingComputer64_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10253 PyObject *resultobj = 0;
10254 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
10255 uint8_t *arg2 = (uint8_t *) 0 ;
10256 void *argp1 = 0 ;
10257 int res1 = 0 ;
10258 void *argp2 = 0 ;
10259 int res2 = 0 ;
10260 PyObject * obj0 = 0 ;
10261 PyObject * obj1 = 0 ;
10262 int result;
10263
10264 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputer64_hamming",&obj0,&obj1)) SWIG_fail;
10265 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, 0 | 0 );
10266 if (!SWIG_IsOK(res1)) {
10267 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputer64_hamming" "', argument " "1"" of type '" "faiss::HammingComputer64 const *""'");
10268 }
10269 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10270 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10271 if (!SWIG_IsOK(res2)) {
10272 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputer64_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
10273 }
10274 arg2 = reinterpret_cast< uint8_t * >(argp2);
10275 {
10276 Py_BEGIN_ALLOW_THREADS
10277 try {
10278 result = (int)((faiss::HammingComputer64 const *)arg1)->hamming((uint8_t const *)arg2);
10279 } catch(faiss::FaissException & e) {
10280 PyEval_RestoreThread(_save);
10281 PyErr_SetString(PyExc_RuntimeError, e.what());
10282 SWIG_fail;
10283 }
10284 Py_END_ALLOW_THREADS
10285 }
10286 resultobj = SWIG_From_int(static_cast< int >(result));
10287 return resultobj;
10288 fail:
10289 return NULL;
10290 }
10291
10292
10293 SWIGINTERN PyObject *_wrap_delete_HammingComputer64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10294 PyObject *resultobj = 0;
10295 faiss::HammingComputer64 *arg1 = (faiss::HammingComputer64 *) 0 ;
10296 void *argp1 = 0 ;
10297 int res1 = 0 ;
10298 PyObject * obj0 = 0 ;
10299
10300 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputer64",&obj0)) SWIG_fail;
10301 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputer64, SWIG_POINTER_DISOWN | 0 );
10302 if (!SWIG_IsOK(res1)) {
10303 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputer64" "', argument " "1"" of type '" "faiss::HammingComputer64 *""'");
10304 }
10305 arg1 = reinterpret_cast< faiss::HammingComputer64 * >(argp1);
10306 delete arg1;
10307 resultobj = SWIG_Py_Void();
10308 return resultobj;
10309 fail:
10310 return NULL;
10311 }
10312
10313
10314 SWIGINTERN PyObject *HammingComputer64_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10315 PyObject *obj;
10316 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
10317 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputer64, SWIG_NewClientData(obj));
10318 return SWIG_Py_Void();
10319 }
10320
10321 SWIGINTERN PyObject *_wrap_HammingComputerDefault_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10322 PyObject *resultobj = 0;
10323 faiss::HammingComputerDefault *arg1 = (faiss::HammingComputerDefault *) 0 ;
10324 uint8_t *arg2 = (uint8_t *) 0 ;
10325 void *argp1 = 0 ;
10326 int res1 = 0 ;
10327 void *argp2 = 0 ;
10328 int res2 = 0 ;
10329 PyObject * obj0 = 0 ;
10330 PyObject * obj1 = 0 ;
10331
10332 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerDefault_a_set",&obj0,&obj1)) SWIG_fail;
10333 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10334 if (!SWIG_IsOK(res1)) {
10335 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_a_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10336 }
10337 arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10338 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, SWIG_POINTER_DISOWN | 0 );
10339 if (!SWIG_IsOK(res2)) {
10340 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerDefault_a_set" "', argument " "2"" of type '" "uint8_t const *""'");
10341 }
10342 arg2 = reinterpret_cast< uint8_t * >(argp2);
10343 if (arg1) (arg1)->a = (uint8_t const *)arg2;
10344 resultobj = SWIG_Py_Void();
10345 return resultobj;
10346 fail:
10347 return NULL;
10348 }
10349
10350
10351 SWIGINTERN PyObject *_wrap_HammingComputerDefault_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10352 PyObject *resultobj = 0;
10353 faiss::HammingComputerDefault *arg1 = (faiss::HammingComputerDefault *) 0 ;
10354 void *argp1 = 0 ;
10355 int res1 = 0 ;
10356 PyObject * obj0 = 0 ;
10357 uint8_t *result = 0 ;
10358
10359 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerDefault_a_get",&obj0)) SWIG_fail;
10360 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10361 if (!SWIG_IsOK(res1)) {
10362 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_a_get" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10363 }
10364 arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10365 result = (uint8_t *) ((arg1)->a);
10366 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
10367 return resultobj;
10368 fail:
10369 return NULL;
10370 }
10371
10372
10373 SWIGINTERN PyObject *_wrap_HammingComputerDefault_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10374 PyObject *resultobj = 0;
10375 faiss::HammingComputerDefault *arg1 = (faiss::HammingComputerDefault *) 0 ;
10376 int arg2 ;
10377 void *argp1 = 0 ;
10378 int res1 = 0 ;
10379 int val2 ;
10380 int ecode2 = 0 ;
10381 PyObject * obj0 = 0 ;
10382 PyObject * obj1 = 0 ;
10383
10384 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerDefault_n_set",&obj0,&obj1)) SWIG_fail;
10385 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10386 if (!SWIG_IsOK(res1)) {
10387 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_n_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10388 }
10389 arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10390 ecode2 = SWIG_AsVal_int(obj1, &val2);
10391 if (!SWIG_IsOK(ecode2)) {
10392 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputerDefault_n_set" "', argument " "2"" of type '" "int""'");
10393 }
10394 arg2 = static_cast< int >(val2);
10395 if (arg1) (arg1)->n = arg2;
10396 resultobj = SWIG_Py_Void();
10397 return resultobj;
10398 fail:
10399 return NULL;
10400 }
10401
10402
10403 SWIGINTERN PyObject *_wrap_HammingComputerDefault_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10404 PyObject *resultobj = 0;
10405 faiss::HammingComputerDefault *arg1 = (faiss::HammingComputerDefault *) 0 ;
10406 void *argp1 = 0 ;
10407 int res1 = 0 ;
10408 PyObject * obj0 = 0 ;
10409 int result;
10410
10411 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerDefault_n_get",&obj0)) SWIG_fail;
10412 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10413 if (!SWIG_IsOK(res1)) {
10414 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_n_get" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10415 }
10416 arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10417 result = (int) ((arg1)->n);
10418 resultobj = SWIG_From_int(static_cast< int >(result));
10419 return resultobj;
10420 fail:
10421 return NULL;
10422 }
10423
10424
10425 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10426 PyObject *resultobj = 0;
10427 faiss::HammingComputerDefault *result = 0 ;
10428
10429 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputerDefault")) SWIG_fail;
10430 {
10431 Py_BEGIN_ALLOW_THREADS
10432 try {
10433 result = (faiss::HammingComputerDefault *)new faiss::HammingComputerDefault();
10434 } catch(faiss::FaissException & e) {
10435 PyEval_RestoreThread(_save);
10436 PyErr_SetString(PyExc_RuntimeError, e.what());
10437 SWIG_fail;
10438 }
10439 Py_END_ALLOW_THREADS
10440 }
10441 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_NEW | 0 );
10442 return resultobj;
10443 fail:
10444 return NULL;
10445 }
10446
10447
10448 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10449 PyObject *resultobj = 0;
10450 uint8_t *arg1 = (uint8_t *) 0 ;
10451 int arg2 ;
10452 void *argp1 = 0 ;
10453 int res1 = 0 ;
10454 int val2 ;
10455 int ecode2 = 0 ;
10456 PyObject * obj0 = 0 ;
10457 PyObject * obj1 = 0 ;
10458 faiss::HammingComputerDefault *result = 0 ;
10459
10460 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputerDefault",&obj0,&obj1)) SWIG_fail;
10461 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
10462 if (!SWIG_IsOK(res1)) {
10463 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputerDefault" "', argument " "1"" of type '" "uint8_t const *""'");
10464 }
10465 arg1 = reinterpret_cast< uint8_t * >(argp1);
10466 ecode2 = SWIG_AsVal_int(obj1, &val2);
10467 if (!SWIG_IsOK(ecode2)) {
10468 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputerDefault" "', argument " "2"" of type '" "int""'");
10469 }
10470 arg2 = static_cast< int >(val2);
10471 {
10472 Py_BEGIN_ALLOW_THREADS
10473 try {
10474 result = (faiss::HammingComputerDefault *)new faiss::HammingComputerDefault((uint8_t const *)arg1,arg2);
10475 } catch(faiss::FaissException & e) {
10476 PyEval_RestoreThread(_save);
10477 PyErr_SetString(PyExc_RuntimeError, e.what());
10478 SWIG_fail;
10479 }
10480 Py_END_ALLOW_THREADS
10481 }
10482 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_NEW | 0 );
10483 return resultobj;
10484 fail:
10485 return NULL;
10486 }
10487
10488
10489 SWIGINTERN PyObject *_wrap_new_HammingComputerDefault(PyObject *self, PyObject *args) {
10490 Py_ssize_t argc;
10491 PyObject *argv[3] = {
10492 0
10493 };
10494 Py_ssize_t ii;
10495
10496 if (!PyTuple_Check(args)) SWIG_fail;
10497 argc = args ? PyObject_Length(args) : 0;
10498 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
10499 argv[ii] = PyTuple_GET_ITEM(args,ii);
10500 }
10501 if (argc == 0) {
10502 return _wrap_new_HammingComputerDefault__SWIG_0(self, args);
10503 }
10504 if (argc == 2) {
10505 int _v;
10506 void *vptr = 0;
10507 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
10508 _v = SWIG_CheckState(res);
10509 if (_v) {
10510 {
10511 int res = SWIG_AsVal_int(argv[1], NULL);
10512 _v = SWIG_CheckState(res);
10513 }
10514 if (_v) {
10515 return _wrap_new_HammingComputerDefault__SWIG_1(self, args);
10516 }
10517 }
10518 }
10519
10520 fail:
10521 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputerDefault'.\n"
10522 " Possible C/C++ prototypes are:\n"
10523 " faiss::HammingComputerDefault::HammingComputerDefault()\n"
10524 " faiss::HammingComputerDefault::HammingComputerDefault(uint8_t const *,int)\n");
10525 return 0;
10526 }
10527
10528
10529 SWIGINTERN PyObject *_wrap_HammingComputerDefault_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10530 PyObject *resultobj = 0;
10531 faiss::HammingComputerDefault *arg1 = (faiss::HammingComputerDefault *) 0 ;
10532 uint8_t *arg2 = (uint8_t *) 0 ;
10533 int arg3 ;
10534 void *argp1 = 0 ;
10535 int res1 = 0 ;
10536 void *argp2 = 0 ;
10537 int res2 = 0 ;
10538 int val3 ;
10539 int ecode3 = 0 ;
10540 PyObject * obj0 = 0 ;
10541 PyObject * obj1 = 0 ;
10542 PyObject * obj2 = 0 ;
10543
10544 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputerDefault_set",&obj0,&obj1,&obj2)) SWIG_fail;
10545 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10546 if (!SWIG_IsOK(res1)) {
10547 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_set" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10548 }
10549 arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10550 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10551 if (!SWIG_IsOK(res2)) {
10552 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerDefault_set" "', argument " "2"" of type '" "uint8_t const *""'");
10553 }
10554 arg2 = reinterpret_cast< uint8_t * >(argp2);
10555 ecode3 = SWIG_AsVal_int(obj2, &val3);
10556 if (!SWIG_IsOK(ecode3)) {
10557 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputerDefault_set" "', argument " "3"" of type '" "int""'");
10558 }
10559 arg3 = static_cast< int >(val3);
10560 {
10561 Py_BEGIN_ALLOW_THREADS
10562 try {
10563 (arg1)->set((uint8_t const *)arg2,arg3);
10564 } catch(faiss::FaissException & e) {
10565 PyEval_RestoreThread(_save);
10566 PyErr_SetString(PyExc_RuntimeError, e.what());
10567 SWIG_fail;
10568 }
10569 Py_END_ALLOW_THREADS
10570 }
10571 resultobj = SWIG_Py_Void();
10572 return resultobj;
10573 fail:
10574 return NULL;
10575 }
10576
10577
10578 SWIGINTERN PyObject *_wrap_HammingComputerDefault_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10579 PyObject *resultobj = 0;
10580 faiss::HammingComputerDefault *arg1 = (faiss::HammingComputerDefault *) 0 ;
10581 uint8_t *arg2 = (uint8_t *) 0 ;
10582 void *argp1 = 0 ;
10583 int res1 = 0 ;
10584 void *argp2 = 0 ;
10585 int res2 = 0 ;
10586 PyObject * obj0 = 0 ;
10587 PyObject * obj1 = 0 ;
10588 int result;
10589
10590 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerDefault_hamming",&obj0,&obj1)) SWIG_fail;
10591 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, 0 | 0 );
10592 if (!SWIG_IsOK(res1)) {
10593 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerDefault_hamming" "', argument " "1"" of type '" "faiss::HammingComputerDefault const *""'");
10594 }
10595 arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10596 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10597 if (!SWIG_IsOK(res2)) {
10598 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerDefault_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
10599 }
10600 arg2 = reinterpret_cast< uint8_t * >(argp2);
10601 {
10602 Py_BEGIN_ALLOW_THREADS
10603 try {
10604 result = (int)((faiss::HammingComputerDefault const *)arg1)->hamming((uint8_t const *)arg2);
10605 } catch(faiss::FaissException & e) {
10606 PyEval_RestoreThread(_save);
10607 PyErr_SetString(PyExc_RuntimeError, e.what());
10608 SWIG_fail;
10609 }
10610 Py_END_ALLOW_THREADS
10611 }
10612 resultobj = SWIG_From_int(static_cast< int >(result));
10613 return resultobj;
10614 fail:
10615 return NULL;
10616 }
10617
10618
10619 SWIGINTERN PyObject *_wrap_delete_HammingComputerDefault(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10620 PyObject *resultobj = 0;
10621 faiss::HammingComputerDefault *arg1 = (faiss::HammingComputerDefault *) 0 ;
10622 void *argp1 = 0 ;
10623 int res1 = 0 ;
10624 PyObject * obj0 = 0 ;
10625
10626 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputerDefault",&obj0)) SWIG_fail;
10627 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_POINTER_DISOWN | 0 );
10628 if (!SWIG_IsOK(res1)) {
10629 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputerDefault" "', argument " "1"" of type '" "faiss::HammingComputerDefault *""'");
10630 }
10631 arg1 = reinterpret_cast< faiss::HammingComputerDefault * >(argp1);
10632 delete arg1;
10633 resultobj = SWIG_Py_Void();
10634 return resultobj;
10635 fail:
10636 return NULL;
10637 }
10638
10639
10640 SWIGINTERN PyObject *HammingComputerDefault_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10641 PyObject *obj;
10642 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
10643 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerDefault, SWIG_NewClientData(obj));
10644 return SWIG_Py_Void();
10645 }
10646
10647 SWIGINTERN PyObject *_wrap_HammingComputerM8_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10648 PyObject *resultobj = 0;
10649 faiss::HammingComputerM8 *arg1 = (faiss::HammingComputerM8 *) 0 ;
10650 uint64_t *arg2 = (uint64_t *) 0 ;
10651 void *argp1 = 0 ;
10652 int res1 = 0 ;
10653 void *argp2 = 0 ;
10654 int res2 = 0 ;
10655 PyObject * obj0 = 0 ;
10656 PyObject * obj1 = 0 ;
10657
10658 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM8_a_set",&obj0,&obj1)) SWIG_fail;
10659 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10660 if (!SWIG_IsOK(res1)) {
10661 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_a_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10662 }
10663 arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10664 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, SWIG_POINTER_DISOWN | 0 );
10665 if (!SWIG_IsOK(res2)) {
10666 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM8_a_set" "', argument " "2"" of type '" "uint64_t const *""'");
10667 }
10668 arg2 = reinterpret_cast< uint64_t * >(argp2);
10669 if (arg1) (arg1)->a = (uint64_t const *)arg2;
10670 resultobj = SWIG_Py_Void();
10671 return resultobj;
10672 fail:
10673 return NULL;
10674 }
10675
10676
10677 SWIGINTERN PyObject *_wrap_HammingComputerM8_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10678 PyObject *resultobj = 0;
10679 faiss::HammingComputerM8 *arg1 = (faiss::HammingComputerM8 *) 0 ;
10680 void *argp1 = 0 ;
10681 int res1 = 0 ;
10682 PyObject * obj0 = 0 ;
10683 uint64_t *result = 0 ;
10684
10685 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerM8_a_get",&obj0)) SWIG_fail;
10686 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10687 if (!SWIG_IsOK(res1)) {
10688 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_a_get" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10689 }
10690 arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10691 result = (uint64_t *) ((arg1)->a);
10692 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
10693 return resultobj;
10694 fail:
10695 return NULL;
10696 }
10697
10698
10699 SWIGINTERN PyObject *_wrap_HammingComputerM8_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10700 PyObject *resultobj = 0;
10701 faiss::HammingComputerM8 *arg1 = (faiss::HammingComputerM8 *) 0 ;
10702 int arg2 ;
10703 void *argp1 = 0 ;
10704 int res1 = 0 ;
10705 int val2 ;
10706 int ecode2 = 0 ;
10707 PyObject * obj0 = 0 ;
10708 PyObject * obj1 = 0 ;
10709
10710 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM8_n_set",&obj0,&obj1)) SWIG_fail;
10711 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10712 if (!SWIG_IsOK(res1)) {
10713 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_n_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10714 }
10715 arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10716 ecode2 = SWIG_AsVal_int(obj1, &val2);
10717 if (!SWIG_IsOK(ecode2)) {
10718 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputerM8_n_set" "', argument " "2"" of type '" "int""'");
10719 }
10720 arg2 = static_cast< int >(val2);
10721 if (arg1) (arg1)->n = arg2;
10722 resultobj = SWIG_Py_Void();
10723 return resultobj;
10724 fail:
10725 return NULL;
10726 }
10727
10728
10729 SWIGINTERN PyObject *_wrap_HammingComputerM8_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10730 PyObject *resultobj = 0;
10731 faiss::HammingComputerM8 *arg1 = (faiss::HammingComputerM8 *) 0 ;
10732 void *argp1 = 0 ;
10733 int res1 = 0 ;
10734 PyObject * obj0 = 0 ;
10735 int result;
10736
10737 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerM8_n_get",&obj0)) SWIG_fail;
10738 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10739 if (!SWIG_IsOK(res1)) {
10740 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_n_get" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10741 }
10742 arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10743 result = (int) ((arg1)->n);
10744 resultobj = SWIG_From_int(static_cast< int >(result));
10745 return resultobj;
10746 fail:
10747 return NULL;
10748 }
10749
10750
10751 SWIGINTERN PyObject *_wrap_new_HammingComputerM8__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10752 PyObject *resultobj = 0;
10753 faiss::HammingComputerM8 *result = 0 ;
10754
10755 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputerM8")) SWIG_fail;
10756 {
10757 Py_BEGIN_ALLOW_THREADS
10758 try {
10759 result = (faiss::HammingComputerM8 *)new faiss::HammingComputerM8();
10760 } catch(faiss::FaissException & e) {
10761 PyEval_RestoreThread(_save);
10762 PyErr_SetString(PyExc_RuntimeError, e.what());
10763 SWIG_fail;
10764 }
10765 Py_END_ALLOW_THREADS
10766 }
10767 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_NEW | 0 );
10768 return resultobj;
10769 fail:
10770 return NULL;
10771 }
10772
10773
10774 SWIGINTERN PyObject *_wrap_new_HammingComputerM8__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10775 PyObject *resultobj = 0;
10776 uint8_t *arg1 = (uint8_t *) 0 ;
10777 int arg2 ;
10778 void *argp1 = 0 ;
10779 int res1 = 0 ;
10780 int val2 ;
10781 int ecode2 = 0 ;
10782 PyObject * obj0 = 0 ;
10783 PyObject * obj1 = 0 ;
10784 faiss::HammingComputerM8 *result = 0 ;
10785
10786 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputerM8",&obj0,&obj1)) SWIG_fail;
10787 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
10788 if (!SWIG_IsOK(res1)) {
10789 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputerM8" "', argument " "1"" of type '" "uint8_t const *""'");
10790 }
10791 arg1 = reinterpret_cast< uint8_t * >(argp1);
10792 ecode2 = SWIG_AsVal_int(obj1, &val2);
10793 if (!SWIG_IsOK(ecode2)) {
10794 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputerM8" "', argument " "2"" of type '" "int""'");
10795 }
10796 arg2 = static_cast< int >(val2);
10797 {
10798 Py_BEGIN_ALLOW_THREADS
10799 try {
10800 result = (faiss::HammingComputerM8 *)new faiss::HammingComputerM8((uint8_t const *)arg1,arg2);
10801 } catch(faiss::FaissException & e) {
10802 PyEval_RestoreThread(_save);
10803 PyErr_SetString(PyExc_RuntimeError, e.what());
10804 SWIG_fail;
10805 }
10806 Py_END_ALLOW_THREADS
10807 }
10808 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_NEW | 0 );
10809 return resultobj;
10810 fail:
10811 return NULL;
10812 }
10813
10814
10815 SWIGINTERN PyObject *_wrap_new_HammingComputerM8(PyObject *self, PyObject *args) {
10816 Py_ssize_t argc;
10817 PyObject *argv[3] = {
10818 0
10819 };
10820 Py_ssize_t ii;
10821
10822 if (!PyTuple_Check(args)) SWIG_fail;
10823 argc = args ? PyObject_Length(args) : 0;
10824 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
10825 argv[ii] = PyTuple_GET_ITEM(args,ii);
10826 }
10827 if (argc == 0) {
10828 return _wrap_new_HammingComputerM8__SWIG_0(self, args);
10829 }
10830 if (argc == 2) {
10831 int _v;
10832 void *vptr = 0;
10833 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
10834 _v = SWIG_CheckState(res);
10835 if (_v) {
10836 {
10837 int res = SWIG_AsVal_int(argv[1], NULL);
10838 _v = SWIG_CheckState(res);
10839 }
10840 if (_v) {
10841 return _wrap_new_HammingComputerM8__SWIG_1(self, args);
10842 }
10843 }
10844 }
10845
10846 fail:
10847 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputerM8'.\n"
10848 " Possible C/C++ prototypes are:\n"
10849 " faiss::HammingComputerM8::HammingComputerM8()\n"
10850 " faiss::HammingComputerM8::HammingComputerM8(uint8_t const *,int)\n");
10851 return 0;
10852 }
10853
10854
10855 SWIGINTERN PyObject *_wrap_HammingComputerM8_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10856 PyObject *resultobj = 0;
10857 faiss::HammingComputerM8 *arg1 = (faiss::HammingComputerM8 *) 0 ;
10858 uint8_t *arg2 = (uint8_t *) 0 ;
10859 int arg3 ;
10860 void *argp1 = 0 ;
10861 int res1 = 0 ;
10862 void *argp2 = 0 ;
10863 int res2 = 0 ;
10864 int val3 ;
10865 int ecode3 = 0 ;
10866 PyObject * obj0 = 0 ;
10867 PyObject * obj1 = 0 ;
10868 PyObject * obj2 = 0 ;
10869
10870 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputerM8_set",&obj0,&obj1,&obj2)) SWIG_fail;
10871 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10872 if (!SWIG_IsOK(res1)) {
10873 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_set" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10874 }
10875 arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10876 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10877 if (!SWIG_IsOK(res2)) {
10878 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM8_set" "', argument " "2"" of type '" "uint8_t const *""'");
10879 }
10880 arg2 = reinterpret_cast< uint8_t * >(argp2);
10881 ecode3 = SWIG_AsVal_int(obj2, &val3);
10882 if (!SWIG_IsOK(ecode3)) {
10883 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputerM8_set" "', argument " "3"" of type '" "int""'");
10884 }
10885 arg3 = static_cast< int >(val3);
10886 {
10887 Py_BEGIN_ALLOW_THREADS
10888 try {
10889 (arg1)->set((uint8_t const *)arg2,arg3);
10890 } catch(faiss::FaissException & e) {
10891 PyEval_RestoreThread(_save);
10892 PyErr_SetString(PyExc_RuntimeError, e.what());
10893 SWIG_fail;
10894 }
10895 Py_END_ALLOW_THREADS
10896 }
10897 resultobj = SWIG_Py_Void();
10898 return resultobj;
10899 fail:
10900 return NULL;
10901 }
10902
10903
10904 SWIGINTERN PyObject *_wrap_HammingComputerM8_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10905 PyObject *resultobj = 0;
10906 faiss::HammingComputerM8 *arg1 = (faiss::HammingComputerM8 *) 0 ;
10907 uint8_t *arg2 = (uint8_t *) 0 ;
10908 void *argp1 = 0 ;
10909 int res1 = 0 ;
10910 void *argp2 = 0 ;
10911 int res2 = 0 ;
10912 PyObject * obj0 = 0 ;
10913 PyObject * obj1 = 0 ;
10914 int result;
10915
10916 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM8_hamming",&obj0,&obj1)) SWIG_fail;
10917 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, 0 | 0 );
10918 if (!SWIG_IsOK(res1)) {
10919 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM8_hamming" "', argument " "1"" of type '" "faiss::HammingComputerM8 const *""'");
10920 }
10921 arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10922 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
10923 if (!SWIG_IsOK(res2)) {
10924 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
10925 }
10926 arg2 = reinterpret_cast< uint8_t * >(argp2);
10927 {
10928 Py_BEGIN_ALLOW_THREADS
10929 try {
10930 result = (int)((faiss::HammingComputerM8 const *)arg1)->hamming((uint8_t const *)arg2);
10931 } catch(faiss::FaissException & e) {
10932 PyEval_RestoreThread(_save);
10933 PyErr_SetString(PyExc_RuntimeError, e.what());
10934 SWIG_fail;
10935 }
10936 Py_END_ALLOW_THREADS
10937 }
10938 resultobj = SWIG_From_int(static_cast< int >(result));
10939 return resultobj;
10940 fail:
10941 return NULL;
10942 }
10943
10944
10945 SWIGINTERN PyObject *_wrap_delete_HammingComputerM8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10946 PyObject *resultobj = 0;
10947 faiss::HammingComputerM8 *arg1 = (faiss::HammingComputerM8 *) 0 ;
10948 void *argp1 = 0 ;
10949 int res1 = 0 ;
10950 PyObject * obj0 = 0 ;
10951
10952 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputerM8",&obj0)) SWIG_fail;
10953 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM8, SWIG_POINTER_DISOWN | 0 );
10954 if (!SWIG_IsOK(res1)) {
10955 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputerM8" "', argument " "1"" of type '" "faiss::HammingComputerM8 *""'");
10956 }
10957 arg1 = reinterpret_cast< faiss::HammingComputerM8 * >(argp1);
10958 delete arg1;
10959 resultobj = SWIG_Py_Void();
10960 return resultobj;
10961 fail:
10962 return NULL;
10963 }
10964
10965
10966 SWIGINTERN PyObject *HammingComputerM8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10967 PyObject *obj;
10968 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
10969 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerM8, SWIG_NewClientData(obj));
10970 return SWIG_Py_Void();
10971 }
10972
10973 SWIGINTERN PyObject *_wrap_HammingComputerM4_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
10974 PyObject *resultobj = 0;
10975 faiss::HammingComputerM4 *arg1 = (faiss::HammingComputerM4 *) 0 ;
10976 uint32_t *arg2 = (uint32_t *) 0 ;
10977 void *argp1 = 0 ;
10978 int res1 = 0 ;
10979 void *argp2 = 0 ;
10980 int res2 = 0 ;
10981 PyObject * obj0 = 0 ;
10982 PyObject * obj1 = 0 ;
10983
10984 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM4_a_set",&obj0,&obj1)) SWIG_fail;
10985 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
10986 if (!SWIG_IsOK(res1)) {
10987 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_a_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
10988 }
10989 arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
10990 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_uint32_t, SWIG_POINTER_DISOWN | 0 );
10991 if (!SWIG_IsOK(res2)) {
10992 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM4_a_set" "', argument " "2"" of type '" "uint32_t const *""'");
10993 }
10994 arg2 = reinterpret_cast< uint32_t * >(argp2);
10995 if (arg1) (arg1)->a = (uint32_t const *)arg2;
10996 resultobj = SWIG_Py_Void();
10997 return resultobj;
10998 fail:
10999 return NULL;
11000 }
11001
11002
11003 SWIGINTERN PyObject *_wrap_HammingComputerM4_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11004 PyObject *resultobj = 0;
11005 faiss::HammingComputerM4 *arg1 = (faiss::HammingComputerM4 *) 0 ;
11006 void *argp1 = 0 ;
11007 int res1 = 0 ;
11008 PyObject * obj0 = 0 ;
11009 uint32_t *result = 0 ;
11010
11011 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerM4_a_get",&obj0)) SWIG_fail;
11012 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11013 if (!SWIG_IsOK(res1)) {
11014 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_a_get" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11015 }
11016 arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11017 result = (uint32_t *) ((arg1)->a);
11018 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uint32_t, 0 | 0 );
11019 return resultobj;
11020 fail:
11021 return NULL;
11022 }
11023
11024
11025 SWIGINTERN PyObject *_wrap_HammingComputerM4_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11026 PyObject *resultobj = 0;
11027 faiss::HammingComputerM4 *arg1 = (faiss::HammingComputerM4 *) 0 ;
11028 int arg2 ;
11029 void *argp1 = 0 ;
11030 int res1 = 0 ;
11031 int val2 ;
11032 int ecode2 = 0 ;
11033 PyObject * obj0 = 0 ;
11034 PyObject * obj1 = 0 ;
11035
11036 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM4_n_set",&obj0,&obj1)) SWIG_fail;
11037 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11038 if (!SWIG_IsOK(res1)) {
11039 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_n_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11040 }
11041 arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11042 ecode2 = SWIG_AsVal_int(obj1, &val2);
11043 if (!SWIG_IsOK(ecode2)) {
11044 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HammingComputerM4_n_set" "', argument " "2"" of type '" "int""'");
11045 }
11046 arg2 = static_cast< int >(val2);
11047 if (arg1) (arg1)->n = arg2;
11048 resultobj = SWIG_Py_Void();
11049 return resultobj;
11050 fail:
11051 return NULL;
11052 }
11053
11054
11055 SWIGINTERN PyObject *_wrap_HammingComputerM4_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11056 PyObject *resultobj = 0;
11057 faiss::HammingComputerM4 *arg1 = (faiss::HammingComputerM4 *) 0 ;
11058 void *argp1 = 0 ;
11059 int res1 = 0 ;
11060 PyObject * obj0 = 0 ;
11061 int result;
11062
11063 if (!PyArg_ParseTuple(args,(char *)"O:HammingComputerM4_n_get",&obj0)) SWIG_fail;
11064 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11065 if (!SWIG_IsOK(res1)) {
11066 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_n_get" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11067 }
11068 arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11069 result = (int) ((arg1)->n);
11070 resultobj = SWIG_From_int(static_cast< int >(result));
11071 return resultobj;
11072 fail:
11073 return NULL;
11074 }
11075
11076
11077 SWIGINTERN PyObject *_wrap_new_HammingComputerM4__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11078 PyObject *resultobj = 0;
11079 faiss::HammingComputerM4 *result = 0 ;
11080
11081 if (!PyArg_ParseTuple(args,(char *)":new_HammingComputerM4")) SWIG_fail;
11082 {
11083 Py_BEGIN_ALLOW_THREADS
11084 try {
11085 result = (faiss::HammingComputerM4 *)new faiss::HammingComputerM4();
11086 } catch(faiss::FaissException & e) {
11087 PyEval_RestoreThread(_save);
11088 PyErr_SetString(PyExc_RuntimeError, e.what());
11089 SWIG_fail;
11090 }
11091 Py_END_ALLOW_THREADS
11092 }
11093 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_NEW | 0 );
11094 return resultobj;
11095 fail:
11096 return NULL;
11097 }
11098
11099
11100 SWIGINTERN PyObject *_wrap_new_HammingComputerM4__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11101 PyObject *resultobj = 0;
11102 uint8_t *arg1 = (uint8_t *) 0 ;
11103 int arg2 ;
11104 void *argp1 = 0 ;
11105 int res1 = 0 ;
11106 int val2 ;
11107 int ecode2 = 0 ;
11108 PyObject * obj0 = 0 ;
11109 PyObject * obj1 = 0 ;
11110 faiss::HammingComputerM4 *result = 0 ;
11111
11112 if (!PyArg_ParseTuple(args,(char *)"OO:new_HammingComputerM4",&obj0,&obj1)) SWIG_fail;
11113 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11114 if (!SWIG_IsOK(res1)) {
11115 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_HammingComputerM4" "', argument " "1"" of type '" "uint8_t const *""'");
11116 }
11117 arg1 = reinterpret_cast< uint8_t * >(argp1);
11118 ecode2 = SWIG_AsVal_int(obj1, &val2);
11119 if (!SWIG_IsOK(ecode2)) {
11120 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_HammingComputerM4" "', argument " "2"" of type '" "int""'");
11121 }
11122 arg2 = static_cast< int >(val2);
11123 {
11124 Py_BEGIN_ALLOW_THREADS
11125 try {
11126 result = (faiss::HammingComputerM4 *)new faiss::HammingComputerM4((uint8_t const *)arg1,arg2);
11127 } catch(faiss::FaissException & e) {
11128 PyEval_RestoreThread(_save);
11129 PyErr_SetString(PyExc_RuntimeError, e.what());
11130 SWIG_fail;
11131 }
11132 Py_END_ALLOW_THREADS
11133 }
11134 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_NEW | 0 );
11135 return resultobj;
11136 fail:
11137 return NULL;
11138 }
11139
11140
11141 SWIGINTERN PyObject *_wrap_new_HammingComputerM4(PyObject *self, PyObject *args) {
11142 Py_ssize_t argc;
11143 PyObject *argv[3] = {
11144 0
11145 };
11146 Py_ssize_t ii;
11147
11148 if (!PyTuple_Check(args)) SWIG_fail;
11149 argc = args ? PyObject_Length(args) : 0;
11150 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
11151 argv[ii] = PyTuple_GET_ITEM(args,ii);
11152 }
11153 if (argc == 0) {
11154 return _wrap_new_HammingComputerM4__SWIG_0(self, args);
11155 }
11156 if (argc == 2) {
11157 int _v;
11158 void *vptr = 0;
11159 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
11160 _v = SWIG_CheckState(res);
11161 if (_v) {
11162 {
11163 int res = SWIG_AsVal_int(argv[1], NULL);
11164 _v = SWIG_CheckState(res);
11165 }
11166 if (_v) {
11167 return _wrap_new_HammingComputerM4__SWIG_1(self, args);
11168 }
11169 }
11170 }
11171
11172 fail:
11173 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HammingComputerM4'.\n"
11174 " Possible C/C++ prototypes are:\n"
11175 " faiss::HammingComputerM4::HammingComputerM4()\n"
11176 " faiss::HammingComputerM4::HammingComputerM4(uint8_t const *,int)\n");
11177 return 0;
11178 }
11179
11180
11181 SWIGINTERN PyObject *_wrap_HammingComputerM4_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11182 PyObject *resultobj = 0;
11183 faiss::HammingComputerM4 *arg1 = (faiss::HammingComputerM4 *) 0 ;
11184 uint8_t *arg2 = (uint8_t *) 0 ;
11185 int arg3 ;
11186 void *argp1 = 0 ;
11187 int res1 = 0 ;
11188 void *argp2 = 0 ;
11189 int res2 = 0 ;
11190 int val3 ;
11191 int ecode3 = 0 ;
11192 PyObject * obj0 = 0 ;
11193 PyObject * obj1 = 0 ;
11194 PyObject * obj2 = 0 ;
11195
11196 if (!PyArg_ParseTuple(args,(char *)"OOO:HammingComputerM4_set",&obj0,&obj1,&obj2)) SWIG_fail;
11197 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11198 if (!SWIG_IsOK(res1)) {
11199 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_set" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11200 }
11201 arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11202 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11203 if (!SWIG_IsOK(res2)) {
11204 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM4_set" "', argument " "2"" of type '" "uint8_t const *""'");
11205 }
11206 arg2 = reinterpret_cast< uint8_t * >(argp2);
11207 ecode3 = SWIG_AsVal_int(obj2, &val3);
11208 if (!SWIG_IsOK(ecode3)) {
11209 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HammingComputerM4_set" "', argument " "3"" of type '" "int""'");
11210 }
11211 arg3 = static_cast< int >(val3);
11212 {
11213 Py_BEGIN_ALLOW_THREADS
11214 try {
11215 (arg1)->set((uint8_t const *)arg2,arg3);
11216 } catch(faiss::FaissException & e) {
11217 PyEval_RestoreThread(_save);
11218 PyErr_SetString(PyExc_RuntimeError, e.what());
11219 SWIG_fail;
11220 }
11221 Py_END_ALLOW_THREADS
11222 }
11223 resultobj = SWIG_Py_Void();
11224 return resultobj;
11225 fail:
11226 return NULL;
11227 }
11228
11229
11230 SWIGINTERN PyObject *_wrap_HammingComputerM4_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11231 PyObject *resultobj = 0;
11232 faiss::HammingComputerM4 *arg1 = (faiss::HammingComputerM4 *) 0 ;
11233 uint8_t *arg2 = (uint8_t *) 0 ;
11234 void *argp1 = 0 ;
11235 int res1 = 0 ;
11236 void *argp2 = 0 ;
11237 int res2 = 0 ;
11238 PyObject * obj0 = 0 ;
11239 PyObject * obj1 = 0 ;
11240 int result;
11241
11242 if (!PyArg_ParseTuple(args,(char *)"OO:HammingComputerM4_hamming",&obj0,&obj1)) SWIG_fail;
11243 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, 0 | 0 );
11244 if (!SWIG_IsOK(res1)) {
11245 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HammingComputerM4_hamming" "', argument " "1"" of type '" "faiss::HammingComputerM4 const *""'");
11246 }
11247 arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11248 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11249 if (!SWIG_IsOK(res2)) {
11250 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HammingComputerM4_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11251 }
11252 arg2 = reinterpret_cast< uint8_t * >(argp2);
11253 {
11254 Py_BEGIN_ALLOW_THREADS
11255 try {
11256 result = (int)((faiss::HammingComputerM4 const *)arg1)->hamming((uint8_t const *)arg2);
11257 } catch(faiss::FaissException & e) {
11258 PyEval_RestoreThread(_save);
11259 PyErr_SetString(PyExc_RuntimeError, e.what());
11260 SWIG_fail;
11261 }
11262 Py_END_ALLOW_THREADS
11263 }
11264 resultobj = SWIG_From_int(static_cast< int >(result));
11265 return resultobj;
11266 fail:
11267 return NULL;
11268 }
11269
11270
11271 SWIGINTERN PyObject *_wrap_delete_HammingComputerM4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11272 PyObject *resultobj = 0;
11273 faiss::HammingComputerM4 *arg1 = (faiss::HammingComputerM4 *) 0 ;
11274 void *argp1 = 0 ;
11275 int res1 = 0 ;
11276 PyObject * obj0 = 0 ;
11277
11278 if (!PyArg_ParseTuple(args,(char *)"O:delete_HammingComputerM4",&obj0)) SWIG_fail;
11279 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HammingComputerM4, SWIG_POINTER_DISOWN | 0 );
11280 if (!SWIG_IsOK(res1)) {
11281 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HammingComputerM4" "', argument " "1"" of type '" "faiss::HammingComputerM4 *""'");
11282 }
11283 arg1 = reinterpret_cast< faiss::HammingComputerM4 * >(argp1);
11284 delete arg1;
11285 resultobj = SWIG_Py_Void();
11286 return resultobj;
11287 fail:
11288 return NULL;
11289 }
11290
11291
11292 SWIGINTERN PyObject *HammingComputerM4_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11293 PyObject *obj;
11294 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
11295 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HammingComputerM4, SWIG_NewClientData(obj));
11296 return SWIG_Py_Void();
11297 }
11298
11299 SWIGINTERN PyObject *_wrap_generalized_hamming_64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11300 PyObject *resultobj = 0;
11301 uint64_t arg1 ;
11302 unsigned long val1 ;
11303 int ecode1 = 0 ;
11304 PyObject * obj0 = 0 ;
11305 int result;
11306
11307 if (!PyArg_ParseTuple(args,(char *)"O:generalized_hamming_64",&obj0)) SWIG_fail;
11308 ecode1 = SWIG_AsVal_unsigned_SS_long(obj0, &val1);
11309 if (!SWIG_IsOK(ecode1)) {
11310 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "generalized_hamming_64" "', argument " "1"" of type '" "uint64_t""'");
11311 }
11312 arg1 = static_cast< uint64_t >(val1);
11313 {
11314 Py_BEGIN_ALLOW_THREADS
11315 try {
11316 result = (int)faiss::generalized_hamming_64(arg1);
11317 } catch(faiss::FaissException & e) {
11318 PyEval_RestoreThread(_save);
11319 PyErr_SetString(PyExc_RuntimeError, e.what());
11320 SWIG_fail;
11321 }
11322 Py_END_ALLOW_THREADS
11323 }
11324 resultobj = SWIG_From_int(static_cast< int >(result));
11325 return resultobj;
11326 fail:
11327 return NULL;
11328 }
11329
11330
11331 SWIGINTERN PyObject *_wrap_GenHammingComputer8_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11332 PyObject *resultobj = 0;
11333 faiss::GenHammingComputer8 *arg1 = (faiss::GenHammingComputer8 *) 0 ;
11334 uint64_t arg2 ;
11335 void *argp1 = 0 ;
11336 int res1 = 0 ;
11337 unsigned long val2 ;
11338 int ecode2 = 0 ;
11339 PyObject * obj0 = 0 ;
11340 PyObject * obj1 = 0 ;
11341
11342 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer8_a0_set",&obj0,&obj1)) SWIG_fail;
11343 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11344 if (!SWIG_IsOK(res1)) {
11345 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer8_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11346 }
11347 arg1 = reinterpret_cast< faiss::GenHammingComputer8 * >(argp1);
11348 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11349 if (!SWIG_IsOK(ecode2)) {
11350 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer8_a0_set" "', argument " "2"" of type '" "uint64_t""'");
11351 }
11352 arg2 = static_cast< uint64_t >(val2);
11353 if (arg1) (arg1)->a0 = arg2;
11354 resultobj = SWIG_Py_Void();
11355 return resultobj;
11356 fail:
11357 return NULL;
11358 }
11359
11360
11361 SWIGINTERN PyObject *_wrap_GenHammingComputer8_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11362 PyObject *resultobj = 0;
11363 faiss::GenHammingComputer8 *arg1 = (faiss::GenHammingComputer8 *) 0 ;
11364 void *argp1 = 0 ;
11365 int res1 = 0 ;
11366 PyObject * obj0 = 0 ;
11367 uint64_t result;
11368
11369 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer8_a0_get",&obj0)) SWIG_fail;
11370 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11371 if (!SWIG_IsOK(res1)) {
11372 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer8_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11373 }
11374 arg1 = reinterpret_cast< faiss::GenHammingComputer8 * >(argp1);
11375 result = (uint64_t) ((arg1)->a0);
11376 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11377 return resultobj;
11378 fail:
11379 return NULL;
11380 }
11381
11382
11383 SWIGINTERN PyObject *_wrap_new_GenHammingComputer8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11384 PyObject *resultobj = 0;
11385 uint8_t *arg1 = (uint8_t *) 0 ;
11386 int arg2 ;
11387 void *argp1 = 0 ;
11388 int res1 = 0 ;
11389 int val2 ;
11390 int ecode2 = 0 ;
11391 PyObject * obj0 = 0 ;
11392 PyObject * obj1 = 0 ;
11393 faiss::GenHammingComputer8 *result = 0 ;
11394
11395 if (!PyArg_ParseTuple(args,(char *)"OO:new_GenHammingComputer8",&obj0,&obj1)) SWIG_fail;
11396 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11397 if (!SWIG_IsOK(res1)) {
11398 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenHammingComputer8" "', argument " "1"" of type '" "uint8_t const *""'");
11399 }
11400 arg1 = reinterpret_cast< uint8_t * >(argp1);
11401 ecode2 = SWIG_AsVal_int(obj1, &val2);
11402 if (!SWIG_IsOK(ecode2)) {
11403 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GenHammingComputer8" "', argument " "2"" of type '" "int""'");
11404 }
11405 arg2 = static_cast< int >(val2);
11406 {
11407 Py_BEGIN_ALLOW_THREADS
11408 try {
11409 result = (faiss::GenHammingComputer8 *)new faiss::GenHammingComputer8((uint8_t const *)arg1,arg2);
11410 } catch(faiss::FaissException & e) {
11411 PyEval_RestoreThread(_save);
11412 PyErr_SetString(PyExc_RuntimeError, e.what());
11413 SWIG_fail;
11414 }
11415 Py_END_ALLOW_THREADS
11416 }
11417 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_POINTER_NEW | 0 );
11418 return resultobj;
11419 fail:
11420 return NULL;
11421 }
11422
11423
11424 SWIGINTERN PyObject *_wrap_GenHammingComputer8_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11425 PyObject *resultobj = 0;
11426 faiss::GenHammingComputer8 *arg1 = (faiss::GenHammingComputer8 *) 0 ;
11427 uint8_t *arg2 = (uint8_t *) 0 ;
11428 void *argp1 = 0 ;
11429 int res1 = 0 ;
11430 void *argp2 = 0 ;
11431 int res2 = 0 ;
11432 PyObject * obj0 = 0 ;
11433 PyObject * obj1 = 0 ;
11434 int result;
11435
11436 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer8_hamming",&obj0,&obj1)) SWIG_fail;
11437 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, 0 | 0 );
11438 if (!SWIG_IsOK(res1)) {
11439 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer8_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer8 const *""'");
11440 }
11441 arg1 = reinterpret_cast< faiss::GenHammingComputer8 * >(argp1);
11442 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11443 if (!SWIG_IsOK(res2)) {
11444 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputer8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11445 }
11446 arg2 = reinterpret_cast< uint8_t * >(argp2);
11447 {
11448 Py_BEGIN_ALLOW_THREADS
11449 try {
11450 result = (int)((faiss::GenHammingComputer8 const *)arg1)->hamming((uint8_t const *)arg2);
11451 } catch(faiss::FaissException & e) {
11452 PyEval_RestoreThread(_save);
11453 PyErr_SetString(PyExc_RuntimeError, e.what());
11454 SWIG_fail;
11455 }
11456 Py_END_ALLOW_THREADS
11457 }
11458 resultobj = SWIG_From_int(static_cast< int >(result));
11459 return resultobj;
11460 fail:
11461 return NULL;
11462 }
11463
11464
11465 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11466 PyObject *resultobj = 0;
11467 faiss::GenHammingComputer8 *arg1 = (faiss::GenHammingComputer8 *) 0 ;
11468 void *argp1 = 0 ;
11469 int res1 = 0 ;
11470 PyObject * obj0 = 0 ;
11471
11472 if (!PyArg_ParseTuple(args,(char *)"O:delete_GenHammingComputer8",&obj0)) SWIG_fail;
11473 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_POINTER_DISOWN | 0 );
11474 if (!SWIG_IsOK(res1)) {
11475 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GenHammingComputer8" "', argument " "1"" of type '" "faiss::GenHammingComputer8 *""'");
11476 }
11477 arg1 = reinterpret_cast< faiss::GenHammingComputer8 * >(argp1);
11478 delete arg1;
11479 resultobj = SWIG_Py_Void();
11480 return resultobj;
11481 fail:
11482 return NULL;
11483 }
11484
11485
11486 SWIGINTERN PyObject *GenHammingComputer8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11487 PyObject *obj;
11488 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
11489 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer8, SWIG_NewClientData(obj));
11490 return SWIG_Py_Void();
11491 }
11492
11493 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11494 PyObject *resultobj = 0;
11495 faiss::GenHammingComputer16 *arg1 = (faiss::GenHammingComputer16 *) 0 ;
11496 uint64_t arg2 ;
11497 void *argp1 = 0 ;
11498 int res1 = 0 ;
11499 unsigned long val2 ;
11500 int ecode2 = 0 ;
11501 PyObject * obj0 = 0 ;
11502 PyObject * obj1 = 0 ;
11503
11504 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer16_a0_set",&obj0,&obj1)) SWIG_fail;
11505 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11506 if (!SWIG_IsOK(res1)) {
11507 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11508 }
11509 arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11510 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11511 if (!SWIG_IsOK(ecode2)) {
11512 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer16_a0_set" "', argument " "2"" of type '" "uint64_t""'");
11513 }
11514 arg2 = static_cast< uint64_t >(val2);
11515 if (arg1) (arg1)->a0 = arg2;
11516 resultobj = SWIG_Py_Void();
11517 return resultobj;
11518 fail:
11519 return NULL;
11520 }
11521
11522
11523 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11524 PyObject *resultobj = 0;
11525 faiss::GenHammingComputer16 *arg1 = (faiss::GenHammingComputer16 *) 0 ;
11526 void *argp1 = 0 ;
11527 int res1 = 0 ;
11528 PyObject * obj0 = 0 ;
11529 uint64_t result;
11530
11531 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer16_a0_get",&obj0)) SWIG_fail;
11532 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11533 if (!SWIG_IsOK(res1)) {
11534 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11535 }
11536 arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11537 result = (uint64_t) ((arg1)->a0);
11538 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11539 return resultobj;
11540 fail:
11541 return NULL;
11542 }
11543
11544
11545 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11546 PyObject *resultobj = 0;
11547 faiss::GenHammingComputer16 *arg1 = (faiss::GenHammingComputer16 *) 0 ;
11548 uint64_t arg2 ;
11549 void *argp1 = 0 ;
11550 int res1 = 0 ;
11551 unsigned long val2 ;
11552 int ecode2 = 0 ;
11553 PyObject * obj0 = 0 ;
11554 PyObject * obj1 = 0 ;
11555
11556 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer16_a1_set",&obj0,&obj1)) SWIG_fail;
11557 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11558 if (!SWIG_IsOK(res1)) {
11559 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_a1_set" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11560 }
11561 arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11562 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11563 if (!SWIG_IsOK(ecode2)) {
11564 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer16_a1_set" "', argument " "2"" of type '" "uint64_t""'");
11565 }
11566 arg2 = static_cast< uint64_t >(val2);
11567 if (arg1) (arg1)->a1 = arg2;
11568 resultobj = SWIG_Py_Void();
11569 return resultobj;
11570 fail:
11571 return NULL;
11572 }
11573
11574
11575 SWIGINTERN PyObject *_wrap_GenHammingComputer16_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11576 PyObject *resultobj = 0;
11577 faiss::GenHammingComputer16 *arg1 = (faiss::GenHammingComputer16 *) 0 ;
11578 void *argp1 = 0 ;
11579 int res1 = 0 ;
11580 PyObject * obj0 = 0 ;
11581 uint64_t result;
11582
11583 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer16_a1_get",&obj0)) SWIG_fail;
11584 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11585 if (!SWIG_IsOK(res1)) {
11586 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_a1_get" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11587 }
11588 arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11589 result = (uint64_t) ((arg1)->a1);
11590 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11591 return resultobj;
11592 fail:
11593 return NULL;
11594 }
11595
11596
11597 SWIGINTERN PyObject *_wrap_new_GenHammingComputer16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11598 PyObject *resultobj = 0;
11599 uint8_t *arg1 = (uint8_t *) 0 ;
11600 int arg2 ;
11601 void *argp1 = 0 ;
11602 int res1 = 0 ;
11603 int val2 ;
11604 int ecode2 = 0 ;
11605 PyObject * obj0 = 0 ;
11606 PyObject * obj1 = 0 ;
11607 faiss::GenHammingComputer16 *result = 0 ;
11608
11609 if (!PyArg_ParseTuple(args,(char *)"OO:new_GenHammingComputer16",&obj0,&obj1)) SWIG_fail;
11610 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11611 if (!SWIG_IsOK(res1)) {
11612 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenHammingComputer16" "', argument " "1"" of type '" "uint8_t const *""'");
11613 }
11614 arg1 = reinterpret_cast< uint8_t * >(argp1);
11615 ecode2 = SWIG_AsVal_int(obj1, &val2);
11616 if (!SWIG_IsOK(ecode2)) {
11617 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GenHammingComputer16" "', argument " "2"" of type '" "int""'");
11618 }
11619 arg2 = static_cast< int >(val2);
11620 {
11621 Py_BEGIN_ALLOW_THREADS
11622 try {
11623 result = (faiss::GenHammingComputer16 *)new faiss::GenHammingComputer16((uint8_t const *)arg1,arg2);
11624 } catch(faiss::FaissException & e) {
11625 PyEval_RestoreThread(_save);
11626 PyErr_SetString(PyExc_RuntimeError, e.what());
11627 SWIG_fail;
11628 }
11629 Py_END_ALLOW_THREADS
11630 }
11631 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_POINTER_NEW | 0 );
11632 return resultobj;
11633 fail:
11634 return NULL;
11635 }
11636
11637
11638 SWIGINTERN PyObject *_wrap_GenHammingComputer16_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11639 PyObject *resultobj = 0;
11640 faiss::GenHammingComputer16 *arg1 = (faiss::GenHammingComputer16 *) 0 ;
11641 uint8_t *arg2 = (uint8_t *) 0 ;
11642 void *argp1 = 0 ;
11643 int res1 = 0 ;
11644 void *argp2 = 0 ;
11645 int res2 = 0 ;
11646 PyObject * obj0 = 0 ;
11647 PyObject * obj1 = 0 ;
11648 int result;
11649
11650 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer16_hamming",&obj0,&obj1)) SWIG_fail;
11651 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, 0 | 0 );
11652 if (!SWIG_IsOK(res1)) {
11653 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer16_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer16 const *""'");
11654 }
11655 arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11656 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11657 if (!SWIG_IsOK(res2)) {
11658 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputer16_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11659 }
11660 arg2 = reinterpret_cast< uint8_t * >(argp2);
11661 {
11662 Py_BEGIN_ALLOW_THREADS
11663 try {
11664 result = (int)((faiss::GenHammingComputer16 const *)arg1)->hamming((uint8_t const *)arg2);
11665 } catch(faiss::FaissException & e) {
11666 PyEval_RestoreThread(_save);
11667 PyErr_SetString(PyExc_RuntimeError, e.what());
11668 SWIG_fail;
11669 }
11670 Py_END_ALLOW_THREADS
11671 }
11672 resultobj = SWIG_From_int(static_cast< int >(result));
11673 return resultobj;
11674 fail:
11675 return NULL;
11676 }
11677
11678
11679 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11680 PyObject *resultobj = 0;
11681 faiss::GenHammingComputer16 *arg1 = (faiss::GenHammingComputer16 *) 0 ;
11682 void *argp1 = 0 ;
11683 int res1 = 0 ;
11684 PyObject * obj0 = 0 ;
11685
11686 if (!PyArg_ParseTuple(args,(char *)"O:delete_GenHammingComputer16",&obj0)) SWIG_fail;
11687 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_POINTER_DISOWN | 0 );
11688 if (!SWIG_IsOK(res1)) {
11689 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GenHammingComputer16" "', argument " "1"" of type '" "faiss::GenHammingComputer16 *""'");
11690 }
11691 arg1 = reinterpret_cast< faiss::GenHammingComputer16 * >(argp1);
11692 delete arg1;
11693 resultobj = SWIG_Py_Void();
11694 return resultobj;
11695 fail:
11696 return NULL;
11697 }
11698
11699
11700 SWIGINTERN PyObject *GenHammingComputer16_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11701 PyObject *obj;
11702 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
11703 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer16, SWIG_NewClientData(obj));
11704 return SWIG_Py_Void();
11705 }
11706
11707 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11708 PyObject *resultobj = 0;
11709 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11710 uint64_t arg2 ;
11711 void *argp1 = 0 ;
11712 int res1 = 0 ;
11713 unsigned long val2 ;
11714 int ecode2 = 0 ;
11715 PyObject * obj0 = 0 ;
11716 PyObject * obj1 = 0 ;
11717
11718 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_a0_set",&obj0,&obj1)) SWIG_fail;
11719 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11720 if (!SWIG_IsOK(res1)) {
11721 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a0_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
11722 }
11723 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11724 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11725 if (!SWIG_IsOK(ecode2)) {
11726 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer32_a0_set" "', argument " "2"" of type '" "uint64_t""'");
11727 }
11728 arg2 = static_cast< uint64_t >(val2);
11729 if (arg1) (arg1)->a0 = arg2;
11730 resultobj = SWIG_Py_Void();
11731 return resultobj;
11732 fail:
11733 return NULL;
11734 }
11735
11736
11737 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11738 PyObject *resultobj = 0;
11739 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11740 void *argp1 = 0 ;
11741 int res1 = 0 ;
11742 PyObject * obj0 = 0 ;
11743 uint64_t result;
11744
11745 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer32_a0_get",&obj0)) SWIG_fail;
11746 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11747 if (!SWIG_IsOK(res1)) {
11748 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a0_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
11749 }
11750 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11751 result = (uint64_t) ((arg1)->a0);
11752 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11753 return resultobj;
11754 fail:
11755 return NULL;
11756 }
11757
11758
11759 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11760 PyObject *resultobj = 0;
11761 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11762 uint64_t arg2 ;
11763 void *argp1 = 0 ;
11764 int res1 = 0 ;
11765 unsigned long val2 ;
11766 int ecode2 = 0 ;
11767 PyObject * obj0 = 0 ;
11768 PyObject * obj1 = 0 ;
11769
11770 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_a1_set",&obj0,&obj1)) SWIG_fail;
11771 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11772 if (!SWIG_IsOK(res1)) {
11773 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a1_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
11774 }
11775 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11776 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11777 if (!SWIG_IsOK(ecode2)) {
11778 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer32_a1_set" "', argument " "2"" of type '" "uint64_t""'");
11779 }
11780 arg2 = static_cast< uint64_t >(val2);
11781 if (arg1) (arg1)->a1 = arg2;
11782 resultobj = SWIG_Py_Void();
11783 return resultobj;
11784 fail:
11785 return NULL;
11786 }
11787
11788
11789 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11790 PyObject *resultobj = 0;
11791 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11792 void *argp1 = 0 ;
11793 int res1 = 0 ;
11794 PyObject * obj0 = 0 ;
11795 uint64_t result;
11796
11797 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer32_a1_get",&obj0)) SWIG_fail;
11798 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11799 if (!SWIG_IsOK(res1)) {
11800 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a1_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
11801 }
11802 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11803 result = (uint64_t) ((arg1)->a1);
11804 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11805 return resultobj;
11806 fail:
11807 return NULL;
11808 }
11809
11810
11811 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11812 PyObject *resultobj = 0;
11813 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11814 uint64_t arg2 ;
11815 void *argp1 = 0 ;
11816 int res1 = 0 ;
11817 unsigned long val2 ;
11818 int ecode2 = 0 ;
11819 PyObject * obj0 = 0 ;
11820 PyObject * obj1 = 0 ;
11821
11822 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_a2_set",&obj0,&obj1)) SWIG_fail;
11823 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11824 if (!SWIG_IsOK(res1)) {
11825 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a2_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
11826 }
11827 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11828 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11829 if (!SWIG_IsOK(ecode2)) {
11830 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer32_a2_set" "', argument " "2"" of type '" "uint64_t""'");
11831 }
11832 arg2 = static_cast< uint64_t >(val2);
11833 if (arg1) (arg1)->a2 = arg2;
11834 resultobj = SWIG_Py_Void();
11835 return resultobj;
11836 fail:
11837 return NULL;
11838 }
11839
11840
11841 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11842 PyObject *resultobj = 0;
11843 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11844 void *argp1 = 0 ;
11845 int res1 = 0 ;
11846 PyObject * obj0 = 0 ;
11847 uint64_t result;
11848
11849 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer32_a2_get",&obj0)) SWIG_fail;
11850 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11851 if (!SWIG_IsOK(res1)) {
11852 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a2_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
11853 }
11854 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11855 result = (uint64_t) ((arg1)->a2);
11856 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11857 return resultobj;
11858 fail:
11859 return NULL;
11860 }
11861
11862
11863 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11864 PyObject *resultobj = 0;
11865 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11866 uint64_t arg2 ;
11867 void *argp1 = 0 ;
11868 int res1 = 0 ;
11869 unsigned long val2 ;
11870 int ecode2 = 0 ;
11871 PyObject * obj0 = 0 ;
11872 PyObject * obj1 = 0 ;
11873
11874 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_a3_set",&obj0,&obj1)) SWIG_fail;
11875 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11876 if (!SWIG_IsOK(res1)) {
11877 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a3_set" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
11878 }
11879 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11880 ecode2 = SWIG_AsVal_unsigned_SS_long(obj1, &val2);
11881 if (!SWIG_IsOK(ecode2)) {
11882 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputer32_a3_set" "', argument " "2"" of type '" "uint64_t""'");
11883 }
11884 arg2 = static_cast< uint64_t >(val2);
11885 if (arg1) (arg1)->a3 = arg2;
11886 resultobj = SWIG_Py_Void();
11887 return resultobj;
11888 fail:
11889 return NULL;
11890 }
11891
11892
11893 SWIGINTERN PyObject *_wrap_GenHammingComputer32_a3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11894 PyObject *resultobj = 0;
11895 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11896 void *argp1 = 0 ;
11897 int res1 = 0 ;
11898 PyObject * obj0 = 0 ;
11899 uint64_t result;
11900
11901 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputer32_a3_get",&obj0)) SWIG_fail;
11902 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11903 if (!SWIG_IsOK(res1)) {
11904 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_a3_get" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
11905 }
11906 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11907 result = (uint64_t) ((arg1)->a3);
11908 resultobj = SWIG_From_unsigned_SS_long(static_cast< unsigned long >(result));
11909 return resultobj;
11910 fail:
11911 return NULL;
11912 }
11913
11914
11915 SWIGINTERN PyObject *_wrap_new_GenHammingComputer32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11916 PyObject *resultobj = 0;
11917 uint8_t *arg1 = (uint8_t *) 0 ;
11918 int arg2 ;
11919 void *argp1 = 0 ;
11920 int res1 = 0 ;
11921 int val2 ;
11922 int ecode2 = 0 ;
11923 PyObject * obj0 = 0 ;
11924 PyObject * obj1 = 0 ;
11925 faiss::GenHammingComputer32 *result = 0 ;
11926
11927 if (!PyArg_ParseTuple(args,(char *)"OO:new_GenHammingComputer32",&obj0,&obj1)) SWIG_fail;
11928 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
11929 if (!SWIG_IsOK(res1)) {
11930 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenHammingComputer32" "', argument " "1"" of type '" "uint8_t const *""'");
11931 }
11932 arg1 = reinterpret_cast< uint8_t * >(argp1);
11933 ecode2 = SWIG_AsVal_int(obj1, &val2);
11934 if (!SWIG_IsOK(ecode2)) {
11935 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GenHammingComputer32" "', argument " "2"" of type '" "int""'");
11936 }
11937 arg2 = static_cast< int >(val2);
11938 {
11939 Py_BEGIN_ALLOW_THREADS
11940 try {
11941 result = (faiss::GenHammingComputer32 *)new faiss::GenHammingComputer32((uint8_t const *)arg1,arg2);
11942 } catch(faiss::FaissException & e) {
11943 PyEval_RestoreThread(_save);
11944 PyErr_SetString(PyExc_RuntimeError, e.what());
11945 SWIG_fail;
11946 }
11947 Py_END_ALLOW_THREADS
11948 }
11949 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_POINTER_NEW | 0 );
11950 return resultobj;
11951 fail:
11952 return NULL;
11953 }
11954
11955
11956 SWIGINTERN PyObject *_wrap_GenHammingComputer32_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11957 PyObject *resultobj = 0;
11958 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
11959 uint8_t *arg2 = (uint8_t *) 0 ;
11960 void *argp1 = 0 ;
11961 int res1 = 0 ;
11962 void *argp2 = 0 ;
11963 int res2 = 0 ;
11964 PyObject * obj0 = 0 ;
11965 PyObject * obj1 = 0 ;
11966 int result;
11967
11968 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputer32_hamming",&obj0,&obj1)) SWIG_fail;
11969 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, 0 | 0 );
11970 if (!SWIG_IsOK(res1)) {
11971 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputer32_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputer32 const *""'");
11972 }
11973 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
11974 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
11975 if (!SWIG_IsOK(res2)) {
11976 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputer32_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
11977 }
11978 arg2 = reinterpret_cast< uint8_t * >(argp2);
11979 {
11980 Py_BEGIN_ALLOW_THREADS
11981 try {
11982 result = (int)((faiss::GenHammingComputer32 const *)arg1)->hamming((uint8_t const *)arg2);
11983 } catch(faiss::FaissException & e) {
11984 PyEval_RestoreThread(_save);
11985 PyErr_SetString(PyExc_RuntimeError, e.what());
11986 SWIG_fail;
11987 }
11988 Py_END_ALLOW_THREADS
11989 }
11990 resultobj = SWIG_From_int(static_cast< int >(result));
11991 return resultobj;
11992 fail:
11993 return NULL;
11994 }
11995
11996
11997 SWIGINTERN PyObject *_wrap_delete_GenHammingComputer32(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
11998 PyObject *resultobj = 0;
11999 faiss::GenHammingComputer32 *arg1 = (faiss::GenHammingComputer32 *) 0 ;
12000 void *argp1 = 0 ;
12001 int res1 = 0 ;
12002 PyObject * obj0 = 0 ;
12003
12004 if (!PyArg_ParseTuple(args,(char *)"O:delete_GenHammingComputer32",&obj0)) SWIG_fail;
12005 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_POINTER_DISOWN | 0 );
12006 if (!SWIG_IsOK(res1)) {
12007 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GenHammingComputer32" "', argument " "1"" of type '" "faiss::GenHammingComputer32 *""'");
12008 }
12009 arg1 = reinterpret_cast< faiss::GenHammingComputer32 * >(argp1);
12010 delete arg1;
12011 resultobj = SWIG_Py_Void();
12012 return resultobj;
12013 fail:
12014 return NULL;
12015 }
12016
12017
12018 SWIGINTERN PyObject *GenHammingComputer32_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12019 PyObject *obj;
12020 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
12021 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputer32, SWIG_NewClientData(obj));
12022 return SWIG_Py_Void();
12023 }
12024
12025 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12026 PyObject *resultobj = 0;
12027 faiss::GenHammingComputerM8 *arg1 = (faiss::GenHammingComputerM8 *) 0 ;
12028 uint64_t *arg2 = (uint64_t *) 0 ;
12029 void *argp1 = 0 ;
12030 int res1 = 0 ;
12031 void *argp2 = 0 ;
12032 int res2 = 0 ;
12033 PyObject * obj0 = 0 ;
12034 PyObject * obj1 = 0 ;
12035
12036 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputerM8_a_set",&obj0,&obj1)) SWIG_fail;
12037 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12038 if (!SWIG_IsOK(res1)) {
12039 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_a_set" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12040 }
12041 arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12042 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, SWIG_POINTER_DISOWN | 0 );
12043 if (!SWIG_IsOK(res2)) {
12044 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputerM8_a_set" "', argument " "2"" of type '" "uint64_t const *""'");
12045 }
12046 arg2 = reinterpret_cast< uint64_t * >(argp2);
12047 if (arg1) (arg1)->a = (uint64_t const *)arg2;
12048 resultobj = SWIG_Py_Void();
12049 return resultobj;
12050 fail:
12051 return NULL;
12052 }
12053
12054
12055 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12056 PyObject *resultobj = 0;
12057 faiss::GenHammingComputerM8 *arg1 = (faiss::GenHammingComputerM8 *) 0 ;
12058 void *argp1 = 0 ;
12059 int res1 = 0 ;
12060 PyObject * obj0 = 0 ;
12061 uint64_t *result = 0 ;
12062
12063 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputerM8_a_get",&obj0)) SWIG_fail;
12064 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12065 if (!SWIG_IsOK(res1)) {
12066 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_a_get" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12067 }
12068 arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12069 result = (uint64_t *) ((arg1)->a);
12070 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
12071 return resultobj;
12072 fail:
12073 return NULL;
12074 }
12075
12076
12077 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12078 PyObject *resultobj = 0;
12079 faiss::GenHammingComputerM8 *arg1 = (faiss::GenHammingComputerM8 *) 0 ;
12080 int arg2 ;
12081 void *argp1 = 0 ;
12082 int res1 = 0 ;
12083 int val2 ;
12084 int ecode2 = 0 ;
12085 PyObject * obj0 = 0 ;
12086 PyObject * obj1 = 0 ;
12087
12088 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputerM8_n_set",&obj0,&obj1)) SWIG_fail;
12089 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12090 if (!SWIG_IsOK(res1)) {
12091 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_n_set" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12092 }
12093 arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12094 ecode2 = SWIG_AsVal_int(obj1, &val2);
12095 if (!SWIG_IsOK(ecode2)) {
12096 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "GenHammingComputerM8_n_set" "', argument " "2"" of type '" "int""'");
12097 }
12098 arg2 = static_cast< int >(val2);
12099 if (arg1) (arg1)->n = arg2;
12100 resultobj = SWIG_Py_Void();
12101 return resultobj;
12102 fail:
12103 return NULL;
12104 }
12105
12106
12107 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12108 PyObject *resultobj = 0;
12109 faiss::GenHammingComputerM8 *arg1 = (faiss::GenHammingComputerM8 *) 0 ;
12110 void *argp1 = 0 ;
12111 int res1 = 0 ;
12112 PyObject * obj0 = 0 ;
12113 int result;
12114
12115 if (!PyArg_ParseTuple(args,(char *)"O:GenHammingComputerM8_n_get",&obj0)) SWIG_fail;
12116 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12117 if (!SWIG_IsOK(res1)) {
12118 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_n_get" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12119 }
12120 arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12121 result = (int) ((arg1)->n);
12122 resultobj = SWIG_From_int(static_cast< int >(result));
12123 return resultobj;
12124 fail:
12125 return NULL;
12126 }
12127
12128
12129 SWIGINTERN PyObject *_wrap_new_GenHammingComputerM8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12130 PyObject *resultobj = 0;
12131 uint8_t *arg1 = (uint8_t *) 0 ;
12132 int arg2 ;
12133 void *argp1 = 0 ;
12134 int res1 = 0 ;
12135 int val2 ;
12136 int ecode2 = 0 ;
12137 PyObject * obj0 = 0 ;
12138 PyObject * obj1 = 0 ;
12139 faiss::GenHammingComputerM8 *result = 0 ;
12140
12141 if (!PyArg_ParseTuple(args,(char *)"OO:new_GenHammingComputerM8",&obj0,&obj1)) SWIG_fail;
12142 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
12143 if (!SWIG_IsOK(res1)) {
12144 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_GenHammingComputerM8" "', argument " "1"" of type '" "uint8_t const *""'");
12145 }
12146 arg1 = reinterpret_cast< uint8_t * >(argp1);
12147 ecode2 = SWIG_AsVal_int(obj1, &val2);
12148 if (!SWIG_IsOK(ecode2)) {
12149 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_GenHammingComputerM8" "', argument " "2"" of type '" "int""'");
12150 }
12151 arg2 = static_cast< int >(val2);
12152 {
12153 Py_BEGIN_ALLOW_THREADS
12154 try {
12155 result = (faiss::GenHammingComputerM8 *)new faiss::GenHammingComputerM8((uint8_t const *)arg1,arg2);
12156 } catch(faiss::FaissException & e) {
12157 PyEval_RestoreThread(_save);
12158 PyErr_SetString(PyExc_RuntimeError, e.what());
12159 SWIG_fail;
12160 }
12161 Py_END_ALLOW_THREADS
12162 }
12163 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_POINTER_NEW | 0 );
12164 return resultobj;
12165 fail:
12166 return NULL;
12167 }
12168
12169
12170 SWIGINTERN PyObject *_wrap_GenHammingComputerM8_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12171 PyObject *resultobj = 0;
12172 faiss::GenHammingComputerM8 *arg1 = (faiss::GenHammingComputerM8 *) 0 ;
12173 uint8_t *arg2 = (uint8_t *) 0 ;
12174 void *argp1 = 0 ;
12175 int res1 = 0 ;
12176 void *argp2 = 0 ;
12177 int res2 = 0 ;
12178 PyObject * obj0 = 0 ;
12179 PyObject * obj1 = 0 ;
12180 int result;
12181
12182 if (!PyArg_ParseTuple(args,(char *)"OO:GenHammingComputerM8_hamming",&obj0,&obj1)) SWIG_fail;
12183 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, 0 | 0 );
12184 if (!SWIG_IsOK(res1)) {
12185 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "GenHammingComputerM8_hamming" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 const *""'");
12186 }
12187 arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12188 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12189 if (!SWIG_IsOK(res2)) {
12190 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "GenHammingComputerM8_hamming" "', argument " "2"" of type '" "uint8_t const *""'");
12191 }
12192 arg2 = reinterpret_cast< uint8_t * >(argp2);
12193 {
12194 Py_BEGIN_ALLOW_THREADS
12195 try {
12196 result = (int)((faiss::GenHammingComputerM8 const *)arg1)->hamming((uint8_t const *)arg2);
12197 } catch(faiss::FaissException & e) {
12198 PyEval_RestoreThread(_save);
12199 PyErr_SetString(PyExc_RuntimeError, e.what());
12200 SWIG_fail;
12201 }
12202 Py_END_ALLOW_THREADS
12203 }
12204 resultobj = SWIG_From_int(static_cast< int >(result));
12205 return resultobj;
12206 fail:
12207 return NULL;
12208 }
12209
12210
12211 SWIGINTERN PyObject *_wrap_delete_GenHammingComputerM8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12212 PyObject *resultobj = 0;
12213 faiss::GenHammingComputerM8 *arg1 = (faiss::GenHammingComputerM8 *) 0 ;
12214 void *argp1 = 0 ;
12215 int res1 = 0 ;
12216 PyObject * obj0 = 0 ;
12217
12218 if (!PyArg_ParseTuple(args,(char *)"O:delete_GenHammingComputerM8",&obj0)) SWIG_fail;
12219 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_POINTER_DISOWN | 0 );
12220 if (!SWIG_IsOK(res1)) {
12221 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_GenHammingComputerM8" "', argument " "1"" of type '" "faiss::GenHammingComputerM8 *""'");
12222 }
12223 arg1 = reinterpret_cast< faiss::GenHammingComputerM8 * >(argp1);
12224 delete arg1;
12225 resultobj = SWIG_Py_Void();
12226 return resultobj;
12227 fail:
12228 return NULL;
12229 }
12230
12231
12232 SWIGINTERN PyObject *GenHammingComputerM8_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12233 PyObject *obj;
12234 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
12235 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__GenHammingComputerM8, SWIG_NewClientData(obj));
12236 return SWIG_Py_Void();
12237 }
12238
12239 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12240 PyObject *resultobj = 0;
12241 faiss::int_maxheap_array_t *arg1 = (faiss::int_maxheap_array_t *) 0 ;
12242 uint8_t *arg2 = (uint8_t *) 0 ;
12243 uint8_t *arg3 = (uint8_t *) 0 ;
12244 size_t arg4 ;
12245 size_t arg5 ;
12246 int arg6 ;
12247 void *argp1 = 0 ;
12248 int res1 = 0 ;
12249 void *argp2 = 0 ;
12250 int res2 = 0 ;
12251 void *argp3 = 0 ;
12252 int res3 = 0 ;
12253 size_t val4 ;
12254 int ecode4 = 0 ;
12255 size_t val5 ;
12256 int ecode5 = 0 ;
12257 int val6 ;
12258 int ecode6 = 0 ;
12259 PyObject * obj0 = 0 ;
12260 PyObject * obj1 = 0 ;
12261 PyObject * obj2 = 0 ;
12262 PyObject * obj3 = 0 ;
12263 PyObject * obj4 = 0 ;
12264 PyObject * obj5 = 0 ;
12265
12266 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:generalized_hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
12267 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
12268 if (!SWIG_IsOK(res1)) {
12269 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generalized_hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
12270 }
12271 arg1 = reinterpret_cast< faiss::int_maxheap_array_t * >(argp1);
12272 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12273 if (!SWIG_IsOK(res2)) {
12274 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "generalized_hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
12275 }
12276 arg2 = reinterpret_cast< uint8_t * >(argp2);
12277 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
12278 if (!SWIG_IsOK(res3)) {
12279 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "generalized_hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
12280 }
12281 arg3 = reinterpret_cast< uint8_t * >(argp3);
12282 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
12283 if (!SWIG_IsOK(ecode4)) {
12284 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "generalized_hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
12285 }
12286 arg4 = static_cast< size_t >(val4);
12287 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
12288 if (!SWIG_IsOK(ecode5)) {
12289 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "generalized_hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
12290 }
12291 arg5 = static_cast< size_t >(val5);
12292 ecode6 = SWIG_AsVal_int(obj5, &val6);
12293 if (!SWIG_IsOK(ecode6)) {
12294 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "generalized_hammings_knn_hc" "', argument " "6"" of type '" "int""'");
12295 }
12296 arg6 = static_cast< int >(val6);
12297 {
12298 Py_BEGIN_ALLOW_THREADS
12299 try {
12300 faiss::generalized_hammings_knn_hc(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,arg4,arg5,arg6);
12301 } catch(faiss::FaissException & e) {
12302 PyEval_RestoreThread(_save);
12303 PyErr_SetString(PyExc_RuntimeError, e.what());
12304 SWIG_fail;
12305 }
12306 Py_END_ALLOW_THREADS
12307 }
12308 resultobj = SWIG_Py_Void();
12309 return resultobj;
12310 fail:
12311 return NULL;
12312 }
12313
12314
12315 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12316 PyObject *resultobj = 0;
12317 faiss::int_maxheap_array_t *arg1 = (faiss::int_maxheap_array_t *) 0 ;
12318 uint8_t *arg2 = (uint8_t *) 0 ;
12319 uint8_t *arg3 = (uint8_t *) 0 ;
12320 size_t arg4 ;
12321 size_t arg5 ;
12322 void *argp1 = 0 ;
12323 int res1 = 0 ;
12324 void *argp2 = 0 ;
12325 int res2 = 0 ;
12326 void *argp3 = 0 ;
12327 int res3 = 0 ;
12328 size_t val4 ;
12329 int ecode4 = 0 ;
12330 size_t val5 ;
12331 int ecode5 = 0 ;
12332 PyObject * obj0 = 0 ;
12333 PyObject * obj1 = 0 ;
12334 PyObject * obj2 = 0 ;
12335 PyObject * obj3 = 0 ;
12336 PyObject * obj4 = 0 ;
12337
12338 if (!PyArg_ParseTuple(args,(char *)"OOOOO:generalized_hammings_knn_hc",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
12339 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
12340 if (!SWIG_IsOK(res1)) {
12341 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "generalized_hammings_knn_hc" "', argument " "1"" of type '" "faiss::int_maxheap_array_t *""'");
12342 }
12343 arg1 = reinterpret_cast< faiss::int_maxheap_array_t * >(argp1);
12344 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
12345 if (!SWIG_IsOK(res2)) {
12346 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "generalized_hammings_knn_hc" "', argument " "2"" of type '" "uint8_t const *""'");
12347 }
12348 arg2 = reinterpret_cast< uint8_t * >(argp2);
12349 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
12350 if (!SWIG_IsOK(res3)) {
12351 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "generalized_hammings_knn_hc" "', argument " "3"" of type '" "uint8_t const *""'");
12352 }
12353 arg3 = reinterpret_cast< uint8_t * >(argp3);
12354 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
12355 if (!SWIG_IsOK(ecode4)) {
12356 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "generalized_hammings_knn_hc" "', argument " "4"" of type '" "size_t""'");
12357 }
12358 arg4 = static_cast< size_t >(val4);
12359 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
12360 if (!SWIG_IsOK(ecode5)) {
12361 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "generalized_hammings_knn_hc" "', argument " "5"" of type '" "size_t""'");
12362 }
12363 arg5 = static_cast< size_t >(val5);
12364 {
12365 Py_BEGIN_ALLOW_THREADS
12366 try {
12367 faiss::generalized_hammings_knn_hc(arg1,(unsigned char const *)arg2,(unsigned char const *)arg3,arg4,arg5);
12368 } catch(faiss::FaissException & e) {
12369 PyEval_RestoreThread(_save);
12370 PyErr_SetString(PyExc_RuntimeError, e.what());
12371 SWIG_fail;
12372 }
12373 Py_END_ALLOW_THREADS
12374 }
12375 resultobj = SWIG_Py_Void();
12376 return resultobj;
12377 fail:
12378 return NULL;
12379 }
12380
12381
12382 SWIGINTERN PyObject *_wrap_generalized_hammings_knn_hc(PyObject *self, PyObject *args) {
12383 Py_ssize_t argc;
12384 PyObject *argv[7] = {
12385 0
12386 };
12387 Py_ssize_t ii;
12388
12389 if (!PyTuple_Check(args)) SWIG_fail;
12390 argc = args ? PyObject_Length(args) : 0;
12391 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
12392 argv[ii] = PyTuple_GET_ITEM(args,ii);
12393 }
12394 if (argc == 5) {
12395 int _v;
12396 void *vptr = 0;
12397 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
12398 _v = SWIG_CheckState(res);
12399 if (_v) {
12400 void *vptr = 0;
12401 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
12402 _v = SWIG_CheckState(res);
12403 if (_v) {
12404 void *vptr = 0;
12405 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
12406 _v = SWIG_CheckState(res);
12407 if (_v) {
12408 {
12409 int res = SWIG_AsVal_size_t(argv[3], NULL);
12410 _v = SWIG_CheckState(res);
12411 }
12412 if (_v) {
12413 {
12414 int res = SWIG_AsVal_size_t(argv[4], NULL);
12415 _v = SWIG_CheckState(res);
12416 }
12417 if (_v) {
12418 return _wrap_generalized_hammings_knn_hc__SWIG_1(self, args);
12419 }
12420 }
12421 }
12422 }
12423 }
12424 }
12425 if (argc == 6) {
12426 int _v;
12427 void *vptr = 0;
12428 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
12429 _v = SWIG_CheckState(res);
12430 if (_v) {
12431 void *vptr = 0;
12432 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
12433 _v = SWIG_CheckState(res);
12434 if (_v) {
12435 void *vptr = 0;
12436 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
12437 _v = SWIG_CheckState(res);
12438 if (_v) {
12439 {
12440 int res = SWIG_AsVal_size_t(argv[3], NULL);
12441 _v = SWIG_CheckState(res);
12442 }
12443 if (_v) {
12444 {
12445 int res = SWIG_AsVal_size_t(argv[4], NULL);
12446 _v = SWIG_CheckState(res);
12447 }
12448 if (_v) {
12449 {
12450 int res = SWIG_AsVal_int(argv[5], NULL);
12451 _v = SWIG_CheckState(res);
12452 }
12453 if (_v) {
12454 return _wrap_generalized_hammings_knn_hc__SWIG_0(self, args);
12455 }
12456 }
12457 }
12458 }
12459 }
12460 }
12461 }
12462
12463 fail:
12464 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'generalized_hammings_knn_hc'.\n"
12465 " Possible C/C++ prototypes are:\n"
12466 " faiss::generalized_hammings_knn_hc(faiss::int_maxheap_array_t *,uint8_t const *,uint8_t const *,size_t,size_t,int)\n"
12467 " faiss::generalized_hammings_knn_hc(faiss::int_maxheap_array_t *,uint8_t const *,uint8_t const *,size_t,size_t)\n");
12468 return 0;
12469 }
12470
12471
12472 SWIGINTERN PyObject *_wrap_get_num_gpus(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12473 PyObject *resultobj = 0;
12474 int result;
12475
12476 if (!PyArg_ParseTuple(args,(char *)":get_num_gpus")) SWIG_fail;
12477 {
12478 Py_BEGIN_ALLOW_THREADS
12479 try {
12480 result = (int)get_num_gpus();
12481 } catch(faiss::FaissException & e) {
12482 PyEval_RestoreThread(_save);
12483 PyErr_SetString(PyExc_RuntimeError, e.what());
12484 SWIG_fail;
12485 }
12486 Py_END_ALLOW_THREADS
12487 }
12488 resultobj = SWIG_From_int(static_cast< int >(result));
12489 return resultobj;
12490 fail:
12491 return NULL;
12492 }
12493
12494
12495 SWIGINTERN PyObject *_wrap_getmillisecs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12496 PyObject *resultobj = 0;
12497 double result;
12498
12499 if (!PyArg_ParseTuple(args,(char *)":getmillisecs")) SWIG_fail;
12500 {
12501 Py_BEGIN_ALLOW_THREADS
12502 try {
12503 result = (double)faiss::getmillisecs();
12504 } catch(faiss::FaissException & e) {
12505 PyEval_RestoreThread(_save);
12506 PyErr_SetString(PyExc_RuntimeError, e.what());
12507 SWIG_fail;
12508 }
12509 Py_END_ALLOW_THREADS
12510 }
12511 resultobj = SWIG_From_double(static_cast< double >(result));
12512 return resultobj;
12513 fail:
12514 return NULL;
12515 }
12516
12517
12518 SWIGINTERN PyObject *_wrap_get_mem_usage_kb(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12519 PyObject *resultobj = 0;
12520 size_t result;
12521
12522 if (!PyArg_ParseTuple(args,(char *)":get_mem_usage_kb")) SWIG_fail;
12523 {
12524 Py_BEGIN_ALLOW_THREADS
12525 try {
12526 result = (size_t)faiss::get_mem_usage_kb();
12527 } catch(faiss::FaissException & e) {
12528 PyEval_RestoreThread(_save);
12529 PyErr_SetString(PyExc_RuntimeError, e.what());
12530 SWIG_fail;
12531 }
12532 Py_END_ALLOW_THREADS
12533 }
12534 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
12535 return resultobj;
12536 fail:
12537 return NULL;
12538 }
12539
12540
12541 SWIGINTERN PyObject *_wrap_RandomGenerator_mt_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12542 PyObject *resultobj = 0;
12543 faiss::RandomGenerator *arg1 = (faiss::RandomGenerator *) 0 ;
12544 std::mt19937 arg2 ;
12545 void *argp1 = 0 ;
12546 int res1 = 0 ;
12547 void *argp2 ;
12548 int res2 = 0 ;
12549 PyObject * obj0 = 0 ;
12550 PyObject * obj1 = 0 ;
12551
12552 if (!PyArg_ParseTuple(args,(char *)"OO:RandomGenerator_mt_set",&obj0,&obj1)) SWIG_fail;
12553 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12554 if (!SWIG_IsOK(res1)) {
12555 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_mt_set" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12556 }
12557 arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
12558 {
12559 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__mt19937, 0 | 0);
12560 if (!SWIG_IsOK(res2)) {
12561 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RandomGenerator_mt_set" "', argument " "2"" of type '" "std::mt19937""'");
12562 }
12563 if (!argp2) {
12564 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "RandomGenerator_mt_set" "', argument " "2"" of type '" "std::mt19937""'");
12565 } else {
12566 std::mt19937 * temp = reinterpret_cast< std::mt19937 * >(argp2);
12567 arg2 = *temp;
12568 if (SWIG_IsNewObj(res2)) delete temp;
12569 }
12570 }
12571 if (arg1) (arg1)->mt = arg2;
12572 resultobj = SWIG_Py_Void();
12573 return resultobj;
12574 fail:
12575 return NULL;
12576 }
12577
12578
12579 SWIGINTERN PyObject *_wrap_RandomGenerator_mt_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12580 PyObject *resultobj = 0;
12581 faiss::RandomGenerator *arg1 = (faiss::RandomGenerator *) 0 ;
12582 void *argp1 = 0 ;
12583 int res1 = 0 ;
12584 PyObject * obj0 = 0 ;
12585 std::mt19937 result;
12586
12587 if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_mt_get",&obj0)) SWIG_fail;
12588 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12589 if (!SWIG_IsOK(res1)) {
12590 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_mt_get" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12591 }
12592 arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
12593 result = ((arg1)->mt);
12594 resultobj = SWIG_NewPointerObj((new std::mt19937(static_cast< const std::mt19937& >(result))), SWIGTYPE_p_std__mt19937, SWIG_POINTER_OWN | 0 );
12595 return resultobj;
12596 fail:
12597 return NULL;
12598 }
12599
12600
12601 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12602 PyObject *resultobj = 0;
12603 faiss::RandomGenerator *arg1 = (faiss::RandomGenerator *) 0 ;
12604 void *argp1 = 0 ;
12605 int res1 = 0 ;
12606 PyObject * obj0 = 0 ;
12607 int result;
12608
12609 if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_rand_int",&obj0)) SWIG_fail;
12610 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12611 if (!SWIG_IsOK(res1)) {
12612 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_int" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12613 }
12614 arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
12615 {
12616 Py_BEGIN_ALLOW_THREADS
12617 try {
12618 result = (int)(arg1)->rand_int();
12619 } catch(faiss::FaissException & e) {
12620 PyEval_RestoreThread(_save);
12621 PyErr_SetString(PyExc_RuntimeError, e.what());
12622 SWIG_fail;
12623 }
12624 Py_END_ALLOW_THREADS
12625 }
12626 resultobj = SWIG_From_int(static_cast< int >(result));
12627 return resultobj;
12628 fail:
12629 return NULL;
12630 }
12631
12632
12633 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_long(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12634 PyObject *resultobj = 0;
12635 faiss::RandomGenerator *arg1 = (faiss::RandomGenerator *) 0 ;
12636 void *argp1 = 0 ;
12637 int res1 = 0 ;
12638 PyObject * obj0 = 0 ;
12639 long result;
12640
12641 if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_rand_long",&obj0)) SWIG_fail;
12642 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12643 if (!SWIG_IsOK(res1)) {
12644 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_long" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12645 }
12646 arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
12647 {
12648 Py_BEGIN_ALLOW_THREADS
12649 try {
12650 result = (long)(arg1)->rand_long();
12651 } catch(faiss::FaissException & e) {
12652 PyEval_RestoreThread(_save);
12653 PyErr_SetString(PyExc_RuntimeError, e.what());
12654 SWIG_fail;
12655 }
12656 Py_END_ALLOW_THREADS
12657 }
12658 resultobj = SWIG_From_long(static_cast< long >(result));
12659 return resultobj;
12660 fail:
12661 return NULL;
12662 }
12663
12664
12665 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12666 PyObject *resultobj = 0;
12667 faiss::RandomGenerator *arg1 = (faiss::RandomGenerator *) 0 ;
12668 int arg2 ;
12669 void *argp1 = 0 ;
12670 int res1 = 0 ;
12671 int val2 ;
12672 int ecode2 = 0 ;
12673 PyObject * obj0 = 0 ;
12674 PyObject * obj1 = 0 ;
12675 int result;
12676
12677 if (!PyArg_ParseTuple(args,(char *)"OO:RandomGenerator_rand_int",&obj0,&obj1)) SWIG_fail;
12678 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12679 if (!SWIG_IsOK(res1)) {
12680 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_int" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12681 }
12682 arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
12683 ecode2 = SWIG_AsVal_int(obj1, &val2);
12684 if (!SWIG_IsOK(ecode2)) {
12685 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RandomGenerator_rand_int" "', argument " "2"" of type '" "int""'");
12686 }
12687 arg2 = static_cast< int >(val2);
12688 {
12689 Py_BEGIN_ALLOW_THREADS
12690 try {
12691 result = (int)(arg1)->rand_int(arg2);
12692 } catch(faiss::FaissException & e) {
12693 PyEval_RestoreThread(_save);
12694 PyErr_SetString(PyExc_RuntimeError, e.what());
12695 SWIG_fail;
12696 }
12697 Py_END_ALLOW_THREADS
12698 }
12699 resultobj = SWIG_From_int(static_cast< int >(result));
12700 return resultobj;
12701 fail:
12702 return NULL;
12703 }
12704
12705
12706 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_int(PyObject *self, PyObject *args) {
12707 Py_ssize_t argc;
12708 PyObject *argv[3] = {
12709 0
12710 };
12711 Py_ssize_t ii;
12712
12713 if (!PyTuple_Check(args)) SWIG_fail;
12714 argc = args ? PyObject_Length(args) : 0;
12715 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
12716 argv[ii] = PyTuple_GET_ITEM(args,ii);
12717 }
12718 if (argc == 1) {
12719 int _v;
12720 void *vptr = 0;
12721 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RandomGenerator, 0);
12722 _v = SWIG_CheckState(res);
12723 if (_v) {
12724 return _wrap_RandomGenerator_rand_int__SWIG_0(self, args);
12725 }
12726 }
12727 if (argc == 2) {
12728 int _v;
12729 void *vptr = 0;
12730 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RandomGenerator, 0);
12731 _v = SWIG_CheckState(res);
12732 if (_v) {
12733 {
12734 int res = SWIG_AsVal_int(argv[1], NULL);
12735 _v = SWIG_CheckState(res);
12736 }
12737 if (_v) {
12738 return _wrap_RandomGenerator_rand_int__SWIG_1(self, args);
12739 }
12740 }
12741 }
12742
12743 fail:
12744 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RandomGenerator_rand_int'.\n"
12745 " Possible C/C++ prototypes are:\n"
12746 " faiss::RandomGenerator::rand_int()\n"
12747 " faiss::RandomGenerator::rand_int(int)\n");
12748 return 0;
12749 }
12750
12751
12752 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_float(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12753 PyObject *resultobj = 0;
12754 faiss::RandomGenerator *arg1 = (faiss::RandomGenerator *) 0 ;
12755 void *argp1 = 0 ;
12756 int res1 = 0 ;
12757 PyObject * obj0 = 0 ;
12758 float result;
12759
12760 if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_rand_float",&obj0)) SWIG_fail;
12761 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12762 if (!SWIG_IsOK(res1)) {
12763 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_float" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12764 }
12765 arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
12766 {
12767 Py_BEGIN_ALLOW_THREADS
12768 try {
12769 result = (float)(arg1)->rand_float();
12770 } catch(faiss::FaissException & e) {
12771 PyEval_RestoreThread(_save);
12772 PyErr_SetString(PyExc_RuntimeError, e.what());
12773 SWIG_fail;
12774 }
12775 Py_END_ALLOW_THREADS
12776 }
12777 resultobj = SWIG_From_float(static_cast< float >(result));
12778 return resultobj;
12779 fail:
12780 return NULL;
12781 }
12782
12783
12784 SWIGINTERN PyObject *_wrap_RandomGenerator_rand_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12785 PyObject *resultobj = 0;
12786 faiss::RandomGenerator *arg1 = (faiss::RandomGenerator *) 0 ;
12787 void *argp1 = 0 ;
12788 int res1 = 0 ;
12789 PyObject * obj0 = 0 ;
12790 double result;
12791
12792 if (!PyArg_ParseTuple(args,(char *)"O:RandomGenerator_rand_double",&obj0)) SWIG_fail;
12793 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
12794 if (!SWIG_IsOK(res1)) {
12795 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomGenerator_rand_double" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12796 }
12797 arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
12798 {
12799 Py_BEGIN_ALLOW_THREADS
12800 try {
12801 result = (double)(arg1)->rand_double();
12802 } catch(faiss::FaissException & e) {
12803 PyEval_RestoreThread(_save);
12804 PyErr_SetString(PyExc_RuntimeError, e.what());
12805 SWIG_fail;
12806 }
12807 Py_END_ALLOW_THREADS
12808 }
12809 resultobj = SWIG_From_double(static_cast< double >(result));
12810 return resultobj;
12811 fail:
12812 return NULL;
12813 }
12814
12815
12816 SWIGINTERN PyObject *_wrap_new_RandomGenerator__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12817 PyObject *resultobj = 0;
12818 long arg1 ;
12819 long val1 ;
12820 int ecode1 = 0 ;
12821 PyObject * obj0 = 0 ;
12822 faiss::RandomGenerator *result = 0 ;
12823
12824 if (!PyArg_ParseTuple(args,(char *)"O:new_RandomGenerator",&obj0)) SWIG_fail;
12825 ecode1 = SWIG_AsVal_long(obj0, &val1);
12826 if (!SWIG_IsOK(ecode1)) {
12827 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RandomGenerator" "', argument " "1"" of type '" "long""'");
12828 }
12829 arg1 = static_cast< long >(val1);
12830 {
12831 Py_BEGIN_ALLOW_THREADS
12832 try {
12833 result = (faiss::RandomGenerator *)new faiss::RandomGenerator(arg1);
12834 } catch(faiss::FaissException & e) {
12835 PyEval_RestoreThread(_save);
12836 PyErr_SetString(PyExc_RuntimeError, e.what());
12837 SWIG_fail;
12838 }
12839 Py_END_ALLOW_THREADS
12840 }
12841 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_NEW | 0 );
12842 return resultobj;
12843 fail:
12844 return NULL;
12845 }
12846
12847
12848 SWIGINTERN PyObject *_wrap_new_RandomGenerator__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12849 PyObject *resultobj = 0;
12850 faiss::RandomGenerator *result = 0 ;
12851
12852 if (!PyArg_ParseTuple(args,(char *)":new_RandomGenerator")) SWIG_fail;
12853 {
12854 Py_BEGIN_ALLOW_THREADS
12855 try {
12856 result = (faiss::RandomGenerator *)new faiss::RandomGenerator();
12857 } catch(faiss::FaissException & e) {
12858 PyEval_RestoreThread(_save);
12859 PyErr_SetString(PyExc_RuntimeError, e.what());
12860 SWIG_fail;
12861 }
12862 Py_END_ALLOW_THREADS
12863 }
12864 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_NEW | 0 );
12865 return resultobj;
12866 fail:
12867 return NULL;
12868 }
12869
12870
12871 SWIGINTERN PyObject *_wrap_new_RandomGenerator(PyObject *self, PyObject *args) {
12872 Py_ssize_t argc;
12873 PyObject *argv[2] = {
12874 0
12875 };
12876 Py_ssize_t ii;
12877
12878 if (!PyTuple_Check(args)) SWIG_fail;
12879 argc = args ? PyObject_Length(args) : 0;
12880 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
12881 argv[ii] = PyTuple_GET_ITEM(args,ii);
12882 }
12883 if (argc == 0) {
12884 return _wrap_new_RandomGenerator__SWIG_1(self, args);
12885 }
12886 if (argc == 1) {
12887 int _v;
12888 {
12889 int res = SWIG_AsVal_long(argv[0], NULL);
12890 _v = SWIG_CheckState(res);
12891 }
12892 if (_v) {
12893 return _wrap_new_RandomGenerator__SWIG_0(self, args);
12894 }
12895 }
12896
12897 fail:
12898 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RandomGenerator'.\n"
12899 " Possible C/C++ prototypes are:\n"
12900 " faiss::RandomGenerator::RandomGenerator(long)\n"
12901 " faiss::RandomGenerator::RandomGenerator()\n");
12902 return 0;
12903 }
12904
12905
12906 SWIGINTERN PyObject *_wrap_delete_RandomGenerator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12907 PyObject *resultobj = 0;
12908 faiss::RandomGenerator *arg1 = (faiss::RandomGenerator *) 0 ;
12909 void *argp1 = 0 ;
12910 int res1 = 0 ;
12911 PyObject * obj0 = 0 ;
12912
12913 if (!PyArg_ParseTuple(args,(char *)"O:delete_RandomGenerator",&obj0)) SWIG_fail;
12914 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_DISOWN | 0 );
12915 if (!SWIG_IsOK(res1)) {
12916 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RandomGenerator" "', argument " "1"" of type '" "faiss::RandomGenerator *""'");
12917 }
12918 arg1 = reinterpret_cast< faiss::RandomGenerator * >(argp1);
12919 delete arg1;
12920 resultobj = SWIG_Py_Void();
12921 return resultobj;
12922 fail:
12923 return NULL;
12924 }
12925
12926
12927 SWIGINTERN PyObject *RandomGenerator_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12928 PyObject *obj;
12929 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
12930 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RandomGenerator, SWIG_NewClientData(obj));
12931 return SWIG_Py_Void();
12932 }
12933
12934 SWIGINTERN PyObject *_wrap_float_rand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12935 PyObject *resultobj = 0;
12936 float *arg1 = (float *) 0 ;
12937 size_t arg2 ;
12938 long arg3 ;
12939 void *argp1 = 0 ;
12940 int res1 = 0 ;
12941 size_t val2 ;
12942 int ecode2 = 0 ;
12943 long val3 ;
12944 int ecode3 = 0 ;
12945 PyObject * obj0 = 0 ;
12946 PyObject * obj1 = 0 ;
12947 PyObject * obj2 = 0 ;
12948
12949 if (!PyArg_ParseTuple(args,(char *)"OOO:float_rand",&obj0,&obj1,&obj2)) SWIG_fail;
12950 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
12951 if (!SWIG_IsOK(res1)) {
12952 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_rand" "', argument " "1"" of type '" "float *""'");
12953 }
12954 arg1 = reinterpret_cast< float * >(argp1);
12955 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
12956 if (!SWIG_IsOK(ecode2)) {
12957 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_rand" "', argument " "2"" of type '" "size_t""'");
12958 }
12959 arg2 = static_cast< size_t >(val2);
12960 ecode3 = SWIG_AsVal_long(obj2, &val3);
12961 if (!SWIG_IsOK(ecode3)) {
12962 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "float_rand" "', argument " "3"" of type '" "long""'");
12963 }
12964 arg3 = static_cast< long >(val3);
12965 {
12966 Py_BEGIN_ALLOW_THREADS
12967 try {
12968 faiss::float_rand(arg1,arg2,arg3);
12969 } catch(faiss::FaissException & e) {
12970 PyEval_RestoreThread(_save);
12971 PyErr_SetString(PyExc_RuntimeError, e.what());
12972 SWIG_fail;
12973 }
12974 Py_END_ALLOW_THREADS
12975 }
12976 resultobj = SWIG_Py_Void();
12977 return resultobj;
12978 fail:
12979 return NULL;
12980 }
12981
12982
12983 SWIGINTERN PyObject *_wrap_float_randn(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
12984 PyObject *resultobj = 0;
12985 float *arg1 = (float *) 0 ;
12986 size_t arg2 ;
12987 long arg3 ;
12988 void *argp1 = 0 ;
12989 int res1 = 0 ;
12990 size_t val2 ;
12991 int ecode2 = 0 ;
12992 long val3 ;
12993 int ecode3 = 0 ;
12994 PyObject * obj0 = 0 ;
12995 PyObject * obj1 = 0 ;
12996 PyObject * obj2 = 0 ;
12997
12998 if (!PyArg_ParseTuple(args,(char *)"OOO:float_randn",&obj0,&obj1,&obj2)) SWIG_fail;
12999 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
13000 if (!SWIG_IsOK(res1)) {
13001 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_randn" "', argument " "1"" of type '" "float *""'");
13002 }
13003 arg1 = reinterpret_cast< float * >(argp1);
13004 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13005 if (!SWIG_IsOK(ecode2)) {
13006 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_randn" "', argument " "2"" of type '" "size_t""'");
13007 }
13008 arg2 = static_cast< size_t >(val2);
13009 ecode3 = SWIG_AsVal_long(obj2, &val3);
13010 if (!SWIG_IsOK(ecode3)) {
13011 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "float_randn" "', argument " "3"" of type '" "long""'");
13012 }
13013 arg3 = static_cast< long >(val3);
13014 {
13015 Py_BEGIN_ALLOW_THREADS
13016 try {
13017 faiss::float_randn(arg1,arg2,arg3);
13018 } catch(faiss::FaissException & e) {
13019 PyEval_RestoreThread(_save);
13020 PyErr_SetString(PyExc_RuntimeError, e.what());
13021 SWIG_fail;
13022 }
13023 Py_END_ALLOW_THREADS
13024 }
13025 resultobj = SWIG_Py_Void();
13026 return resultobj;
13027 fail:
13028 return NULL;
13029 }
13030
13031
13032 SWIGINTERN PyObject *_wrap_long_rand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13033 PyObject *resultobj = 0;
13034 long *arg1 = (long *) 0 ;
13035 size_t arg2 ;
13036 long arg3 ;
13037 void *argp1 = 0 ;
13038 int res1 = 0 ;
13039 size_t val2 ;
13040 int ecode2 = 0 ;
13041 long val3 ;
13042 int ecode3 = 0 ;
13043 PyObject * obj0 = 0 ;
13044 PyObject * obj1 = 0 ;
13045 PyObject * obj2 = 0 ;
13046
13047 if (!PyArg_ParseTuple(args,(char *)"OOO:long_rand",&obj0,&obj1,&obj2)) SWIG_fail;
13048 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_long, 0 | 0 );
13049 if (!SWIG_IsOK(res1)) {
13050 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "long_rand" "', argument " "1"" of type '" "long *""'");
13051 }
13052 arg1 = reinterpret_cast< long * >(argp1);
13053 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13054 if (!SWIG_IsOK(ecode2)) {
13055 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "long_rand" "', argument " "2"" of type '" "size_t""'");
13056 }
13057 arg2 = static_cast< size_t >(val2);
13058 ecode3 = SWIG_AsVal_long(obj2, &val3);
13059 if (!SWIG_IsOK(ecode3)) {
13060 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "long_rand" "', argument " "3"" of type '" "long""'");
13061 }
13062 arg3 = static_cast< long >(val3);
13063 {
13064 Py_BEGIN_ALLOW_THREADS
13065 try {
13066 faiss::long_rand(arg1,arg2,arg3);
13067 } catch(faiss::FaissException & e) {
13068 PyEval_RestoreThread(_save);
13069 PyErr_SetString(PyExc_RuntimeError, e.what());
13070 SWIG_fail;
13071 }
13072 Py_END_ALLOW_THREADS
13073 }
13074 resultobj = SWIG_Py_Void();
13075 return resultobj;
13076 fail:
13077 return NULL;
13078 }
13079
13080
13081 SWIGINTERN PyObject *_wrap_byte_rand(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13082 PyObject *resultobj = 0;
13083 uint8_t *arg1 = (uint8_t *) 0 ;
13084 size_t arg2 ;
13085 long arg3 ;
13086 void *argp1 = 0 ;
13087 int res1 = 0 ;
13088 size_t val2 ;
13089 int ecode2 = 0 ;
13090 long val3 ;
13091 int ecode3 = 0 ;
13092 PyObject * obj0 = 0 ;
13093 PyObject * obj1 = 0 ;
13094 PyObject * obj2 = 0 ;
13095
13096 if (!PyArg_ParseTuple(args,(char *)"OOO:byte_rand",&obj0,&obj1,&obj2)) SWIG_fail;
13097 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
13098 if (!SWIG_IsOK(res1)) {
13099 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "byte_rand" "', argument " "1"" of type '" "uint8_t *""'");
13100 }
13101 arg1 = reinterpret_cast< uint8_t * >(argp1);
13102 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13103 if (!SWIG_IsOK(ecode2)) {
13104 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "byte_rand" "', argument " "2"" of type '" "size_t""'");
13105 }
13106 arg2 = static_cast< size_t >(val2);
13107 ecode3 = SWIG_AsVal_long(obj2, &val3);
13108 if (!SWIG_IsOK(ecode3)) {
13109 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "byte_rand" "', argument " "3"" of type '" "long""'");
13110 }
13111 arg3 = static_cast< long >(val3);
13112 {
13113 Py_BEGIN_ALLOW_THREADS
13114 try {
13115 faiss::byte_rand(arg1,arg2,arg3);
13116 } catch(faiss::FaissException & e) {
13117 PyEval_RestoreThread(_save);
13118 PyErr_SetString(PyExc_RuntimeError, e.what());
13119 SWIG_fail;
13120 }
13121 Py_END_ALLOW_THREADS
13122 }
13123 resultobj = SWIG_Py_Void();
13124 return resultobj;
13125 fail:
13126 return NULL;
13127 }
13128
13129
13130 SWIGINTERN PyObject *_wrap_rand_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13131 PyObject *resultobj = 0;
13132 int *arg1 = (int *) 0 ;
13133 size_t arg2 ;
13134 long arg3 ;
13135 void *argp1 = 0 ;
13136 int res1 = 0 ;
13137 size_t val2 ;
13138 int ecode2 = 0 ;
13139 long val3 ;
13140 int ecode3 = 0 ;
13141 PyObject * obj0 = 0 ;
13142 PyObject * obj1 = 0 ;
13143 PyObject * obj2 = 0 ;
13144
13145 if (!PyArg_ParseTuple(args,(char *)"OOO:rand_perm",&obj0,&obj1,&obj2)) SWIG_fail;
13146 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 | 0 );
13147 if (!SWIG_IsOK(res1)) {
13148 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rand_perm" "', argument " "1"" of type '" "int *""'");
13149 }
13150 arg1 = reinterpret_cast< int * >(argp1);
13151 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
13152 if (!SWIG_IsOK(ecode2)) {
13153 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rand_perm" "', argument " "2"" of type '" "size_t""'");
13154 }
13155 arg2 = static_cast< size_t >(val2);
13156 ecode3 = SWIG_AsVal_long(obj2, &val3);
13157 if (!SWIG_IsOK(ecode3)) {
13158 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "rand_perm" "', argument " "3"" of type '" "long""'");
13159 }
13160 arg3 = static_cast< long >(val3);
13161 {
13162 Py_BEGIN_ALLOW_THREADS
13163 try {
13164 faiss::rand_perm(arg1,arg2,arg3);
13165 } catch(faiss::FaissException & e) {
13166 PyEval_RestoreThread(_save);
13167 PyErr_SetString(PyExc_RuntimeError, e.what());
13168 SWIG_fail;
13169 }
13170 Py_END_ALLOW_THREADS
13171 }
13172 resultobj = SWIG_Py_Void();
13173 return resultobj;
13174 fail:
13175 return NULL;
13176 }
13177
13178
13179 SWIGINTERN PyObject *_wrap_fvec_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13180 PyObject *resultobj = 0;
13181 float *arg1 = (float *) 0 ;
13182 float *arg2 = (float *) 0 ;
13183 size_t arg3 ;
13184 void *argp1 = 0 ;
13185 int res1 = 0 ;
13186 void *argp2 = 0 ;
13187 int res2 = 0 ;
13188 size_t val3 ;
13189 int ecode3 = 0 ;
13190 PyObject * obj0 = 0 ;
13191 PyObject * obj1 = 0 ;
13192 PyObject * obj2 = 0 ;
13193 float result;
13194
13195 if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_L2sqr",&obj0,&obj1,&obj2)) SWIG_fail;
13196 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
13197 if (!SWIG_IsOK(res1)) {
13198 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_L2sqr" "', argument " "1"" of type '" "float const *""'");
13199 }
13200 arg1 = reinterpret_cast< float * >(argp1);
13201 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
13202 if (!SWIG_IsOK(res2)) {
13203 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_L2sqr" "', argument " "2"" of type '" "float const *""'");
13204 }
13205 arg2 = reinterpret_cast< float * >(argp2);
13206 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
13207 if (!SWIG_IsOK(ecode3)) {
13208 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_L2sqr" "', argument " "3"" of type '" "size_t""'");
13209 }
13210 arg3 = static_cast< size_t >(val3);
13211 {
13212 Py_BEGIN_ALLOW_THREADS
13213 try {
13214 result = (float)faiss::fvec_L2sqr((float const *)arg1,(float const *)arg2,arg3);
13215 } catch(faiss::FaissException & e) {
13216 PyEval_RestoreThread(_save);
13217 PyErr_SetString(PyExc_RuntimeError, e.what());
13218 SWIG_fail;
13219 }
13220 Py_END_ALLOW_THREADS
13221 }
13222 resultobj = SWIG_From_float(static_cast< float >(result));
13223 return resultobj;
13224 fail:
13225 return NULL;
13226 }
13227
13228
13229 SWIGINTERN PyObject *_wrap_fvec_inner_product(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13230 PyObject *resultobj = 0;
13231 float *arg1 = (float *) 0 ;
13232 float *arg2 = (float *) 0 ;
13233 size_t arg3 ;
13234 void *argp1 = 0 ;
13235 int res1 = 0 ;
13236 void *argp2 = 0 ;
13237 int res2 = 0 ;
13238 size_t val3 ;
13239 int ecode3 = 0 ;
13240 PyObject * obj0 = 0 ;
13241 PyObject * obj1 = 0 ;
13242 PyObject * obj2 = 0 ;
13243 float result;
13244
13245 if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_inner_product",&obj0,&obj1,&obj2)) SWIG_fail;
13246 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
13247 if (!SWIG_IsOK(res1)) {
13248 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_inner_product" "', argument " "1"" of type '" "float const *""'");
13249 }
13250 arg1 = reinterpret_cast< float * >(argp1);
13251 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
13252 if (!SWIG_IsOK(res2)) {
13253 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_inner_product" "', argument " "2"" of type '" "float const *""'");
13254 }
13255 arg2 = reinterpret_cast< float * >(argp2);
13256 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
13257 if (!SWIG_IsOK(ecode3)) {
13258 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_inner_product" "', argument " "3"" of type '" "size_t""'");
13259 }
13260 arg3 = static_cast< size_t >(val3);
13261 {
13262 Py_BEGIN_ALLOW_THREADS
13263 try {
13264 result = (float)faiss::fvec_inner_product((float const *)arg1,(float const *)arg2,arg3);
13265 } catch(faiss::FaissException & e) {
13266 PyEval_RestoreThread(_save);
13267 PyErr_SetString(PyExc_RuntimeError, e.what());
13268 SWIG_fail;
13269 }
13270 Py_END_ALLOW_THREADS
13271 }
13272 resultobj = SWIG_From_float(static_cast< float >(result));
13273 return resultobj;
13274 fail:
13275 return NULL;
13276 }
13277
13278
13279 SWIGINTERN PyObject *_wrap_imbalance_factor__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13280 PyObject *resultobj = 0;
13281 int arg1 ;
13282 int arg2 ;
13283 long *arg3 = (long *) 0 ;
13284 int val1 ;
13285 int ecode1 = 0 ;
13286 int val2 ;
13287 int ecode2 = 0 ;
13288 void *argp3 = 0 ;
13289 int res3 = 0 ;
13290 PyObject * obj0 = 0 ;
13291 PyObject * obj1 = 0 ;
13292 PyObject * obj2 = 0 ;
13293 double result;
13294
13295 if (!PyArg_ParseTuple(args,(char *)"OOO:imbalance_factor",&obj0,&obj1,&obj2)) SWIG_fail;
13296 ecode1 = SWIG_AsVal_int(obj0, &val1);
13297 if (!SWIG_IsOK(ecode1)) {
13298 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "imbalance_factor" "', argument " "1"" of type '" "int""'");
13299 }
13300 arg1 = static_cast< int >(val1);
13301 ecode2 = SWIG_AsVal_int(obj1, &val2);
13302 if (!SWIG_IsOK(ecode2)) {
13303 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "imbalance_factor" "', argument " "2"" of type '" "int""'");
13304 }
13305 arg2 = static_cast< int >(val2);
13306 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
13307 if (!SWIG_IsOK(res3)) {
13308 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "imbalance_factor" "', argument " "3"" of type '" "long const *""'");
13309 }
13310 arg3 = reinterpret_cast< long * >(argp3);
13311 {
13312 Py_BEGIN_ALLOW_THREADS
13313 try {
13314 result = (double)faiss::imbalance_factor(arg1,arg2,(long const *)arg3);
13315 } catch(faiss::FaissException & e) {
13316 PyEval_RestoreThread(_save);
13317 PyErr_SetString(PyExc_RuntimeError, e.what());
13318 SWIG_fail;
13319 }
13320 Py_END_ALLOW_THREADS
13321 }
13322 resultobj = SWIG_From_double(static_cast< double >(result));
13323 return resultobj;
13324 fail:
13325 return NULL;
13326 }
13327
13328
13329 SWIGINTERN PyObject *_wrap_imbalance_factor__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13330 PyObject *resultobj = 0;
13331 int arg1 ;
13332 int *arg2 = (int *) 0 ;
13333 int val1 ;
13334 int ecode1 = 0 ;
13335 void *argp2 = 0 ;
13336 int res2 = 0 ;
13337 PyObject * obj0 = 0 ;
13338 PyObject * obj1 = 0 ;
13339 double result;
13340
13341 if (!PyArg_ParseTuple(args,(char *)"OO:imbalance_factor",&obj0,&obj1)) SWIG_fail;
13342 ecode1 = SWIG_AsVal_int(obj0, &val1);
13343 if (!SWIG_IsOK(ecode1)) {
13344 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "imbalance_factor" "', argument " "1"" of type '" "int""'");
13345 }
13346 arg1 = static_cast< int >(val1);
13347 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
13348 if (!SWIG_IsOK(res2)) {
13349 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "imbalance_factor" "', argument " "2"" of type '" "int const *""'");
13350 }
13351 arg2 = reinterpret_cast< int * >(argp2);
13352 {
13353 Py_BEGIN_ALLOW_THREADS
13354 try {
13355 result = (double)faiss::imbalance_factor(arg1,(int const *)arg2);
13356 } catch(faiss::FaissException & e) {
13357 PyEval_RestoreThread(_save);
13358 PyErr_SetString(PyExc_RuntimeError, e.what());
13359 SWIG_fail;
13360 }
13361 Py_END_ALLOW_THREADS
13362 }
13363 resultobj = SWIG_From_double(static_cast< double >(result));
13364 return resultobj;
13365 fail:
13366 return NULL;
13367 }
13368
13369
13370 SWIGINTERN PyObject *_wrap_imbalance_factor(PyObject *self, PyObject *args) {
13371 Py_ssize_t argc;
13372 PyObject *argv[4] = {
13373 0
13374 };
13375 Py_ssize_t ii;
13376
13377 if (!PyTuple_Check(args)) SWIG_fail;
13378 argc = args ? PyObject_Length(args) : 0;
13379 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
13380 argv[ii] = PyTuple_GET_ITEM(args,ii);
13381 }
13382 if (argc == 2) {
13383 int _v;
13384 {
13385 int res = SWIG_AsVal_int(argv[0], NULL);
13386 _v = SWIG_CheckState(res);
13387 }
13388 if (_v) {
13389 void *vptr = 0;
13390 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_int, 0);
13391 _v = SWIG_CheckState(res);
13392 if (_v) {
13393 return _wrap_imbalance_factor__SWIG_1(self, args);
13394 }
13395 }
13396 }
13397 if (argc == 3) {
13398 int _v;
13399 {
13400 int res = SWIG_AsVal_int(argv[0], NULL);
13401 _v = SWIG_CheckState(res);
13402 }
13403 if (_v) {
13404 {
13405 int res = SWIG_AsVal_int(argv[1], NULL);
13406 _v = SWIG_CheckState(res);
13407 }
13408 if (_v) {
13409 void *vptr = 0;
13410 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
13411 _v = SWIG_CheckState(res);
13412 if (_v) {
13413 return _wrap_imbalance_factor__SWIG_0(self, args);
13414 }
13415 }
13416 }
13417 }
13418
13419 fail:
13420 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'imbalance_factor'.\n"
13421 " Possible C/C++ prototypes are:\n"
13422 " faiss::imbalance_factor(int,int,long const *)\n"
13423 " faiss::imbalance_factor(int,int const *)\n");
13424 return 0;
13425 }
13426
13427
13428 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13429 PyObject *resultobj = 0;
13430 long arg1 ;
13431 long arg2 ;
13432 float *arg3 = (float *) 0 ;
13433 long arg4 ;
13434 float *arg5 = (float *) 0 ;
13435 float *arg6 = (float *) 0 ;
13436 long arg7 ;
13437 long arg8 ;
13438 long arg9 ;
13439 long val1 ;
13440 int ecode1 = 0 ;
13441 long val2 ;
13442 int ecode2 = 0 ;
13443 void *argp3 = 0 ;
13444 int res3 = 0 ;
13445 long val4 ;
13446 int ecode4 = 0 ;
13447 void *argp5 = 0 ;
13448 int res5 = 0 ;
13449 void *argp6 = 0 ;
13450 int res6 = 0 ;
13451 long val7 ;
13452 int ecode7 = 0 ;
13453 long val8 ;
13454 int ecode8 = 0 ;
13455 long val9 ;
13456 int ecode9 = 0 ;
13457 PyObject * obj0 = 0 ;
13458 PyObject * obj1 = 0 ;
13459 PyObject * obj2 = 0 ;
13460 PyObject * obj3 = 0 ;
13461 PyObject * obj4 = 0 ;
13462 PyObject * obj5 = 0 ;
13463 PyObject * obj6 = 0 ;
13464 PyObject * obj7 = 0 ;
13465 PyObject * obj8 = 0 ;
13466
13467 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
13468 ecode1 = SWIG_AsVal_long(obj0, &val1);
13469 if (!SWIG_IsOK(ecode1)) {
13470 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
13471 }
13472 arg1 = static_cast< long >(val1);
13473 ecode2 = SWIG_AsVal_long(obj1, &val2);
13474 if (!SWIG_IsOK(ecode2)) {
13475 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
13476 }
13477 arg2 = static_cast< long >(val2);
13478 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
13479 if (!SWIG_IsOK(res3)) {
13480 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
13481 }
13482 arg3 = reinterpret_cast< float * >(argp3);
13483 ecode4 = SWIG_AsVal_long(obj3, &val4);
13484 if (!SWIG_IsOK(ecode4)) {
13485 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
13486 }
13487 arg4 = static_cast< long >(val4);
13488 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
13489 if (!SWIG_IsOK(res5)) {
13490 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
13491 }
13492 arg5 = reinterpret_cast< float * >(argp5);
13493 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
13494 if (!SWIG_IsOK(res6)) {
13495 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
13496 }
13497 arg6 = reinterpret_cast< float * >(argp6);
13498 ecode7 = SWIG_AsVal_long(obj6, &val7);
13499 if (!SWIG_IsOK(ecode7)) {
13500 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
13501 }
13502 arg7 = static_cast< long >(val7);
13503 ecode8 = SWIG_AsVal_long(obj7, &val8);
13504 if (!SWIG_IsOK(ecode8)) {
13505 SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "pairwise_L2sqr" "', argument " "8"" of type '" "long""'");
13506 }
13507 arg8 = static_cast< long >(val8);
13508 ecode9 = SWIG_AsVal_long(obj8, &val9);
13509 if (!SWIG_IsOK(ecode9)) {
13510 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "pairwise_L2sqr" "', argument " "9"" of type '" "long""'");
13511 }
13512 arg9 = static_cast< long >(val9);
13513 {
13514 Py_BEGIN_ALLOW_THREADS
13515 try {
13516 faiss::pairwise_L2sqr(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6,arg7,arg8,arg9);
13517 } catch(faiss::FaissException & e) {
13518 PyEval_RestoreThread(_save);
13519 PyErr_SetString(PyExc_RuntimeError, e.what());
13520 SWIG_fail;
13521 }
13522 Py_END_ALLOW_THREADS
13523 }
13524 resultobj = SWIG_Py_Void();
13525 return resultobj;
13526 fail:
13527 return NULL;
13528 }
13529
13530
13531 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13532 PyObject *resultobj = 0;
13533 long arg1 ;
13534 long arg2 ;
13535 float *arg3 = (float *) 0 ;
13536 long arg4 ;
13537 float *arg5 = (float *) 0 ;
13538 float *arg6 = (float *) 0 ;
13539 long arg7 ;
13540 long arg8 ;
13541 long val1 ;
13542 int ecode1 = 0 ;
13543 long val2 ;
13544 int ecode2 = 0 ;
13545 void *argp3 = 0 ;
13546 int res3 = 0 ;
13547 long val4 ;
13548 int ecode4 = 0 ;
13549 void *argp5 = 0 ;
13550 int res5 = 0 ;
13551 void *argp6 = 0 ;
13552 int res6 = 0 ;
13553 long val7 ;
13554 int ecode7 = 0 ;
13555 long val8 ;
13556 int ecode8 = 0 ;
13557 PyObject * obj0 = 0 ;
13558 PyObject * obj1 = 0 ;
13559 PyObject * obj2 = 0 ;
13560 PyObject * obj3 = 0 ;
13561 PyObject * obj4 = 0 ;
13562 PyObject * obj5 = 0 ;
13563 PyObject * obj6 = 0 ;
13564 PyObject * obj7 = 0 ;
13565
13566 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
13567 ecode1 = SWIG_AsVal_long(obj0, &val1);
13568 if (!SWIG_IsOK(ecode1)) {
13569 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
13570 }
13571 arg1 = static_cast< long >(val1);
13572 ecode2 = SWIG_AsVal_long(obj1, &val2);
13573 if (!SWIG_IsOK(ecode2)) {
13574 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
13575 }
13576 arg2 = static_cast< long >(val2);
13577 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
13578 if (!SWIG_IsOK(res3)) {
13579 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
13580 }
13581 arg3 = reinterpret_cast< float * >(argp3);
13582 ecode4 = SWIG_AsVal_long(obj3, &val4);
13583 if (!SWIG_IsOK(ecode4)) {
13584 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
13585 }
13586 arg4 = static_cast< long >(val4);
13587 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
13588 if (!SWIG_IsOK(res5)) {
13589 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
13590 }
13591 arg5 = reinterpret_cast< float * >(argp5);
13592 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
13593 if (!SWIG_IsOK(res6)) {
13594 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
13595 }
13596 arg6 = reinterpret_cast< float * >(argp6);
13597 ecode7 = SWIG_AsVal_long(obj6, &val7);
13598 if (!SWIG_IsOK(ecode7)) {
13599 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
13600 }
13601 arg7 = static_cast< long >(val7);
13602 ecode8 = SWIG_AsVal_long(obj7, &val8);
13603 if (!SWIG_IsOK(ecode8)) {
13604 SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "pairwise_L2sqr" "', argument " "8"" of type '" "long""'");
13605 }
13606 arg8 = static_cast< long >(val8);
13607 {
13608 Py_BEGIN_ALLOW_THREADS
13609 try {
13610 faiss::pairwise_L2sqr(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6,arg7,arg8);
13611 } catch(faiss::FaissException & e) {
13612 PyEval_RestoreThread(_save);
13613 PyErr_SetString(PyExc_RuntimeError, e.what());
13614 SWIG_fail;
13615 }
13616 Py_END_ALLOW_THREADS
13617 }
13618 resultobj = SWIG_Py_Void();
13619 return resultobj;
13620 fail:
13621 return NULL;
13622 }
13623
13624
13625 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13626 PyObject *resultobj = 0;
13627 long arg1 ;
13628 long arg2 ;
13629 float *arg3 = (float *) 0 ;
13630 long arg4 ;
13631 float *arg5 = (float *) 0 ;
13632 float *arg6 = (float *) 0 ;
13633 long arg7 ;
13634 long val1 ;
13635 int ecode1 = 0 ;
13636 long val2 ;
13637 int ecode2 = 0 ;
13638 void *argp3 = 0 ;
13639 int res3 = 0 ;
13640 long val4 ;
13641 int ecode4 = 0 ;
13642 void *argp5 = 0 ;
13643 int res5 = 0 ;
13644 void *argp6 = 0 ;
13645 int res6 = 0 ;
13646 long val7 ;
13647 int ecode7 = 0 ;
13648 PyObject * obj0 = 0 ;
13649 PyObject * obj1 = 0 ;
13650 PyObject * obj2 = 0 ;
13651 PyObject * obj3 = 0 ;
13652 PyObject * obj4 = 0 ;
13653 PyObject * obj5 = 0 ;
13654 PyObject * obj6 = 0 ;
13655
13656 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
13657 ecode1 = SWIG_AsVal_long(obj0, &val1);
13658 if (!SWIG_IsOK(ecode1)) {
13659 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
13660 }
13661 arg1 = static_cast< long >(val1);
13662 ecode2 = SWIG_AsVal_long(obj1, &val2);
13663 if (!SWIG_IsOK(ecode2)) {
13664 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
13665 }
13666 arg2 = static_cast< long >(val2);
13667 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
13668 if (!SWIG_IsOK(res3)) {
13669 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
13670 }
13671 arg3 = reinterpret_cast< float * >(argp3);
13672 ecode4 = SWIG_AsVal_long(obj3, &val4);
13673 if (!SWIG_IsOK(ecode4)) {
13674 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
13675 }
13676 arg4 = static_cast< long >(val4);
13677 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
13678 if (!SWIG_IsOK(res5)) {
13679 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
13680 }
13681 arg5 = reinterpret_cast< float * >(argp5);
13682 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
13683 if (!SWIG_IsOK(res6)) {
13684 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
13685 }
13686 arg6 = reinterpret_cast< float * >(argp6);
13687 ecode7 = SWIG_AsVal_long(obj6, &val7);
13688 if (!SWIG_IsOK(ecode7)) {
13689 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "pairwise_L2sqr" "', argument " "7"" of type '" "long""'");
13690 }
13691 arg7 = static_cast< long >(val7);
13692 {
13693 Py_BEGIN_ALLOW_THREADS
13694 try {
13695 faiss::pairwise_L2sqr(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6,arg7);
13696 } catch(faiss::FaissException & e) {
13697 PyEval_RestoreThread(_save);
13698 PyErr_SetString(PyExc_RuntimeError, e.what());
13699 SWIG_fail;
13700 }
13701 Py_END_ALLOW_THREADS
13702 }
13703 resultobj = SWIG_Py_Void();
13704 return resultobj;
13705 fail:
13706 return NULL;
13707 }
13708
13709
13710 SWIGINTERN PyObject *_wrap_pairwise_L2sqr__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13711 PyObject *resultobj = 0;
13712 long arg1 ;
13713 long arg2 ;
13714 float *arg3 = (float *) 0 ;
13715 long arg4 ;
13716 float *arg5 = (float *) 0 ;
13717 float *arg6 = (float *) 0 ;
13718 long val1 ;
13719 int ecode1 = 0 ;
13720 long val2 ;
13721 int ecode2 = 0 ;
13722 void *argp3 = 0 ;
13723 int res3 = 0 ;
13724 long val4 ;
13725 int ecode4 = 0 ;
13726 void *argp5 = 0 ;
13727 int res5 = 0 ;
13728 void *argp6 = 0 ;
13729 int res6 = 0 ;
13730 PyObject * obj0 = 0 ;
13731 PyObject * obj1 = 0 ;
13732 PyObject * obj2 = 0 ;
13733 PyObject * obj3 = 0 ;
13734 PyObject * obj4 = 0 ;
13735 PyObject * obj5 = 0 ;
13736
13737 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:pairwise_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
13738 ecode1 = SWIG_AsVal_long(obj0, &val1);
13739 if (!SWIG_IsOK(ecode1)) {
13740 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "pairwise_L2sqr" "', argument " "1"" of type '" "long""'");
13741 }
13742 arg1 = static_cast< long >(val1);
13743 ecode2 = SWIG_AsVal_long(obj1, &val2);
13744 if (!SWIG_IsOK(ecode2)) {
13745 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "pairwise_L2sqr" "', argument " "2"" of type '" "long""'");
13746 }
13747 arg2 = static_cast< long >(val2);
13748 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
13749 if (!SWIG_IsOK(res3)) {
13750 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "pairwise_L2sqr" "', argument " "3"" of type '" "float const *""'");
13751 }
13752 arg3 = reinterpret_cast< float * >(argp3);
13753 ecode4 = SWIG_AsVal_long(obj3, &val4);
13754 if (!SWIG_IsOK(ecode4)) {
13755 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "pairwise_L2sqr" "', argument " "4"" of type '" "long""'");
13756 }
13757 arg4 = static_cast< long >(val4);
13758 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
13759 if (!SWIG_IsOK(res5)) {
13760 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "pairwise_L2sqr" "', argument " "5"" of type '" "float const *""'");
13761 }
13762 arg5 = reinterpret_cast< float * >(argp5);
13763 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
13764 if (!SWIG_IsOK(res6)) {
13765 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "pairwise_L2sqr" "', argument " "6"" of type '" "float *""'");
13766 }
13767 arg6 = reinterpret_cast< float * >(argp6);
13768 {
13769 Py_BEGIN_ALLOW_THREADS
13770 try {
13771 faiss::pairwise_L2sqr(arg1,arg2,(float const *)arg3,arg4,(float const *)arg5,arg6);
13772 } catch(faiss::FaissException & e) {
13773 PyEval_RestoreThread(_save);
13774 PyErr_SetString(PyExc_RuntimeError, e.what());
13775 SWIG_fail;
13776 }
13777 Py_END_ALLOW_THREADS
13778 }
13779 resultobj = SWIG_Py_Void();
13780 return resultobj;
13781 fail:
13782 return NULL;
13783 }
13784
13785
13786 SWIGINTERN PyObject *_wrap_pairwise_L2sqr(PyObject *self, PyObject *args) {
13787 Py_ssize_t argc;
13788 PyObject *argv[10] = {
13789 0
13790 };
13791 Py_ssize_t ii;
13792
13793 if (!PyTuple_Check(args)) SWIG_fail;
13794 argc = args ? PyObject_Length(args) : 0;
13795 for (ii = 0; (ii < 9) && (ii < argc); ii++) {
13796 argv[ii] = PyTuple_GET_ITEM(args,ii);
13797 }
13798 if (argc == 6) {
13799 int _v;
13800 {
13801 int res = SWIG_AsVal_long(argv[0], NULL);
13802 _v = SWIG_CheckState(res);
13803 }
13804 if (_v) {
13805 {
13806 int res = SWIG_AsVal_long(argv[1], NULL);
13807 _v = SWIG_CheckState(res);
13808 }
13809 if (_v) {
13810 void *vptr = 0;
13811 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
13812 _v = SWIG_CheckState(res);
13813 if (_v) {
13814 {
13815 int res = SWIG_AsVal_long(argv[3], NULL);
13816 _v = SWIG_CheckState(res);
13817 }
13818 if (_v) {
13819 void *vptr = 0;
13820 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
13821 _v = SWIG_CheckState(res);
13822 if (_v) {
13823 void *vptr = 0;
13824 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
13825 _v = SWIG_CheckState(res);
13826 if (_v) {
13827 return _wrap_pairwise_L2sqr__SWIG_3(self, args);
13828 }
13829 }
13830 }
13831 }
13832 }
13833 }
13834 }
13835 if (argc == 7) {
13836 int _v;
13837 {
13838 int res = SWIG_AsVal_long(argv[0], NULL);
13839 _v = SWIG_CheckState(res);
13840 }
13841 if (_v) {
13842 {
13843 int res = SWIG_AsVal_long(argv[1], NULL);
13844 _v = SWIG_CheckState(res);
13845 }
13846 if (_v) {
13847 void *vptr = 0;
13848 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
13849 _v = SWIG_CheckState(res);
13850 if (_v) {
13851 {
13852 int res = SWIG_AsVal_long(argv[3], NULL);
13853 _v = SWIG_CheckState(res);
13854 }
13855 if (_v) {
13856 void *vptr = 0;
13857 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
13858 _v = SWIG_CheckState(res);
13859 if (_v) {
13860 void *vptr = 0;
13861 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
13862 _v = SWIG_CheckState(res);
13863 if (_v) {
13864 {
13865 int res = SWIG_AsVal_long(argv[6], NULL);
13866 _v = SWIG_CheckState(res);
13867 }
13868 if (_v) {
13869 return _wrap_pairwise_L2sqr__SWIG_2(self, args);
13870 }
13871 }
13872 }
13873 }
13874 }
13875 }
13876 }
13877 }
13878 if (argc == 8) {
13879 int _v;
13880 {
13881 int res = SWIG_AsVal_long(argv[0], NULL);
13882 _v = SWIG_CheckState(res);
13883 }
13884 if (_v) {
13885 {
13886 int res = SWIG_AsVal_long(argv[1], NULL);
13887 _v = SWIG_CheckState(res);
13888 }
13889 if (_v) {
13890 void *vptr = 0;
13891 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
13892 _v = SWIG_CheckState(res);
13893 if (_v) {
13894 {
13895 int res = SWIG_AsVal_long(argv[3], NULL);
13896 _v = SWIG_CheckState(res);
13897 }
13898 if (_v) {
13899 void *vptr = 0;
13900 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
13901 _v = SWIG_CheckState(res);
13902 if (_v) {
13903 void *vptr = 0;
13904 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
13905 _v = SWIG_CheckState(res);
13906 if (_v) {
13907 {
13908 int res = SWIG_AsVal_long(argv[6], NULL);
13909 _v = SWIG_CheckState(res);
13910 }
13911 if (_v) {
13912 {
13913 int res = SWIG_AsVal_long(argv[7], NULL);
13914 _v = SWIG_CheckState(res);
13915 }
13916 if (_v) {
13917 return _wrap_pairwise_L2sqr__SWIG_1(self, args);
13918 }
13919 }
13920 }
13921 }
13922 }
13923 }
13924 }
13925 }
13926 }
13927 if (argc == 9) {
13928 int _v;
13929 {
13930 int res = SWIG_AsVal_long(argv[0], NULL);
13931 _v = SWIG_CheckState(res);
13932 }
13933 if (_v) {
13934 {
13935 int res = SWIG_AsVal_long(argv[1], NULL);
13936 _v = SWIG_CheckState(res);
13937 }
13938 if (_v) {
13939 void *vptr = 0;
13940 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
13941 _v = SWIG_CheckState(res);
13942 if (_v) {
13943 {
13944 int res = SWIG_AsVal_long(argv[3], NULL);
13945 _v = SWIG_CheckState(res);
13946 }
13947 if (_v) {
13948 void *vptr = 0;
13949 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
13950 _v = SWIG_CheckState(res);
13951 if (_v) {
13952 void *vptr = 0;
13953 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
13954 _v = SWIG_CheckState(res);
13955 if (_v) {
13956 {
13957 int res = SWIG_AsVal_long(argv[6], NULL);
13958 _v = SWIG_CheckState(res);
13959 }
13960 if (_v) {
13961 {
13962 int res = SWIG_AsVal_long(argv[7], NULL);
13963 _v = SWIG_CheckState(res);
13964 }
13965 if (_v) {
13966 {
13967 int res = SWIG_AsVal_long(argv[8], NULL);
13968 _v = SWIG_CheckState(res);
13969 }
13970 if (_v) {
13971 return _wrap_pairwise_L2sqr__SWIG_0(self, args);
13972 }
13973 }
13974 }
13975 }
13976 }
13977 }
13978 }
13979 }
13980 }
13981 }
13982
13983 fail:
13984 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'pairwise_L2sqr'.\n"
13985 " Possible C/C++ prototypes are:\n"
13986 " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long,long,long)\n"
13987 " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long,long)\n"
13988 " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *,long)\n"
13989 " faiss::pairwise_L2sqr(long,long,float const *,long,float const *,float *)\n");
13990 return 0;
13991 }
13992
13993
13994 SWIGINTERN PyObject *_wrap_fvec_inner_products_ny(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
13995 PyObject *resultobj = 0;
13996 float *arg1 = (float *) 0 ;
13997 float *arg2 = (float *) 0 ;
13998 float *arg3 = (float *) 0 ;
13999 size_t arg4 ;
14000 size_t arg5 ;
14001 void *argp1 = 0 ;
14002 int res1 = 0 ;
14003 void *argp2 = 0 ;
14004 int res2 = 0 ;
14005 void *argp3 = 0 ;
14006 int res3 = 0 ;
14007 size_t val4 ;
14008 int ecode4 = 0 ;
14009 size_t val5 ;
14010 int ecode5 = 0 ;
14011 PyObject * obj0 = 0 ;
14012 PyObject * obj1 = 0 ;
14013 PyObject * obj2 = 0 ;
14014 PyObject * obj3 = 0 ;
14015 PyObject * obj4 = 0 ;
14016
14017 if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvec_inner_products_ny",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
14018 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14019 if (!SWIG_IsOK(res1)) {
14020 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_inner_products_ny" "', argument " "1"" of type '" "float *""'");
14021 }
14022 arg1 = reinterpret_cast< float * >(argp1);
14023 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14024 if (!SWIG_IsOK(res2)) {
14025 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_inner_products_ny" "', argument " "2"" of type '" "float const *""'");
14026 }
14027 arg2 = reinterpret_cast< float * >(argp2);
14028 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14029 if (!SWIG_IsOK(res3)) {
14030 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_inner_products_ny" "', argument " "3"" of type '" "float const *""'");
14031 }
14032 arg3 = reinterpret_cast< float * >(argp3);
14033 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14034 if (!SWIG_IsOK(ecode4)) {
14035 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvec_inner_products_ny" "', argument " "4"" of type '" "size_t""'");
14036 }
14037 arg4 = static_cast< size_t >(val4);
14038 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14039 if (!SWIG_IsOK(ecode5)) {
14040 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvec_inner_products_ny" "', argument " "5"" of type '" "size_t""'");
14041 }
14042 arg5 = static_cast< size_t >(val5);
14043 {
14044 Py_BEGIN_ALLOW_THREADS
14045 try {
14046 faiss::fvec_inner_products_ny(arg1,(float const *)arg2,(float const *)arg3,arg4,arg5);
14047 } catch(faiss::FaissException & e) {
14048 PyEval_RestoreThread(_save);
14049 PyErr_SetString(PyExc_RuntimeError, e.what());
14050 SWIG_fail;
14051 }
14052 Py_END_ALLOW_THREADS
14053 }
14054 resultobj = SWIG_Py_Void();
14055 return resultobj;
14056 fail:
14057 return NULL;
14058 }
14059
14060
14061 SWIGINTERN PyObject *_wrap_fvec_L2sqr_ny(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14062 PyObject *resultobj = 0;
14063 float *arg1 = (float *) 0 ;
14064 float *arg2 = (float *) 0 ;
14065 float *arg3 = (float *) 0 ;
14066 size_t arg4 ;
14067 size_t arg5 ;
14068 void *argp1 = 0 ;
14069 int res1 = 0 ;
14070 void *argp2 = 0 ;
14071 int res2 = 0 ;
14072 void *argp3 = 0 ;
14073 int res3 = 0 ;
14074 size_t val4 ;
14075 int ecode4 = 0 ;
14076 size_t val5 ;
14077 int ecode5 = 0 ;
14078 PyObject * obj0 = 0 ;
14079 PyObject * obj1 = 0 ;
14080 PyObject * obj2 = 0 ;
14081 PyObject * obj3 = 0 ;
14082 PyObject * obj4 = 0 ;
14083
14084 if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvec_L2sqr_ny",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
14085 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14086 if (!SWIG_IsOK(res1)) {
14087 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_L2sqr_ny" "', argument " "1"" of type '" "float *""'");
14088 }
14089 arg1 = reinterpret_cast< float * >(argp1);
14090 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14091 if (!SWIG_IsOK(res2)) {
14092 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_L2sqr_ny" "', argument " "2"" of type '" "float const *""'");
14093 }
14094 arg2 = reinterpret_cast< float * >(argp2);
14095 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14096 if (!SWIG_IsOK(res3)) {
14097 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_L2sqr_ny" "', argument " "3"" of type '" "float const *""'");
14098 }
14099 arg3 = reinterpret_cast< float * >(argp3);
14100 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14101 if (!SWIG_IsOK(ecode4)) {
14102 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvec_L2sqr_ny" "', argument " "4"" of type '" "size_t""'");
14103 }
14104 arg4 = static_cast< size_t >(val4);
14105 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14106 if (!SWIG_IsOK(ecode5)) {
14107 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvec_L2sqr_ny" "', argument " "5"" of type '" "size_t""'");
14108 }
14109 arg5 = static_cast< size_t >(val5);
14110 {
14111 Py_BEGIN_ALLOW_THREADS
14112 try {
14113 faiss::fvec_L2sqr_ny(arg1,(float const *)arg2,(float const *)arg3,arg4,arg5);
14114 } catch(faiss::FaissException & e) {
14115 PyEval_RestoreThread(_save);
14116 PyErr_SetString(PyExc_RuntimeError, e.what());
14117 SWIG_fail;
14118 }
14119 Py_END_ALLOW_THREADS
14120 }
14121 resultobj = SWIG_Py_Void();
14122 return resultobj;
14123 fail:
14124 return NULL;
14125 }
14126
14127
14128 SWIGINTERN PyObject *_wrap_fvec_norm_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14129 PyObject *resultobj = 0;
14130 float *arg1 = (float *) 0 ;
14131 size_t arg2 ;
14132 void *argp1 = 0 ;
14133 int res1 = 0 ;
14134 size_t val2 ;
14135 int ecode2 = 0 ;
14136 PyObject * obj0 = 0 ;
14137 PyObject * obj1 = 0 ;
14138 float result;
14139
14140 if (!PyArg_ParseTuple(args,(char *)"OO:fvec_norm_L2sqr",&obj0,&obj1)) SWIG_fail;
14141 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14142 if (!SWIG_IsOK(res1)) {
14143 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_norm_L2sqr" "', argument " "1"" of type '" "float const *""'");
14144 }
14145 arg1 = reinterpret_cast< float * >(argp1);
14146 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14147 if (!SWIG_IsOK(ecode2)) {
14148 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fvec_norm_L2sqr" "', argument " "2"" of type '" "size_t""'");
14149 }
14150 arg2 = static_cast< size_t >(val2);
14151 {
14152 Py_BEGIN_ALLOW_THREADS
14153 try {
14154 result = (float)faiss::fvec_norm_L2sqr((float const *)arg1,arg2);
14155 } catch(faiss::FaissException & e) {
14156 PyEval_RestoreThread(_save);
14157 PyErr_SetString(PyExc_RuntimeError, e.what());
14158 SWIG_fail;
14159 }
14160 Py_END_ALLOW_THREADS
14161 }
14162 resultobj = SWIG_From_float(static_cast< float >(result));
14163 return resultobj;
14164 fail:
14165 return NULL;
14166 }
14167
14168
14169 SWIGINTERN PyObject *_wrap_fvec_norms_L2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14170 PyObject *resultobj = 0;
14171 float *arg1 = (float *) 0 ;
14172 float *arg2 = (float *) 0 ;
14173 size_t arg3 ;
14174 size_t arg4 ;
14175 void *argp1 = 0 ;
14176 int res1 = 0 ;
14177 void *argp2 = 0 ;
14178 int res2 = 0 ;
14179 size_t val3 ;
14180 int ecode3 = 0 ;
14181 size_t val4 ;
14182 int ecode4 = 0 ;
14183 PyObject * obj0 = 0 ;
14184 PyObject * obj1 = 0 ;
14185 PyObject * obj2 = 0 ;
14186 PyObject * obj3 = 0 ;
14187
14188 if (!PyArg_ParseTuple(args,(char *)"OOOO:fvec_norms_L2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
14189 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14190 if (!SWIG_IsOK(res1)) {
14191 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_norms_L2" "', argument " "1"" of type '" "float *""'");
14192 }
14193 arg1 = reinterpret_cast< float * >(argp1);
14194 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14195 if (!SWIG_IsOK(res2)) {
14196 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_norms_L2" "', argument " "2"" of type '" "float const *""'");
14197 }
14198 arg2 = reinterpret_cast< float * >(argp2);
14199 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14200 if (!SWIG_IsOK(ecode3)) {
14201 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_norms_L2" "', argument " "3"" of type '" "size_t""'");
14202 }
14203 arg3 = static_cast< size_t >(val3);
14204 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14205 if (!SWIG_IsOK(ecode4)) {
14206 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvec_norms_L2" "', argument " "4"" of type '" "size_t""'");
14207 }
14208 arg4 = static_cast< size_t >(val4);
14209 {
14210 Py_BEGIN_ALLOW_THREADS
14211 try {
14212 faiss::fvec_norms_L2(arg1,(float const *)arg2,arg3,arg4);
14213 } catch(faiss::FaissException & e) {
14214 PyEval_RestoreThread(_save);
14215 PyErr_SetString(PyExc_RuntimeError, e.what());
14216 SWIG_fail;
14217 }
14218 Py_END_ALLOW_THREADS
14219 }
14220 resultobj = SWIG_Py_Void();
14221 return resultobj;
14222 fail:
14223 return NULL;
14224 }
14225
14226
14227 SWIGINTERN PyObject *_wrap_fvec_norms_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14228 PyObject *resultobj = 0;
14229 float *arg1 = (float *) 0 ;
14230 float *arg2 = (float *) 0 ;
14231 size_t arg3 ;
14232 size_t arg4 ;
14233 void *argp1 = 0 ;
14234 int res1 = 0 ;
14235 void *argp2 = 0 ;
14236 int res2 = 0 ;
14237 size_t val3 ;
14238 int ecode3 = 0 ;
14239 size_t val4 ;
14240 int ecode4 = 0 ;
14241 PyObject * obj0 = 0 ;
14242 PyObject * obj1 = 0 ;
14243 PyObject * obj2 = 0 ;
14244 PyObject * obj3 = 0 ;
14245
14246 if (!PyArg_ParseTuple(args,(char *)"OOOO:fvec_norms_L2sqr",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
14247 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14248 if (!SWIG_IsOK(res1)) {
14249 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_norms_L2sqr" "', argument " "1"" of type '" "float *""'");
14250 }
14251 arg1 = reinterpret_cast< float * >(argp1);
14252 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14253 if (!SWIG_IsOK(res2)) {
14254 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_norms_L2sqr" "', argument " "2"" of type '" "float const *""'");
14255 }
14256 arg2 = reinterpret_cast< float * >(argp2);
14257 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14258 if (!SWIG_IsOK(ecode3)) {
14259 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_norms_L2sqr" "', argument " "3"" of type '" "size_t""'");
14260 }
14261 arg3 = static_cast< size_t >(val3);
14262 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14263 if (!SWIG_IsOK(ecode4)) {
14264 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fvec_norms_L2sqr" "', argument " "4"" of type '" "size_t""'");
14265 }
14266 arg4 = static_cast< size_t >(val4);
14267 {
14268 Py_BEGIN_ALLOW_THREADS
14269 try {
14270 faiss::fvec_norms_L2sqr(arg1,(float const *)arg2,arg3,arg4);
14271 } catch(faiss::FaissException & e) {
14272 PyEval_RestoreThread(_save);
14273 PyErr_SetString(PyExc_RuntimeError, e.what());
14274 SWIG_fail;
14275 }
14276 Py_END_ALLOW_THREADS
14277 }
14278 resultobj = SWIG_Py_Void();
14279 return resultobj;
14280 fail:
14281 return NULL;
14282 }
14283
14284
14285 SWIGINTERN PyObject *_wrap_fvec_renorm_L2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14286 PyObject *resultobj = 0;
14287 size_t arg1 ;
14288 size_t arg2 ;
14289 float *arg3 = (float *) 0 ;
14290 size_t val1 ;
14291 int ecode1 = 0 ;
14292 size_t val2 ;
14293 int ecode2 = 0 ;
14294 void *argp3 = 0 ;
14295 int res3 = 0 ;
14296 PyObject * obj0 = 0 ;
14297 PyObject * obj1 = 0 ;
14298 PyObject * obj2 = 0 ;
14299
14300 if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_renorm_L2",&obj0,&obj1,&obj2)) SWIG_fail;
14301 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
14302 if (!SWIG_IsOK(ecode1)) {
14303 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_renorm_L2" "', argument " "1"" of type '" "size_t""'");
14304 }
14305 arg1 = static_cast< size_t >(val1);
14306 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
14307 if (!SWIG_IsOK(ecode2)) {
14308 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fvec_renorm_L2" "', argument " "2"" of type '" "size_t""'");
14309 }
14310 arg2 = static_cast< size_t >(val2);
14311 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14312 if (!SWIG_IsOK(res3)) {
14313 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_renorm_L2" "', argument " "3"" of type '" "float *""'");
14314 }
14315 arg3 = reinterpret_cast< float * >(argp3);
14316 {
14317 Py_BEGIN_ALLOW_THREADS
14318 try {
14319 faiss::fvec_renorm_L2(arg1,arg2,arg3);
14320 } catch(faiss::FaissException & e) {
14321 PyEval_RestoreThread(_save);
14322 PyErr_SetString(PyExc_RuntimeError, e.what());
14323 SWIG_fail;
14324 }
14325 Py_END_ALLOW_THREADS
14326 }
14327 resultobj = SWIG_Py_Void();
14328 return resultobj;
14329 fail:
14330 return NULL;
14331 }
14332
14333
14334 SWIGINTERN PyObject *_wrap_inner_product_to_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14335 PyObject *resultobj = 0;
14336 float *arg1 = (float *) 0 ;
14337 float *arg2 = (float *) 0 ;
14338 float *arg3 = (float *) 0 ;
14339 size_t arg4 ;
14340 size_t arg5 ;
14341 void *argp1 = 0 ;
14342 int res1 = 0 ;
14343 void *argp2 = 0 ;
14344 int res2 = 0 ;
14345 void *argp3 = 0 ;
14346 int res3 = 0 ;
14347 size_t val4 ;
14348 int ecode4 = 0 ;
14349 size_t val5 ;
14350 int ecode5 = 0 ;
14351 PyObject * obj0 = 0 ;
14352 PyObject * obj1 = 0 ;
14353 PyObject * obj2 = 0 ;
14354 PyObject * obj3 = 0 ;
14355 PyObject * obj4 = 0 ;
14356
14357 if (!PyArg_ParseTuple(args,(char *)"OOOOO:inner_product_to_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
14358 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14359 if (!SWIG_IsOK(res1)) {
14360 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "inner_product_to_L2sqr" "', argument " "1"" of type '" "float *""'");
14361 }
14362 arg1 = reinterpret_cast< float * >(argp1);
14363 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14364 if (!SWIG_IsOK(res2)) {
14365 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "inner_product_to_L2sqr" "', argument " "2"" of type '" "float const *""'");
14366 }
14367 arg2 = reinterpret_cast< float * >(argp2);
14368 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14369 if (!SWIG_IsOK(res3)) {
14370 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "inner_product_to_L2sqr" "', argument " "3"" of type '" "float const *""'");
14371 }
14372 arg3 = reinterpret_cast< float * >(argp3);
14373 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14374 if (!SWIG_IsOK(ecode4)) {
14375 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "inner_product_to_L2sqr" "', argument " "4"" of type '" "size_t""'");
14376 }
14377 arg4 = static_cast< size_t >(val4);
14378 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14379 if (!SWIG_IsOK(ecode5)) {
14380 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "inner_product_to_L2sqr" "', argument " "5"" of type '" "size_t""'");
14381 }
14382 arg5 = static_cast< size_t >(val5);
14383 {
14384 Py_BEGIN_ALLOW_THREADS
14385 try {
14386 faiss::inner_product_to_L2sqr(arg1,(float const *)arg2,(float const *)arg3,arg4,arg5);
14387 } catch(faiss::FaissException & e) {
14388 PyEval_RestoreThread(_save);
14389 PyErr_SetString(PyExc_RuntimeError, e.what());
14390 SWIG_fail;
14391 }
14392 Py_END_ALLOW_THREADS
14393 }
14394 resultobj = SWIG_Py_Void();
14395 return resultobj;
14396 fail:
14397 return NULL;
14398 }
14399
14400
14401 SWIGINTERN PyObject *_wrap_fvec_inner_products_by_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14402 PyObject *resultobj = 0;
14403 float *arg1 = (float *) 0 ;
14404 float *arg2 = (float *) 0 ;
14405 float *arg3 = (float *) 0 ;
14406 long *arg4 = (long *) 0 ;
14407 size_t arg5 ;
14408 size_t arg6 ;
14409 size_t arg7 ;
14410 void *argp1 = 0 ;
14411 int res1 = 0 ;
14412 void *argp2 = 0 ;
14413 int res2 = 0 ;
14414 void *argp3 = 0 ;
14415 int res3 = 0 ;
14416 void *argp4 = 0 ;
14417 int res4 = 0 ;
14418 size_t val5 ;
14419 int ecode5 = 0 ;
14420 size_t val6 ;
14421 int ecode6 = 0 ;
14422 size_t val7 ;
14423 int ecode7 = 0 ;
14424 PyObject * obj0 = 0 ;
14425 PyObject * obj1 = 0 ;
14426 PyObject * obj2 = 0 ;
14427 PyObject * obj3 = 0 ;
14428 PyObject * obj4 = 0 ;
14429 PyObject * obj5 = 0 ;
14430 PyObject * obj6 = 0 ;
14431
14432 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:fvec_inner_products_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14433 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14434 if (!SWIG_IsOK(res1)) {
14435 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_inner_products_by_idx" "', argument " "1"" of type '" "float *""'");
14436 }
14437 arg1 = reinterpret_cast< float * >(argp1);
14438 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14439 if (!SWIG_IsOK(res2)) {
14440 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_inner_products_by_idx" "', argument " "2"" of type '" "float const *""'");
14441 }
14442 arg2 = reinterpret_cast< float * >(argp2);
14443 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14444 if (!SWIG_IsOK(res3)) {
14445 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_inner_products_by_idx" "', argument " "3"" of type '" "float const *""'");
14446 }
14447 arg3 = reinterpret_cast< float * >(argp3);
14448 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
14449 if (!SWIG_IsOK(res4)) {
14450 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvec_inner_products_by_idx" "', argument " "4"" of type '" "long const *""'");
14451 }
14452 arg4 = reinterpret_cast< long * >(argp4);
14453 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14454 if (!SWIG_IsOK(ecode5)) {
14455 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvec_inner_products_by_idx" "', argument " "5"" of type '" "size_t""'");
14456 }
14457 arg5 = static_cast< size_t >(val5);
14458 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
14459 if (!SWIG_IsOK(ecode6)) {
14460 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fvec_inner_products_by_idx" "', argument " "6"" of type '" "size_t""'");
14461 }
14462 arg6 = static_cast< size_t >(val6);
14463 ecode7 = SWIG_AsVal_size_t(obj6, &val7);
14464 if (!SWIG_IsOK(ecode7)) {
14465 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fvec_inner_products_by_idx" "', argument " "7"" of type '" "size_t""'");
14466 }
14467 arg7 = static_cast< size_t >(val7);
14468 {
14469 Py_BEGIN_ALLOW_THREADS
14470 try {
14471 faiss::fvec_inner_products_by_idx(arg1,(float const *)arg2,(float const *)arg3,(long const *)arg4,arg5,arg6,arg7);
14472 } catch(faiss::FaissException & e) {
14473 PyEval_RestoreThread(_save);
14474 PyErr_SetString(PyExc_RuntimeError, e.what());
14475 SWIG_fail;
14476 }
14477 Py_END_ALLOW_THREADS
14478 }
14479 resultobj = SWIG_Py_Void();
14480 return resultobj;
14481 fail:
14482 return NULL;
14483 }
14484
14485
14486 SWIGINTERN PyObject *_wrap_fvec_L2sqr_by_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14487 PyObject *resultobj = 0;
14488 float *arg1 = (float *) 0 ;
14489 float *arg2 = (float *) 0 ;
14490 float *arg3 = (float *) 0 ;
14491 long *arg4 = (long *) 0 ;
14492 size_t arg5 ;
14493 size_t arg6 ;
14494 size_t arg7 ;
14495 void *argp1 = 0 ;
14496 int res1 = 0 ;
14497 void *argp2 = 0 ;
14498 int res2 = 0 ;
14499 void *argp3 = 0 ;
14500 int res3 = 0 ;
14501 void *argp4 = 0 ;
14502 int res4 = 0 ;
14503 size_t val5 ;
14504 int ecode5 = 0 ;
14505 size_t val6 ;
14506 int ecode6 = 0 ;
14507 size_t val7 ;
14508 int ecode7 = 0 ;
14509 PyObject * obj0 = 0 ;
14510 PyObject * obj1 = 0 ;
14511 PyObject * obj2 = 0 ;
14512 PyObject * obj3 = 0 ;
14513 PyObject * obj4 = 0 ;
14514 PyObject * obj5 = 0 ;
14515 PyObject * obj6 = 0 ;
14516
14517 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:fvec_L2sqr_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14518 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14519 if (!SWIG_IsOK(res1)) {
14520 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fvec_L2sqr_by_idx" "', argument " "1"" of type '" "float *""'");
14521 }
14522 arg1 = reinterpret_cast< float * >(argp1);
14523 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14524 if (!SWIG_IsOK(res2)) {
14525 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_L2sqr_by_idx" "', argument " "2"" of type '" "float const *""'");
14526 }
14527 arg2 = reinterpret_cast< float * >(argp2);
14528 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
14529 if (!SWIG_IsOK(res3)) {
14530 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_L2sqr_by_idx" "', argument " "3"" of type '" "float const *""'");
14531 }
14532 arg3 = reinterpret_cast< float * >(argp3);
14533 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
14534 if (!SWIG_IsOK(res4)) {
14535 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvec_L2sqr_by_idx" "', argument " "4"" of type '" "long const *""'");
14536 }
14537 arg4 = reinterpret_cast< long * >(argp4);
14538 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14539 if (!SWIG_IsOK(ecode5)) {
14540 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvec_L2sqr_by_idx" "', argument " "5"" of type '" "size_t""'");
14541 }
14542 arg5 = static_cast< size_t >(val5);
14543 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
14544 if (!SWIG_IsOK(ecode6)) {
14545 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fvec_L2sqr_by_idx" "', argument " "6"" of type '" "size_t""'");
14546 }
14547 arg6 = static_cast< size_t >(val6);
14548 ecode7 = SWIG_AsVal_size_t(obj6, &val7);
14549 if (!SWIG_IsOK(ecode7)) {
14550 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fvec_L2sqr_by_idx" "', argument " "7"" of type '" "size_t""'");
14551 }
14552 arg7 = static_cast< size_t >(val7);
14553 {
14554 Py_BEGIN_ALLOW_THREADS
14555 try {
14556 faiss::fvec_L2sqr_by_idx(arg1,(float const *)arg2,(float const *)arg3,(long const *)arg4,arg5,arg6,arg7);
14557 } catch(faiss::FaissException & e) {
14558 PyEval_RestoreThread(_save);
14559 PyErr_SetString(PyExc_RuntimeError, e.what());
14560 SWIG_fail;
14561 }
14562 Py_END_ALLOW_THREADS
14563 }
14564 resultobj = SWIG_Py_Void();
14565 return resultobj;
14566 fail:
14567 return NULL;
14568 }
14569
14570
14571 SWIGINTERN int Swig_var_distance_compute_blas_threshold_set(PyObject *_val) {
14572 {
14573 int val;
14574 int res = SWIG_AsVal_int(_val, &val);
14575 if (!SWIG_IsOK(res)) {
14576 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::distance_compute_blas_threshold""' of type '""int""'");
14577 }
14578 faiss::distance_compute_blas_threshold = static_cast< int >(val);
14579 }
14580 return 0;
14581 fail:
14582 return 1;
14583 }
14584
14585
14586 SWIGINTERN PyObject *Swig_var_distance_compute_blas_threshold_get(void) {
14587 PyObject *pyobj = 0;
14588
14589 pyobj = SWIG_From_int(static_cast< int >(faiss::distance_compute_blas_threshold));
14590 return pyobj;
14591 }
14592
14593
14594 SWIGINTERN PyObject *_wrap_knn_inner_product(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14595 PyObject *resultobj = 0;
14596 float *arg1 = (float *) 0 ;
14597 float *arg2 = (float *) 0 ;
14598 size_t arg3 ;
14599 size_t arg4 ;
14600 size_t arg5 ;
14601 faiss::float_minheap_array_t *arg6 = (faiss::float_minheap_array_t *) 0 ;
14602 void *argp1 = 0 ;
14603 int res1 = 0 ;
14604 void *argp2 = 0 ;
14605 int res2 = 0 ;
14606 size_t val3 ;
14607 int ecode3 = 0 ;
14608 size_t val4 ;
14609 int ecode4 = 0 ;
14610 size_t val5 ;
14611 int ecode5 = 0 ;
14612 void *argp6 = 0 ;
14613 int res6 = 0 ;
14614 PyObject * obj0 = 0 ;
14615 PyObject * obj1 = 0 ;
14616 PyObject * obj2 = 0 ;
14617 PyObject * obj3 = 0 ;
14618 PyObject * obj4 = 0 ;
14619 PyObject * obj5 = 0 ;
14620
14621 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:knn_inner_product",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
14622 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14623 if (!SWIG_IsOK(res1)) {
14624 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_inner_product" "', argument " "1"" of type '" "float const *""'");
14625 }
14626 arg1 = reinterpret_cast< float * >(argp1);
14627 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14628 if (!SWIG_IsOK(res2)) {
14629 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_inner_product" "', argument " "2"" of type '" "float const *""'");
14630 }
14631 arg2 = reinterpret_cast< float * >(argp2);
14632 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14633 if (!SWIG_IsOK(ecode3)) {
14634 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "knn_inner_product" "', argument " "3"" of type '" "size_t""'");
14635 }
14636 arg3 = static_cast< size_t >(val3);
14637 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14638 if (!SWIG_IsOK(ecode4)) {
14639 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_inner_product" "', argument " "4"" of type '" "size_t""'");
14640 }
14641 arg4 = static_cast< size_t >(val4);
14642 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14643 if (!SWIG_IsOK(ecode5)) {
14644 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_inner_product" "', argument " "5"" of type '" "size_t""'");
14645 }
14646 arg5 = static_cast< size_t >(val5);
14647 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
14648 if (!SWIG_IsOK(res6)) {
14649 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "knn_inner_product" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
14650 }
14651 arg6 = reinterpret_cast< faiss::float_minheap_array_t * >(argp6);
14652 {
14653 Py_BEGIN_ALLOW_THREADS
14654 try {
14655 faiss::knn_inner_product((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6);
14656 } catch(faiss::FaissException & e) {
14657 PyEval_RestoreThread(_save);
14658 PyErr_SetString(PyExc_RuntimeError, e.what());
14659 SWIG_fail;
14660 }
14661 Py_END_ALLOW_THREADS
14662 }
14663 resultobj = SWIG_Py_Void();
14664 return resultobj;
14665 fail:
14666 return NULL;
14667 }
14668
14669
14670 SWIGINTERN PyObject *_wrap_knn_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14671 PyObject *resultobj = 0;
14672 float *arg1 = (float *) 0 ;
14673 float *arg2 = (float *) 0 ;
14674 size_t arg3 ;
14675 size_t arg4 ;
14676 size_t arg5 ;
14677 faiss::float_maxheap_array_t *arg6 = (faiss::float_maxheap_array_t *) 0 ;
14678 void *argp1 = 0 ;
14679 int res1 = 0 ;
14680 void *argp2 = 0 ;
14681 int res2 = 0 ;
14682 size_t val3 ;
14683 int ecode3 = 0 ;
14684 size_t val4 ;
14685 int ecode4 = 0 ;
14686 size_t val5 ;
14687 int ecode5 = 0 ;
14688 void *argp6 = 0 ;
14689 int res6 = 0 ;
14690 PyObject * obj0 = 0 ;
14691 PyObject * obj1 = 0 ;
14692 PyObject * obj2 = 0 ;
14693 PyObject * obj3 = 0 ;
14694 PyObject * obj4 = 0 ;
14695 PyObject * obj5 = 0 ;
14696
14697 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:knn_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
14698 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14699 if (!SWIG_IsOK(res1)) {
14700 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_L2sqr" "', argument " "1"" of type '" "float const *""'");
14701 }
14702 arg1 = reinterpret_cast< float * >(argp1);
14703 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14704 if (!SWIG_IsOK(res2)) {
14705 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_L2sqr" "', argument " "2"" of type '" "float const *""'");
14706 }
14707 arg2 = reinterpret_cast< float * >(argp2);
14708 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14709 if (!SWIG_IsOK(ecode3)) {
14710 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "knn_L2sqr" "', argument " "3"" of type '" "size_t""'");
14711 }
14712 arg3 = static_cast< size_t >(val3);
14713 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14714 if (!SWIG_IsOK(ecode4)) {
14715 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_L2sqr" "', argument " "4"" of type '" "size_t""'");
14716 }
14717 arg4 = static_cast< size_t >(val4);
14718 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14719 if (!SWIG_IsOK(ecode5)) {
14720 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_L2sqr" "', argument " "5"" of type '" "size_t""'");
14721 }
14722 arg5 = static_cast< size_t >(val5);
14723 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
14724 if (!SWIG_IsOK(res6)) {
14725 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "knn_L2sqr" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
14726 }
14727 arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
14728 {
14729 Py_BEGIN_ALLOW_THREADS
14730 try {
14731 faiss::knn_L2sqr((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6);
14732 } catch(faiss::FaissException & e) {
14733 PyEval_RestoreThread(_save);
14734 PyErr_SetString(PyExc_RuntimeError, e.what());
14735 SWIG_fail;
14736 }
14737 Py_END_ALLOW_THREADS
14738 }
14739 resultobj = SWIG_Py_Void();
14740 return resultobj;
14741 fail:
14742 return NULL;
14743 }
14744
14745
14746 SWIGINTERN PyObject *_wrap_knn_L2sqr_base_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14747 PyObject *resultobj = 0;
14748 float *arg1 = (float *) 0 ;
14749 float *arg2 = (float *) 0 ;
14750 size_t arg3 ;
14751 size_t arg4 ;
14752 size_t arg5 ;
14753 faiss::float_maxheap_array_t *arg6 = (faiss::float_maxheap_array_t *) 0 ;
14754 float *arg7 = (float *) 0 ;
14755 void *argp1 = 0 ;
14756 int res1 = 0 ;
14757 void *argp2 = 0 ;
14758 int res2 = 0 ;
14759 size_t val3 ;
14760 int ecode3 = 0 ;
14761 size_t val4 ;
14762 int ecode4 = 0 ;
14763 size_t val5 ;
14764 int ecode5 = 0 ;
14765 void *argp6 = 0 ;
14766 int res6 = 0 ;
14767 void *argp7 = 0 ;
14768 int res7 = 0 ;
14769 PyObject * obj0 = 0 ;
14770 PyObject * obj1 = 0 ;
14771 PyObject * obj2 = 0 ;
14772 PyObject * obj3 = 0 ;
14773 PyObject * obj4 = 0 ;
14774 PyObject * obj5 = 0 ;
14775 PyObject * obj6 = 0 ;
14776
14777 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:knn_L2sqr_base_shift",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14778 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14779 if (!SWIG_IsOK(res1)) {
14780 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_L2sqr_base_shift" "', argument " "1"" of type '" "float const *""'");
14781 }
14782 arg1 = reinterpret_cast< float * >(argp1);
14783 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14784 if (!SWIG_IsOK(res2)) {
14785 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_L2sqr_base_shift" "', argument " "2"" of type '" "float const *""'");
14786 }
14787 arg2 = reinterpret_cast< float * >(argp2);
14788 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
14789 if (!SWIG_IsOK(ecode3)) {
14790 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "knn_L2sqr_base_shift" "', argument " "3"" of type '" "size_t""'");
14791 }
14792 arg3 = static_cast< size_t >(val3);
14793 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14794 if (!SWIG_IsOK(ecode4)) {
14795 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_L2sqr_base_shift" "', argument " "4"" of type '" "size_t""'");
14796 }
14797 arg4 = static_cast< size_t >(val4);
14798 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14799 if (!SWIG_IsOK(ecode5)) {
14800 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_L2sqr_base_shift" "', argument " "5"" of type '" "size_t""'");
14801 }
14802 arg5 = static_cast< size_t >(val5);
14803 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
14804 if (!SWIG_IsOK(res6)) {
14805 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "knn_L2sqr_base_shift" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
14806 }
14807 arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
14808 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
14809 if (!SWIG_IsOK(res7)) {
14810 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "knn_L2sqr_base_shift" "', argument " "7"" of type '" "float const *""'");
14811 }
14812 arg7 = reinterpret_cast< float * >(argp7);
14813 {
14814 Py_BEGIN_ALLOW_THREADS
14815 try {
14816 faiss::knn_L2sqr_base_shift((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6,(float const *)arg7);
14817 } catch(faiss::FaissException & e) {
14818 PyEval_RestoreThread(_save);
14819 PyErr_SetString(PyExc_RuntimeError, e.what());
14820 SWIG_fail;
14821 }
14822 Py_END_ALLOW_THREADS
14823 }
14824 resultobj = SWIG_Py_Void();
14825 return resultobj;
14826 fail:
14827 return NULL;
14828 }
14829
14830
14831 SWIGINTERN PyObject *_wrap_knn_inner_products_by_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14832 PyObject *resultobj = 0;
14833 float *arg1 = (float *) 0 ;
14834 float *arg2 = (float *) 0 ;
14835 long *arg3 = (long *) 0 ;
14836 size_t arg4 ;
14837 size_t arg5 ;
14838 size_t arg6 ;
14839 faiss::float_minheap_array_t *arg7 = (faiss::float_minheap_array_t *) 0 ;
14840 void *argp1 = 0 ;
14841 int res1 = 0 ;
14842 void *argp2 = 0 ;
14843 int res2 = 0 ;
14844 void *argp3 = 0 ;
14845 int res3 = 0 ;
14846 size_t val4 ;
14847 int ecode4 = 0 ;
14848 size_t val5 ;
14849 int ecode5 = 0 ;
14850 size_t val6 ;
14851 int ecode6 = 0 ;
14852 void *argp7 = 0 ;
14853 int res7 = 0 ;
14854 PyObject * obj0 = 0 ;
14855 PyObject * obj1 = 0 ;
14856 PyObject * obj2 = 0 ;
14857 PyObject * obj3 = 0 ;
14858 PyObject * obj4 = 0 ;
14859 PyObject * obj5 = 0 ;
14860 PyObject * obj6 = 0 ;
14861
14862 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:knn_inner_products_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14863 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14864 if (!SWIG_IsOK(res1)) {
14865 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_inner_products_by_idx" "', argument " "1"" of type '" "float const *""'");
14866 }
14867 arg1 = reinterpret_cast< float * >(argp1);
14868 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14869 if (!SWIG_IsOK(res2)) {
14870 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_inner_products_by_idx" "', argument " "2"" of type '" "float const *""'");
14871 }
14872 arg2 = reinterpret_cast< float * >(argp2);
14873 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
14874 if (!SWIG_IsOK(res3)) {
14875 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "knn_inner_products_by_idx" "', argument " "3"" of type '" "long const *""'");
14876 }
14877 arg3 = reinterpret_cast< long * >(argp3);
14878 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14879 if (!SWIG_IsOK(ecode4)) {
14880 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_inner_products_by_idx" "', argument " "4"" of type '" "size_t""'");
14881 }
14882 arg4 = static_cast< size_t >(val4);
14883 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14884 if (!SWIG_IsOK(ecode5)) {
14885 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_inner_products_by_idx" "', argument " "5"" of type '" "size_t""'");
14886 }
14887 arg5 = static_cast< size_t >(val5);
14888 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
14889 if (!SWIG_IsOK(ecode6)) {
14890 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "knn_inner_products_by_idx" "', argument " "6"" of type '" "size_t""'");
14891 }
14892 arg6 = static_cast< size_t >(val6);
14893 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
14894 if (!SWIG_IsOK(res7)) {
14895 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "knn_inner_products_by_idx" "', argument " "7"" of type '" "faiss::float_minheap_array_t *""'");
14896 }
14897 arg7 = reinterpret_cast< faiss::float_minheap_array_t * >(argp7);
14898 {
14899 Py_BEGIN_ALLOW_THREADS
14900 try {
14901 faiss::knn_inner_products_by_idx((float const *)arg1,(float const *)arg2,(long const *)arg3,arg4,arg5,arg6,arg7);
14902 } catch(faiss::FaissException & e) {
14903 PyEval_RestoreThread(_save);
14904 PyErr_SetString(PyExc_RuntimeError, e.what());
14905 SWIG_fail;
14906 }
14907 Py_END_ALLOW_THREADS
14908 }
14909 resultobj = SWIG_Py_Void();
14910 return resultobj;
14911 fail:
14912 return NULL;
14913 }
14914
14915
14916 SWIGINTERN PyObject *_wrap_knn_L2sqr_by_idx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
14917 PyObject *resultobj = 0;
14918 float *arg1 = (float *) 0 ;
14919 float *arg2 = (float *) 0 ;
14920 long *arg3 = (long *) 0 ;
14921 size_t arg4 ;
14922 size_t arg5 ;
14923 size_t arg6 ;
14924 faiss::float_maxheap_array_t *arg7 = (faiss::float_maxheap_array_t *) 0 ;
14925 void *argp1 = 0 ;
14926 int res1 = 0 ;
14927 void *argp2 = 0 ;
14928 int res2 = 0 ;
14929 void *argp3 = 0 ;
14930 int res3 = 0 ;
14931 size_t val4 ;
14932 int ecode4 = 0 ;
14933 size_t val5 ;
14934 int ecode5 = 0 ;
14935 size_t val6 ;
14936 int ecode6 = 0 ;
14937 void *argp7 = 0 ;
14938 int res7 = 0 ;
14939 PyObject * obj0 = 0 ;
14940 PyObject * obj1 = 0 ;
14941 PyObject * obj2 = 0 ;
14942 PyObject * obj3 = 0 ;
14943 PyObject * obj4 = 0 ;
14944 PyObject * obj5 = 0 ;
14945 PyObject * obj6 = 0 ;
14946
14947 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:knn_L2sqr_by_idx",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
14948 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
14949 if (!SWIG_IsOK(res1)) {
14950 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "knn_L2sqr_by_idx" "', argument " "1"" of type '" "float const *""'");
14951 }
14952 arg1 = reinterpret_cast< float * >(argp1);
14953 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
14954 if (!SWIG_IsOK(res2)) {
14955 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "knn_L2sqr_by_idx" "', argument " "2"" of type '" "float const *""'");
14956 }
14957 arg2 = reinterpret_cast< float * >(argp2);
14958 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
14959 if (!SWIG_IsOK(res3)) {
14960 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "knn_L2sqr_by_idx" "', argument " "3"" of type '" "long const *""'");
14961 }
14962 arg3 = reinterpret_cast< long * >(argp3);
14963 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
14964 if (!SWIG_IsOK(ecode4)) {
14965 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "knn_L2sqr_by_idx" "', argument " "4"" of type '" "size_t""'");
14966 }
14967 arg4 = static_cast< size_t >(val4);
14968 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
14969 if (!SWIG_IsOK(ecode5)) {
14970 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "knn_L2sqr_by_idx" "', argument " "5"" of type '" "size_t""'");
14971 }
14972 arg5 = static_cast< size_t >(val5);
14973 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
14974 if (!SWIG_IsOK(ecode6)) {
14975 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "knn_L2sqr_by_idx" "', argument " "6"" of type '" "size_t""'");
14976 }
14977 arg6 = static_cast< size_t >(val6);
14978 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
14979 if (!SWIG_IsOK(res7)) {
14980 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "knn_L2sqr_by_idx" "', argument " "7"" of type '" "faiss::float_maxheap_array_t *""'");
14981 }
14982 arg7 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp7);
14983 {
14984 Py_BEGIN_ALLOW_THREADS
14985 try {
14986 faiss::knn_L2sqr_by_idx((float const *)arg1,(float const *)arg2,(long const *)arg3,arg4,arg5,arg6,arg7);
14987 } catch(faiss::FaissException & e) {
14988 PyEval_RestoreThread(_save);
14989 PyErr_SetString(PyExc_RuntimeError, e.what());
14990 SWIG_fail;
14991 }
14992 Py_END_ALLOW_THREADS
14993 }
14994 resultobj = SWIG_Py_Void();
14995 return resultobj;
14996 fail:
14997 return NULL;
14998 }
14999
15000
15001 SWIGINTERN PyObject *_wrap_range_search_L2sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15002 PyObject *resultobj = 0;
15003 float *arg1 = (float *) 0 ;
15004 float *arg2 = (float *) 0 ;
15005 size_t arg3 ;
15006 size_t arg4 ;
15007 size_t arg5 ;
15008 float arg6 ;
15009 faiss::RangeSearchResult *arg7 = (faiss::RangeSearchResult *) 0 ;
15010 void *argp1 = 0 ;
15011 int res1 = 0 ;
15012 void *argp2 = 0 ;
15013 int res2 = 0 ;
15014 size_t val3 ;
15015 int ecode3 = 0 ;
15016 size_t val4 ;
15017 int ecode4 = 0 ;
15018 size_t val5 ;
15019 int ecode5 = 0 ;
15020 float val6 ;
15021 int ecode6 = 0 ;
15022 void *argp7 = 0 ;
15023 int res7 = 0 ;
15024 PyObject * obj0 = 0 ;
15025 PyObject * obj1 = 0 ;
15026 PyObject * obj2 = 0 ;
15027 PyObject * obj3 = 0 ;
15028 PyObject * obj4 = 0 ;
15029 PyObject * obj5 = 0 ;
15030 PyObject * obj6 = 0 ;
15031
15032 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:range_search_L2sqr",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15033 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15034 if (!SWIG_IsOK(res1)) {
15035 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "range_search_L2sqr" "', argument " "1"" of type '" "float const *""'");
15036 }
15037 arg1 = reinterpret_cast< float * >(argp1);
15038 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15039 if (!SWIG_IsOK(res2)) {
15040 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "range_search_L2sqr" "', argument " "2"" of type '" "float const *""'");
15041 }
15042 arg2 = reinterpret_cast< float * >(argp2);
15043 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15044 if (!SWIG_IsOK(ecode3)) {
15045 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "range_search_L2sqr" "', argument " "3"" of type '" "size_t""'");
15046 }
15047 arg3 = static_cast< size_t >(val3);
15048 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15049 if (!SWIG_IsOK(ecode4)) {
15050 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "range_search_L2sqr" "', argument " "4"" of type '" "size_t""'");
15051 }
15052 arg4 = static_cast< size_t >(val4);
15053 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15054 if (!SWIG_IsOK(ecode5)) {
15055 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "range_search_L2sqr" "', argument " "5"" of type '" "size_t""'");
15056 }
15057 arg5 = static_cast< size_t >(val5);
15058 ecode6 = SWIG_AsVal_float(obj5, &val6);
15059 if (!SWIG_IsOK(ecode6)) {
15060 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "range_search_L2sqr" "', argument " "6"" of type '" "float""'");
15061 }
15062 arg6 = static_cast< float >(val6);
15063 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
15064 if (!SWIG_IsOK(res7)) {
15065 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "range_search_L2sqr" "', argument " "7"" of type '" "faiss::RangeSearchResult *""'");
15066 }
15067 arg7 = reinterpret_cast< faiss::RangeSearchResult * >(argp7);
15068 {
15069 Py_BEGIN_ALLOW_THREADS
15070 try {
15071 faiss::range_search_L2sqr((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6,arg7);
15072 } catch(faiss::FaissException & e) {
15073 PyEval_RestoreThread(_save);
15074 PyErr_SetString(PyExc_RuntimeError, e.what());
15075 SWIG_fail;
15076 }
15077 Py_END_ALLOW_THREADS
15078 }
15079 resultobj = SWIG_Py_Void();
15080 return resultobj;
15081 fail:
15082 return NULL;
15083 }
15084
15085
15086 SWIGINTERN PyObject *_wrap_range_search_inner_product(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15087 PyObject *resultobj = 0;
15088 float *arg1 = (float *) 0 ;
15089 float *arg2 = (float *) 0 ;
15090 size_t arg3 ;
15091 size_t arg4 ;
15092 size_t arg5 ;
15093 float arg6 ;
15094 faiss::RangeSearchResult *arg7 = (faiss::RangeSearchResult *) 0 ;
15095 void *argp1 = 0 ;
15096 int res1 = 0 ;
15097 void *argp2 = 0 ;
15098 int res2 = 0 ;
15099 size_t val3 ;
15100 int ecode3 = 0 ;
15101 size_t val4 ;
15102 int ecode4 = 0 ;
15103 size_t val5 ;
15104 int ecode5 = 0 ;
15105 float val6 ;
15106 int ecode6 = 0 ;
15107 void *argp7 = 0 ;
15108 int res7 = 0 ;
15109 PyObject * obj0 = 0 ;
15110 PyObject * obj1 = 0 ;
15111 PyObject * obj2 = 0 ;
15112 PyObject * obj3 = 0 ;
15113 PyObject * obj4 = 0 ;
15114 PyObject * obj5 = 0 ;
15115 PyObject * obj6 = 0 ;
15116
15117 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:range_search_inner_product",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15118 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15119 if (!SWIG_IsOK(res1)) {
15120 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "range_search_inner_product" "', argument " "1"" of type '" "float const *""'");
15121 }
15122 arg1 = reinterpret_cast< float * >(argp1);
15123 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15124 if (!SWIG_IsOK(res2)) {
15125 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "range_search_inner_product" "', argument " "2"" of type '" "float const *""'");
15126 }
15127 arg2 = reinterpret_cast< float * >(argp2);
15128 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15129 if (!SWIG_IsOK(ecode3)) {
15130 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "range_search_inner_product" "', argument " "3"" of type '" "size_t""'");
15131 }
15132 arg3 = static_cast< size_t >(val3);
15133 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15134 if (!SWIG_IsOK(ecode4)) {
15135 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "range_search_inner_product" "', argument " "4"" of type '" "size_t""'");
15136 }
15137 arg4 = static_cast< size_t >(val4);
15138 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15139 if (!SWIG_IsOK(ecode5)) {
15140 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "range_search_inner_product" "', argument " "5"" of type '" "size_t""'");
15141 }
15142 arg5 = static_cast< size_t >(val5);
15143 ecode6 = SWIG_AsVal_float(obj5, &val6);
15144 if (!SWIG_IsOK(ecode6)) {
15145 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "range_search_inner_product" "', argument " "6"" of type '" "float""'");
15146 }
15147 arg6 = static_cast< float >(val6);
15148 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
15149 if (!SWIG_IsOK(res7)) {
15150 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "range_search_inner_product" "', argument " "7"" of type '" "faiss::RangeSearchResult *""'");
15151 }
15152 arg7 = reinterpret_cast< faiss::RangeSearchResult * >(argp7);
15153 {
15154 Py_BEGIN_ALLOW_THREADS
15155 try {
15156 faiss::range_search_inner_product((float const *)arg1,(float const *)arg2,arg3,arg4,arg5,arg6,arg7);
15157 } catch(faiss::FaissException & e) {
15158 PyEval_RestoreThread(_save);
15159 PyErr_SetString(PyExc_RuntimeError, e.what());
15160 SWIG_fail;
15161 }
15162 Py_END_ALLOW_THREADS
15163 }
15164 resultobj = SWIG_Py_Void();
15165 return resultobj;
15166 fail:
15167 return NULL;
15168 }
15169
15170
15171 SWIGINTERN PyObject *_wrap_fvec_madd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15172 PyObject *resultobj = 0;
15173 size_t arg1 ;
15174 float *arg2 = (float *) 0 ;
15175 float arg3 ;
15176 float *arg4 = (float *) 0 ;
15177 float *arg5 = (float *) 0 ;
15178 size_t val1 ;
15179 int ecode1 = 0 ;
15180 void *argp2 = 0 ;
15181 int res2 = 0 ;
15182 float val3 ;
15183 int ecode3 = 0 ;
15184 void *argp4 = 0 ;
15185 int res4 = 0 ;
15186 void *argp5 = 0 ;
15187 int res5 = 0 ;
15188 PyObject * obj0 = 0 ;
15189 PyObject * obj1 = 0 ;
15190 PyObject * obj2 = 0 ;
15191 PyObject * obj3 = 0 ;
15192 PyObject * obj4 = 0 ;
15193
15194 if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvec_madd",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15195 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15196 if (!SWIG_IsOK(ecode1)) {
15197 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_madd" "', argument " "1"" of type '" "size_t""'");
15198 }
15199 arg1 = static_cast< size_t >(val1);
15200 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15201 if (!SWIG_IsOK(res2)) {
15202 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_madd" "', argument " "2"" of type '" "float const *""'");
15203 }
15204 arg2 = reinterpret_cast< float * >(argp2);
15205 ecode3 = SWIG_AsVal_float(obj2, &val3);
15206 if (!SWIG_IsOK(ecode3)) {
15207 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_madd" "', argument " "3"" of type '" "float""'");
15208 }
15209 arg3 = static_cast< float >(val3);
15210 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
15211 if (!SWIG_IsOK(res4)) {
15212 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvec_madd" "', argument " "4"" of type '" "float const *""'");
15213 }
15214 arg4 = reinterpret_cast< float * >(argp4);
15215 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
15216 if (!SWIG_IsOK(res5)) {
15217 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fvec_madd" "', argument " "5"" of type '" "float *""'");
15218 }
15219 arg5 = reinterpret_cast< float * >(argp5);
15220 {
15221 Py_BEGIN_ALLOW_THREADS
15222 try {
15223 faiss::fvec_madd(arg1,(float const *)arg2,arg3,(float const *)arg4,arg5);
15224 } catch(faiss::FaissException & e) {
15225 PyEval_RestoreThread(_save);
15226 PyErr_SetString(PyExc_RuntimeError, e.what());
15227 SWIG_fail;
15228 }
15229 Py_END_ALLOW_THREADS
15230 }
15231 resultobj = SWIG_Py_Void();
15232 return resultobj;
15233 fail:
15234 return NULL;
15235 }
15236
15237
15238 SWIGINTERN PyObject *_wrap_fvec_madd_and_argmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15239 PyObject *resultobj = 0;
15240 size_t arg1 ;
15241 float *arg2 = (float *) 0 ;
15242 float arg3 ;
15243 float *arg4 = (float *) 0 ;
15244 float *arg5 = (float *) 0 ;
15245 size_t val1 ;
15246 int ecode1 = 0 ;
15247 void *argp2 = 0 ;
15248 int res2 = 0 ;
15249 float val3 ;
15250 int ecode3 = 0 ;
15251 void *argp4 = 0 ;
15252 int res4 = 0 ;
15253 void *argp5 = 0 ;
15254 int res5 = 0 ;
15255 PyObject * obj0 = 0 ;
15256 PyObject * obj1 = 0 ;
15257 PyObject * obj2 = 0 ;
15258 PyObject * obj3 = 0 ;
15259 PyObject * obj4 = 0 ;
15260 int result;
15261
15262 if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvec_madd_and_argmin",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15263 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15264 if (!SWIG_IsOK(ecode1)) {
15265 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_madd_and_argmin" "', argument " "1"" of type '" "size_t""'");
15266 }
15267 arg1 = static_cast< size_t >(val1);
15268 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15269 if (!SWIG_IsOK(res2)) {
15270 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_madd_and_argmin" "', argument " "2"" of type '" "float const *""'");
15271 }
15272 arg2 = reinterpret_cast< float * >(argp2);
15273 ecode3 = SWIG_AsVal_float(obj2, &val3);
15274 if (!SWIG_IsOK(ecode3)) {
15275 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvec_madd_and_argmin" "', argument " "3"" of type '" "float""'");
15276 }
15277 arg3 = static_cast< float >(val3);
15278 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
15279 if (!SWIG_IsOK(res4)) {
15280 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvec_madd_and_argmin" "', argument " "4"" of type '" "float const *""'");
15281 }
15282 arg4 = reinterpret_cast< float * >(argp4);
15283 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
15284 if (!SWIG_IsOK(res5)) {
15285 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fvec_madd_and_argmin" "', argument " "5"" of type '" "float *""'");
15286 }
15287 arg5 = reinterpret_cast< float * >(argp5);
15288 {
15289 Py_BEGIN_ALLOW_THREADS
15290 try {
15291 result = (int)faiss::fvec_madd_and_argmin(arg1,(float const *)arg2,arg3,(float const *)arg4,arg5);
15292 } catch(faiss::FaissException & e) {
15293 PyEval_RestoreThread(_save);
15294 PyErr_SetString(PyExc_RuntimeError, e.what());
15295 SWIG_fail;
15296 }
15297 Py_END_ALLOW_THREADS
15298 }
15299 resultobj = SWIG_From_int(static_cast< int >(result));
15300 return resultobj;
15301 fail:
15302 return NULL;
15303 }
15304
15305
15306 SWIGINTERN PyObject *_wrap_reflection(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15307 PyObject *resultobj = 0;
15308 float *arg1 = (float *) 0 ;
15309 float *arg2 = (float *) 0 ;
15310 size_t arg3 ;
15311 size_t arg4 ;
15312 size_t arg5 ;
15313 void *argp1 = 0 ;
15314 int res1 = 0 ;
15315 void *argp2 = 0 ;
15316 int res2 = 0 ;
15317 size_t val3 ;
15318 int ecode3 = 0 ;
15319 size_t val4 ;
15320 int ecode4 = 0 ;
15321 size_t val5 ;
15322 int ecode5 = 0 ;
15323 PyObject * obj0 = 0 ;
15324 PyObject * obj1 = 0 ;
15325 PyObject * obj2 = 0 ;
15326 PyObject * obj3 = 0 ;
15327 PyObject * obj4 = 0 ;
15328
15329 if (!PyArg_ParseTuple(args,(char *)"OOOOO:reflection",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
15330 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15331 if (!SWIG_IsOK(res1)) {
15332 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "reflection" "', argument " "1"" of type '" "float const *""'");
15333 }
15334 arg1 = reinterpret_cast< float * >(argp1);
15335 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15336 if (!SWIG_IsOK(res2)) {
15337 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "reflection" "', argument " "2"" of type '" "float *""'");
15338 }
15339 arg2 = reinterpret_cast< float * >(argp2);
15340 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15341 if (!SWIG_IsOK(ecode3)) {
15342 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "reflection" "', argument " "3"" of type '" "size_t""'");
15343 }
15344 arg3 = static_cast< size_t >(val3);
15345 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15346 if (!SWIG_IsOK(ecode4)) {
15347 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "reflection" "', argument " "4"" of type '" "size_t""'");
15348 }
15349 arg4 = static_cast< size_t >(val4);
15350 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15351 if (!SWIG_IsOK(ecode5)) {
15352 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "reflection" "', argument " "5"" of type '" "size_t""'");
15353 }
15354 arg5 = static_cast< size_t >(val5);
15355 {
15356 Py_BEGIN_ALLOW_THREADS
15357 try {
15358 faiss::reflection((float const *)arg1,arg2,arg3,arg4,arg5);
15359 } catch(faiss::FaissException & e) {
15360 PyEval_RestoreThread(_save);
15361 PyErr_SetString(PyExc_RuntimeError, e.what());
15362 SWIG_fail;
15363 }
15364 Py_END_ALLOW_THREADS
15365 }
15366 resultobj = SWIG_Py_Void();
15367 return resultobj;
15368 fail:
15369 return NULL;
15370 }
15371
15372
15373 SWIGINTERN PyObject *_wrap_km_update_centroids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15374 PyObject *resultobj = 0;
15375 float *arg1 = (float *) 0 ;
15376 float *arg2 = (float *) 0 ;
15377 long *arg3 = (long *) 0 ;
15378 size_t arg4 ;
15379 size_t arg5 ;
15380 size_t arg6 ;
15381 size_t arg7 ;
15382 void *argp1 = 0 ;
15383 int res1 = 0 ;
15384 void *argp2 = 0 ;
15385 int res2 = 0 ;
15386 void *argp3 = 0 ;
15387 int res3 = 0 ;
15388 size_t val4 ;
15389 int ecode4 = 0 ;
15390 size_t val5 ;
15391 int ecode5 = 0 ;
15392 size_t val6 ;
15393 int ecode6 = 0 ;
15394 size_t val7 ;
15395 int ecode7 = 0 ;
15396 PyObject * obj0 = 0 ;
15397 PyObject * obj1 = 0 ;
15398 PyObject * obj2 = 0 ;
15399 PyObject * obj3 = 0 ;
15400 PyObject * obj4 = 0 ;
15401 PyObject * obj5 = 0 ;
15402 PyObject * obj6 = 0 ;
15403 int result;
15404
15405 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:km_update_centroids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15406 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
15407 if (!SWIG_IsOK(res1)) {
15408 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "km_update_centroids" "', argument " "1"" of type '" "float const *""'");
15409 }
15410 arg1 = reinterpret_cast< float * >(argp1);
15411 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
15412 if (!SWIG_IsOK(res2)) {
15413 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "km_update_centroids" "', argument " "2"" of type '" "float *""'");
15414 }
15415 arg2 = reinterpret_cast< float * >(argp2);
15416 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
15417 if (!SWIG_IsOK(res3)) {
15418 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "km_update_centroids" "', argument " "3"" of type '" "long *""'");
15419 }
15420 arg3 = reinterpret_cast< long * >(argp3);
15421 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
15422 if (!SWIG_IsOK(ecode4)) {
15423 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "km_update_centroids" "', argument " "4"" of type '" "size_t""'");
15424 }
15425 arg4 = static_cast< size_t >(val4);
15426 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
15427 if (!SWIG_IsOK(ecode5)) {
15428 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "km_update_centroids" "', argument " "5"" of type '" "size_t""'");
15429 }
15430 arg5 = static_cast< size_t >(val5);
15431 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
15432 if (!SWIG_IsOK(ecode6)) {
15433 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "km_update_centroids" "', argument " "6"" of type '" "size_t""'");
15434 }
15435 arg6 = static_cast< size_t >(val6);
15436 ecode7 = SWIG_AsVal_size_t(obj6, &val7);
15437 if (!SWIG_IsOK(ecode7)) {
15438 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "km_update_centroids" "', argument " "7"" of type '" "size_t""'");
15439 }
15440 arg7 = static_cast< size_t >(val7);
15441 {
15442 Py_BEGIN_ALLOW_THREADS
15443 try {
15444 result = (int)faiss::km_update_centroids((float const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7);
15445 } catch(faiss::FaissException & e) {
15446 PyEval_RestoreThread(_save);
15447 PyErr_SetString(PyExc_RuntimeError, e.what());
15448 SWIG_fail;
15449 }
15450 Py_END_ALLOW_THREADS
15451 }
15452 resultobj = SWIG_From_int(static_cast< int >(result));
15453 return resultobj;
15454 fail:
15455 return NULL;
15456 }
15457
15458
15459 SWIGINTERN PyObject *_wrap_matrix_qr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15460 PyObject *resultobj = 0;
15461 int arg1 ;
15462 int arg2 ;
15463 float *arg3 = (float *) 0 ;
15464 int val1 ;
15465 int ecode1 = 0 ;
15466 int val2 ;
15467 int ecode2 = 0 ;
15468 void *argp3 = 0 ;
15469 int res3 = 0 ;
15470 PyObject * obj0 = 0 ;
15471 PyObject * obj1 = 0 ;
15472 PyObject * obj2 = 0 ;
15473
15474 if (!PyArg_ParseTuple(args,(char *)"OOO:matrix_qr",&obj0,&obj1,&obj2)) SWIG_fail;
15475 ecode1 = SWIG_AsVal_int(obj0, &val1);
15476 if (!SWIG_IsOK(ecode1)) {
15477 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "matrix_qr" "', argument " "1"" of type '" "int""'");
15478 }
15479 arg1 = static_cast< int >(val1);
15480 ecode2 = SWIG_AsVal_int(obj1, &val2);
15481 if (!SWIG_IsOK(ecode2)) {
15482 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "matrix_qr" "', argument " "2"" of type '" "int""'");
15483 }
15484 arg2 = static_cast< int >(val2);
15485 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15486 if (!SWIG_IsOK(res3)) {
15487 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "matrix_qr" "', argument " "3"" of type '" "float *""'");
15488 }
15489 arg3 = reinterpret_cast< float * >(argp3);
15490 {
15491 Py_BEGIN_ALLOW_THREADS
15492 try {
15493 faiss::matrix_qr(arg1,arg2,arg3);
15494 } catch(faiss::FaissException & e) {
15495 PyEval_RestoreThread(_save);
15496 PyErr_SetString(PyExc_RuntimeError, e.what());
15497 SWIG_fail;
15498 }
15499 Py_END_ALLOW_THREADS
15500 }
15501 resultobj = SWIG_Py_Void();
15502 return resultobj;
15503 fail:
15504 return NULL;
15505 }
15506
15507
15508 SWIGINTERN PyObject *_wrap_ranklist_handle_ties(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15509 PyObject *resultobj = 0;
15510 int arg1 ;
15511 long *arg2 = (long *) 0 ;
15512 float *arg3 = (float *) 0 ;
15513 int val1 ;
15514 int ecode1 = 0 ;
15515 void *argp2 = 0 ;
15516 int res2 = 0 ;
15517 void *argp3 = 0 ;
15518 int res3 = 0 ;
15519 PyObject * obj0 = 0 ;
15520 PyObject * obj1 = 0 ;
15521 PyObject * obj2 = 0 ;
15522
15523 if (!PyArg_ParseTuple(args,(char *)"OOO:ranklist_handle_ties",&obj0,&obj1,&obj2)) SWIG_fail;
15524 ecode1 = SWIG_AsVal_int(obj0, &val1);
15525 if (!SWIG_IsOK(ecode1)) {
15526 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ranklist_handle_ties" "', argument " "1"" of type '" "int""'");
15527 }
15528 arg1 = static_cast< int >(val1);
15529 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
15530 if (!SWIG_IsOK(res2)) {
15531 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ranklist_handle_ties" "', argument " "2"" of type '" "long *""'");
15532 }
15533 arg2 = reinterpret_cast< long * >(argp2);
15534 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
15535 if (!SWIG_IsOK(res3)) {
15536 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ranklist_handle_ties" "', argument " "3"" of type '" "float const *""'");
15537 }
15538 arg3 = reinterpret_cast< float * >(argp3);
15539 {
15540 Py_BEGIN_ALLOW_THREADS
15541 try {
15542 faiss::ranklist_handle_ties(arg1,arg2,(float const *)arg3);
15543 } catch(faiss::FaissException & e) {
15544 PyEval_RestoreThread(_save);
15545 PyErr_SetString(PyExc_RuntimeError, e.what());
15546 SWIG_fail;
15547 }
15548 Py_END_ALLOW_THREADS
15549 }
15550 resultobj = SWIG_Py_Void();
15551 return resultobj;
15552 fail:
15553 return NULL;
15554 }
15555
15556
15557 SWIGINTERN PyObject *_wrap_ranklist_intersection_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15558 PyObject *resultobj = 0;
15559 size_t arg1 ;
15560 long *arg2 = (long *) 0 ;
15561 size_t arg3 ;
15562 long *arg4 = (long *) 0 ;
15563 size_t val1 ;
15564 int ecode1 = 0 ;
15565 void *argp2 = 0 ;
15566 int res2 = 0 ;
15567 size_t val3 ;
15568 int ecode3 = 0 ;
15569 void *argp4 = 0 ;
15570 int res4 = 0 ;
15571 PyObject * obj0 = 0 ;
15572 PyObject * obj1 = 0 ;
15573 PyObject * obj2 = 0 ;
15574 PyObject * obj3 = 0 ;
15575 size_t result;
15576
15577 if (!PyArg_ParseTuple(args,(char *)"OOOO:ranklist_intersection_size",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
15578 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15579 if (!SWIG_IsOK(ecode1)) {
15580 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ranklist_intersection_size" "', argument " "1"" of type '" "size_t""'");
15581 }
15582 arg1 = static_cast< size_t >(val1);
15583 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
15584 if (!SWIG_IsOK(res2)) {
15585 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ranklist_intersection_size" "', argument " "2"" of type '" "long const *""'");
15586 }
15587 arg2 = reinterpret_cast< long * >(argp2);
15588 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
15589 if (!SWIG_IsOK(ecode3)) {
15590 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ranklist_intersection_size" "', argument " "3"" of type '" "size_t""'");
15591 }
15592 arg3 = static_cast< size_t >(val3);
15593 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
15594 if (!SWIG_IsOK(res4)) {
15595 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ranklist_intersection_size" "', argument " "4"" of type '" "long const *""'");
15596 }
15597 arg4 = reinterpret_cast< long * >(argp4);
15598 {
15599 Py_BEGIN_ALLOW_THREADS
15600 try {
15601 result = (size_t)faiss::ranklist_intersection_size(arg1,(long const *)arg2,arg3,(long const *)arg4);
15602 } catch(faiss::FaissException & e) {
15603 PyEval_RestoreThread(_save);
15604 PyErr_SetString(PyExc_RuntimeError, e.what());
15605 SWIG_fail;
15606 }
15607 Py_END_ALLOW_THREADS
15608 }
15609 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
15610 return resultobj;
15611 fail:
15612 return NULL;
15613 }
15614
15615
15616 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15617 PyObject *resultobj = 0;
15618 size_t arg1 ;
15619 size_t arg2 ;
15620 long *arg3 = (long *) 0 ;
15621 float *arg4 = (float *) 0 ;
15622 long *arg5 = (long *) 0 ;
15623 float *arg6 = (float *) 0 ;
15624 bool arg7 ;
15625 long arg8 ;
15626 size_t val1 ;
15627 int ecode1 = 0 ;
15628 size_t val2 ;
15629 int ecode2 = 0 ;
15630 void *argp3 = 0 ;
15631 int res3 = 0 ;
15632 void *argp4 = 0 ;
15633 int res4 = 0 ;
15634 void *argp5 = 0 ;
15635 int res5 = 0 ;
15636 void *argp6 = 0 ;
15637 int res6 = 0 ;
15638 bool val7 ;
15639 int ecode7 = 0 ;
15640 long val8 ;
15641 int ecode8 = 0 ;
15642 PyObject * obj0 = 0 ;
15643 PyObject * obj1 = 0 ;
15644 PyObject * obj2 = 0 ;
15645 PyObject * obj3 = 0 ;
15646 PyObject * obj4 = 0 ;
15647 PyObject * obj5 = 0 ;
15648 PyObject * obj6 = 0 ;
15649 PyObject * obj7 = 0 ;
15650 size_t result;
15651
15652 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
15653 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15654 if (!SWIG_IsOK(ecode1)) {
15655 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
15656 }
15657 arg1 = static_cast< size_t >(val1);
15658 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
15659 if (!SWIG_IsOK(ecode2)) {
15660 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
15661 }
15662 arg2 = static_cast< size_t >(val2);
15663 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
15664 if (!SWIG_IsOK(res3)) {
15665 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
15666 }
15667 arg3 = reinterpret_cast< long * >(argp3);
15668 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
15669 if (!SWIG_IsOK(res4)) {
15670 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
15671 }
15672 arg4 = reinterpret_cast< float * >(argp4);
15673 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
15674 if (!SWIG_IsOK(res5)) {
15675 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
15676 }
15677 arg5 = reinterpret_cast< long * >(argp5);
15678 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
15679 if (!SWIG_IsOK(res6)) {
15680 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
15681 }
15682 arg6 = reinterpret_cast< float * >(argp6);
15683 ecode7 = SWIG_AsVal_bool(obj6, &val7);
15684 if (!SWIG_IsOK(ecode7)) {
15685 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "merge_result_table_with" "', argument " "7"" of type '" "bool""'");
15686 }
15687 arg7 = static_cast< bool >(val7);
15688 ecode8 = SWIG_AsVal_long(obj7, &val8);
15689 if (!SWIG_IsOK(ecode8)) {
15690 SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "merge_result_table_with" "', argument " "8"" of type '" "long""'");
15691 }
15692 arg8 = static_cast< long >(val8);
15693 {
15694 Py_BEGIN_ALLOW_THREADS
15695 try {
15696 result = (size_t)faiss::merge_result_table_with(arg1,arg2,arg3,arg4,(long const *)arg5,(float const *)arg6,arg7,arg8);
15697 } catch(faiss::FaissException & e) {
15698 PyEval_RestoreThread(_save);
15699 PyErr_SetString(PyExc_RuntimeError, e.what());
15700 SWIG_fail;
15701 }
15702 Py_END_ALLOW_THREADS
15703 }
15704 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
15705 return resultobj;
15706 fail:
15707 return NULL;
15708 }
15709
15710
15711 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15712 PyObject *resultobj = 0;
15713 size_t arg1 ;
15714 size_t arg2 ;
15715 long *arg3 = (long *) 0 ;
15716 float *arg4 = (float *) 0 ;
15717 long *arg5 = (long *) 0 ;
15718 float *arg6 = (float *) 0 ;
15719 bool arg7 ;
15720 size_t val1 ;
15721 int ecode1 = 0 ;
15722 size_t val2 ;
15723 int ecode2 = 0 ;
15724 void *argp3 = 0 ;
15725 int res3 = 0 ;
15726 void *argp4 = 0 ;
15727 int res4 = 0 ;
15728 void *argp5 = 0 ;
15729 int res5 = 0 ;
15730 void *argp6 = 0 ;
15731 int res6 = 0 ;
15732 bool val7 ;
15733 int ecode7 = 0 ;
15734 PyObject * obj0 = 0 ;
15735 PyObject * obj1 = 0 ;
15736 PyObject * obj2 = 0 ;
15737 PyObject * obj3 = 0 ;
15738 PyObject * obj4 = 0 ;
15739 PyObject * obj5 = 0 ;
15740 PyObject * obj6 = 0 ;
15741 size_t result;
15742
15743 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
15744 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15745 if (!SWIG_IsOK(ecode1)) {
15746 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
15747 }
15748 arg1 = static_cast< size_t >(val1);
15749 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
15750 if (!SWIG_IsOK(ecode2)) {
15751 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
15752 }
15753 arg2 = static_cast< size_t >(val2);
15754 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
15755 if (!SWIG_IsOK(res3)) {
15756 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
15757 }
15758 arg3 = reinterpret_cast< long * >(argp3);
15759 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
15760 if (!SWIG_IsOK(res4)) {
15761 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
15762 }
15763 arg4 = reinterpret_cast< float * >(argp4);
15764 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
15765 if (!SWIG_IsOK(res5)) {
15766 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
15767 }
15768 arg5 = reinterpret_cast< long * >(argp5);
15769 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
15770 if (!SWIG_IsOK(res6)) {
15771 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
15772 }
15773 arg6 = reinterpret_cast< float * >(argp6);
15774 ecode7 = SWIG_AsVal_bool(obj6, &val7);
15775 if (!SWIG_IsOK(ecode7)) {
15776 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "merge_result_table_with" "', argument " "7"" of type '" "bool""'");
15777 }
15778 arg7 = static_cast< bool >(val7);
15779 {
15780 Py_BEGIN_ALLOW_THREADS
15781 try {
15782 result = (size_t)faiss::merge_result_table_with(arg1,arg2,arg3,arg4,(long const *)arg5,(float const *)arg6,arg7);
15783 } catch(faiss::FaissException & e) {
15784 PyEval_RestoreThread(_save);
15785 PyErr_SetString(PyExc_RuntimeError, e.what());
15786 SWIG_fail;
15787 }
15788 Py_END_ALLOW_THREADS
15789 }
15790 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
15791 return resultobj;
15792 fail:
15793 return NULL;
15794 }
15795
15796
15797 SWIGINTERN PyObject *_wrap_merge_result_table_with__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
15798 PyObject *resultobj = 0;
15799 size_t arg1 ;
15800 size_t arg2 ;
15801 long *arg3 = (long *) 0 ;
15802 float *arg4 = (float *) 0 ;
15803 long *arg5 = (long *) 0 ;
15804 float *arg6 = (float *) 0 ;
15805 size_t val1 ;
15806 int ecode1 = 0 ;
15807 size_t val2 ;
15808 int ecode2 = 0 ;
15809 void *argp3 = 0 ;
15810 int res3 = 0 ;
15811 void *argp4 = 0 ;
15812 int res4 = 0 ;
15813 void *argp5 = 0 ;
15814 int res5 = 0 ;
15815 void *argp6 = 0 ;
15816 int res6 = 0 ;
15817 PyObject * obj0 = 0 ;
15818 PyObject * obj1 = 0 ;
15819 PyObject * obj2 = 0 ;
15820 PyObject * obj3 = 0 ;
15821 PyObject * obj4 = 0 ;
15822 PyObject * obj5 = 0 ;
15823 size_t result;
15824
15825 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:merge_result_table_with",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
15826 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
15827 if (!SWIG_IsOK(ecode1)) {
15828 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "merge_result_table_with" "', argument " "1"" of type '" "size_t""'");
15829 }
15830 arg1 = static_cast< size_t >(val1);
15831 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
15832 if (!SWIG_IsOK(ecode2)) {
15833 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "merge_result_table_with" "', argument " "2"" of type '" "size_t""'");
15834 }
15835 arg2 = static_cast< size_t >(val2);
15836 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
15837 if (!SWIG_IsOK(res3)) {
15838 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "merge_result_table_with" "', argument " "3"" of type '" "long *""'");
15839 }
15840 arg3 = reinterpret_cast< long * >(argp3);
15841 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
15842 if (!SWIG_IsOK(res4)) {
15843 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "merge_result_table_with" "', argument " "4"" of type '" "float *""'");
15844 }
15845 arg4 = reinterpret_cast< float * >(argp4);
15846 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
15847 if (!SWIG_IsOK(res5)) {
15848 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "merge_result_table_with" "', argument " "5"" of type '" "long const *""'");
15849 }
15850 arg5 = reinterpret_cast< long * >(argp5);
15851 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
15852 if (!SWIG_IsOK(res6)) {
15853 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "merge_result_table_with" "', argument " "6"" of type '" "float const *""'");
15854 }
15855 arg6 = reinterpret_cast< float * >(argp6);
15856 {
15857 Py_BEGIN_ALLOW_THREADS
15858 try {
15859 result = (size_t)faiss::merge_result_table_with(arg1,arg2,arg3,arg4,(long const *)arg5,(float const *)arg6);
15860 } catch(faiss::FaissException & e) {
15861 PyEval_RestoreThread(_save);
15862 PyErr_SetString(PyExc_RuntimeError, e.what());
15863 SWIG_fail;
15864 }
15865 Py_END_ALLOW_THREADS
15866 }
15867 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
15868 return resultobj;
15869 fail:
15870 return NULL;
15871 }
15872
15873
15874 SWIGINTERN PyObject *_wrap_merge_result_table_with(PyObject *self, PyObject *args) {
15875 Py_ssize_t argc;
15876 PyObject *argv[9] = {
15877 0
15878 };
15879 Py_ssize_t ii;
15880
15881 if (!PyTuple_Check(args)) SWIG_fail;
15882 argc = args ? PyObject_Length(args) : 0;
15883 for (ii = 0; (ii < 8) && (ii < argc); ii++) {
15884 argv[ii] = PyTuple_GET_ITEM(args,ii);
15885 }
15886 if (argc == 6) {
15887 int _v;
15888 {
15889 int res = SWIG_AsVal_size_t(argv[0], NULL);
15890 _v = SWIG_CheckState(res);
15891 }
15892 if (_v) {
15893 {
15894 int res = SWIG_AsVal_size_t(argv[1], NULL);
15895 _v = SWIG_CheckState(res);
15896 }
15897 if (_v) {
15898 void *vptr = 0;
15899 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
15900 _v = SWIG_CheckState(res);
15901 if (_v) {
15902 void *vptr = 0;
15903 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
15904 _v = SWIG_CheckState(res);
15905 if (_v) {
15906 void *vptr = 0;
15907 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
15908 _v = SWIG_CheckState(res);
15909 if (_v) {
15910 void *vptr = 0;
15911 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
15912 _v = SWIG_CheckState(res);
15913 if (_v) {
15914 return _wrap_merge_result_table_with__SWIG_2(self, args);
15915 }
15916 }
15917 }
15918 }
15919 }
15920 }
15921 }
15922 if (argc == 7) {
15923 int _v;
15924 {
15925 int res = SWIG_AsVal_size_t(argv[0], NULL);
15926 _v = SWIG_CheckState(res);
15927 }
15928 if (_v) {
15929 {
15930 int res = SWIG_AsVal_size_t(argv[1], NULL);
15931 _v = SWIG_CheckState(res);
15932 }
15933 if (_v) {
15934 void *vptr = 0;
15935 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
15936 _v = SWIG_CheckState(res);
15937 if (_v) {
15938 void *vptr = 0;
15939 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
15940 _v = SWIG_CheckState(res);
15941 if (_v) {
15942 void *vptr = 0;
15943 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
15944 _v = SWIG_CheckState(res);
15945 if (_v) {
15946 void *vptr = 0;
15947 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
15948 _v = SWIG_CheckState(res);
15949 if (_v) {
15950 {
15951 int res = SWIG_AsVal_bool(argv[6], NULL);
15952 _v = SWIG_CheckState(res);
15953 }
15954 if (_v) {
15955 return _wrap_merge_result_table_with__SWIG_1(self, args);
15956 }
15957 }
15958 }
15959 }
15960 }
15961 }
15962 }
15963 }
15964 if (argc == 8) {
15965 int _v;
15966 {
15967 int res = SWIG_AsVal_size_t(argv[0], NULL);
15968 _v = SWIG_CheckState(res);
15969 }
15970 if (_v) {
15971 {
15972 int res = SWIG_AsVal_size_t(argv[1], NULL);
15973 _v = SWIG_CheckState(res);
15974 }
15975 if (_v) {
15976 void *vptr = 0;
15977 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
15978 _v = SWIG_CheckState(res);
15979 if (_v) {
15980 void *vptr = 0;
15981 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
15982 _v = SWIG_CheckState(res);
15983 if (_v) {
15984 void *vptr = 0;
15985 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
15986 _v = SWIG_CheckState(res);
15987 if (_v) {
15988 void *vptr = 0;
15989 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
15990 _v = SWIG_CheckState(res);
15991 if (_v) {
15992 {
15993 int res = SWIG_AsVal_bool(argv[6], NULL);
15994 _v = SWIG_CheckState(res);
15995 }
15996 if (_v) {
15997 {
15998 int res = SWIG_AsVal_long(argv[7], NULL);
15999 _v = SWIG_CheckState(res);
16000 }
16001 if (_v) {
16002 return _wrap_merge_result_table_with__SWIG_0(self, args);
16003 }
16004 }
16005 }
16006 }
16007 }
16008 }
16009 }
16010 }
16011 }
16012
16013 fail:
16014 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'merge_result_table_with'.\n"
16015 " Possible C/C++ prototypes are:\n"
16016 " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *,bool,long)\n"
16017 " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *,bool)\n"
16018 " faiss::merge_result_table_with(size_t,size_t,long *,float *,long const *,float const *)\n");
16019 return 0;
16020 }
16021
16022
16023 SWIGINTERN PyObject *_wrap_fvec_argsort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16024 PyObject *resultobj = 0;
16025 size_t arg1 ;
16026 float *arg2 = (float *) 0 ;
16027 size_t *arg3 = (size_t *) 0 ;
16028 size_t val1 ;
16029 int ecode1 = 0 ;
16030 void *argp2 = 0 ;
16031 int res2 = 0 ;
16032 void *argp3 = 0 ;
16033 int res3 = 0 ;
16034 PyObject * obj0 = 0 ;
16035 PyObject * obj1 = 0 ;
16036 PyObject * obj2 = 0 ;
16037
16038 if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_argsort",&obj0,&obj1,&obj2)) SWIG_fail;
16039 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16040 if (!SWIG_IsOK(ecode1)) {
16041 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_argsort" "', argument " "1"" of type '" "size_t""'");
16042 }
16043 arg1 = static_cast< size_t >(val1);
16044 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16045 if (!SWIG_IsOK(res2)) {
16046 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_argsort" "', argument " "2"" of type '" "float const *""'");
16047 }
16048 arg2 = reinterpret_cast< float * >(argp2);
16049 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 | 0 );
16050 if (!SWIG_IsOK(res3)) {
16051 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_argsort" "', argument " "3"" of type '" "size_t *""'");
16052 }
16053 arg3 = reinterpret_cast< size_t * >(argp3);
16054 {
16055 Py_BEGIN_ALLOW_THREADS
16056 try {
16057 faiss::fvec_argsort(arg1,(float const *)arg2,arg3);
16058 } catch(faiss::FaissException & e) {
16059 PyEval_RestoreThread(_save);
16060 PyErr_SetString(PyExc_RuntimeError, e.what());
16061 SWIG_fail;
16062 }
16063 Py_END_ALLOW_THREADS
16064 }
16065 resultobj = SWIG_Py_Void();
16066 return resultobj;
16067 fail:
16068 return NULL;
16069 }
16070
16071
16072 SWIGINTERN PyObject *_wrap_fvec_argsort_parallel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16073 PyObject *resultobj = 0;
16074 size_t arg1 ;
16075 float *arg2 = (float *) 0 ;
16076 size_t *arg3 = (size_t *) 0 ;
16077 size_t val1 ;
16078 int ecode1 = 0 ;
16079 void *argp2 = 0 ;
16080 int res2 = 0 ;
16081 void *argp3 = 0 ;
16082 int res3 = 0 ;
16083 PyObject * obj0 = 0 ;
16084 PyObject * obj1 = 0 ;
16085 PyObject * obj2 = 0 ;
16086
16087 if (!PyArg_ParseTuple(args,(char *)"OOO:fvec_argsort_parallel",&obj0,&obj1,&obj2)) SWIG_fail;
16088 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16089 if (!SWIG_IsOK(ecode1)) {
16090 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvec_argsort_parallel" "', argument " "1"" of type '" "size_t""'");
16091 }
16092 arg1 = static_cast< size_t >(val1);
16093 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16094 if (!SWIG_IsOK(res2)) {
16095 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvec_argsort_parallel" "', argument " "2"" of type '" "float const *""'");
16096 }
16097 arg2 = reinterpret_cast< float * >(argp2);
16098 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 | 0 );
16099 if (!SWIG_IsOK(res3)) {
16100 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fvec_argsort_parallel" "', argument " "3"" of type '" "size_t *""'");
16101 }
16102 arg3 = reinterpret_cast< size_t * >(argp3);
16103 {
16104 Py_BEGIN_ALLOW_THREADS
16105 try {
16106 faiss::fvec_argsort_parallel(arg1,(float const *)arg2,arg3);
16107 } catch(faiss::FaissException & e) {
16108 PyEval_RestoreThread(_save);
16109 PyErr_SetString(PyExc_RuntimeError, e.what());
16110 SWIG_fail;
16111 }
16112 Py_END_ALLOW_THREADS
16113 }
16114 resultobj = SWIG_Py_Void();
16115 return resultobj;
16116 fail:
16117 return NULL;
16118 }
16119
16120
16121 SWIGINTERN PyObject *_wrap_ivec_hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16122 PyObject *resultobj = 0;
16123 size_t arg1 ;
16124 int *arg2 = (int *) 0 ;
16125 int arg3 ;
16126 int *arg4 = (int *) 0 ;
16127 size_t val1 ;
16128 int ecode1 = 0 ;
16129 void *argp2 = 0 ;
16130 int res2 = 0 ;
16131 int val3 ;
16132 int ecode3 = 0 ;
16133 void *argp4 = 0 ;
16134 int res4 = 0 ;
16135 PyObject * obj0 = 0 ;
16136 PyObject * obj1 = 0 ;
16137 PyObject * obj2 = 0 ;
16138 PyObject * obj3 = 0 ;
16139 int result;
16140
16141 if (!PyArg_ParseTuple(args,(char *)"OOOO:ivec_hist",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
16142 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16143 if (!SWIG_IsOK(ecode1)) {
16144 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ivec_hist" "', argument " "1"" of type '" "size_t""'");
16145 }
16146 arg1 = static_cast< size_t >(val1);
16147 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
16148 if (!SWIG_IsOK(res2)) {
16149 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec_hist" "', argument " "2"" of type '" "int const *""'");
16150 }
16151 arg2 = reinterpret_cast< int * >(argp2);
16152 ecode3 = SWIG_AsVal_int(obj2, &val3);
16153 if (!SWIG_IsOK(ecode3)) {
16154 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ivec_hist" "', argument " "3"" of type '" "int""'");
16155 }
16156 arg3 = static_cast< int >(val3);
16157 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
16158 if (!SWIG_IsOK(res4)) {
16159 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ivec_hist" "', argument " "4"" of type '" "int *""'");
16160 }
16161 arg4 = reinterpret_cast< int * >(argp4);
16162 {
16163 Py_BEGIN_ALLOW_THREADS
16164 try {
16165 result = (int)faiss::ivec_hist(arg1,(int const *)arg2,arg3,arg4);
16166 } catch(faiss::FaissException & e) {
16167 PyEval_RestoreThread(_save);
16168 PyErr_SetString(PyExc_RuntimeError, e.what());
16169 SWIG_fail;
16170 }
16171 Py_END_ALLOW_THREADS
16172 }
16173 resultobj = SWIG_From_int(static_cast< int >(result));
16174 return resultobj;
16175 fail:
16176 return NULL;
16177 }
16178
16179
16180 SWIGINTERN PyObject *_wrap_bincode_hist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16181 PyObject *resultobj = 0;
16182 size_t arg1 ;
16183 size_t arg2 ;
16184 uint8_t *arg3 = (uint8_t *) 0 ;
16185 int *arg4 = (int *) 0 ;
16186 size_t val1 ;
16187 int ecode1 = 0 ;
16188 size_t val2 ;
16189 int ecode2 = 0 ;
16190 void *argp3 = 0 ;
16191 int res3 = 0 ;
16192 void *argp4 = 0 ;
16193 int res4 = 0 ;
16194 PyObject * obj0 = 0 ;
16195 PyObject * obj1 = 0 ;
16196 PyObject * obj2 = 0 ;
16197 PyObject * obj3 = 0 ;
16198
16199 if (!PyArg_ParseTuple(args,(char *)"OOOO:bincode_hist",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
16200 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16201 if (!SWIG_IsOK(ecode1)) {
16202 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "bincode_hist" "', argument " "1"" of type '" "size_t""'");
16203 }
16204 arg1 = static_cast< size_t >(val1);
16205 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
16206 if (!SWIG_IsOK(ecode2)) {
16207 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "bincode_hist" "', argument " "2"" of type '" "size_t""'");
16208 }
16209 arg2 = static_cast< size_t >(val2);
16210 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
16211 if (!SWIG_IsOK(res3)) {
16212 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "bincode_hist" "', argument " "3"" of type '" "uint8_t const *""'");
16213 }
16214 arg3 = reinterpret_cast< uint8_t * >(argp3);
16215 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
16216 if (!SWIG_IsOK(res4)) {
16217 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "bincode_hist" "', argument " "4"" of type '" "int *""'");
16218 }
16219 arg4 = reinterpret_cast< int * >(argp4);
16220 {
16221 Py_BEGIN_ALLOW_THREADS
16222 try {
16223 faiss::bincode_hist(arg1,arg2,(unsigned char const *)arg3,arg4);
16224 } catch(faiss::FaissException & e) {
16225 PyEval_RestoreThread(_save);
16226 PyErr_SetString(PyExc_RuntimeError, e.what());
16227 SWIG_fail;
16228 }
16229 Py_END_ALLOW_THREADS
16230 }
16231 resultobj = SWIG_Py_Void();
16232 return resultobj;
16233 fail:
16234 return NULL;
16235 }
16236
16237
16238 SWIGINTERN PyObject *_wrap_ivec_checksum(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16239 PyObject *resultobj = 0;
16240 size_t arg1 ;
16241 int *arg2 = (int *) 0 ;
16242 size_t val1 ;
16243 int ecode1 = 0 ;
16244 void *argp2 = 0 ;
16245 int res2 = 0 ;
16246 PyObject * obj0 = 0 ;
16247 PyObject * obj1 = 0 ;
16248 size_t result;
16249
16250 if (!PyArg_ParseTuple(args,(char *)"OO:ivec_checksum",&obj0,&obj1)) SWIG_fail;
16251 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16252 if (!SWIG_IsOK(ecode1)) {
16253 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ivec_checksum" "', argument " "1"" of type '" "size_t""'");
16254 }
16255 arg1 = static_cast< size_t >(val1);
16256 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
16257 if (!SWIG_IsOK(res2)) {
16258 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ivec_checksum" "', argument " "2"" of type '" "int const *""'");
16259 }
16260 arg2 = reinterpret_cast< int * >(argp2);
16261 {
16262 Py_BEGIN_ALLOW_THREADS
16263 try {
16264 result = (size_t)faiss::ivec_checksum(arg1,(int const *)arg2);
16265 } catch(faiss::FaissException & e) {
16266 PyEval_RestoreThread(_save);
16267 PyErr_SetString(PyExc_RuntimeError, e.what());
16268 SWIG_fail;
16269 }
16270 Py_END_ALLOW_THREADS
16271 }
16272 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
16273 return resultobj;
16274 fail:
16275 return NULL;
16276 }
16277
16278
16279 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16280 PyObject *resultobj = 0;
16281 size_t arg1 ;
16282 size_t *arg2 = (size_t *) 0 ;
16283 size_t arg3 ;
16284 float *arg4 = (float *) 0 ;
16285 bool arg5 ;
16286 long arg6 ;
16287 size_t val1 ;
16288 int ecode1 = 0 ;
16289 void *argp2 = 0 ;
16290 int res2 = 0 ;
16291 size_t val3 ;
16292 int ecode3 = 0 ;
16293 void *argp4 = 0 ;
16294 int res4 = 0 ;
16295 bool val5 ;
16296 int ecode5 = 0 ;
16297 long val6 ;
16298 int ecode6 = 0 ;
16299 PyObject * obj0 = 0 ;
16300 PyObject * obj1 = 0 ;
16301 PyObject * obj2 = 0 ;
16302 PyObject * obj3 = 0 ;
16303 PyObject * obj4 = 0 ;
16304 PyObject * obj5 = 0 ;
16305 float *result = 0 ;
16306
16307 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
16308 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16309 if (!SWIG_IsOK(ecode1)) {
16310 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
16311 }
16312 arg1 = static_cast< size_t >(val1);
16313 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
16314 if (!SWIG_IsOK(res2)) {
16315 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
16316 }
16317 arg2 = reinterpret_cast< size_t * >(argp2);
16318 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16319 if (!SWIG_IsOK(ecode3)) {
16320 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
16321 }
16322 arg3 = static_cast< size_t >(val3);
16323 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16324 if (!SWIG_IsOK(res4)) {
16325 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
16326 }
16327 arg4 = reinterpret_cast< float * >(argp4);
16328 ecode5 = SWIG_AsVal_bool(obj4, &val5);
16329 if (!SWIG_IsOK(ecode5)) {
16330 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvecs_maybe_subsample" "', argument " "5"" of type '" "bool""'");
16331 }
16332 arg5 = static_cast< bool >(val5);
16333 ecode6 = SWIG_AsVal_long(obj5, &val6);
16334 if (!SWIG_IsOK(ecode6)) {
16335 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fvecs_maybe_subsample" "', argument " "6"" of type '" "long""'");
16336 }
16337 arg6 = static_cast< long >(val6);
16338 {
16339 Py_BEGIN_ALLOW_THREADS
16340 try {
16341 result = (float *)faiss::fvecs_maybe_subsample(arg1,arg2,arg3,(float const *)arg4,arg5,arg6);
16342 } catch(faiss::FaissException & e) {
16343 PyEval_RestoreThread(_save);
16344 PyErr_SetString(PyExc_RuntimeError, e.what());
16345 SWIG_fail;
16346 }
16347 Py_END_ALLOW_THREADS
16348 }
16349 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
16350 return resultobj;
16351 fail:
16352 return NULL;
16353 }
16354
16355
16356 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16357 PyObject *resultobj = 0;
16358 size_t arg1 ;
16359 size_t *arg2 = (size_t *) 0 ;
16360 size_t arg3 ;
16361 float *arg4 = (float *) 0 ;
16362 bool arg5 ;
16363 size_t val1 ;
16364 int ecode1 = 0 ;
16365 void *argp2 = 0 ;
16366 int res2 = 0 ;
16367 size_t val3 ;
16368 int ecode3 = 0 ;
16369 void *argp4 = 0 ;
16370 int res4 = 0 ;
16371 bool val5 ;
16372 int ecode5 = 0 ;
16373 PyObject * obj0 = 0 ;
16374 PyObject * obj1 = 0 ;
16375 PyObject * obj2 = 0 ;
16376 PyObject * obj3 = 0 ;
16377 PyObject * obj4 = 0 ;
16378 float *result = 0 ;
16379
16380 if (!PyArg_ParseTuple(args,(char *)"OOOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
16381 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16382 if (!SWIG_IsOK(ecode1)) {
16383 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
16384 }
16385 arg1 = static_cast< size_t >(val1);
16386 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
16387 if (!SWIG_IsOK(res2)) {
16388 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
16389 }
16390 arg2 = reinterpret_cast< size_t * >(argp2);
16391 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16392 if (!SWIG_IsOK(ecode3)) {
16393 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
16394 }
16395 arg3 = static_cast< size_t >(val3);
16396 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16397 if (!SWIG_IsOK(res4)) {
16398 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
16399 }
16400 arg4 = reinterpret_cast< float * >(argp4);
16401 ecode5 = SWIG_AsVal_bool(obj4, &val5);
16402 if (!SWIG_IsOK(ecode5)) {
16403 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fvecs_maybe_subsample" "', argument " "5"" of type '" "bool""'");
16404 }
16405 arg5 = static_cast< bool >(val5);
16406 {
16407 Py_BEGIN_ALLOW_THREADS
16408 try {
16409 result = (float *)faiss::fvecs_maybe_subsample(arg1,arg2,arg3,(float const *)arg4,arg5);
16410 } catch(faiss::FaissException & e) {
16411 PyEval_RestoreThread(_save);
16412 PyErr_SetString(PyExc_RuntimeError, e.what());
16413 SWIG_fail;
16414 }
16415 Py_END_ALLOW_THREADS
16416 }
16417 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
16418 return resultobj;
16419 fail:
16420 return NULL;
16421 }
16422
16423
16424 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16425 PyObject *resultobj = 0;
16426 size_t arg1 ;
16427 size_t *arg2 = (size_t *) 0 ;
16428 size_t arg3 ;
16429 float *arg4 = (float *) 0 ;
16430 size_t val1 ;
16431 int ecode1 = 0 ;
16432 void *argp2 = 0 ;
16433 int res2 = 0 ;
16434 size_t val3 ;
16435 int ecode3 = 0 ;
16436 void *argp4 = 0 ;
16437 int res4 = 0 ;
16438 PyObject * obj0 = 0 ;
16439 PyObject * obj1 = 0 ;
16440 PyObject * obj2 = 0 ;
16441 PyObject * obj3 = 0 ;
16442 float *result = 0 ;
16443
16444 if (!PyArg_ParseTuple(args,(char *)"OOOO:fvecs_maybe_subsample",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
16445 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16446 if (!SWIG_IsOK(ecode1)) {
16447 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fvecs_maybe_subsample" "', argument " "1"" of type '" "size_t""'");
16448 }
16449 arg1 = static_cast< size_t >(val1);
16450 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, 0 | 0 );
16451 if (!SWIG_IsOK(res2)) {
16452 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fvecs_maybe_subsample" "', argument " "2"" of type '" "size_t *""'");
16453 }
16454 arg2 = reinterpret_cast< size_t * >(argp2);
16455 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
16456 if (!SWIG_IsOK(ecode3)) {
16457 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fvecs_maybe_subsample" "', argument " "3"" of type '" "size_t""'");
16458 }
16459 arg3 = static_cast< size_t >(val3);
16460 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
16461 if (!SWIG_IsOK(res4)) {
16462 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fvecs_maybe_subsample" "', argument " "4"" of type '" "float const *""'");
16463 }
16464 arg4 = reinterpret_cast< float * >(argp4);
16465 {
16466 Py_BEGIN_ALLOW_THREADS
16467 try {
16468 result = (float *)faiss::fvecs_maybe_subsample(arg1,arg2,arg3,(float const *)arg4);
16469 } catch(faiss::FaissException & e) {
16470 PyEval_RestoreThread(_save);
16471 PyErr_SetString(PyExc_RuntimeError, e.what());
16472 SWIG_fail;
16473 }
16474 Py_END_ALLOW_THREADS
16475 }
16476 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
16477 return resultobj;
16478 fail:
16479 return NULL;
16480 }
16481
16482
16483 SWIGINTERN PyObject *_wrap_fvecs_maybe_subsample(PyObject *self, PyObject *args) {
16484 Py_ssize_t argc;
16485 PyObject *argv[7] = {
16486 0
16487 };
16488 Py_ssize_t ii;
16489
16490 if (!PyTuple_Check(args)) SWIG_fail;
16491 argc = args ? PyObject_Length(args) : 0;
16492 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
16493 argv[ii] = PyTuple_GET_ITEM(args,ii);
16494 }
16495 if (argc == 4) {
16496 int _v;
16497 {
16498 int res = SWIG_AsVal_size_t(argv[0], NULL);
16499 _v = SWIG_CheckState(res);
16500 }
16501 if (_v) {
16502 void *vptr = 0;
16503 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
16504 _v = SWIG_CheckState(res);
16505 if (_v) {
16506 {
16507 int res = SWIG_AsVal_size_t(argv[2], NULL);
16508 _v = SWIG_CheckState(res);
16509 }
16510 if (_v) {
16511 void *vptr = 0;
16512 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
16513 _v = SWIG_CheckState(res);
16514 if (_v) {
16515 return _wrap_fvecs_maybe_subsample__SWIG_2(self, args);
16516 }
16517 }
16518 }
16519 }
16520 }
16521 if (argc == 5) {
16522 int _v;
16523 {
16524 int res = SWIG_AsVal_size_t(argv[0], NULL);
16525 _v = SWIG_CheckState(res);
16526 }
16527 if (_v) {
16528 void *vptr = 0;
16529 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
16530 _v = SWIG_CheckState(res);
16531 if (_v) {
16532 {
16533 int res = SWIG_AsVal_size_t(argv[2], NULL);
16534 _v = SWIG_CheckState(res);
16535 }
16536 if (_v) {
16537 void *vptr = 0;
16538 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
16539 _v = SWIG_CheckState(res);
16540 if (_v) {
16541 {
16542 int res = SWIG_AsVal_bool(argv[4], NULL);
16543 _v = SWIG_CheckState(res);
16544 }
16545 if (_v) {
16546 return _wrap_fvecs_maybe_subsample__SWIG_1(self, args);
16547 }
16548 }
16549 }
16550 }
16551 }
16552 }
16553 if (argc == 6) {
16554 int _v;
16555 {
16556 int res = SWIG_AsVal_size_t(argv[0], NULL);
16557 _v = SWIG_CheckState(res);
16558 }
16559 if (_v) {
16560 void *vptr = 0;
16561 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_long, 0);
16562 _v = SWIG_CheckState(res);
16563 if (_v) {
16564 {
16565 int res = SWIG_AsVal_size_t(argv[2], NULL);
16566 _v = SWIG_CheckState(res);
16567 }
16568 if (_v) {
16569 void *vptr = 0;
16570 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
16571 _v = SWIG_CheckState(res);
16572 if (_v) {
16573 {
16574 int res = SWIG_AsVal_bool(argv[4], NULL);
16575 _v = SWIG_CheckState(res);
16576 }
16577 if (_v) {
16578 {
16579 int res = SWIG_AsVal_long(argv[5], NULL);
16580 _v = SWIG_CheckState(res);
16581 }
16582 if (_v) {
16583 return _wrap_fvecs_maybe_subsample__SWIG_0(self, args);
16584 }
16585 }
16586 }
16587 }
16588 }
16589 }
16590 }
16591
16592 fail:
16593 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'fvecs_maybe_subsample'.\n"
16594 " Possible C/C++ prototypes are:\n"
16595 " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *,bool,long)\n"
16596 " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *,bool)\n"
16597 " faiss::fvecs_maybe_subsample(size_t,size_t *,size_t,float const *)\n");
16598 return 0;
16599 }
16600
16601
16602 SWIGINTERN PyObject *_wrap_binary_to_real(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16603 PyObject *resultobj = 0;
16604 size_t arg1 ;
16605 uint8_t *arg2 = (uint8_t *) 0 ;
16606 float *arg3 = (float *) 0 ;
16607 size_t val1 ;
16608 int ecode1 = 0 ;
16609 void *argp2 = 0 ;
16610 int res2 = 0 ;
16611 void *argp3 = 0 ;
16612 int res3 = 0 ;
16613 PyObject * obj0 = 0 ;
16614 PyObject * obj1 = 0 ;
16615 PyObject * obj2 = 0 ;
16616
16617 if (!PyArg_ParseTuple(args,(char *)"OOO:binary_to_real",&obj0,&obj1,&obj2)) SWIG_fail;
16618 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16619 if (!SWIG_IsOK(ecode1)) {
16620 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "binary_to_real" "', argument " "1"" of type '" "size_t""'");
16621 }
16622 arg1 = static_cast< size_t >(val1);
16623 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
16624 if (!SWIG_IsOK(res2)) {
16625 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "binary_to_real" "', argument " "2"" of type '" "uint8_t const *""'");
16626 }
16627 arg2 = reinterpret_cast< uint8_t * >(argp2);
16628 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
16629 if (!SWIG_IsOK(res3)) {
16630 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "binary_to_real" "', argument " "3"" of type '" "float *""'");
16631 }
16632 arg3 = reinterpret_cast< float * >(argp3);
16633 {
16634 Py_BEGIN_ALLOW_THREADS
16635 try {
16636 faiss::binary_to_real(arg1,(unsigned char const *)arg2,arg3);
16637 } catch(faiss::FaissException & e) {
16638 PyEval_RestoreThread(_save);
16639 PyErr_SetString(PyExc_RuntimeError, e.what());
16640 SWIG_fail;
16641 }
16642 Py_END_ALLOW_THREADS
16643 }
16644 resultobj = SWIG_Py_Void();
16645 return resultobj;
16646 fail:
16647 return NULL;
16648 }
16649
16650
16651 SWIGINTERN PyObject *_wrap_real_to_binary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16652 PyObject *resultobj = 0;
16653 size_t arg1 ;
16654 float *arg2 = (float *) 0 ;
16655 uint8_t *arg3 = (uint8_t *) 0 ;
16656 size_t val1 ;
16657 int ecode1 = 0 ;
16658 void *argp2 = 0 ;
16659 int res2 = 0 ;
16660 void *argp3 = 0 ;
16661 int res3 = 0 ;
16662 PyObject * obj0 = 0 ;
16663 PyObject * obj1 = 0 ;
16664 PyObject * obj2 = 0 ;
16665
16666 if (!PyArg_ParseTuple(args,(char *)"OOO:real_to_binary",&obj0,&obj1,&obj2)) SWIG_fail;
16667 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
16668 if (!SWIG_IsOK(ecode1)) {
16669 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "real_to_binary" "', argument " "1"" of type '" "size_t""'");
16670 }
16671 arg1 = static_cast< size_t >(val1);
16672 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
16673 if (!SWIG_IsOK(res2)) {
16674 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "real_to_binary" "', argument " "2"" of type '" "float const *""'");
16675 }
16676 arg2 = reinterpret_cast< float * >(argp2);
16677 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
16678 if (!SWIG_IsOK(res3)) {
16679 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "real_to_binary" "', argument " "3"" of type '" "uint8_t *""'");
16680 }
16681 arg3 = reinterpret_cast< uint8_t * >(argp3);
16682 {
16683 Py_BEGIN_ALLOW_THREADS
16684 try {
16685 faiss::real_to_binary(arg1,(float const *)arg2,arg3);
16686 } catch(faiss::FaissException & e) {
16687 PyEval_RestoreThread(_save);
16688 PyErr_SetString(PyExc_RuntimeError, e.what());
16689 SWIG_fail;
16690 }
16691 Py_END_ALLOW_THREADS
16692 }
16693 resultobj = SWIG_Py_Void();
16694 return resultobj;
16695 fail:
16696 return NULL;
16697 }
16698
16699
16700 SWIGINTERN PyObject *_wrap_Index_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16701 PyObject *resultobj = 0;
16702 faiss::Index *arg1 = (faiss::Index *) 0 ;
16703 int arg2 ;
16704 void *argp1 = 0 ;
16705 int res1 = 0 ;
16706 int val2 ;
16707 int ecode2 = 0 ;
16708 PyObject * obj0 = 0 ;
16709 PyObject * obj1 = 0 ;
16710
16711 if (!PyArg_ParseTuple(args,(char *)"OO:Index_d_set",&obj0,&obj1)) SWIG_fail;
16712 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16713 if (!SWIG_IsOK(res1)) {
16714 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_d_set" "', argument " "1"" of type '" "faiss::Index *""'");
16715 }
16716 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16717 ecode2 = SWIG_AsVal_int(obj1, &val2);
16718 if (!SWIG_IsOK(ecode2)) {
16719 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_d_set" "', argument " "2"" of type '" "int""'");
16720 }
16721 arg2 = static_cast< int >(val2);
16722 if (arg1) (arg1)->d = arg2;
16723 resultobj = SWIG_Py_Void();
16724 return resultobj;
16725 fail:
16726 return NULL;
16727 }
16728
16729
16730 SWIGINTERN PyObject *_wrap_Index_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16731 PyObject *resultobj = 0;
16732 faiss::Index *arg1 = (faiss::Index *) 0 ;
16733 void *argp1 = 0 ;
16734 int res1 = 0 ;
16735 PyObject * obj0 = 0 ;
16736 int result;
16737
16738 if (!PyArg_ParseTuple(args,(char *)"O:Index_d_get",&obj0)) SWIG_fail;
16739 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16740 if (!SWIG_IsOK(res1)) {
16741 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_d_get" "', argument " "1"" of type '" "faiss::Index *""'");
16742 }
16743 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16744 result = (int) ((arg1)->d);
16745 resultobj = SWIG_From_int(static_cast< int >(result));
16746 return resultobj;
16747 fail:
16748 return NULL;
16749 }
16750
16751
16752 SWIGINTERN PyObject *_wrap_Index_ntotal_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16753 PyObject *resultobj = 0;
16754 faiss::Index *arg1 = (faiss::Index *) 0 ;
16755 faiss::Index::idx_t arg2 ;
16756 void *argp1 = 0 ;
16757 int res1 = 0 ;
16758 long val2 ;
16759 int ecode2 = 0 ;
16760 PyObject * obj0 = 0 ;
16761 PyObject * obj1 = 0 ;
16762
16763 if (!PyArg_ParseTuple(args,(char *)"OO:Index_ntotal_set",&obj0,&obj1)) SWIG_fail;
16764 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16765 if (!SWIG_IsOK(res1)) {
16766 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_ntotal_set" "', argument " "1"" of type '" "faiss::Index *""'");
16767 }
16768 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16769 ecode2 = SWIG_AsVal_long(obj1, &val2);
16770 if (!SWIG_IsOK(ecode2)) {
16771 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_ntotal_set" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
16772 }
16773 arg2 = static_cast< faiss::Index::idx_t >(val2);
16774 if (arg1) (arg1)->ntotal = arg2;
16775 resultobj = SWIG_Py_Void();
16776 return resultobj;
16777 fail:
16778 return NULL;
16779 }
16780
16781
16782 SWIGINTERN PyObject *_wrap_Index_ntotal_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16783 PyObject *resultobj = 0;
16784 faiss::Index *arg1 = (faiss::Index *) 0 ;
16785 void *argp1 = 0 ;
16786 int res1 = 0 ;
16787 PyObject * obj0 = 0 ;
16788 faiss::Index::idx_t result;
16789
16790 if (!PyArg_ParseTuple(args,(char *)"O:Index_ntotal_get",&obj0)) SWIG_fail;
16791 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16792 if (!SWIG_IsOK(res1)) {
16793 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_ntotal_get" "', argument " "1"" of type '" "faiss::Index *""'");
16794 }
16795 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16796 result = (faiss::Index::idx_t) ((arg1)->ntotal);
16797 resultobj = SWIG_From_long(static_cast< long >(result));
16798 return resultobj;
16799 fail:
16800 return NULL;
16801 }
16802
16803
16804 SWIGINTERN PyObject *_wrap_Index_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16805 PyObject *resultobj = 0;
16806 faiss::Index *arg1 = (faiss::Index *) 0 ;
16807 bool arg2 ;
16808 void *argp1 = 0 ;
16809 int res1 = 0 ;
16810 bool val2 ;
16811 int ecode2 = 0 ;
16812 PyObject * obj0 = 0 ;
16813 PyObject * obj1 = 0 ;
16814
16815 if (!PyArg_ParseTuple(args,(char *)"OO:Index_verbose_set",&obj0,&obj1)) SWIG_fail;
16816 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16817 if (!SWIG_IsOK(res1)) {
16818 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_verbose_set" "', argument " "1"" of type '" "faiss::Index *""'");
16819 }
16820 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16821 ecode2 = SWIG_AsVal_bool(obj1, &val2);
16822 if (!SWIG_IsOK(ecode2)) {
16823 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_verbose_set" "', argument " "2"" of type '" "bool""'");
16824 }
16825 arg2 = static_cast< bool >(val2);
16826 if (arg1) (arg1)->verbose = arg2;
16827 resultobj = SWIG_Py_Void();
16828 return resultobj;
16829 fail:
16830 return NULL;
16831 }
16832
16833
16834 SWIGINTERN PyObject *_wrap_Index_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16835 PyObject *resultobj = 0;
16836 faiss::Index *arg1 = (faiss::Index *) 0 ;
16837 void *argp1 = 0 ;
16838 int res1 = 0 ;
16839 PyObject * obj0 = 0 ;
16840 bool result;
16841
16842 if (!PyArg_ParseTuple(args,(char *)"O:Index_verbose_get",&obj0)) SWIG_fail;
16843 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16844 if (!SWIG_IsOK(res1)) {
16845 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_verbose_get" "', argument " "1"" of type '" "faiss::Index *""'");
16846 }
16847 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16848 result = (bool) ((arg1)->verbose);
16849 resultobj = SWIG_From_bool(static_cast< bool >(result));
16850 return resultobj;
16851 fail:
16852 return NULL;
16853 }
16854
16855
16856 SWIGINTERN PyObject *_wrap_Index_is_trained_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16857 PyObject *resultobj = 0;
16858 faiss::Index *arg1 = (faiss::Index *) 0 ;
16859 bool arg2 ;
16860 void *argp1 = 0 ;
16861 int res1 = 0 ;
16862 bool val2 ;
16863 int ecode2 = 0 ;
16864 PyObject * obj0 = 0 ;
16865 PyObject * obj1 = 0 ;
16866
16867 if (!PyArg_ParseTuple(args,(char *)"OO:Index_is_trained_set",&obj0,&obj1)) SWIG_fail;
16868 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16869 if (!SWIG_IsOK(res1)) {
16870 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_is_trained_set" "', argument " "1"" of type '" "faiss::Index *""'");
16871 }
16872 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16873 ecode2 = SWIG_AsVal_bool(obj1, &val2);
16874 if (!SWIG_IsOK(ecode2)) {
16875 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_is_trained_set" "', argument " "2"" of type '" "bool""'");
16876 }
16877 arg2 = static_cast< bool >(val2);
16878 if (arg1) (arg1)->is_trained = arg2;
16879 resultobj = SWIG_Py_Void();
16880 return resultobj;
16881 fail:
16882 return NULL;
16883 }
16884
16885
16886 SWIGINTERN PyObject *_wrap_Index_is_trained_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16887 PyObject *resultobj = 0;
16888 faiss::Index *arg1 = (faiss::Index *) 0 ;
16889 void *argp1 = 0 ;
16890 int res1 = 0 ;
16891 PyObject * obj0 = 0 ;
16892 bool result;
16893
16894 if (!PyArg_ParseTuple(args,(char *)"O:Index_is_trained_get",&obj0)) SWIG_fail;
16895 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16896 if (!SWIG_IsOK(res1)) {
16897 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_is_trained_get" "', argument " "1"" of type '" "faiss::Index *""'");
16898 }
16899 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16900 result = (bool) ((arg1)->is_trained);
16901 resultobj = SWIG_From_bool(static_cast< bool >(result));
16902 return resultobj;
16903 fail:
16904 return NULL;
16905 }
16906
16907
16908 SWIGINTERN PyObject *_wrap_Index_metric_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16909 PyObject *resultobj = 0;
16910 faiss::Index *arg1 = (faiss::Index *) 0 ;
16911 faiss::MetricType arg2 ;
16912 void *argp1 = 0 ;
16913 int res1 = 0 ;
16914 int val2 ;
16915 int ecode2 = 0 ;
16916 PyObject * obj0 = 0 ;
16917 PyObject * obj1 = 0 ;
16918
16919 if (!PyArg_ParseTuple(args,(char *)"OO:Index_metric_type_set",&obj0,&obj1)) SWIG_fail;
16920 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16921 if (!SWIG_IsOK(res1)) {
16922 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_metric_type_set" "', argument " "1"" of type '" "faiss::Index *""'");
16923 }
16924 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16925 ecode2 = SWIG_AsVal_int(obj1, &val2);
16926 if (!SWIG_IsOK(ecode2)) {
16927 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_metric_type_set" "', argument " "2"" of type '" "faiss::MetricType""'");
16928 }
16929 arg2 = static_cast< faiss::MetricType >(val2);
16930 if (arg1) (arg1)->metric_type = arg2;
16931 resultobj = SWIG_Py_Void();
16932 return resultobj;
16933 fail:
16934 return NULL;
16935 }
16936
16937
16938 SWIGINTERN PyObject *_wrap_Index_metric_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16939 PyObject *resultobj = 0;
16940 faiss::Index *arg1 = (faiss::Index *) 0 ;
16941 void *argp1 = 0 ;
16942 int res1 = 0 ;
16943 PyObject * obj0 = 0 ;
16944 faiss::MetricType result;
16945
16946 if (!PyArg_ParseTuple(args,(char *)"O:Index_metric_type_get",&obj0)) SWIG_fail;
16947 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
16948 if (!SWIG_IsOK(res1)) {
16949 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_metric_type_get" "', argument " "1"" of type '" "faiss::Index *""'");
16950 }
16951 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16952 result = (faiss::MetricType) ((arg1)->metric_type);
16953 resultobj = SWIG_From_int(static_cast< int >(result));
16954 return resultobj;
16955 fail:
16956 return NULL;
16957 }
16958
16959
16960 SWIGINTERN PyObject *_wrap_delete_Index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16961 PyObject *resultobj = 0;
16962 faiss::Index *arg1 = (faiss::Index *) 0 ;
16963 void *argp1 = 0 ;
16964 int res1 = 0 ;
16965 PyObject * obj0 = 0 ;
16966
16967 if (!PyArg_ParseTuple(args,(char *)"O:delete_Index",&obj0)) SWIG_fail;
16968 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
16969 if (!SWIG_IsOK(res1)) {
16970 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Index" "', argument " "1"" of type '" "faiss::Index *""'");
16971 }
16972 arg1 = reinterpret_cast< faiss::Index * >(argp1);
16973 {
16974 Py_BEGIN_ALLOW_THREADS
16975 try {
16976 delete arg1;
16977 } catch(faiss::FaissException & e) {
16978 PyEval_RestoreThread(_save);
16979 PyErr_SetString(PyExc_RuntimeError, e.what());
16980 SWIG_fail;
16981 }
16982 Py_END_ALLOW_THREADS
16983 }
16984 resultobj = SWIG_Py_Void();
16985 return resultobj;
16986 fail:
16987 return NULL;
16988 }
16989
16990
16991 SWIGINTERN PyObject *_wrap_Index_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
16992 PyObject *resultobj = 0;
16993 faiss::Index *arg1 = (faiss::Index *) 0 ;
16994 faiss::Index::idx_t arg2 ;
16995 float *arg3 = (float *) 0 ;
16996 void *argp1 = 0 ;
16997 int res1 = 0 ;
16998 long val2 ;
16999 int ecode2 = 0 ;
17000 void *argp3 = 0 ;
17001 int res3 = 0 ;
17002 PyObject * obj0 = 0 ;
17003 PyObject * obj1 = 0 ;
17004 PyObject * obj2 = 0 ;
17005
17006 if (!PyArg_ParseTuple(args,(char *)"OOO:Index_train",&obj0,&obj1,&obj2)) SWIG_fail;
17007 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17008 if (!SWIG_IsOK(res1)) {
17009 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_train" "', argument " "1"" of type '" "faiss::Index *""'");
17010 }
17011 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17012 ecode2 = SWIG_AsVal_long(obj1, &val2);
17013 if (!SWIG_IsOK(ecode2)) {
17014 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17015 }
17016 arg2 = static_cast< faiss::Index::idx_t >(val2);
17017 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17018 if (!SWIG_IsOK(res3)) {
17019 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_train" "', argument " "3"" of type '" "float const *""'");
17020 }
17021 arg3 = reinterpret_cast< float * >(argp3);
17022 {
17023 Py_BEGIN_ALLOW_THREADS
17024 try {
17025 (arg1)->train(arg2,(float const *)arg3);
17026 } catch(faiss::FaissException & e) {
17027 PyEval_RestoreThread(_save);
17028 PyErr_SetString(PyExc_RuntimeError, e.what());
17029 SWIG_fail;
17030 }
17031 Py_END_ALLOW_THREADS
17032 }
17033 resultobj = SWIG_Py_Void();
17034 return resultobj;
17035 fail:
17036 return NULL;
17037 }
17038
17039
17040 SWIGINTERN PyObject *_wrap_Index_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17041 PyObject *resultobj = 0;
17042 faiss::Index *arg1 = (faiss::Index *) 0 ;
17043 faiss::Index::idx_t arg2 ;
17044 float *arg3 = (float *) 0 ;
17045 void *argp1 = 0 ;
17046 int res1 = 0 ;
17047 long val2 ;
17048 int ecode2 = 0 ;
17049 void *argp3 = 0 ;
17050 int res3 = 0 ;
17051 PyObject * obj0 = 0 ;
17052 PyObject * obj1 = 0 ;
17053 PyObject * obj2 = 0 ;
17054
17055 if (!PyArg_ParseTuple(args,(char *)"OOO:Index_add",&obj0,&obj1,&obj2)) SWIG_fail;
17056 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17057 if (!SWIG_IsOK(res1)) {
17058 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_add" "', argument " "1"" of type '" "faiss::Index *""'");
17059 }
17060 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17061 ecode2 = SWIG_AsVal_long(obj1, &val2);
17062 if (!SWIG_IsOK(ecode2)) {
17063 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17064 }
17065 arg2 = static_cast< faiss::Index::idx_t >(val2);
17066 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17067 if (!SWIG_IsOK(res3)) {
17068 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_add" "', argument " "3"" of type '" "float const *""'");
17069 }
17070 arg3 = reinterpret_cast< float * >(argp3);
17071 {
17072 Py_BEGIN_ALLOW_THREADS
17073 try {
17074 (arg1)->add(arg2,(float const *)arg3);
17075 } catch(faiss::FaissException & e) {
17076 PyEval_RestoreThread(_save);
17077 PyErr_SetString(PyExc_RuntimeError, e.what());
17078 SWIG_fail;
17079 }
17080 Py_END_ALLOW_THREADS
17081 }
17082 resultobj = SWIG_Py_Void();
17083 return resultobj;
17084 fail:
17085 return NULL;
17086 }
17087
17088
17089 SWIGINTERN PyObject *_wrap_Index_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17090 PyObject *resultobj = 0;
17091 faiss::Index *arg1 = (faiss::Index *) 0 ;
17092 faiss::Index::idx_t arg2 ;
17093 float *arg3 = (float *) 0 ;
17094 long *arg4 = (long *) 0 ;
17095 void *argp1 = 0 ;
17096 int res1 = 0 ;
17097 long val2 ;
17098 int ecode2 = 0 ;
17099 void *argp3 = 0 ;
17100 int res3 = 0 ;
17101 void *argp4 = 0 ;
17102 int res4 = 0 ;
17103 PyObject * obj0 = 0 ;
17104 PyObject * obj1 = 0 ;
17105 PyObject * obj2 = 0 ;
17106 PyObject * obj3 = 0 ;
17107
17108 if (!PyArg_ParseTuple(args,(char *)"OOOO:Index_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17109 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17110 if (!SWIG_IsOK(res1)) {
17111 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_add_with_ids" "', argument " "1"" of type '" "faiss::Index *""'");
17112 }
17113 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17114 ecode2 = SWIG_AsVal_long(obj1, &val2);
17115 if (!SWIG_IsOK(ecode2)) {
17116 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17117 }
17118 arg2 = static_cast< faiss::Index::idx_t >(val2);
17119 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17120 if (!SWIG_IsOK(res3)) {
17121 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_add_with_ids" "', argument " "3"" of type '" "float const *""'");
17122 }
17123 arg3 = reinterpret_cast< float * >(argp3);
17124 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
17125 if (!SWIG_IsOK(res4)) {
17126 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index_add_with_ids" "', argument " "4"" of type '" "long const *""'");
17127 }
17128 arg4 = reinterpret_cast< long * >(argp4);
17129 {
17130 Py_BEGIN_ALLOW_THREADS
17131 try {
17132 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
17133 } catch(faiss::FaissException & e) {
17134 PyEval_RestoreThread(_save);
17135 PyErr_SetString(PyExc_RuntimeError, e.what());
17136 SWIG_fail;
17137 }
17138 Py_END_ALLOW_THREADS
17139 }
17140 resultobj = SWIG_Py_Void();
17141 return resultobj;
17142 fail:
17143 return NULL;
17144 }
17145
17146
17147 SWIGINTERN PyObject *_wrap_Index_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17148 PyObject *resultobj = 0;
17149 faiss::Index *arg1 = (faiss::Index *) 0 ;
17150 faiss::Index::idx_t arg2 ;
17151 float *arg3 = (float *) 0 ;
17152 faiss::Index::idx_t arg4 ;
17153 float *arg5 = (float *) 0 ;
17154 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
17155 void *argp1 = 0 ;
17156 int res1 = 0 ;
17157 long val2 ;
17158 int ecode2 = 0 ;
17159 void *argp3 = 0 ;
17160 int res3 = 0 ;
17161 long val4 ;
17162 int ecode4 = 0 ;
17163 void *argp5 = 0 ;
17164 int res5 = 0 ;
17165 void *argp6 = 0 ;
17166 int res6 = 0 ;
17167 PyObject * obj0 = 0 ;
17168 PyObject * obj1 = 0 ;
17169 PyObject * obj2 = 0 ;
17170 PyObject * obj3 = 0 ;
17171 PyObject * obj4 = 0 ;
17172 PyObject * obj5 = 0 ;
17173
17174 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:Index_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
17175 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17176 if (!SWIG_IsOK(res1)) {
17177 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_search" "', argument " "1"" of type '" "faiss::Index const *""'");
17178 }
17179 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17180 ecode2 = SWIG_AsVal_long(obj1, &val2);
17181 if (!SWIG_IsOK(ecode2)) {
17182 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17183 }
17184 arg2 = static_cast< faiss::Index::idx_t >(val2);
17185 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17186 if (!SWIG_IsOK(res3)) {
17187 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_search" "', argument " "3"" of type '" "float const *""'");
17188 }
17189 arg3 = reinterpret_cast< float * >(argp3);
17190 ecode4 = SWIG_AsVal_long(obj3, &val4);
17191 if (!SWIG_IsOK(ecode4)) {
17192 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
17193 }
17194 arg4 = static_cast< faiss::Index::idx_t >(val4);
17195 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
17196 if (!SWIG_IsOK(res5)) {
17197 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Index_search" "', argument " "5"" of type '" "float *""'");
17198 }
17199 arg5 = reinterpret_cast< float * >(argp5);
17200 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
17201 if (!SWIG_IsOK(res6)) {
17202 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Index_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
17203 }
17204 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
17205 {
17206 Py_BEGIN_ALLOW_THREADS
17207 try {
17208 ((faiss::Index const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
17209 } catch(faiss::FaissException & e) {
17210 PyEval_RestoreThread(_save);
17211 PyErr_SetString(PyExc_RuntimeError, e.what());
17212 SWIG_fail;
17213 }
17214 Py_END_ALLOW_THREADS
17215 }
17216 resultobj = SWIG_Py_Void();
17217 return resultobj;
17218 fail:
17219 return NULL;
17220 }
17221
17222
17223 SWIGINTERN PyObject *_wrap_Index_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17224 PyObject *resultobj = 0;
17225 faiss::Index *arg1 = (faiss::Index *) 0 ;
17226 faiss::Index::idx_t arg2 ;
17227 float *arg3 = (float *) 0 ;
17228 float arg4 ;
17229 faiss::RangeSearchResult *arg5 = (faiss::RangeSearchResult *) 0 ;
17230 void *argp1 = 0 ;
17231 int res1 = 0 ;
17232 long val2 ;
17233 int ecode2 = 0 ;
17234 void *argp3 = 0 ;
17235 int res3 = 0 ;
17236 float val4 ;
17237 int ecode4 = 0 ;
17238 void *argp5 = 0 ;
17239 int res5 = 0 ;
17240 PyObject * obj0 = 0 ;
17241 PyObject * obj1 = 0 ;
17242 PyObject * obj2 = 0 ;
17243 PyObject * obj3 = 0 ;
17244 PyObject * obj4 = 0 ;
17245
17246 if (!PyArg_ParseTuple(args,(char *)"OOOOO:Index_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
17247 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17248 if (!SWIG_IsOK(res1)) {
17249 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_range_search" "', argument " "1"" of type '" "faiss::Index const *""'");
17250 }
17251 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17252 ecode2 = SWIG_AsVal_long(obj1, &val2);
17253 if (!SWIG_IsOK(ecode2)) {
17254 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17255 }
17256 arg2 = static_cast< faiss::Index::idx_t >(val2);
17257 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17258 if (!SWIG_IsOK(res3)) {
17259 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_range_search" "', argument " "3"" of type '" "float const *""'");
17260 }
17261 arg3 = reinterpret_cast< float * >(argp3);
17262 ecode4 = SWIG_AsVal_float(obj3, &val4);
17263 if (!SWIG_IsOK(ecode4)) {
17264 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index_range_search" "', argument " "4"" of type '" "float""'");
17265 }
17266 arg4 = static_cast< float >(val4);
17267 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
17268 if (!SWIG_IsOK(res5)) {
17269 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Index_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
17270 }
17271 arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
17272 {
17273 Py_BEGIN_ALLOW_THREADS
17274 try {
17275 ((faiss::Index const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
17276 } catch(faiss::FaissException & e) {
17277 PyEval_RestoreThread(_save);
17278 PyErr_SetString(PyExc_RuntimeError, e.what());
17279 SWIG_fail;
17280 }
17281 Py_END_ALLOW_THREADS
17282 }
17283 resultobj = SWIG_Py_Void();
17284 return resultobj;
17285 fail:
17286 return NULL;
17287 }
17288
17289
17290 SWIGINTERN PyObject *_wrap_Index_assign__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17291 PyObject *resultobj = 0;
17292 faiss::Index *arg1 = (faiss::Index *) 0 ;
17293 faiss::Index::idx_t arg2 ;
17294 float *arg3 = (float *) 0 ;
17295 faiss::Index::idx_t *arg4 = (faiss::Index::idx_t *) 0 ;
17296 faiss::Index::idx_t arg5 ;
17297 void *argp1 = 0 ;
17298 int res1 = 0 ;
17299 long val2 ;
17300 int ecode2 = 0 ;
17301 void *argp3 = 0 ;
17302 int res3 = 0 ;
17303 void *argp4 = 0 ;
17304 int res4 = 0 ;
17305 long val5 ;
17306 int ecode5 = 0 ;
17307 PyObject * obj0 = 0 ;
17308 PyObject * obj1 = 0 ;
17309 PyObject * obj2 = 0 ;
17310 PyObject * obj3 = 0 ;
17311 PyObject * obj4 = 0 ;
17312
17313 if (!PyArg_ParseTuple(args,(char *)"OOOOO:Index_assign",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
17314 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17315 if (!SWIG_IsOK(res1)) {
17316 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_assign" "', argument " "1"" of type '" "faiss::Index *""'");
17317 }
17318 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17319 ecode2 = SWIG_AsVal_long(obj1, &val2);
17320 if (!SWIG_IsOK(ecode2)) {
17321 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_assign" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17322 }
17323 arg2 = static_cast< faiss::Index::idx_t >(val2);
17324 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17325 if (!SWIG_IsOK(res3)) {
17326 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_assign" "', argument " "3"" of type '" "float const *""'");
17327 }
17328 arg3 = reinterpret_cast< float * >(argp3);
17329 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
17330 if (!SWIG_IsOK(res4)) {
17331 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index_assign" "', argument " "4"" of type '" "faiss::Index::idx_t *""'");
17332 }
17333 arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
17334 ecode5 = SWIG_AsVal_long(obj4, &val5);
17335 if (!SWIG_IsOK(ecode5)) {
17336 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Index_assign" "', argument " "5"" of type '" "faiss::Index::idx_t""'");
17337 }
17338 arg5 = static_cast< faiss::Index::idx_t >(val5);
17339 {
17340 Py_BEGIN_ALLOW_THREADS
17341 try {
17342 (arg1)->assign(arg2,(float const *)arg3,arg4,arg5);
17343 } catch(faiss::FaissException & e) {
17344 PyEval_RestoreThread(_save);
17345 PyErr_SetString(PyExc_RuntimeError, e.what());
17346 SWIG_fail;
17347 }
17348 Py_END_ALLOW_THREADS
17349 }
17350 resultobj = SWIG_Py_Void();
17351 return resultobj;
17352 fail:
17353 return NULL;
17354 }
17355
17356
17357 SWIGINTERN PyObject *_wrap_Index_assign__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17358 PyObject *resultobj = 0;
17359 faiss::Index *arg1 = (faiss::Index *) 0 ;
17360 faiss::Index::idx_t arg2 ;
17361 float *arg3 = (float *) 0 ;
17362 faiss::Index::idx_t *arg4 = (faiss::Index::idx_t *) 0 ;
17363 void *argp1 = 0 ;
17364 int res1 = 0 ;
17365 long val2 ;
17366 int ecode2 = 0 ;
17367 void *argp3 = 0 ;
17368 int res3 = 0 ;
17369 void *argp4 = 0 ;
17370 int res4 = 0 ;
17371 PyObject * obj0 = 0 ;
17372 PyObject * obj1 = 0 ;
17373 PyObject * obj2 = 0 ;
17374 PyObject * obj3 = 0 ;
17375
17376 if (!PyArg_ParseTuple(args,(char *)"OOOO:Index_assign",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17377 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17378 if (!SWIG_IsOK(res1)) {
17379 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_assign" "', argument " "1"" of type '" "faiss::Index *""'");
17380 }
17381 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17382 ecode2 = SWIG_AsVal_long(obj1, &val2);
17383 if (!SWIG_IsOK(ecode2)) {
17384 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_assign" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17385 }
17386 arg2 = static_cast< faiss::Index::idx_t >(val2);
17387 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17388 if (!SWIG_IsOK(res3)) {
17389 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_assign" "', argument " "3"" of type '" "float const *""'");
17390 }
17391 arg3 = reinterpret_cast< float * >(argp3);
17392 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
17393 if (!SWIG_IsOK(res4)) {
17394 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index_assign" "', argument " "4"" of type '" "faiss::Index::idx_t *""'");
17395 }
17396 arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
17397 {
17398 Py_BEGIN_ALLOW_THREADS
17399 try {
17400 (arg1)->assign(arg2,(float const *)arg3,arg4);
17401 } catch(faiss::FaissException & e) {
17402 PyEval_RestoreThread(_save);
17403 PyErr_SetString(PyExc_RuntimeError, e.what());
17404 SWIG_fail;
17405 }
17406 Py_END_ALLOW_THREADS
17407 }
17408 resultobj = SWIG_Py_Void();
17409 return resultobj;
17410 fail:
17411 return NULL;
17412 }
17413
17414
17415 SWIGINTERN PyObject *_wrap_Index_assign(PyObject *self, PyObject *args) {
17416 Py_ssize_t argc;
17417 PyObject *argv[6] = {
17418 0
17419 };
17420 Py_ssize_t ii;
17421
17422 if (!PyTuple_Check(args)) SWIG_fail;
17423 argc = args ? PyObject_Length(args) : 0;
17424 for (ii = 0; (ii < 5) && (ii < argc); ii++) {
17425 argv[ii] = PyTuple_GET_ITEM(args,ii);
17426 }
17427 if (argc == 4) {
17428 int _v;
17429 void *vptr = 0;
17430 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
17431 _v = SWIG_CheckState(res);
17432 if (_v) {
17433 {
17434 int res = SWIG_AsVal_long(argv[1], NULL);
17435 _v = SWIG_CheckState(res);
17436 }
17437 if (_v) {
17438 void *vptr = 0;
17439 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
17440 _v = SWIG_CheckState(res);
17441 if (_v) {
17442 void *vptr = 0;
17443 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
17444 _v = SWIG_CheckState(res);
17445 if (_v) {
17446 return _wrap_Index_assign__SWIG_1(self, args);
17447 }
17448 }
17449 }
17450 }
17451 }
17452 if (argc == 5) {
17453 int _v;
17454 void *vptr = 0;
17455 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
17456 _v = SWIG_CheckState(res);
17457 if (_v) {
17458 {
17459 int res = SWIG_AsVal_long(argv[1], NULL);
17460 _v = SWIG_CheckState(res);
17461 }
17462 if (_v) {
17463 void *vptr = 0;
17464 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
17465 _v = SWIG_CheckState(res);
17466 if (_v) {
17467 void *vptr = 0;
17468 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
17469 _v = SWIG_CheckState(res);
17470 if (_v) {
17471 {
17472 int res = SWIG_AsVal_long(argv[4], NULL);
17473 _v = SWIG_CheckState(res);
17474 }
17475 if (_v) {
17476 return _wrap_Index_assign__SWIG_0(self, args);
17477 }
17478 }
17479 }
17480 }
17481 }
17482 }
17483
17484 fail:
17485 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'Index_assign'.\n"
17486 " Possible C/C++ prototypes are:\n"
17487 " faiss::Index::assign(faiss::Index::idx_t,float const *,faiss::Index::idx_t *,faiss::Index::idx_t)\n"
17488 " faiss::Index::assign(faiss::Index::idx_t,float const *,faiss::Index::idx_t *)\n");
17489 return 0;
17490 }
17491
17492
17493 SWIGINTERN PyObject *_wrap_Index_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17494 PyObject *resultobj = 0;
17495 faiss::Index *arg1 = (faiss::Index *) 0 ;
17496 void *argp1 = 0 ;
17497 int res1 = 0 ;
17498 PyObject * obj0 = 0 ;
17499
17500 if (!PyArg_ParseTuple(args,(char *)"O:Index_reset",&obj0)) SWIG_fail;
17501 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17502 if (!SWIG_IsOK(res1)) {
17503 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_reset" "', argument " "1"" of type '" "faiss::Index *""'");
17504 }
17505 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17506 {
17507 Py_BEGIN_ALLOW_THREADS
17508 try {
17509 (arg1)->reset();
17510 } catch(faiss::FaissException & e) {
17511 PyEval_RestoreThread(_save);
17512 PyErr_SetString(PyExc_RuntimeError, e.what());
17513 SWIG_fail;
17514 }
17515 Py_END_ALLOW_THREADS
17516 }
17517 resultobj = SWIG_Py_Void();
17518 return resultobj;
17519 fail:
17520 return NULL;
17521 }
17522
17523
17524 SWIGINTERN PyObject *_wrap_Index_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17525 PyObject *resultobj = 0;
17526 faiss::Index *arg1 = (faiss::Index *) 0 ;
17527 faiss::IDSelector *arg2 = 0 ;
17528 void *argp1 = 0 ;
17529 int res1 = 0 ;
17530 void *argp2 = 0 ;
17531 int res2 = 0 ;
17532 PyObject * obj0 = 0 ;
17533 PyObject * obj1 = 0 ;
17534 long result;
17535
17536 if (!PyArg_ParseTuple(args,(char *)"OO:Index_remove_ids",&obj0,&obj1)) SWIG_fail;
17537 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17538 if (!SWIG_IsOK(res1)) {
17539 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_remove_ids" "', argument " "1"" of type '" "faiss::Index *""'");
17540 }
17541 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17542 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
17543 if (!SWIG_IsOK(res2)) {
17544 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
17545 }
17546 if (!argp2) {
17547 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Index_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
17548 }
17549 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
17550 {
17551 Py_BEGIN_ALLOW_THREADS
17552 try {
17553 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
17554 } catch(faiss::FaissException & e) {
17555 PyEval_RestoreThread(_save);
17556 PyErr_SetString(PyExc_RuntimeError, e.what());
17557 SWIG_fail;
17558 }
17559 Py_END_ALLOW_THREADS
17560 }
17561 resultobj = SWIG_From_long(static_cast< long >(result));
17562 return resultobj;
17563 fail:
17564 return NULL;
17565 }
17566
17567
17568 SWIGINTERN PyObject *_wrap_Index_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17569 PyObject *resultobj = 0;
17570 faiss::Index *arg1 = (faiss::Index *) 0 ;
17571 faiss::Index::idx_t arg2 ;
17572 float *arg3 = (float *) 0 ;
17573 void *argp1 = 0 ;
17574 int res1 = 0 ;
17575 long val2 ;
17576 int ecode2 = 0 ;
17577 void *argp3 = 0 ;
17578 int res3 = 0 ;
17579 PyObject * obj0 = 0 ;
17580 PyObject * obj1 = 0 ;
17581 PyObject * obj2 = 0 ;
17582
17583 if (!PyArg_ParseTuple(args,(char *)"OOO:Index_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
17584 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17585 if (!SWIG_IsOK(res1)) {
17586 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_reconstruct" "', argument " "1"" of type '" "faiss::Index const *""'");
17587 }
17588 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17589 ecode2 = SWIG_AsVal_long(obj1, &val2);
17590 if (!SWIG_IsOK(ecode2)) {
17591 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17592 }
17593 arg2 = static_cast< faiss::Index::idx_t >(val2);
17594 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17595 if (!SWIG_IsOK(res3)) {
17596 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_reconstruct" "', argument " "3"" of type '" "float *""'");
17597 }
17598 arg3 = reinterpret_cast< float * >(argp3);
17599 {
17600 Py_BEGIN_ALLOW_THREADS
17601 try {
17602 ((faiss::Index const *)arg1)->reconstruct(arg2,arg3);
17603 } catch(faiss::FaissException & e) {
17604 PyEval_RestoreThread(_save);
17605 PyErr_SetString(PyExc_RuntimeError, e.what());
17606 SWIG_fail;
17607 }
17608 Py_END_ALLOW_THREADS
17609 }
17610 resultobj = SWIG_Py_Void();
17611 return resultobj;
17612 fail:
17613 return NULL;
17614 }
17615
17616
17617 SWIGINTERN PyObject *_wrap_Index_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17618 PyObject *resultobj = 0;
17619 faiss::Index *arg1 = (faiss::Index *) 0 ;
17620 faiss::Index::idx_t arg2 ;
17621 faiss::Index::idx_t arg3 ;
17622 float *arg4 = (float *) 0 ;
17623 void *argp1 = 0 ;
17624 int res1 = 0 ;
17625 long val2 ;
17626 int ecode2 = 0 ;
17627 long val3 ;
17628 int ecode3 = 0 ;
17629 void *argp4 = 0 ;
17630 int res4 = 0 ;
17631 PyObject * obj0 = 0 ;
17632 PyObject * obj1 = 0 ;
17633 PyObject * obj2 = 0 ;
17634 PyObject * obj3 = 0 ;
17635
17636 if (!PyArg_ParseTuple(args,(char *)"OOOO:Index_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17637 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17638 if (!SWIG_IsOK(res1)) {
17639 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_reconstruct_n" "', argument " "1"" of type '" "faiss::Index const *""'");
17640 }
17641 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17642 ecode2 = SWIG_AsVal_long(obj1, &val2);
17643 if (!SWIG_IsOK(ecode2)) {
17644 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17645 }
17646 arg2 = static_cast< faiss::Index::idx_t >(val2);
17647 ecode3 = SWIG_AsVal_long(obj2, &val3);
17648 if (!SWIG_IsOK(ecode3)) {
17649 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Index_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
17650 }
17651 arg3 = static_cast< faiss::Index::idx_t >(val3);
17652 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
17653 if (!SWIG_IsOK(res4)) {
17654 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index_reconstruct_n" "', argument " "4"" of type '" "float *""'");
17655 }
17656 arg4 = reinterpret_cast< float * >(argp4);
17657 {
17658 Py_BEGIN_ALLOW_THREADS
17659 try {
17660 ((faiss::Index const *)arg1)->reconstruct_n(arg2,arg3,arg4);
17661 } catch(faiss::FaissException & e) {
17662 PyEval_RestoreThread(_save);
17663 PyErr_SetString(PyExc_RuntimeError, e.what());
17664 SWIG_fail;
17665 }
17666 Py_END_ALLOW_THREADS
17667 }
17668 resultobj = SWIG_Py_Void();
17669 return resultobj;
17670 fail:
17671 return NULL;
17672 }
17673
17674
17675 SWIGINTERN PyObject *_wrap_Index_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17676 PyObject *resultobj = 0;
17677 faiss::Index *arg1 = (faiss::Index *) 0 ;
17678 faiss::Index::idx_t arg2 ;
17679 float *arg3 = (float *) 0 ;
17680 faiss::Index::idx_t arg4 ;
17681 float *arg5 = (float *) 0 ;
17682 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
17683 float *arg7 = (float *) 0 ;
17684 void *argp1 = 0 ;
17685 int res1 = 0 ;
17686 long val2 ;
17687 int ecode2 = 0 ;
17688 void *argp3 = 0 ;
17689 int res3 = 0 ;
17690 long val4 ;
17691 int ecode4 = 0 ;
17692 void *argp5 = 0 ;
17693 int res5 = 0 ;
17694 void *argp6 = 0 ;
17695 int res6 = 0 ;
17696 void *argp7 = 0 ;
17697 int res7 = 0 ;
17698 PyObject * obj0 = 0 ;
17699 PyObject * obj1 = 0 ;
17700 PyObject * obj2 = 0 ;
17701 PyObject * obj3 = 0 ;
17702 PyObject * obj4 = 0 ;
17703 PyObject * obj5 = 0 ;
17704 PyObject * obj6 = 0 ;
17705
17706 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:Index_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
17707 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17708 if (!SWIG_IsOK(res1)) {
17709 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_search_and_reconstruct" "', argument " "1"" of type '" "faiss::Index const *""'");
17710 }
17711 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17712 ecode2 = SWIG_AsVal_long(obj1, &val2);
17713 if (!SWIG_IsOK(ecode2)) {
17714 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index_search_and_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
17715 }
17716 arg2 = static_cast< faiss::Index::idx_t >(val2);
17717 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17718 if (!SWIG_IsOK(res3)) {
17719 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_search_and_reconstruct" "', argument " "3"" of type '" "float const *""'");
17720 }
17721 arg3 = reinterpret_cast< float * >(argp3);
17722 ecode4 = SWIG_AsVal_long(obj3, &val4);
17723 if (!SWIG_IsOK(ecode4)) {
17724 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index_search_and_reconstruct" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
17725 }
17726 arg4 = static_cast< faiss::Index::idx_t >(val4);
17727 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
17728 if (!SWIG_IsOK(res5)) {
17729 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Index_search_and_reconstruct" "', argument " "5"" of type '" "float *""'");
17730 }
17731 arg5 = reinterpret_cast< float * >(argp5);
17732 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
17733 if (!SWIG_IsOK(res6)) {
17734 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Index_search_and_reconstruct" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
17735 }
17736 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
17737 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
17738 if (!SWIG_IsOK(res7)) {
17739 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "Index_search_and_reconstruct" "', argument " "7"" of type '" "float *""'");
17740 }
17741 arg7 = reinterpret_cast< float * >(argp7);
17742 {
17743 Py_BEGIN_ALLOW_THREADS
17744 try {
17745 ((faiss::Index const *)arg1)->search_and_reconstruct(arg2,(float const *)arg3,arg4,arg5,arg6,arg7);
17746 } catch(faiss::FaissException & e) {
17747 PyEval_RestoreThread(_save);
17748 PyErr_SetString(PyExc_RuntimeError, e.what());
17749 SWIG_fail;
17750 }
17751 Py_END_ALLOW_THREADS
17752 }
17753 resultobj = SWIG_Py_Void();
17754 return resultobj;
17755 fail:
17756 return NULL;
17757 }
17758
17759
17760 SWIGINTERN PyObject *_wrap_Index_compute_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17761 PyObject *resultobj = 0;
17762 faiss::Index *arg1 = (faiss::Index *) 0 ;
17763 float *arg2 = (float *) 0 ;
17764 float *arg3 = (float *) 0 ;
17765 faiss::Index::idx_t arg4 ;
17766 void *argp1 = 0 ;
17767 int res1 = 0 ;
17768 void *argp2 = 0 ;
17769 int res2 = 0 ;
17770 void *argp3 = 0 ;
17771 int res3 = 0 ;
17772 long val4 ;
17773 int ecode4 = 0 ;
17774 PyObject * obj0 = 0 ;
17775 PyObject * obj1 = 0 ;
17776 PyObject * obj2 = 0 ;
17777 PyObject * obj3 = 0 ;
17778
17779 if (!PyArg_ParseTuple(args,(char *)"OOOO:Index_compute_residual",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
17780 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17781 if (!SWIG_IsOK(res1)) {
17782 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_compute_residual" "', argument " "1"" of type '" "faiss::Index const *""'");
17783 }
17784 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17785 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
17786 if (!SWIG_IsOK(res2)) {
17787 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index_compute_residual" "', argument " "2"" of type '" "float const *""'");
17788 }
17789 arg2 = reinterpret_cast< float * >(argp2);
17790 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
17791 if (!SWIG_IsOK(res3)) {
17792 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index_compute_residual" "', argument " "3"" of type '" "float *""'");
17793 }
17794 arg3 = reinterpret_cast< float * >(argp3);
17795 ecode4 = SWIG_AsVal_long(obj3, &val4);
17796 if (!SWIG_IsOK(ecode4)) {
17797 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index_compute_residual" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
17798 }
17799 arg4 = static_cast< faiss::Index::idx_t >(val4);
17800 {
17801 Py_BEGIN_ALLOW_THREADS
17802 try {
17803 ((faiss::Index const *)arg1)->compute_residual((float const *)arg2,arg3,arg4);
17804 } catch(faiss::FaissException & e) {
17805 PyEval_RestoreThread(_save);
17806 PyErr_SetString(PyExc_RuntimeError, e.what());
17807 SWIG_fail;
17808 }
17809 Py_END_ALLOW_THREADS
17810 }
17811 resultobj = SWIG_Py_Void();
17812 return resultobj;
17813 fail:
17814 return NULL;
17815 }
17816
17817
17818 SWIGINTERN PyObject *_wrap_Index_display(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17819 PyObject *resultobj = 0;
17820 faiss::Index *arg1 = (faiss::Index *) 0 ;
17821 void *argp1 = 0 ;
17822 int res1 = 0 ;
17823 PyObject * obj0 = 0 ;
17824
17825 if (!PyArg_ParseTuple(args,(char *)"O:Index_display",&obj0)) SWIG_fail;
17826 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
17827 if (!SWIG_IsOK(res1)) {
17828 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index_display" "', argument " "1"" of type '" "faiss::Index const *""'");
17829 }
17830 arg1 = reinterpret_cast< faiss::Index * >(argp1);
17831 {
17832 Py_BEGIN_ALLOW_THREADS
17833 try {
17834 ((faiss::Index const *)arg1)->display();
17835 } catch(faiss::FaissException & e) {
17836 PyEval_RestoreThread(_save);
17837 PyErr_SetString(PyExc_RuntimeError, e.what());
17838 SWIG_fail;
17839 }
17840 Py_END_ALLOW_THREADS
17841 }
17842 resultobj = SWIG_Py_Void();
17843 return resultobj;
17844 fail:
17845 return NULL;
17846 }
17847
17848
17849 SWIGINTERN PyObject *Index_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17850 PyObject *obj;
17851 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
17852 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Index, SWIG_NewClientData(obj));
17853 return SWIG_Py_Void();
17854 }
17855
17856 SWIGINTERN PyObject *_wrap_ClusteringParameters_niter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17857 PyObject *resultobj = 0;
17858 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
17859 int arg2 ;
17860 void *argp1 = 0 ;
17861 int res1 = 0 ;
17862 int val2 ;
17863 int ecode2 = 0 ;
17864 PyObject * obj0 = 0 ;
17865 PyObject * obj1 = 0 ;
17866
17867 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_niter_set",&obj0,&obj1)) SWIG_fail;
17868 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
17869 if (!SWIG_IsOK(res1)) {
17870 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_niter_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
17871 }
17872 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
17873 ecode2 = SWIG_AsVal_int(obj1, &val2);
17874 if (!SWIG_IsOK(ecode2)) {
17875 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_niter_set" "', argument " "2"" of type '" "int""'");
17876 }
17877 arg2 = static_cast< int >(val2);
17878 if (arg1) (arg1)->niter = arg2;
17879 resultobj = SWIG_Py_Void();
17880 return resultobj;
17881 fail:
17882 return NULL;
17883 }
17884
17885
17886 SWIGINTERN PyObject *_wrap_ClusteringParameters_niter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17887 PyObject *resultobj = 0;
17888 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
17889 void *argp1 = 0 ;
17890 int res1 = 0 ;
17891 PyObject * obj0 = 0 ;
17892 int result;
17893
17894 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_niter_get",&obj0)) SWIG_fail;
17895 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
17896 if (!SWIG_IsOK(res1)) {
17897 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_niter_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
17898 }
17899 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
17900 result = (int) ((arg1)->niter);
17901 resultobj = SWIG_From_int(static_cast< int >(result));
17902 return resultobj;
17903 fail:
17904 return NULL;
17905 }
17906
17907
17908 SWIGINTERN PyObject *_wrap_ClusteringParameters_nredo_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17909 PyObject *resultobj = 0;
17910 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
17911 int arg2 ;
17912 void *argp1 = 0 ;
17913 int res1 = 0 ;
17914 int val2 ;
17915 int ecode2 = 0 ;
17916 PyObject * obj0 = 0 ;
17917 PyObject * obj1 = 0 ;
17918
17919 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_nredo_set",&obj0,&obj1)) SWIG_fail;
17920 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
17921 if (!SWIG_IsOK(res1)) {
17922 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_nredo_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
17923 }
17924 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
17925 ecode2 = SWIG_AsVal_int(obj1, &val2);
17926 if (!SWIG_IsOK(ecode2)) {
17927 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_nredo_set" "', argument " "2"" of type '" "int""'");
17928 }
17929 arg2 = static_cast< int >(val2);
17930 if (arg1) (arg1)->nredo = arg2;
17931 resultobj = SWIG_Py_Void();
17932 return resultobj;
17933 fail:
17934 return NULL;
17935 }
17936
17937
17938 SWIGINTERN PyObject *_wrap_ClusteringParameters_nredo_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17939 PyObject *resultobj = 0;
17940 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
17941 void *argp1 = 0 ;
17942 int res1 = 0 ;
17943 PyObject * obj0 = 0 ;
17944 int result;
17945
17946 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_nredo_get",&obj0)) SWIG_fail;
17947 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
17948 if (!SWIG_IsOK(res1)) {
17949 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_nredo_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
17950 }
17951 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
17952 result = (int) ((arg1)->nredo);
17953 resultobj = SWIG_From_int(static_cast< int >(result));
17954 return resultobj;
17955 fail:
17956 return NULL;
17957 }
17958
17959
17960 SWIGINTERN PyObject *_wrap_ClusteringParameters_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17961 PyObject *resultobj = 0;
17962 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
17963 bool arg2 ;
17964 void *argp1 = 0 ;
17965 int res1 = 0 ;
17966 bool val2 ;
17967 int ecode2 = 0 ;
17968 PyObject * obj0 = 0 ;
17969 PyObject * obj1 = 0 ;
17970
17971 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_verbose_set",&obj0,&obj1)) SWIG_fail;
17972 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
17973 if (!SWIG_IsOK(res1)) {
17974 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_verbose_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
17975 }
17976 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
17977 ecode2 = SWIG_AsVal_bool(obj1, &val2);
17978 if (!SWIG_IsOK(ecode2)) {
17979 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_verbose_set" "', argument " "2"" of type '" "bool""'");
17980 }
17981 arg2 = static_cast< bool >(val2);
17982 if (arg1) (arg1)->verbose = arg2;
17983 resultobj = SWIG_Py_Void();
17984 return resultobj;
17985 fail:
17986 return NULL;
17987 }
17988
17989
17990 SWIGINTERN PyObject *_wrap_ClusteringParameters_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
17991 PyObject *resultobj = 0;
17992 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
17993 void *argp1 = 0 ;
17994 int res1 = 0 ;
17995 PyObject * obj0 = 0 ;
17996 bool result;
17997
17998 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_verbose_get",&obj0)) SWIG_fail;
17999 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18000 if (!SWIG_IsOK(res1)) {
18001 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_verbose_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18002 }
18003 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18004 result = (bool) ((arg1)->verbose);
18005 resultobj = SWIG_From_bool(static_cast< bool >(result));
18006 return resultobj;
18007 fail:
18008 return NULL;
18009 }
18010
18011
18012 SWIGINTERN PyObject *_wrap_ClusteringParameters_spherical_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18013 PyObject *resultobj = 0;
18014 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18015 bool arg2 ;
18016 void *argp1 = 0 ;
18017 int res1 = 0 ;
18018 bool val2 ;
18019 int ecode2 = 0 ;
18020 PyObject * obj0 = 0 ;
18021 PyObject * obj1 = 0 ;
18022
18023 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_spherical_set",&obj0,&obj1)) SWIG_fail;
18024 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18025 if (!SWIG_IsOK(res1)) {
18026 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_spherical_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18027 }
18028 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18029 ecode2 = SWIG_AsVal_bool(obj1, &val2);
18030 if (!SWIG_IsOK(ecode2)) {
18031 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_spherical_set" "', argument " "2"" of type '" "bool""'");
18032 }
18033 arg2 = static_cast< bool >(val2);
18034 if (arg1) (arg1)->spherical = arg2;
18035 resultobj = SWIG_Py_Void();
18036 return resultobj;
18037 fail:
18038 return NULL;
18039 }
18040
18041
18042 SWIGINTERN PyObject *_wrap_ClusteringParameters_spherical_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18043 PyObject *resultobj = 0;
18044 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18045 void *argp1 = 0 ;
18046 int res1 = 0 ;
18047 PyObject * obj0 = 0 ;
18048 bool result;
18049
18050 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_spherical_get",&obj0)) SWIG_fail;
18051 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18052 if (!SWIG_IsOK(res1)) {
18053 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_spherical_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18054 }
18055 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18056 result = (bool) ((arg1)->spherical);
18057 resultobj = SWIG_From_bool(static_cast< bool >(result));
18058 return resultobj;
18059 fail:
18060 return NULL;
18061 }
18062
18063
18064 SWIGINTERN PyObject *_wrap_ClusteringParameters_update_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18065 PyObject *resultobj = 0;
18066 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18067 bool arg2 ;
18068 void *argp1 = 0 ;
18069 int res1 = 0 ;
18070 bool val2 ;
18071 int ecode2 = 0 ;
18072 PyObject * obj0 = 0 ;
18073 PyObject * obj1 = 0 ;
18074
18075 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_update_index_set",&obj0,&obj1)) SWIG_fail;
18076 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18077 if (!SWIG_IsOK(res1)) {
18078 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_update_index_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18079 }
18080 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18081 ecode2 = SWIG_AsVal_bool(obj1, &val2);
18082 if (!SWIG_IsOK(ecode2)) {
18083 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_update_index_set" "', argument " "2"" of type '" "bool""'");
18084 }
18085 arg2 = static_cast< bool >(val2);
18086 if (arg1) (arg1)->update_index = arg2;
18087 resultobj = SWIG_Py_Void();
18088 return resultobj;
18089 fail:
18090 return NULL;
18091 }
18092
18093
18094 SWIGINTERN PyObject *_wrap_ClusteringParameters_update_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18095 PyObject *resultobj = 0;
18096 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18097 void *argp1 = 0 ;
18098 int res1 = 0 ;
18099 PyObject * obj0 = 0 ;
18100 bool result;
18101
18102 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_update_index_get",&obj0)) SWIG_fail;
18103 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18104 if (!SWIG_IsOK(res1)) {
18105 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_update_index_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18106 }
18107 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18108 result = (bool) ((arg1)->update_index);
18109 resultobj = SWIG_From_bool(static_cast< bool >(result));
18110 return resultobj;
18111 fail:
18112 return NULL;
18113 }
18114
18115
18116 SWIGINTERN PyObject *_wrap_ClusteringParameters_frozen_centroids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18117 PyObject *resultobj = 0;
18118 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18119 bool arg2 ;
18120 void *argp1 = 0 ;
18121 int res1 = 0 ;
18122 bool val2 ;
18123 int ecode2 = 0 ;
18124 PyObject * obj0 = 0 ;
18125 PyObject * obj1 = 0 ;
18126
18127 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_frozen_centroids_set",&obj0,&obj1)) SWIG_fail;
18128 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18129 if (!SWIG_IsOK(res1)) {
18130 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_frozen_centroids_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18131 }
18132 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18133 ecode2 = SWIG_AsVal_bool(obj1, &val2);
18134 if (!SWIG_IsOK(ecode2)) {
18135 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_frozen_centroids_set" "', argument " "2"" of type '" "bool""'");
18136 }
18137 arg2 = static_cast< bool >(val2);
18138 if (arg1) (arg1)->frozen_centroids = arg2;
18139 resultobj = SWIG_Py_Void();
18140 return resultobj;
18141 fail:
18142 return NULL;
18143 }
18144
18145
18146 SWIGINTERN PyObject *_wrap_ClusteringParameters_frozen_centroids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18147 PyObject *resultobj = 0;
18148 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18149 void *argp1 = 0 ;
18150 int res1 = 0 ;
18151 PyObject * obj0 = 0 ;
18152 bool result;
18153
18154 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_frozen_centroids_get",&obj0)) SWIG_fail;
18155 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18156 if (!SWIG_IsOK(res1)) {
18157 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_frozen_centroids_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18158 }
18159 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18160 result = (bool) ((arg1)->frozen_centroids);
18161 resultobj = SWIG_From_bool(static_cast< bool >(result));
18162 return resultobj;
18163 fail:
18164 return NULL;
18165 }
18166
18167
18168 SWIGINTERN PyObject *_wrap_ClusteringParameters_min_points_per_centroid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18169 PyObject *resultobj = 0;
18170 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18171 int arg2 ;
18172 void *argp1 = 0 ;
18173 int res1 = 0 ;
18174 int val2 ;
18175 int ecode2 = 0 ;
18176 PyObject * obj0 = 0 ;
18177 PyObject * obj1 = 0 ;
18178
18179 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_min_points_per_centroid_set",&obj0,&obj1)) SWIG_fail;
18180 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18181 if (!SWIG_IsOK(res1)) {
18182 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_min_points_per_centroid_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18183 }
18184 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18185 ecode2 = SWIG_AsVal_int(obj1, &val2);
18186 if (!SWIG_IsOK(ecode2)) {
18187 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_min_points_per_centroid_set" "', argument " "2"" of type '" "int""'");
18188 }
18189 arg2 = static_cast< int >(val2);
18190 if (arg1) (arg1)->min_points_per_centroid = arg2;
18191 resultobj = SWIG_Py_Void();
18192 return resultobj;
18193 fail:
18194 return NULL;
18195 }
18196
18197
18198 SWIGINTERN PyObject *_wrap_ClusteringParameters_min_points_per_centroid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18199 PyObject *resultobj = 0;
18200 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18201 void *argp1 = 0 ;
18202 int res1 = 0 ;
18203 PyObject * obj0 = 0 ;
18204 int result;
18205
18206 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_min_points_per_centroid_get",&obj0)) SWIG_fail;
18207 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18208 if (!SWIG_IsOK(res1)) {
18209 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_min_points_per_centroid_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18210 }
18211 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18212 result = (int) ((arg1)->min_points_per_centroid);
18213 resultobj = SWIG_From_int(static_cast< int >(result));
18214 return resultobj;
18215 fail:
18216 return NULL;
18217 }
18218
18219
18220 SWIGINTERN PyObject *_wrap_ClusteringParameters_max_points_per_centroid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18221 PyObject *resultobj = 0;
18222 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18223 int arg2 ;
18224 void *argp1 = 0 ;
18225 int res1 = 0 ;
18226 int val2 ;
18227 int ecode2 = 0 ;
18228 PyObject * obj0 = 0 ;
18229 PyObject * obj1 = 0 ;
18230
18231 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_max_points_per_centroid_set",&obj0,&obj1)) SWIG_fail;
18232 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18233 if (!SWIG_IsOK(res1)) {
18234 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_max_points_per_centroid_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18235 }
18236 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18237 ecode2 = SWIG_AsVal_int(obj1, &val2);
18238 if (!SWIG_IsOK(ecode2)) {
18239 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_max_points_per_centroid_set" "', argument " "2"" of type '" "int""'");
18240 }
18241 arg2 = static_cast< int >(val2);
18242 if (arg1) (arg1)->max_points_per_centroid = arg2;
18243 resultobj = SWIG_Py_Void();
18244 return resultobj;
18245 fail:
18246 return NULL;
18247 }
18248
18249
18250 SWIGINTERN PyObject *_wrap_ClusteringParameters_max_points_per_centroid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18251 PyObject *resultobj = 0;
18252 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18253 void *argp1 = 0 ;
18254 int res1 = 0 ;
18255 PyObject * obj0 = 0 ;
18256 int result;
18257
18258 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_max_points_per_centroid_get",&obj0)) SWIG_fail;
18259 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18260 if (!SWIG_IsOK(res1)) {
18261 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_max_points_per_centroid_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18262 }
18263 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18264 result = (int) ((arg1)->max_points_per_centroid);
18265 resultobj = SWIG_From_int(static_cast< int >(result));
18266 return resultobj;
18267 fail:
18268 return NULL;
18269 }
18270
18271
18272 SWIGINTERN PyObject *_wrap_ClusteringParameters_seed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18273 PyObject *resultobj = 0;
18274 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18275 int arg2 ;
18276 void *argp1 = 0 ;
18277 int res1 = 0 ;
18278 int val2 ;
18279 int ecode2 = 0 ;
18280 PyObject * obj0 = 0 ;
18281 PyObject * obj1 = 0 ;
18282
18283 if (!PyArg_ParseTuple(args,(char *)"OO:ClusteringParameters_seed_set",&obj0,&obj1)) SWIG_fail;
18284 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18285 if (!SWIG_IsOK(res1)) {
18286 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_seed_set" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18287 }
18288 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18289 ecode2 = SWIG_AsVal_int(obj1, &val2);
18290 if (!SWIG_IsOK(ecode2)) {
18291 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ClusteringParameters_seed_set" "', argument " "2"" of type '" "int""'");
18292 }
18293 arg2 = static_cast< int >(val2);
18294 if (arg1) (arg1)->seed = arg2;
18295 resultobj = SWIG_Py_Void();
18296 return resultobj;
18297 fail:
18298 return NULL;
18299 }
18300
18301
18302 SWIGINTERN PyObject *_wrap_ClusteringParameters_seed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18303 PyObject *resultobj = 0;
18304 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18305 void *argp1 = 0 ;
18306 int res1 = 0 ;
18307 PyObject * obj0 = 0 ;
18308 int result;
18309
18310 if (!PyArg_ParseTuple(args,(char *)"O:ClusteringParameters_seed_get",&obj0)) SWIG_fail;
18311 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
18312 if (!SWIG_IsOK(res1)) {
18313 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ClusteringParameters_seed_get" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18314 }
18315 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18316 result = (int) ((arg1)->seed);
18317 resultobj = SWIG_From_int(static_cast< int >(result));
18318 return resultobj;
18319 fail:
18320 return NULL;
18321 }
18322
18323
18324 SWIGINTERN PyObject *_wrap_new_ClusteringParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18325 PyObject *resultobj = 0;
18326 faiss::ClusteringParameters *result = 0 ;
18327
18328 if (!PyArg_ParseTuple(args,(char *)":new_ClusteringParameters")) SWIG_fail;
18329 {
18330 Py_BEGIN_ALLOW_THREADS
18331 try {
18332 result = (faiss::ClusteringParameters *)new faiss::ClusteringParameters();
18333 } catch(faiss::FaissException & e) {
18334 PyEval_RestoreThread(_save);
18335 PyErr_SetString(PyExc_RuntimeError, e.what());
18336 SWIG_fail;
18337 }
18338 Py_END_ALLOW_THREADS
18339 }
18340 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, SWIG_POINTER_NEW | 0 );
18341 return resultobj;
18342 fail:
18343 return NULL;
18344 }
18345
18346
18347 SWIGINTERN PyObject *_wrap_delete_ClusteringParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18348 PyObject *resultobj = 0;
18349 faiss::ClusteringParameters *arg1 = (faiss::ClusteringParameters *) 0 ;
18350 void *argp1 = 0 ;
18351 int res1 = 0 ;
18352 PyObject * obj0 = 0 ;
18353
18354 if (!PyArg_ParseTuple(args,(char *)"O:delete_ClusteringParameters",&obj0)) SWIG_fail;
18355 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ClusteringParameters, SWIG_POINTER_DISOWN | 0 );
18356 if (!SWIG_IsOK(res1)) {
18357 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ClusteringParameters" "', argument " "1"" of type '" "faiss::ClusteringParameters *""'");
18358 }
18359 arg1 = reinterpret_cast< faiss::ClusteringParameters * >(argp1);
18360 delete arg1;
18361 resultobj = SWIG_Py_Void();
18362 return resultobj;
18363 fail:
18364 return NULL;
18365 }
18366
18367
18368 SWIGINTERN PyObject *ClusteringParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18369 PyObject *obj;
18370 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
18371 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ClusteringParameters, SWIG_NewClientData(obj));
18372 return SWIG_Py_Void();
18373 }
18374
18375 SWIGINTERN PyObject *_wrap_Clustering_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18376 PyObject *resultobj = 0;
18377 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18378 size_t arg2 ;
18379 void *argp1 = 0 ;
18380 int res1 = 0 ;
18381 size_t val2 ;
18382 int ecode2 = 0 ;
18383 PyObject * obj0 = 0 ;
18384 PyObject * obj1 = 0 ;
18385
18386 if (!PyArg_ParseTuple(args,(char *)"OO:Clustering_d_set",&obj0,&obj1)) SWIG_fail;
18387 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18388 if (!SWIG_IsOK(res1)) {
18389 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_d_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
18390 }
18391 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18392 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
18393 if (!SWIG_IsOK(ecode2)) {
18394 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Clustering_d_set" "', argument " "2"" of type '" "size_t""'");
18395 }
18396 arg2 = static_cast< size_t >(val2);
18397 if (arg1) (arg1)->d = arg2;
18398 resultobj = SWIG_Py_Void();
18399 return resultobj;
18400 fail:
18401 return NULL;
18402 }
18403
18404
18405 SWIGINTERN PyObject *_wrap_Clustering_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18406 PyObject *resultobj = 0;
18407 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18408 void *argp1 = 0 ;
18409 int res1 = 0 ;
18410 PyObject * obj0 = 0 ;
18411 size_t result;
18412
18413 if (!PyArg_ParseTuple(args,(char *)"O:Clustering_d_get",&obj0)) SWIG_fail;
18414 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18415 if (!SWIG_IsOK(res1)) {
18416 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_d_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
18417 }
18418 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18419 result = (size_t) ((arg1)->d);
18420 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
18421 return resultobj;
18422 fail:
18423 return NULL;
18424 }
18425
18426
18427 SWIGINTERN PyObject *_wrap_Clustering_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18428 PyObject *resultobj = 0;
18429 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18430 size_t arg2 ;
18431 void *argp1 = 0 ;
18432 int res1 = 0 ;
18433 size_t val2 ;
18434 int ecode2 = 0 ;
18435 PyObject * obj0 = 0 ;
18436 PyObject * obj1 = 0 ;
18437
18438 if (!PyArg_ParseTuple(args,(char *)"OO:Clustering_k_set",&obj0,&obj1)) SWIG_fail;
18439 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18440 if (!SWIG_IsOK(res1)) {
18441 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_k_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
18442 }
18443 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18444 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
18445 if (!SWIG_IsOK(ecode2)) {
18446 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Clustering_k_set" "', argument " "2"" of type '" "size_t""'");
18447 }
18448 arg2 = static_cast< size_t >(val2);
18449 if (arg1) (arg1)->k = arg2;
18450 resultobj = SWIG_Py_Void();
18451 return resultobj;
18452 fail:
18453 return NULL;
18454 }
18455
18456
18457 SWIGINTERN PyObject *_wrap_Clustering_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18458 PyObject *resultobj = 0;
18459 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18460 void *argp1 = 0 ;
18461 int res1 = 0 ;
18462 PyObject * obj0 = 0 ;
18463 size_t result;
18464
18465 if (!PyArg_ParseTuple(args,(char *)"O:Clustering_k_get",&obj0)) SWIG_fail;
18466 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18467 if (!SWIG_IsOK(res1)) {
18468 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_k_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
18469 }
18470 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18471 result = (size_t) ((arg1)->k);
18472 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
18473 return resultobj;
18474 fail:
18475 return NULL;
18476 }
18477
18478
18479 SWIGINTERN PyObject *_wrap_Clustering_centroids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18480 PyObject *resultobj = 0;
18481 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18482 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
18483 void *argp1 = 0 ;
18484 int res1 = 0 ;
18485 void *argp2 = 0 ;
18486 int res2 = 0 ;
18487 PyObject * obj0 = 0 ;
18488 PyObject * obj1 = 0 ;
18489
18490 if (!PyArg_ParseTuple(args,(char *)"OO:Clustering_centroids_set",&obj0,&obj1)) SWIG_fail;
18491 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18492 if (!SWIG_IsOK(res1)) {
18493 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_centroids_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
18494 }
18495 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18496 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
18497 if (!SWIG_IsOK(res2)) {
18498 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Clustering_centroids_set" "', argument " "2"" of type '" "std::vector< float > *""'");
18499 }
18500 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
18501 if (arg1) (arg1)->centroids = *arg2;
18502 resultobj = SWIG_Py_Void();
18503 return resultobj;
18504 fail:
18505 return NULL;
18506 }
18507
18508
18509 SWIGINTERN PyObject *_wrap_Clustering_centroids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18510 PyObject *resultobj = 0;
18511 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18512 void *argp1 = 0 ;
18513 int res1 = 0 ;
18514 PyObject * obj0 = 0 ;
18515 std::vector< float > *result = 0 ;
18516
18517 if (!PyArg_ParseTuple(args,(char *)"O:Clustering_centroids_get",&obj0)) SWIG_fail;
18518 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18519 if (!SWIG_IsOK(res1)) {
18520 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_centroids_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
18521 }
18522 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18523 result = (std::vector< float > *)& ((arg1)->centroids);
18524 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
18525 return resultobj;
18526 fail:
18527 return NULL;
18528 }
18529
18530
18531 SWIGINTERN PyObject *_wrap_Clustering_obj_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18532 PyObject *resultobj = 0;
18533 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18534 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
18535 void *argp1 = 0 ;
18536 int res1 = 0 ;
18537 void *argp2 = 0 ;
18538 int res2 = 0 ;
18539 PyObject * obj0 = 0 ;
18540 PyObject * obj1 = 0 ;
18541
18542 if (!PyArg_ParseTuple(args,(char *)"OO:Clustering_obj_set",&obj0,&obj1)) SWIG_fail;
18543 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18544 if (!SWIG_IsOK(res1)) {
18545 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_obj_set" "', argument " "1"" of type '" "faiss::Clustering *""'");
18546 }
18547 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18548 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
18549 if (!SWIG_IsOK(res2)) {
18550 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Clustering_obj_set" "', argument " "2"" of type '" "std::vector< float > *""'");
18551 }
18552 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
18553 if (arg1) (arg1)->obj = *arg2;
18554 resultobj = SWIG_Py_Void();
18555 return resultobj;
18556 fail:
18557 return NULL;
18558 }
18559
18560
18561 SWIGINTERN PyObject *_wrap_Clustering_obj_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18562 PyObject *resultobj = 0;
18563 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18564 void *argp1 = 0 ;
18565 int res1 = 0 ;
18566 PyObject * obj0 = 0 ;
18567 std::vector< float > *result = 0 ;
18568
18569 if (!PyArg_ParseTuple(args,(char *)"O:Clustering_obj_get",&obj0)) SWIG_fail;
18570 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18571 if (!SWIG_IsOK(res1)) {
18572 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_obj_get" "', argument " "1"" of type '" "faiss::Clustering *""'");
18573 }
18574 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18575 result = (std::vector< float > *)& ((arg1)->obj);
18576 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
18577 return resultobj;
18578 fail:
18579 return NULL;
18580 }
18581
18582
18583 SWIGINTERN PyObject *_wrap_new_Clustering__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18584 PyObject *resultobj = 0;
18585 int arg1 ;
18586 int arg2 ;
18587 int val1 ;
18588 int ecode1 = 0 ;
18589 int val2 ;
18590 int ecode2 = 0 ;
18591 PyObject * obj0 = 0 ;
18592 PyObject * obj1 = 0 ;
18593 faiss::Clustering *result = 0 ;
18594
18595 if (!PyArg_ParseTuple(args,(char *)"OO:new_Clustering",&obj0,&obj1)) SWIG_fail;
18596 ecode1 = SWIG_AsVal_int(obj0, &val1);
18597 if (!SWIG_IsOK(ecode1)) {
18598 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Clustering" "', argument " "1"" of type '" "int""'");
18599 }
18600 arg1 = static_cast< int >(val1);
18601 ecode2 = SWIG_AsVal_int(obj1, &val2);
18602 if (!SWIG_IsOK(ecode2)) {
18603 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Clustering" "', argument " "2"" of type '" "int""'");
18604 }
18605 arg2 = static_cast< int >(val2);
18606 {
18607 Py_BEGIN_ALLOW_THREADS
18608 try {
18609 result = (faiss::Clustering *)new faiss::Clustering(arg1,arg2);
18610 } catch(faiss::FaissException & e) {
18611 PyEval_RestoreThread(_save);
18612 PyErr_SetString(PyExc_RuntimeError, e.what());
18613 SWIG_fail;
18614 }
18615 Py_END_ALLOW_THREADS
18616 }
18617 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_NEW | 0 );
18618 return resultobj;
18619 fail:
18620 return NULL;
18621 }
18622
18623
18624 SWIGINTERN PyObject *_wrap_new_Clustering__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18625 PyObject *resultobj = 0;
18626 int arg1 ;
18627 int arg2 ;
18628 faiss::ClusteringParameters *arg3 = 0 ;
18629 int val1 ;
18630 int ecode1 = 0 ;
18631 int val2 ;
18632 int ecode2 = 0 ;
18633 void *argp3 = 0 ;
18634 int res3 = 0 ;
18635 PyObject * obj0 = 0 ;
18636 PyObject * obj1 = 0 ;
18637 PyObject * obj2 = 0 ;
18638 faiss::Clustering *result = 0 ;
18639
18640 if (!PyArg_ParseTuple(args,(char *)"OOO:new_Clustering",&obj0,&obj1,&obj2)) SWIG_fail;
18641 ecode1 = SWIG_AsVal_int(obj0, &val1);
18642 if (!SWIG_IsOK(ecode1)) {
18643 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_Clustering" "', argument " "1"" of type '" "int""'");
18644 }
18645 arg1 = static_cast< int >(val1);
18646 ecode2 = SWIG_AsVal_int(obj1, &val2);
18647 if (!SWIG_IsOK(ecode2)) {
18648 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Clustering" "', argument " "2"" of type '" "int""'");
18649 }
18650 arg2 = static_cast< int >(val2);
18651 res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0);
18652 if (!SWIG_IsOK(res3)) {
18653 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_Clustering" "', argument " "3"" of type '" "faiss::ClusteringParameters const &""'");
18654 }
18655 if (!argp3) {
18656 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_Clustering" "', argument " "3"" of type '" "faiss::ClusteringParameters const &""'");
18657 }
18658 arg3 = reinterpret_cast< faiss::ClusteringParameters * >(argp3);
18659 {
18660 Py_BEGIN_ALLOW_THREADS
18661 try {
18662 result = (faiss::Clustering *)new faiss::Clustering(arg1,arg2,(faiss::ClusteringParameters const &)*arg3);
18663 } catch(faiss::FaissException & e) {
18664 PyEval_RestoreThread(_save);
18665 PyErr_SetString(PyExc_RuntimeError, e.what());
18666 SWIG_fail;
18667 }
18668 Py_END_ALLOW_THREADS
18669 }
18670 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_NEW | 0 );
18671 return resultobj;
18672 fail:
18673 return NULL;
18674 }
18675
18676
18677 SWIGINTERN PyObject *_wrap_new_Clustering(PyObject *self, PyObject *args) {
18678 Py_ssize_t argc;
18679 PyObject *argv[4] = {
18680 0
18681 };
18682 Py_ssize_t ii;
18683
18684 if (!PyTuple_Check(args)) SWIG_fail;
18685 argc = args ? PyObject_Length(args) : 0;
18686 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
18687 argv[ii] = PyTuple_GET_ITEM(args,ii);
18688 }
18689 if (argc == 2) {
18690 int _v;
18691 {
18692 int res = SWIG_AsVal_int(argv[0], NULL);
18693 _v = SWIG_CheckState(res);
18694 }
18695 if (_v) {
18696 {
18697 int res = SWIG_AsVal_int(argv[1], NULL);
18698 _v = SWIG_CheckState(res);
18699 }
18700 if (_v) {
18701 return _wrap_new_Clustering__SWIG_0(self, args);
18702 }
18703 }
18704 }
18705 if (argc == 3) {
18706 int _v;
18707 {
18708 int res = SWIG_AsVal_int(argv[0], NULL);
18709 _v = SWIG_CheckState(res);
18710 }
18711 if (_v) {
18712 {
18713 int res = SWIG_AsVal_int(argv[1], NULL);
18714 _v = SWIG_CheckState(res);
18715 }
18716 if (_v) {
18717 int res = SWIG_ConvertPtr(argv[2], 0, SWIGTYPE_p_faiss__ClusteringParameters, 0);
18718 _v = SWIG_CheckState(res);
18719 if (_v) {
18720 return _wrap_new_Clustering__SWIG_1(self, args);
18721 }
18722 }
18723 }
18724 }
18725
18726 fail:
18727 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Clustering'.\n"
18728 " Possible C/C++ prototypes are:\n"
18729 " faiss::Clustering::Clustering(int,int)\n"
18730 " faiss::Clustering::Clustering(int,int,faiss::ClusteringParameters const &)\n");
18731 return 0;
18732 }
18733
18734
18735 SWIGINTERN PyObject *_wrap_Clustering_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18736 PyObject *resultobj = 0;
18737 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18738 faiss::Clustering::idx_t arg2 ;
18739 float *arg3 = (float *) 0 ;
18740 faiss::Index *arg4 = 0 ;
18741 void *argp1 = 0 ;
18742 int res1 = 0 ;
18743 long val2 ;
18744 int ecode2 = 0 ;
18745 void *argp3 = 0 ;
18746 int res3 = 0 ;
18747 void *argp4 = 0 ;
18748 int res4 = 0 ;
18749 PyObject * obj0 = 0 ;
18750 PyObject * obj1 = 0 ;
18751 PyObject * obj2 = 0 ;
18752 PyObject * obj3 = 0 ;
18753
18754 if (!PyArg_ParseTuple(args,(char *)"OOOO:Clustering_train",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
18755 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, 0 | 0 );
18756 if (!SWIG_IsOK(res1)) {
18757 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Clustering_train" "', argument " "1"" of type '" "faiss::Clustering *""'");
18758 }
18759 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18760 ecode2 = SWIG_AsVal_long(obj1, &val2);
18761 if (!SWIG_IsOK(ecode2)) {
18762 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Clustering_train" "', argument " "2"" of type '" "faiss::Clustering::idx_t""'");
18763 }
18764 arg2 = static_cast< faiss::Clustering::idx_t >(val2);
18765 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
18766 if (!SWIG_IsOK(res3)) {
18767 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Clustering_train" "', argument " "3"" of type '" "float const *""'");
18768 }
18769 arg3 = reinterpret_cast< float * >(argp3);
18770 res4 = SWIG_ConvertPtr(obj3, &argp4, SWIGTYPE_p_faiss__Index, 0 );
18771 if (!SWIG_IsOK(res4)) {
18772 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Clustering_train" "', argument " "4"" of type '" "faiss::Index &""'");
18773 }
18774 if (!argp4) {
18775 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Clustering_train" "', argument " "4"" of type '" "faiss::Index &""'");
18776 }
18777 arg4 = reinterpret_cast< faiss::Index * >(argp4);
18778 {
18779 Py_BEGIN_ALLOW_THREADS
18780 try {
18781 (arg1)->train(arg2,(float const *)arg3,*arg4);
18782 } catch(faiss::FaissException & e) {
18783 PyEval_RestoreThread(_save);
18784 PyErr_SetString(PyExc_RuntimeError, e.what());
18785 SWIG_fail;
18786 }
18787 Py_END_ALLOW_THREADS
18788 }
18789 resultobj = SWIG_Py_Void();
18790 return resultobj;
18791 fail:
18792 return NULL;
18793 }
18794
18795
18796 SWIGINTERN PyObject *_wrap_delete_Clustering(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18797 PyObject *resultobj = 0;
18798 faiss::Clustering *arg1 = (faiss::Clustering *) 0 ;
18799 void *argp1 = 0 ;
18800 int res1 = 0 ;
18801 PyObject * obj0 = 0 ;
18802
18803 if (!PyArg_ParseTuple(args,(char *)"O:delete_Clustering",&obj0)) SWIG_fail;
18804 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Clustering, SWIG_POINTER_DISOWN | 0 );
18805 if (!SWIG_IsOK(res1)) {
18806 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Clustering" "', argument " "1"" of type '" "faiss::Clustering *""'");
18807 }
18808 arg1 = reinterpret_cast< faiss::Clustering * >(argp1);
18809 {
18810 Py_BEGIN_ALLOW_THREADS
18811 try {
18812 delete arg1;
18813 } catch(faiss::FaissException & e) {
18814 PyEval_RestoreThread(_save);
18815 PyErr_SetString(PyExc_RuntimeError, e.what());
18816 SWIG_fail;
18817 }
18818 Py_END_ALLOW_THREADS
18819 }
18820 resultobj = SWIG_Py_Void();
18821 return resultobj;
18822 fail:
18823 return NULL;
18824 }
18825
18826
18827 SWIGINTERN PyObject *Clustering_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18828 PyObject *obj;
18829 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
18830 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Clustering, SWIG_NewClientData(obj));
18831 return SWIG_Py_Void();
18832 }
18833
18834 SWIGINTERN PyObject *_wrap_kmeans_clustering(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18835 PyObject *resultobj = 0;
18836 size_t arg1 ;
18837 size_t arg2 ;
18838 size_t arg3 ;
18839 float *arg4 = (float *) 0 ;
18840 float *arg5 = (float *) 0 ;
18841 size_t val1 ;
18842 int ecode1 = 0 ;
18843 size_t val2 ;
18844 int ecode2 = 0 ;
18845 size_t val3 ;
18846 int ecode3 = 0 ;
18847 void *argp4 = 0 ;
18848 int res4 = 0 ;
18849 void *argp5 = 0 ;
18850 int res5 = 0 ;
18851 PyObject * obj0 = 0 ;
18852 PyObject * obj1 = 0 ;
18853 PyObject * obj2 = 0 ;
18854 PyObject * obj3 = 0 ;
18855 PyObject * obj4 = 0 ;
18856 float result;
18857
18858 if (!PyArg_ParseTuple(args,(char *)"OOOOO:kmeans_clustering",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
18859 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
18860 if (!SWIG_IsOK(ecode1)) {
18861 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "kmeans_clustering" "', argument " "1"" of type '" "size_t""'");
18862 }
18863 arg1 = static_cast< size_t >(val1);
18864 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
18865 if (!SWIG_IsOK(ecode2)) {
18866 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "kmeans_clustering" "', argument " "2"" of type '" "size_t""'");
18867 }
18868 arg2 = static_cast< size_t >(val2);
18869 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
18870 if (!SWIG_IsOK(ecode3)) {
18871 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "kmeans_clustering" "', argument " "3"" of type '" "size_t""'");
18872 }
18873 arg3 = static_cast< size_t >(val3);
18874 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
18875 if (!SWIG_IsOK(res4)) {
18876 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "kmeans_clustering" "', argument " "4"" of type '" "float const *""'");
18877 }
18878 arg4 = reinterpret_cast< float * >(argp4);
18879 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
18880 if (!SWIG_IsOK(res5)) {
18881 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "kmeans_clustering" "', argument " "5"" of type '" "float *""'");
18882 }
18883 arg5 = reinterpret_cast< float * >(argp5);
18884 {
18885 Py_BEGIN_ALLOW_THREADS
18886 try {
18887 result = (float)faiss::kmeans_clustering(arg1,arg2,arg3,(float const *)arg4,arg5);
18888 } catch(faiss::FaissException & e) {
18889 PyEval_RestoreThread(_save);
18890 PyErr_SetString(PyExc_RuntimeError, e.what());
18891 SWIG_fail;
18892 }
18893 Py_END_ALLOW_THREADS
18894 }
18895 resultobj = SWIG_From_float(static_cast< float >(result));
18896 return resultobj;
18897 fail:
18898 return NULL;
18899 }
18900
18901
18902 SWIGINTERN PyObject *_wrap_ProductQuantizer_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18903 PyObject *resultobj = 0;
18904 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
18905 size_t arg2 ;
18906 void *argp1 = 0 ;
18907 int res1 = 0 ;
18908 size_t val2 ;
18909 int ecode2 = 0 ;
18910 PyObject * obj0 = 0 ;
18911 PyObject * obj1 = 0 ;
18912
18913 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_d_set",&obj0,&obj1)) SWIG_fail;
18914 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
18915 if (!SWIG_IsOK(res1)) {
18916 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_d_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
18917 }
18918 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
18919 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
18920 if (!SWIG_IsOK(ecode2)) {
18921 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_d_set" "', argument " "2"" of type '" "size_t""'");
18922 }
18923 arg2 = static_cast< size_t >(val2);
18924 if (arg1) (arg1)->d = arg2;
18925 resultobj = SWIG_Py_Void();
18926 return resultobj;
18927 fail:
18928 return NULL;
18929 }
18930
18931
18932 SWIGINTERN PyObject *_wrap_ProductQuantizer_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18933 PyObject *resultobj = 0;
18934 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
18935 void *argp1 = 0 ;
18936 int res1 = 0 ;
18937 PyObject * obj0 = 0 ;
18938 size_t result;
18939
18940 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_d_get",&obj0)) SWIG_fail;
18941 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
18942 if (!SWIG_IsOK(res1)) {
18943 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_d_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
18944 }
18945 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
18946 result = (size_t) ((arg1)->d);
18947 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
18948 return resultobj;
18949 fail:
18950 return NULL;
18951 }
18952
18953
18954 SWIGINTERN PyObject *_wrap_ProductQuantizer_M_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18955 PyObject *resultobj = 0;
18956 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
18957 size_t arg2 ;
18958 void *argp1 = 0 ;
18959 int res1 = 0 ;
18960 size_t val2 ;
18961 int ecode2 = 0 ;
18962 PyObject * obj0 = 0 ;
18963 PyObject * obj1 = 0 ;
18964
18965 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_M_set",&obj0,&obj1)) SWIG_fail;
18966 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
18967 if (!SWIG_IsOK(res1)) {
18968 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_M_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
18969 }
18970 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
18971 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
18972 if (!SWIG_IsOK(ecode2)) {
18973 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_M_set" "', argument " "2"" of type '" "size_t""'");
18974 }
18975 arg2 = static_cast< size_t >(val2);
18976 if (arg1) (arg1)->M = arg2;
18977 resultobj = SWIG_Py_Void();
18978 return resultobj;
18979 fail:
18980 return NULL;
18981 }
18982
18983
18984 SWIGINTERN PyObject *_wrap_ProductQuantizer_M_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
18985 PyObject *resultobj = 0;
18986 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
18987 void *argp1 = 0 ;
18988 int res1 = 0 ;
18989 PyObject * obj0 = 0 ;
18990 size_t result;
18991
18992 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_M_get",&obj0)) SWIG_fail;
18993 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
18994 if (!SWIG_IsOK(res1)) {
18995 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_M_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
18996 }
18997 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
18998 result = (size_t) ((arg1)->M);
18999 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19000 return resultobj;
19001 fail:
19002 return NULL;
19003 }
19004
19005
19006 SWIGINTERN PyObject *_wrap_ProductQuantizer_nbits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19007 PyObject *resultobj = 0;
19008 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19009 size_t arg2 ;
19010 void *argp1 = 0 ;
19011 int res1 = 0 ;
19012 size_t val2 ;
19013 int ecode2 = 0 ;
19014 PyObject * obj0 = 0 ;
19015 PyObject * obj1 = 0 ;
19016
19017 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_nbits_set",&obj0,&obj1)) SWIG_fail;
19018 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19019 if (!SWIG_IsOK(res1)) {
19020 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_nbits_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19021 }
19022 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19023 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19024 if (!SWIG_IsOK(ecode2)) {
19025 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_nbits_set" "', argument " "2"" of type '" "size_t""'");
19026 }
19027 arg2 = static_cast< size_t >(val2);
19028 if (arg1) (arg1)->nbits = arg2;
19029 resultobj = SWIG_Py_Void();
19030 return resultobj;
19031 fail:
19032 return NULL;
19033 }
19034
19035
19036 SWIGINTERN PyObject *_wrap_ProductQuantizer_nbits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19037 PyObject *resultobj = 0;
19038 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19039 void *argp1 = 0 ;
19040 int res1 = 0 ;
19041 PyObject * obj0 = 0 ;
19042 size_t result;
19043
19044 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_nbits_get",&obj0)) SWIG_fail;
19045 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19046 if (!SWIG_IsOK(res1)) {
19047 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_nbits_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19048 }
19049 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19050 result = (size_t) ((arg1)->nbits);
19051 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19052 return resultobj;
19053 fail:
19054 return NULL;
19055 }
19056
19057
19058 SWIGINTERN PyObject *_wrap_ProductQuantizer_dsub_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19059 PyObject *resultobj = 0;
19060 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19061 size_t arg2 ;
19062 void *argp1 = 0 ;
19063 int res1 = 0 ;
19064 size_t val2 ;
19065 int ecode2 = 0 ;
19066 PyObject * obj0 = 0 ;
19067 PyObject * obj1 = 0 ;
19068
19069 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_dsub_set",&obj0,&obj1)) SWIG_fail;
19070 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19071 if (!SWIG_IsOK(res1)) {
19072 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_dsub_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19073 }
19074 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19075 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19076 if (!SWIG_IsOK(ecode2)) {
19077 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_dsub_set" "', argument " "2"" of type '" "size_t""'");
19078 }
19079 arg2 = static_cast< size_t >(val2);
19080 if (arg1) (arg1)->dsub = arg2;
19081 resultobj = SWIG_Py_Void();
19082 return resultobj;
19083 fail:
19084 return NULL;
19085 }
19086
19087
19088 SWIGINTERN PyObject *_wrap_ProductQuantizer_dsub_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19089 PyObject *resultobj = 0;
19090 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19091 void *argp1 = 0 ;
19092 int res1 = 0 ;
19093 PyObject * obj0 = 0 ;
19094 size_t result;
19095
19096 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_dsub_get",&obj0)) SWIG_fail;
19097 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19098 if (!SWIG_IsOK(res1)) {
19099 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_dsub_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19100 }
19101 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19102 result = (size_t) ((arg1)->dsub);
19103 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19104 return resultobj;
19105 fail:
19106 return NULL;
19107 }
19108
19109
19110 SWIGINTERN PyObject *_wrap_ProductQuantizer_byte_per_idx_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19111 PyObject *resultobj = 0;
19112 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19113 size_t arg2 ;
19114 void *argp1 = 0 ;
19115 int res1 = 0 ;
19116 size_t val2 ;
19117 int ecode2 = 0 ;
19118 PyObject * obj0 = 0 ;
19119 PyObject * obj1 = 0 ;
19120
19121 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_byte_per_idx_set",&obj0,&obj1)) SWIG_fail;
19122 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19123 if (!SWIG_IsOK(res1)) {
19124 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_byte_per_idx_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19125 }
19126 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19127 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19128 if (!SWIG_IsOK(ecode2)) {
19129 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_byte_per_idx_set" "', argument " "2"" of type '" "size_t""'");
19130 }
19131 arg2 = static_cast< size_t >(val2);
19132 if (arg1) (arg1)->byte_per_idx = arg2;
19133 resultobj = SWIG_Py_Void();
19134 return resultobj;
19135 fail:
19136 return NULL;
19137 }
19138
19139
19140 SWIGINTERN PyObject *_wrap_ProductQuantizer_byte_per_idx_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19141 PyObject *resultobj = 0;
19142 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19143 void *argp1 = 0 ;
19144 int res1 = 0 ;
19145 PyObject * obj0 = 0 ;
19146 size_t result;
19147
19148 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_byte_per_idx_get",&obj0)) SWIG_fail;
19149 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19150 if (!SWIG_IsOK(res1)) {
19151 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_byte_per_idx_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19152 }
19153 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19154 result = (size_t) ((arg1)->byte_per_idx);
19155 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19156 return resultobj;
19157 fail:
19158 return NULL;
19159 }
19160
19161
19162 SWIGINTERN PyObject *_wrap_ProductQuantizer_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19163 PyObject *resultobj = 0;
19164 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19165 size_t arg2 ;
19166 void *argp1 = 0 ;
19167 int res1 = 0 ;
19168 size_t val2 ;
19169 int ecode2 = 0 ;
19170 PyObject * obj0 = 0 ;
19171 PyObject * obj1 = 0 ;
19172
19173 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_code_size_set",&obj0,&obj1)) SWIG_fail;
19174 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19175 if (!SWIG_IsOK(res1)) {
19176 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_code_size_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19177 }
19178 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19179 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19180 if (!SWIG_IsOK(ecode2)) {
19181 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_code_size_set" "', argument " "2"" of type '" "size_t""'");
19182 }
19183 arg2 = static_cast< size_t >(val2);
19184 if (arg1) (arg1)->code_size = arg2;
19185 resultobj = SWIG_Py_Void();
19186 return resultobj;
19187 fail:
19188 return NULL;
19189 }
19190
19191
19192 SWIGINTERN PyObject *_wrap_ProductQuantizer_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19193 PyObject *resultobj = 0;
19194 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19195 void *argp1 = 0 ;
19196 int res1 = 0 ;
19197 PyObject * obj0 = 0 ;
19198 size_t result;
19199
19200 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_code_size_get",&obj0)) SWIG_fail;
19201 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19202 if (!SWIG_IsOK(res1)) {
19203 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_code_size_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19204 }
19205 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19206 result = (size_t) ((arg1)->code_size);
19207 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19208 return resultobj;
19209 fail:
19210 return NULL;
19211 }
19212
19213
19214 SWIGINTERN PyObject *_wrap_ProductQuantizer_ksub_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19215 PyObject *resultobj = 0;
19216 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19217 size_t arg2 ;
19218 void *argp1 = 0 ;
19219 int res1 = 0 ;
19220 size_t val2 ;
19221 int ecode2 = 0 ;
19222 PyObject * obj0 = 0 ;
19223 PyObject * obj1 = 0 ;
19224
19225 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_ksub_set",&obj0,&obj1)) SWIG_fail;
19226 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19227 if (!SWIG_IsOK(res1)) {
19228 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_ksub_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19229 }
19230 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19231 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19232 if (!SWIG_IsOK(ecode2)) {
19233 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_ksub_set" "', argument " "2"" of type '" "size_t""'");
19234 }
19235 arg2 = static_cast< size_t >(val2);
19236 if (arg1) (arg1)->ksub = arg2;
19237 resultobj = SWIG_Py_Void();
19238 return resultobj;
19239 fail:
19240 return NULL;
19241 }
19242
19243
19244 SWIGINTERN PyObject *_wrap_ProductQuantizer_ksub_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19245 PyObject *resultobj = 0;
19246 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19247 void *argp1 = 0 ;
19248 int res1 = 0 ;
19249 PyObject * obj0 = 0 ;
19250 size_t result;
19251
19252 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_ksub_get",&obj0)) SWIG_fail;
19253 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19254 if (!SWIG_IsOK(res1)) {
19255 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_ksub_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19256 }
19257 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19258 result = (size_t) ((arg1)->ksub);
19259 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
19260 return resultobj;
19261 fail:
19262 return NULL;
19263 }
19264
19265
19266 SWIGINTERN PyObject *_wrap_ProductQuantizer_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19267 PyObject *resultobj = 0;
19268 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19269 bool arg2 ;
19270 void *argp1 = 0 ;
19271 int res1 = 0 ;
19272 bool val2 ;
19273 int ecode2 = 0 ;
19274 PyObject * obj0 = 0 ;
19275 PyObject * obj1 = 0 ;
19276
19277 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_verbose_set",&obj0,&obj1)) SWIG_fail;
19278 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19279 if (!SWIG_IsOK(res1)) {
19280 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_verbose_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19281 }
19282 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19283 ecode2 = SWIG_AsVal_bool(obj1, &val2);
19284 if (!SWIG_IsOK(ecode2)) {
19285 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_verbose_set" "', argument " "2"" of type '" "bool""'");
19286 }
19287 arg2 = static_cast< bool >(val2);
19288 if (arg1) (arg1)->verbose = arg2;
19289 resultobj = SWIG_Py_Void();
19290 return resultobj;
19291 fail:
19292 return NULL;
19293 }
19294
19295
19296 SWIGINTERN PyObject *_wrap_ProductQuantizer_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19297 PyObject *resultobj = 0;
19298 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19299 void *argp1 = 0 ;
19300 int res1 = 0 ;
19301 PyObject * obj0 = 0 ;
19302 bool result;
19303
19304 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_verbose_get",&obj0)) SWIG_fail;
19305 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19306 if (!SWIG_IsOK(res1)) {
19307 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_verbose_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19308 }
19309 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19310 result = (bool) ((arg1)->verbose);
19311 resultobj = SWIG_From_bool(static_cast< bool >(result));
19312 return resultobj;
19313 fail:
19314 return NULL;
19315 }
19316
19317
19318 SWIGINTERN PyObject *_wrap_ProductQuantizer_train_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19319 PyObject *resultobj = 0;
19320 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19321 faiss::ProductQuantizer::train_type_t arg2 ;
19322 void *argp1 = 0 ;
19323 int res1 = 0 ;
19324 int val2 ;
19325 int ecode2 = 0 ;
19326 PyObject * obj0 = 0 ;
19327 PyObject * obj1 = 0 ;
19328
19329 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_train_type_set",&obj0,&obj1)) SWIG_fail;
19330 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19331 if (!SWIG_IsOK(res1)) {
19332 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_train_type_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19333 }
19334 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19335 ecode2 = SWIG_AsVal_int(obj1, &val2);
19336 if (!SWIG_IsOK(ecode2)) {
19337 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_train_type_set" "', argument " "2"" of type '" "faiss::ProductQuantizer::train_type_t""'");
19338 }
19339 arg2 = static_cast< faiss::ProductQuantizer::train_type_t >(val2);
19340 if (arg1) (arg1)->train_type = arg2;
19341 resultobj = SWIG_Py_Void();
19342 return resultobj;
19343 fail:
19344 return NULL;
19345 }
19346
19347
19348 SWIGINTERN PyObject *_wrap_ProductQuantizer_train_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19349 PyObject *resultobj = 0;
19350 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19351 void *argp1 = 0 ;
19352 int res1 = 0 ;
19353 PyObject * obj0 = 0 ;
19354 faiss::ProductQuantizer::train_type_t result;
19355
19356 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_train_type_get",&obj0)) SWIG_fail;
19357 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19358 if (!SWIG_IsOK(res1)) {
19359 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_train_type_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19360 }
19361 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19362 result = (faiss::ProductQuantizer::train_type_t) ((arg1)->train_type);
19363 resultobj = SWIG_From_int(static_cast< int >(result));
19364 return resultobj;
19365 fail:
19366 return NULL;
19367 }
19368
19369
19370 SWIGINTERN PyObject *_wrap_ProductQuantizer_cp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19371 PyObject *resultobj = 0;
19372 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19373 faiss::ClusteringParameters *arg2 = (faiss::ClusteringParameters *) 0 ;
19374 void *argp1 = 0 ;
19375 int res1 = 0 ;
19376 void *argp2 = 0 ;
19377 int res2 = 0 ;
19378 PyObject * obj0 = 0 ;
19379 PyObject * obj1 = 0 ;
19380
19381 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_cp_set",&obj0,&obj1)) SWIG_fail;
19382 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19383 if (!SWIG_IsOK(res1)) {
19384 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_cp_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19385 }
19386 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19387 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19388 if (!SWIG_IsOK(res2)) {
19389 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_cp_set" "', argument " "2"" of type '" "faiss::ClusteringParameters *""'");
19390 }
19391 arg2 = reinterpret_cast< faiss::ClusteringParameters * >(argp2);
19392 if (arg1) (arg1)->cp = *arg2;
19393 resultobj = SWIG_Py_Void();
19394 return resultobj;
19395 fail:
19396 return NULL;
19397 }
19398
19399
19400 SWIGINTERN PyObject *_wrap_ProductQuantizer_cp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19401 PyObject *resultobj = 0;
19402 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19403 void *argp1 = 0 ;
19404 int res1 = 0 ;
19405 PyObject * obj0 = 0 ;
19406 faiss::ClusteringParameters *result = 0 ;
19407
19408 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_cp_get",&obj0)) SWIG_fail;
19409 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19410 if (!SWIG_IsOK(res1)) {
19411 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_cp_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19412 }
19413 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19414 result = (faiss::ClusteringParameters *)& ((arg1)->cp);
19415 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
19416 return resultobj;
19417 fail:
19418 return NULL;
19419 }
19420
19421
19422 SWIGINTERN PyObject *_wrap_ProductQuantizer_assign_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19423 PyObject *resultobj = 0;
19424 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19425 faiss::Index *arg2 = (faiss::Index *) 0 ;
19426 void *argp1 = 0 ;
19427 int res1 = 0 ;
19428 void *argp2 = 0 ;
19429 int res2 = 0 ;
19430 PyObject * obj0 = 0 ;
19431 PyObject * obj1 = 0 ;
19432
19433 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_assign_index_set",&obj0,&obj1)) SWIG_fail;
19434 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19435 if (!SWIG_IsOK(res1)) {
19436 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_assign_index_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19437 }
19438 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19439 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
19440 if (!SWIG_IsOK(res2)) {
19441 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_assign_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
19442 }
19443 arg2 = reinterpret_cast< faiss::Index * >(argp2);
19444 if (arg1) (arg1)->assign_index = arg2;
19445 resultobj = SWIG_Py_Void();
19446 return resultobj;
19447 fail:
19448 return NULL;
19449 }
19450
19451
19452 SWIGINTERN PyObject *_wrap_ProductQuantizer_assign_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19453 PyObject *resultobj = 0;
19454 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19455 void *argp1 = 0 ;
19456 int res1 = 0 ;
19457 PyObject * obj0 = 0 ;
19458 faiss::Index *result = 0 ;
19459
19460 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_assign_index_get",&obj0)) SWIG_fail;
19461 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19462 if (!SWIG_IsOK(res1)) {
19463 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_assign_index_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19464 }
19465 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19466 result = (faiss::Index *) ((arg1)->assign_index);
19467 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
19468 return resultobj;
19469 fail:
19470 return NULL;
19471 }
19472
19473
19474 SWIGINTERN PyObject *_wrap_ProductQuantizer_centroids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19475 PyObject *resultobj = 0;
19476 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19477 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
19478 void *argp1 = 0 ;
19479 int res1 = 0 ;
19480 void *argp2 = 0 ;
19481 int res2 = 0 ;
19482 PyObject * obj0 = 0 ;
19483 PyObject * obj1 = 0 ;
19484
19485 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_centroids_set",&obj0,&obj1)) SWIG_fail;
19486 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19487 if (!SWIG_IsOK(res1)) {
19488 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_centroids_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19489 }
19490 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19491 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19492 if (!SWIG_IsOK(res2)) {
19493 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_centroids_set" "', argument " "2"" of type '" "std::vector< float > *""'");
19494 }
19495 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
19496 if (arg1) (arg1)->centroids = *arg2;
19497 resultobj = SWIG_Py_Void();
19498 return resultobj;
19499 fail:
19500 return NULL;
19501 }
19502
19503
19504 SWIGINTERN PyObject *_wrap_ProductQuantizer_centroids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19505 PyObject *resultobj = 0;
19506 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19507 void *argp1 = 0 ;
19508 int res1 = 0 ;
19509 PyObject * obj0 = 0 ;
19510 std::vector< float > *result = 0 ;
19511
19512 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_centroids_get",&obj0)) SWIG_fail;
19513 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19514 if (!SWIG_IsOK(res1)) {
19515 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_centroids_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19516 }
19517 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19518 result = (std::vector< float > *)& ((arg1)->centroids);
19519 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
19520 return resultobj;
19521 fail:
19522 return NULL;
19523 }
19524
19525
19526 SWIGINTERN PyObject *_wrap_ProductQuantizer_get_centroids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19527 PyObject *resultobj = 0;
19528 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19529 size_t arg2 ;
19530 size_t arg3 ;
19531 void *argp1 = 0 ;
19532 int res1 = 0 ;
19533 size_t val2 ;
19534 int ecode2 = 0 ;
19535 size_t val3 ;
19536 int ecode3 = 0 ;
19537 PyObject * obj0 = 0 ;
19538 PyObject * obj1 = 0 ;
19539 PyObject * obj2 = 0 ;
19540 float *result = 0 ;
19541
19542 if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_get_centroids",&obj0,&obj1,&obj2)) SWIG_fail;
19543 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19544 if (!SWIG_IsOK(res1)) {
19545 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_get_centroids" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19546 }
19547 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19548 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19549 if (!SWIG_IsOK(ecode2)) {
19550 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_get_centroids" "', argument " "2"" of type '" "size_t""'");
19551 }
19552 arg2 = static_cast< size_t >(val2);
19553 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
19554 if (!SWIG_IsOK(ecode3)) {
19555 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_get_centroids" "', argument " "3"" of type '" "size_t""'");
19556 }
19557 arg3 = static_cast< size_t >(val3);
19558 {
19559 Py_BEGIN_ALLOW_THREADS
19560 try {
19561 result = (float *)(arg1)->get_centroids(arg2,arg3);
19562 } catch(faiss::FaissException & e) {
19563 PyEval_RestoreThread(_save);
19564 PyErr_SetString(PyExc_RuntimeError, e.what());
19565 SWIG_fail;
19566 }
19567 Py_END_ALLOW_THREADS
19568 }
19569 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
19570 return resultobj;
19571 fail:
19572 return NULL;
19573 }
19574
19575
19576 SWIGINTERN PyObject *_wrap_ProductQuantizer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19577 PyObject *resultobj = 0;
19578 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19579 int arg2 ;
19580 float *arg3 = (float *) 0 ;
19581 void *argp1 = 0 ;
19582 int res1 = 0 ;
19583 int val2 ;
19584 int ecode2 = 0 ;
19585 void *argp3 = 0 ;
19586 int res3 = 0 ;
19587 PyObject * obj0 = 0 ;
19588 PyObject * obj1 = 0 ;
19589 PyObject * obj2 = 0 ;
19590
19591 if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
19592 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19593 if (!SWIG_IsOK(res1)) {
19594 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_train" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19595 }
19596 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19597 ecode2 = SWIG_AsVal_int(obj1, &val2);
19598 if (!SWIG_IsOK(ecode2)) {
19599 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_train" "', argument " "2"" of type '" "int""'");
19600 }
19601 arg2 = static_cast< int >(val2);
19602 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
19603 if (!SWIG_IsOK(res3)) {
19604 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_train" "', argument " "3"" of type '" "float const *""'");
19605 }
19606 arg3 = reinterpret_cast< float * >(argp3);
19607 {
19608 Py_BEGIN_ALLOW_THREADS
19609 try {
19610 (arg1)->train(arg2,(float const *)arg3);
19611 } catch(faiss::FaissException & e) {
19612 PyEval_RestoreThread(_save);
19613 PyErr_SetString(PyExc_RuntimeError, e.what());
19614 SWIG_fail;
19615 }
19616 Py_END_ALLOW_THREADS
19617 }
19618 resultobj = SWIG_Py_Void();
19619 return resultobj;
19620 fail:
19621 return NULL;
19622 }
19623
19624
19625 SWIGINTERN PyObject *_wrap_new_ProductQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19626 PyObject *resultobj = 0;
19627 size_t arg1 ;
19628 size_t arg2 ;
19629 size_t arg3 ;
19630 size_t val1 ;
19631 int ecode1 = 0 ;
19632 size_t val2 ;
19633 int ecode2 = 0 ;
19634 size_t val3 ;
19635 int ecode3 = 0 ;
19636 PyObject * obj0 = 0 ;
19637 PyObject * obj1 = 0 ;
19638 PyObject * obj2 = 0 ;
19639 faiss::ProductQuantizer *result = 0 ;
19640
19641 if (!PyArg_ParseTuple(args,(char *)"OOO:new_ProductQuantizer",&obj0,&obj1,&obj2)) SWIG_fail;
19642 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
19643 if (!SWIG_IsOK(ecode1)) {
19644 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ProductQuantizer" "', argument " "1"" of type '" "size_t""'");
19645 }
19646 arg1 = static_cast< size_t >(val1);
19647 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
19648 if (!SWIG_IsOK(ecode2)) {
19649 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ProductQuantizer" "', argument " "2"" of type '" "size_t""'");
19650 }
19651 arg2 = static_cast< size_t >(val2);
19652 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
19653 if (!SWIG_IsOK(ecode3)) {
19654 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ProductQuantizer" "', argument " "3"" of type '" "size_t""'");
19655 }
19656 arg3 = static_cast< size_t >(val3);
19657 {
19658 Py_BEGIN_ALLOW_THREADS
19659 try {
19660 result = (faiss::ProductQuantizer *)new faiss::ProductQuantizer(arg1,arg2,arg3);
19661 } catch(faiss::FaissException & e) {
19662 PyEval_RestoreThread(_save);
19663 PyErr_SetString(PyExc_RuntimeError, e.what());
19664 SWIG_fail;
19665 }
19666 Py_END_ALLOW_THREADS
19667 }
19668 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_NEW | 0 );
19669 return resultobj;
19670 fail:
19671 return NULL;
19672 }
19673
19674
19675 SWIGINTERN PyObject *_wrap_new_ProductQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19676 PyObject *resultobj = 0;
19677 faiss::ProductQuantizer *result = 0 ;
19678
19679 if (!PyArg_ParseTuple(args,(char *)":new_ProductQuantizer")) SWIG_fail;
19680 {
19681 Py_BEGIN_ALLOW_THREADS
19682 try {
19683 result = (faiss::ProductQuantizer *)new faiss::ProductQuantizer();
19684 } catch(faiss::FaissException & e) {
19685 PyEval_RestoreThread(_save);
19686 PyErr_SetString(PyExc_RuntimeError, e.what());
19687 SWIG_fail;
19688 }
19689 Py_END_ALLOW_THREADS
19690 }
19691 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_NEW | 0 );
19692 return resultobj;
19693 fail:
19694 return NULL;
19695 }
19696
19697
19698 SWIGINTERN PyObject *_wrap_new_ProductQuantizer(PyObject *self, PyObject *args) {
19699 Py_ssize_t argc;
19700 PyObject *argv[4] = {
19701 0
19702 };
19703 Py_ssize_t ii;
19704
19705 if (!PyTuple_Check(args)) SWIG_fail;
19706 argc = args ? PyObject_Length(args) : 0;
19707 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
19708 argv[ii] = PyTuple_GET_ITEM(args,ii);
19709 }
19710 if (argc == 0) {
19711 return _wrap_new_ProductQuantizer__SWIG_1(self, args);
19712 }
19713 if (argc == 3) {
19714 int _v;
19715 {
19716 int res = SWIG_AsVal_size_t(argv[0], NULL);
19717 _v = SWIG_CheckState(res);
19718 }
19719 if (_v) {
19720 {
19721 int res = SWIG_AsVal_size_t(argv[1], NULL);
19722 _v = SWIG_CheckState(res);
19723 }
19724 if (_v) {
19725 {
19726 int res = SWIG_AsVal_size_t(argv[2], NULL);
19727 _v = SWIG_CheckState(res);
19728 }
19729 if (_v) {
19730 return _wrap_new_ProductQuantizer__SWIG_0(self, args);
19731 }
19732 }
19733 }
19734 }
19735
19736 fail:
19737 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ProductQuantizer'.\n"
19738 " Possible C/C++ prototypes are:\n"
19739 " faiss::ProductQuantizer::ProductQuantizer(size_t,size_t,size_t)\n"
19740 " faiss::ProductQuantizer::ProductQuantizer()\n");
19741 return 0;
19742 }
19743
19744
19745 SWIGINTERN PyObject *_wrap_ProductQuantizer_set_derived_values(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19746 PyObject *resultobj = 0;
19747 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19748 void *argp1 = 0 ;
19749 int res1 = 0 ;
19750 PyObject * obj0 = 0 ;
19751
19752 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_set_derived_values",&obj0)) SWIG_fail;
19753 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19754 if (!SWIG_IsOK(res1)) {
19755 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_set_derived_values" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19756 }
19757 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19758 {
19759 Py_BEGIN_ALLOW_THREADS
19760 try {
19761 (arg1)->set_derived_values();
19762 } catch(faiss::FaissException & e) {
19763 PyEval_RestoreThread(_save);
19764 PyErr_SetString(PyExc_RuntimeError, e.what());
19765 SWIG_fail;
19766 }
19767 Py_END_ALLOW_THREADS
19768 }
19769 resultobj = SWIG_Py_Void();
19770 return resultobj;
19771 fail:
19772 return NULL;
19773 }
19774
19775
19776 SWIGINTERN PyObject *_wrap_ProductQuantizer_set_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19777 PyObject *resultobj = 0;
19778 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19779 float *arg2 = (float *) 0 ;
19780 int arg3 ;
19781 void *argp1 = 0 ;
19782 int res1 = 0 ;
19783 void *argp2 = 0 ;
19784 int res2 = 0 ;
19785 int val3 ;
19786 int ecode3 = 0 ;
19787 PyObject * obj0 = 0 ;
19788 PyObject * obj1 = 0 ;
19789 PyObject * obj2 = 0 ;
19790
19791 if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_set_params",&obj0,&obj1,&obj2)) SWIG_fail;
19792 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19793 if (!SWIG_IsOK(res1)) {
19794 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_set_params" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
19795 }
19796 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19797 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
19798 if (!SWIG_IsOK(res2)) {
19799 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_set_params" "', argument " "2"" of type '" "float const *""'");
19800 }
19801 arg2 = reinterpret_cast< float * >(argp2);
19802 ecode3 = SWIG_AsVal_int(obj2, &val3);
19803 if (!SWIG_IsOK(ecode3)) {
19804 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_set_params" "', argument " "3"" of type '" "int""'");
19805 }
19806 arg3 = static_cast< int >(val3);
19807 {
19808 Py_BEGIN_ALLOW_THREADS
19809 try {
19810 (arg1)->set_params((float const *)arg2,arg3);
19811 } catch(faiss::FaissException & e) {
19812 PyEval_RestoreThread(_save);
19813 PyErr_SetString(PyExc_RuntimeError, e.what());
19814 SWIG_fail;
19815 }
19816 Py_END_ALLOW_THREADS
19817 }
19818 resultobj = SWIG_Py_Void();
19819 return resultobj;
19820 fail:
19821 return NULL;
19822 }
19823
19824
19825 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19826 PyObject *resultobj = 0;
19827 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19828 float *arg2 = (float *) 0 ;
19829 uint8_t *arg3 = (uint8_t *) 0 ;
19830 void *argp1 = 0 ;
19831 int res1 = 0 ;
19832 void *argp2 = 0 ;
19833 int res2 = 0 ;
19834 void *argp3 = 0 ;
19835 int res3 = 0 ;
19836 PyObject * obj0 = 0 ;
19837 PyObject * obj1 = 0 ;
19838 PyObject * obj2 = 0 ;
19839
19840 if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_compute_code",&obj0,&obj1,&obj2)) SWIG_fail;
19841 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19842 if (!SWIG_IsOK(res1)) {
19843 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_code" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
19844 }
19845 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19846 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
19847 if (!SWIG_IsOK(res2)) {
19848 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_code" "', argument " "2"" of type '" "float const *""'");
19849 }
19850 arg2 = reinterpret_cast< float * >(argp2);
19851 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
19852 if (!SWIG_IsOK(res3)) {
19853 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_code" "', argument " "3"" of type '" "uint8_t *""'");
19854 }
19855 arg3 = reinterpret_cast< uint8_t * >(argp3);
19856 {
19857 Py_BEGIN_ALLOW_THREADS
19858 try {
19859 ((faiss::ProductQuantizer const *)arg1)->compute_code((float const *)arg2,arg3);
19860 } catch(faiss::FaissException & e) {
19861 PyEval_RestoreThread(_save);
19862 PyErr_SetString(PyExc_RuntimeError, e.what());
19863 SWIG_fail;
19864 }
19865 Py_END_ALLOW_THREADS
19866 }
19867 resultobj = SWIG_Py_Void();
19868 return resultobj;
19869 fail:
19870 return NULL;
19871 }
19872
19873
19874 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19875 PyObject *resultobj = 0;
19876 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19877 float *arg2 = (float *) 0 ;
19878 uint8_t *arg3 = (uint8_t *) 0 ;
19879 size_t arg4 ;
19880 void *argp1 = 0 ;
19881 int res1 = 0 ;
19882 void *argp2 = 0 ;
19883 int res2 = 0 ;
19884 void *argp3 = 0 ;
19885 int res3 = 0 ;
19886 size_t val4 ;
19887 int ecode4 = 0 ;
19888 PyObject * obj0 = 0 ;
19889 PyObject * obj1 = 0 ;
19890 PyObject * obj2 = 0 ;
19891 PyObject * obj3 = 0 ;
19892
19893 if (!PyArg_ParseTuple(args,(char *)"OOOO:ProductQuantizer_compute_codes",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
19894 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19895 if (!SWIG_IsOK(res1)) {
19896 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_codes" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
19897 }
19898 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19899 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
19900 if (!SWIG_IsOK(res2)) {
19901 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_codes" "', argument " "2"" of type '" "float const *""'");
19902 }
19903 arg2 = reinterpret_cast< float * >(argp2);
19904 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
19905 if (!SWIG_IsOK(res3)) {
19906 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_codes" "', argument " "3"" of type '" "uint8_t *""'");
19907 }
19908 arg3 = reinterpret_cast< uint8_t * >(argp3);
19909 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
19910 if (!SWIG_IsOK(ecode4)) {
19911 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProductQuantizer_compute_codes" "', argument " "4"" of type '" "size_t""'");
19912 }
19913 arg4 = static_cast< size_t >(val4);
19914 {
19915 Py_BEGIN_ALLOW_THREADS
19916 try {
19917 ((faiss::ProductQuantizer const *)arg1)->compute_codes((float const *)arg2,arg3,arg4);
19918 } catch(faiss::FaissException & e) {
19919 PyEval_RestoreThread(_save);
19920 PyErr_SetString(PyExc_RuntimeError, e.what());
19921 SWIG_fail;
19922 }
19923 Py_END_ALLOW_THREADS
19924 }
19925 resultobj = SWIG_Py_Void();
19926 return resultobj;
19927 fail:
19928 return NULL;
19929 }
19930
19931
19932 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19933 PyObject *resultobj = 0;
19934 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19935 uint8_t *arg2 = (uint8_t *) 0 ;
19936 float *arg3 = (float *) 0 ;
19937 void *argp1 = 0 ;
19938 int res1 = 0 ;
19939 void *argp2 = 0 ;
19940 int res2 = 0 ;
19941 void *argp3 = 0 ;
19942 int res3 = 0 ;
19943 PyObject * obj0 = 0 ;
19944 PyObject * obj1 = 0 ;
19945 PyObject * obj2 = 0 ;
19946
19947 if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_decode",&obj0,&obj1,&obj2)) SWIG_fail;
19948 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
19949 if (!SWIG_IsOK(res1)) {
19950 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_decode" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
19951 }
19952 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
19953 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
19954 if (!SWIG_IsOK(res2)) {
19955 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_decode" "', argument " "2"" of type '" "uint8_t const *""'");
19956 }
19957 arg2 = reinterpret_cast< uint8_t * >(argp2);
19958 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
19959 if (!SWIG_IsOK(res3)) {
19960 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_decode" "', argument " "3"" of type '" "float *""'");
19961 }
19962 arg3 = reinterpret_cast< float * >(argp3);
19963 {
19964 Py_BEGIN_ALLOW_THREADS
19965 try {
19966 ((faiss::ProductQuantizer const *)arg1)->decode((uint8_t const *)arg2,arg3);
19967 } catch(faiss::FaissException & e) {
19968 PyEval_RestoreThread(_save);
19969 PyErr_SetString(PyExc_RuntimeError, e.what());
19970 SWIG_fail;
19971 }
19972 Py_END_ALLOW_THREADS
19973 }
19974 resultobj = SWIG_Py_Void();
19975 return resultobj;
19976 fail:
19977 return NULL;
19978 }
19979
19980
19981 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
19982 PyObject *resultobj = 0;
19983 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
19984 uint8_t *arg2 = (uint8_t *) 0 ;
19985 float *arg3 = (float *) 0 ;
19986 size_t arg4 ;
19987 void *argp1 = 0 ;
19988 int res1 = 0 ;
19989 void *argp2 = 0 ;
19990 int res2 = 0 ;
19991 void *argp3 = 0 ;
19992 int res3 = 0 ;
19993 size_t val4 ;
19994 int ecode4 = 0 ;
19995 PyObject * obj0 = 0 ;
19996 PyObject * obj1 = 0 ;
19997 PyObject * obj2 = 0 ;
19998 PyObject * obj3 = 0 ;
19999
20000 if (!PyArg_ParseTuple(args,(char *)"OOOO:ProductQuantizer_decode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
20001 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20002 if (!SWIG_IsOK(res1)) {
20003 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_decode" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20004 }
20005 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20006 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
20007 if (!SWIG_IsOK(res2)) {
20008 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_decode" "', argument " "2"" of type '" "uint8_t const *""'");
20009 }
20010 arg2 = reinterpret_cast< uint8_t * >(argp2);
20011 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20012 if (!SWIG_IsOK(res3)) {
20013 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_decode" "', argument " "3"" of type '" "float *""'");
20014 }
20015 arg3 = reinterpret_cast< float * >(argp3);
20016 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
20017 if (!SWIG_IsOK(ecode4)) {
20018 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ProductQuantizer_decode" "', argument " "4"" of type '" "size_t""'");
20019 }
20020 arg4 = static_cast< size_t >(val4);
20021 {
20022 Py_BEGIN_ALLOW_THREADS
20023 try {
20024 ((faiss::ProductQuantizer const *)arg1)->decode((uint8_t const *)arg2,arg3,arg4);
20025 } catch(faiss::FaissException & e) {
20026 PyEval_RestoreThread(_save);
20027 PyErr_SetString(PyExc_RuntimeError, e.what());
20028 SWIG_fail;
20029 }
20030 Py_END_ALLOW_THREADS
20031 }
20032 resultobj = SWIG_Py_Void();
20033 return resultobj;
20034 fail:
20035 return NULL;
20036 }
20037
20038
20039 SWIGINTERN PyObject *_wrap_ProductQuantizer_decode(PyObject *self, PyObject *args) {
20040 Py_ssize_t argc;
20041 PyObject *argv[5] = {
20042 0
20043 };
20044 Py_ssize_t ii;
20045
20046 if (!PyTuple_Check(args)) SWIG_fail;
20047 argc = args ? PyObject_Length(args) : 0;
20048 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
20049 argv[ii] = PyTuple_GET_ITEM(args,ii);
20050 }
20051 if (argc == 3) {
20052 int _v;
20053 void *vptr = 0;
20054 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
20055 _v = SWIG_CheckState(res);
20056 if (_v) {
20057 void *vptr = 0;
20058 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
20059 _v = SWIG_CheckState(res);
20060 if (_v) {
20061 void *vptr = 0;
20062 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
20063 _v = SWIG_CheckState(res);
20064 if (_v) {
20065 return _wrap_ProductQuantizer_decode__SWIG_0(self, args);
20066 }
20067 }
20068 }
20069 }
20070 if (argc == 4) {
20071 int _v;
20072 void *vptr = 0;
20073 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
20074 _v = SWIG_CheckState(res);
20075 if (_v) {
20076 void *vptr = 0;
20077 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
20078 _v = SWIG_CheckState(res);
20079 if (_v) {
20080 void *vptr = 0;
20081 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
20082 _v = SWIG_CheckState(res);
20083 if (_v) {
20084 {
20085 int res = SWIG_AsVal_size_t(argv[3], NULL);
20086 _v = SWIG_CheckState(res);
20087 }
20088 if (_v) {
20089 return _wrap_ProductQuantizer_decode__SWIG_1(self, args);
20090 }
20091 }
20092 }
20093 }
20094 }
20095
20096 fail:
20097 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProductQuantizer_decode'.\n"
20098 " Possible C/C++ prototypes are:\n"
20099 " faiss::ProductQuantizer::decode(uint8_t const *,float *) const\n"
20100 " faiss::ProductQuantizer::decode(uint8_t const *,float *,size_t) const\n");
20101 return 0;
20102 }
20103
20104
20105 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_code_from_distance_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20106 PyObject *resultobj = 0;
20107 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20108 float *arg2 = (float *) 0 ;
20109 uint8_t *arg3 = (uint8_t *) 0 ;
20110 void *argp1 = 0 ;
20111 int res1 = 0 ;
20112 void *argp2 = 0 ;
20113 int res2 = 0 ;
20114 void *argp3 = 0 ;
20115 int res3 = 0 ;
20116 PyObject * obj0 = 0 ;
20117 PyObject * obj1 = 0 ;
20118 PyObject * obj2 = 0 ;
20119
20120 if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_compute_code_from_distance_table",&obj0,&obj1,&obj2)) SWIG_fail;
20121 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20122 if (!SWIG_IsOK(res1)) {
20123 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20124 }
20125 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20126 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20127 if (!SWIG_IsOK(res2)) {
20128 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "2"" of type '" "float const *""'");
20129 }
20130 arg2 = reinterpret_cast< float * >(argp2);
20131 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
20132 if (!SWIG_IsOK(res3)) {
20133 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_code_from_distance_table" "', argument " "3"" of type '" "uint8_t *""'");
20134 }
20135 arg3 = reinterpret_cast< uint8_t * >(argp3);
20136 {
20137 Py_BEGIN_ALLOW_THREADS
20138 try {
20139 ((faiss::ProductQuantizer const *)arg1)->compute_code_from_distance_table((float const *)arg2,arg3);
20140 } catch(faiss::FaissException & e) {
20141 PyEval_RestoreThread(_save);
20142 PyErr_SetString(PyExc_RuntimeError, e.what());
20143 SWIG_fail;
20144 }
20145 Py_END_ALLOW_THREADS
20146 }
20147 resultobj = SWIG_Py_Void();
20148 return resultobj;
20149 fail:
20150 return NULL;
20151 }
20152
20153
20154 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_distance_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20155 PyObject *resultobj = 0;
20156 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20157 float *arg2 = (float *) 0 ;
20158 float *arg3 = (float *) 0 ;
20159 void *argp1 = 0 ;
20160 int res1 = 0 ;
20161 void *argp2 = 0 ;
20162 int res2 = 0 ;
20163 void *argp3 = 0 ;
20164 int res3 = 0 ;
20165 PyObject * obj0 = 0 ;
20166 PyObject * obj1 = 0 ;
20167 PyObject * obj2 = 0 ;
20168
20169 if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_compute_distance_table",&obj0,&obj1,&obj2)) SWIG_fail;
20170 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20171 if (!SWIG_IsOK(res1)) {
20172 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_distance_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20173 }
20174 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20175 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20176 if (!SWIG_IsOK(res2)) {
20177 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_distance_table" "', argument " "2"" of type '" "float const *""'");
20178 }
20179 arg2 = reinterpret_cast< float * >(argp2);
20180 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20181 if (!SWIG_IsOK(res3)) {
20182 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_distance_table" "', argument " "3"" of type '" "float *""'");
20183 }
20184 arg3 = reinterpret_cast< float * >(argp3);
20185 {
20186 Py_BEGIN_ALLOW_THREADS
20187 try {
20188 ((faiss::ProductQuantizer const *)arg1)->compute_distance_table((float const *)arg2,arg3);
20189 } catch(faiss::FaissException & e) {
20190 PyEval_RestoreThread(_save);
20191 PyErr_SetString(PyExc_RuntimeError, e.what());
20192 SWIG_fail;
20193 }
20194 Py_END_ALLOW_THREADS
20195 }
20196 resultobj = SWIG_Py_Void();
20197 return resultobj;
20198 fail:
20199 return NULL;
20200 }
20201
20202
20203 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_inner_prod_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20204 PyObject *resultobj = 0;
20205 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20206 float *arg2 = (float *) 0 ;
20207 float *arg3 = (float *) 0 ;
20208 void *argp1 = 0 ;
20209 int res1 = 0 ;
20210 void *argp2 = 0 ;
20211 int res2 = 0 ;
20212 void *argp3 = 0 ;
20213 int res3 = 0 ;
20214 PyObject * obj0 = 0 ;
20215 PyObject * obj1 = 0 ;
20216 PyObject * obj2 = 0 ;
20217
20218 if (!PyArg_ParseTuple(args,(char *)"OOO:ProductQuantizer_compute_inner_prod_table",&obj0,&obj1,&obj2)) SWIG_fail;
20219 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20220 if (!SWIG_IsOK(res1)) {
20221 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20222 }
20223 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20224 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20225 if (!SWIG_IsOK(res2)) {
20226 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "2"" of type '" "float const *""'");
20227 }
20228 arg2 = reinterpret_cast< float * >(argp2);
20229 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20230 if (!SWIG_IsOK(res3)) {
20231 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_inner_prod_table" "', argument " "3"" of type '" "float *""'");
20232 }
20233 arg3 = reinterpret_cast< float * >(argp3);
20234 {
20235 Py_BEGIN_ALLOW_THREADS
20236 try {
20237 ((faiss::ProductQuantizer const *)arg1)->compute_inner_prod_table((float const *)arg2,arg3);
20238 } catch(faiss::FaissException & e) {
20239 PyEval_RestoreThread(_save);
20240 PyErr_SetString(PyExc_RuntimeError, e.what());
20241 SWIG_fail;
20242 }
20243 Py_END_ALLOW_THREADS
20244 }
20245 resultobj = SWIG_Py_Void();
20246 return resultobj;
20247 fail:
20248 return NULL;
20249 }
20250
20251
20252 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_distance_tables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20253 PyObject *resultobj = 0;
20254 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20255 size_t arg2 ;
20256 float *arg3 = (float *) 0 ;
20257 float *arg4 = (float *) 0 ;
20258 void *argp1 = 0 ;
20259 int res1 = 0 ;
20260 size_t val2 ;
20261 int ecode2 = 0 ;
20262 void *argp3 = 0 ;
20263 int res3 = 0 ;
20264 void *argp4 = 0 ;
20265 int res4 = 0 ;
20266 PyObject * obj0 = 0 ;
20267 PyObject * obj1 = 0 ;
20268 PyObject * obj2 = 0 ;
20269 PyObject * obj3 = 0 ;
20270
20271 if (!PyArg_ParseTuple(args,(char *)"OOOO:ProductQuantizer_compute_distance_tables",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
20272 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20273 if (!SWIG_IsOK(res1)) {
20274 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_distance_tables" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20275 }
20276 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20277 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20278 if (!SWIG_IsOK(ecode2)) {
20279 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_compute_distance_tables" "', argument " "2"" of type '" "size_t""'");
20280 }
20281 arg2 = static_cast< size_t >(val2);
20282 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20283 if (!SWIG_IsOK(res3)) {
20284 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_distance_tables" "', argument " "3"" of type '" "float const *""'");
20285 }
20286 arg3 = reinterpret_cast< float * >(argp3);
20287 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
20288 if (!SWIG_IsOK(res4)) {
20289 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_compute_distance_tables" "', argument " "4"" of type '" "float *""'");
20290 }
20291 arg4 = reinterpret_cast< float * >(argp4);
20292 {
20293 Py_BEGIN_ALLOW_THREADS
20294 try {
20295 ((faiss::ProductQuantizer const *)arg1)->compute_distance_tables(arg2,(float const *)arg3,arg4);
20296 } catch(faiss::FaissException & e) {
20297 PyEval_RestoreThread(_save);
20298 PyErr_SetString(PyExc_RuntimeError, e.what());
20299 SWIG_fail;
20300 }
20301 Py_END_ALLOW_THREADS
20302 }
20303 resultobj = SWIG_Py_Void();
20304 return resultobj;
20305 fail:
20306 return NULL;
20307 }
20308
20309
20310 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_inner_prod_tables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20311 PyObject *resultobj = 0;
20312 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20313 size_t arg2 ;
20314 float *arg3 = (float *) 0 ;
20315 float *arg4 = (float *) 0 ;
20316 void *argp1 = 0 ;
20317 int res1 = 0 ;
20318 size_t val2 ;
20319 int ecode2 = 0 ;
20320 void *argp3 = 0 ;
20321 int res3 = 0 ;
20322 void *argp4 = 0 ;
20323 int res4 = 0 ;
20324 PyObject * obj0 = 0 ;
20325 PyObject * obj1 = 0 ;
20326 PyObject * obj2 = 0 ;
20327 PyObject * obj3 = 0 ;
20328
20329 if (!PyArg_ParseTuple(args,(char *)"OOOO:ProductQuantizer_compute_inner_prod_tables",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
20330 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20331 if (!SWIG_IsOK(res1)) {
20332 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20333 }
20334 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20335 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
20336 if (!SWIG_IsOK(ecode2)) {
20337 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "2"" of type '" "size_t""'");
20338 }
20339 arg2 = static_cast< size_t >(val2);
20340 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
20341 if (!SWIG_IsOK(res3)) {
20342 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "3"" of type '" "float const *""'");
20343 }
20344 arg3 = reinterpret_cast< float * >(argp3);
20345 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
20346 if (!SWIG_IsOK(res4)) {
20347 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_compute_inner_prod_tables" "', argument " "4"" of type '" "float *""'");
20348 }
20349 arg4 = reinterpret_cast< float * >(argp4);
20350 {
20351 Py_BEGIN_ALLOW_THREADS
20352 try {
20353 ((faiss::ProductQuantizer const *)arg1)->compute_inner_prod_tables(arg2,(float const *)arg3,arg4);
20354 } catch(faiss::FaissException & e) {
20355 PyEval_RestoreThread(_save);
20356 PyErr_SetString(PyExc_RuntimeError, e.what());
20357 SWIG_fail;
20358 }
20359 Py_END_ALLOW_THREADS
20360 }
20361 resultobj = SWIG_Py_Void();
20362 return resultobj;
20363 fail:
20364 return NULL;
20365 }
20366
20367
20368 SWIGINTERN PyObject *_wrap_ProductQuantizer_search__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20369 PyObject *resultobj = 0;
20370 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20371 float *arg2 = (float *) 0 ;
20372 size_t arg3 ;
20373 uint8_t *arg4 = (uint8_t *) 0 ;
20374 size_t arg5 ;
20375 faiss::float_maxheap_array_t *arg6 = (faiss::float_maxheap_array_t *) 0 ;
20376 bool arg7 ;
20377 void *argp1 = 0 ;
20378 int res1 = 0 ;
20379 void *argp2 = 0 ;
20380 int res2 = 0 ;
20381 size_t val3 ;
20382 int ecode3 = 0 ;
20383 void *argp4 = 0 ;
20384 int res4 = 0 ;
20385 size_t val5 ;
20386 int ecode5 = 0 ;
20387 void *argp6 = 0 ;
20388 int res6 = 0 ;
20389 bool val7 ;
20390 int ecode7 = 0 ;
20391 PyObject * obj0 = 0 ;
20392 PyObject * obj1 = 0 ;
20393 PyObject * obj2 = 0 ;
20394 PyObject * obj3 = 0 ;
20395 PyObject * obj4 = 0 ;
20396 PyObject * obj5 = 0 ;
20397 PyObject * obj6 = 0 ;
20398
20399 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:ProductQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
20400 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20401 if (!SWIG_IsOK(res1)) {
20402 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20403 }
20404 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20405 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20406 if (!SWIG_IsOK(res2)) {
20407 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search" "', argument " "2"" of type '" "float const *""'");
20408 }
20409 arg2 = reinterpret_cast< float * >(argp2);
20410 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20411 if (!SWIG_IsOK(ecode3)) {
20412 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search" "', argument " "3"" of type '" "size_t""'");
20413 }
20414 arg3 = static_cast< size_t >(val3);
20415 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
20416 if (!SWIG_IsOK(res4)) {
20417 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search" "', argument " "4"" of type '" "uint8_t const *""'");
20418 }
20419 arg4 = reinterpret_cast< uint8_t * >(argp4);
20420 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
20421 if (!SWIG_IsOK(ecode5)) {
20422 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search" "', argument " "5"" of type '" "size_t""'");
20423 }
20424 arg5 = static_cast< size_t >(val5);
20425 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
20426 if (!SWIG_IsOK(res6)) {
20427 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
20428 }
20429 arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
20430 ecode7 = SWIG_AsVal_bool(obj6, &val7);
20431 if (!SWIG_IsOK(ecode7)) {
20432 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ProductQuantizer_search" "', argument " "7"" of type '" "bool""'");
20433 }
20434 arg7 = static_cast< bool >(val7);
20435 {
20436 Py_BEGIN_ALLOW_THREADS
20437 try {
20438 ((faiss::ProductQuantizer const *)arg1)->search((float const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6,arg7);
20439 } catch(faiss::FaissException & e) {
20440 PyEval_RestoreThread(_save);
20441 PyErr_SetString(PyExc_RuntimeError, e.what());
20442 SWIG_fail;
20443 }
20444 Py_END_ALLOW_THREADS
20445 }
20446 resultobj = SWIG_Py_Void();
20447 return resultobj;
20448 fail:
20449 return NULL;
20450 }
20451
20452
20453 SWIGINTERN PyObject *_wrap_ProductQuantizer_search__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20454 PyObject *resultobj = 0;
20455 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20456 float *arg2 = (float *) 0 ;
20457 size_t arg3 ;
20458 uint8_t *arg4 = (uint8_t *) 0 ;
20459 size_t arg5 ;
20460 faiss::float_maxheap_array_t *arg6 = (faiss::float_maxheap_array_t *) 0 ;
20461 void *argp1 = 0 ;
20462 int res1 = 0 ;
20463 void *argp2 = 0 ;
20464 int res2 = 0 ;
20465 size_t val3 ;
20466 int ecode3 = 0 ;
20467 void *argp4 = 0 ;
20468 int res4 = 0 ;
20469 size_t val5 ;
20470 int ecode5 = 0 ;
20471 void *argp6 = 0 ;
20472 int res6 = 0 ;
20473 PyObject * obj0 = 0 ;
20474 PyObject * obj1 = 0 ;
20475 PyObject * obj2 = 0 ;
20476 PyObject * obj3 = 0 ;
20477 PyObject * obj4 = 0 ;
20478 PyObject * obj5 = 0 ;
20479
20480 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ProductQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
20481 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20482 if (!SWIG_IsOK(res1)) {
20483 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20484 }
20485 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20486 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20487 if (!SWIG_IsOK(res2)) {
20488 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search" "', argument " "2"" of type '" "float const *""'");
20489 }
20490 arg2 = reinterpret_cast< float * >(argp2);
20491 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20492 if (!SWIG_IsOK(ecode3)) {
20493 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search" "', argument " "3"" of type '" "size_t""'");
20494 }
20495 arg3 = static_cast< size_t >(val3);
20496 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
20497 if (!SWIG_IsOK(res4)) {
20498 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search" "', argument " "4"" of type '" "uint8_t const *""'");
20499 }
20500 arg4 = reinterpret_cast< uint8_t * >(argp4);
20501 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
20502 if (!SWIG_IsOK(ecode5)) {
20503 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search" "', argument " "5"" of type '" "size_t""'");
20504 }
20505 arg5 = static_cast< size_t >(val5);
20506 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
20507 if (!SWIG_IsOK(res6)) {
20508 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
20509 }
20510 arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
20511 {
20512 Py_BEGIN_ALLOW_THREADS
20513 try {
20514 ((faiss::ProductQuantizer const *)arg1)->search((float const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6);
20515 } catch(faiss::FaissException & e) {
20516 PyEval_RestoreThread(_save);
20517 PyErr_SetString(PyExc_RuntimeError, e.what());
20518 SWIG_fail;
20519 }
20520 Py_END_ALLOW_THREADS
20521 }
20522 resultobj = SWIG_Py_Void();
20523 return resultobj;
20524 fail:
20525 return NULL;
20526 }
20527
20528
20529 SWIGINTERN PyObject *_wrap_ProductQuantizer_search(PyObject *self, PyObject *args) {
20530 Py_ssize_t argc;
20531 PyObject *argv[8] = {
20532 0
20533 };
20534 Py_ssize_t ii;
20535
20536 if (!PyTuple_Check(args)) SWIG_fail;
20537 argc = args ? PyObject_Length(args) : 0;
20538 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
20539 argv[ii] = PyTuple_GET_ITEM(args,ii);
20540 }
20541 if (argc == 6) {
20542 int _v;
20543 void *vptr = 0;
20544 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
20545 _v = SWIG_CheckState(res);
20546 if (_v) {
20547 void *vptr = 0;
20548 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
20549 _v = SWIG_CheckState(res);
20550 if (_v) {
20551 {
20552 int res = SWIG_AsVal_size_t(argv[2], NULL);
20553 _v = SWIG_CheckState(res);
20554 }
20555 if (_v) {
20556 void *vptr = 0;
20557 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
20558 _v = SWIG_CheckState(res);
20559 if (_v) {
20560 {
20561 int res = SWIG_AsVal_size_t(argv[4], NULL);
20562 _v = SWIG_CheckState(res);
20563 }
20564 if (_v) {
20565 void *vptr = 0;
20566 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
20567 _v = SWIG_CheckState(res);
20568 if (_v) {
20569 return _wrap_ProductQuantizer_search__SWIG_1(self, args);
20570 }
20571 }
20572 }
20573 }
20574 }
20575 }
20576 }
20577 if (argc == 7) {
20578 int _v;
20579 void *vptr = 0;
20580 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
20581 _v = SWIG_CheckState(res);
20582 if (_v) {
20583 void *vptr = 0;
20584 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
20585 _v = SWIG_CheckState(res);
20586 if (_v) {
20587 {
20588 int res = SWIG_AsVal_size_t(argv[2], NULL);
20589 _v = SWIG_CheckState(res);
20590 }
20591 if (_v) {
20592 void *vptr = 0;
20593 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
20594 _v = SWIG_CheckState(res);
20595 if (_v) {
20596 {
20597 int res = SWIG_AsVal_size_t(argv[4], NULL);
20598 _v = SWIG_CheckState(res);
20599 }
20600 if (_v) {
20601 void *vptr = 0;
20602 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
20603 _v = SWIG_CheckState(res);
20604 if (_v) {
20605 {
20606 int res = SWIG_AsVal_bool(argv[6], NULL);
20607 _v = SWIG_CheckState(res);
20608 }
20609 if (_v) {
20610 return _wrap_ProductQuantizer_search__SWIG_0(self, args);
20611 }
20612 }
20613 }
20614 }
20615 }
20616 }
20617 }
20618 }
20619
20620 fail:
20621 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search'.\n"
20622 " Possible C/C++ prototypes are:\n"
20623 " faiss::ProductQuantizer::search(float const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *,bool) const\n"
20624 " faiss::ProductQuantizer::search(float const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *) const\n");
20625 return 0;
20626 }
20627
20628
20629 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20630 PyObject *resultobj = 0;
20631 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20632 float *arg2 = (float *) 0 ;
20633 size_t arg3 ;
20634 uint8_t *arg4 = (uint8_t *) 0 ;
20635 size_t arg5 ;
20636 faiss::float_minheap_array_t *arg6 = (faiss::float_minheap_array_t *) 0 ;
20637 bool arg7 ;
20638 void *argp1 = 0 ;
20639 int res1 = 0 ;
20640 void *argp2 = 0 ;
20641 int res2 = 0 ;
20642 size_t val3 ;
20643 int ecode3 = 0 ;
20644 void *argp4 = 0 ;
20645 int res4 = 0 ;
20646 size_t val5 ;
20647 int ecode5 = 0 ;
20648 void *argp6 = 0 ;
20649 int res6 = 0 ;
20650 bool val7 ;
20651 int ecode7 = 0 ;
20652 PyObject * obj0 = 0 ;
20653 PyObject * obj1 = 0 ;
20654 PyObject * obj2 = 0 ;
20655 PyObject * obj3 = 0 ;
20656 PyObject * obj4 = 0 ;
20657 PyObject * obj5 = 0 ;
20658 PyObject * obj6 = 0 ;
20659
20660 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:ProductQuantizer_search_ip",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
20661 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20662 if (!SWIG_IsOK(res1)) {
20663 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search_ip" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20664 }
20665 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20666 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20667 if (!SWIG_IsOK(res2)) {
20668 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search_ip" "', argument " "2"" of type '" "float const *""'");
20669 }
20670 arg2 = reinterpret_cast< float * >(argp2);
20671 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20672 if (!SWIG_IsOK(ecode3)) {
20673 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search_ip" "', argument " "3"" of type '" "size_t""'");
20674 }
20675 arg3 = static_cast< size_t >(val3);
20676 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
20677 if (!SWIG_IsOK(res4)) {
20678 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search_ip" "', argument " "4"" of type '" "uint8_t const *""'");
20679 }
20680 arg4 = reinterpret_cast< uint8_t * >(argp4);
20681 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
20682 if (!SWIG_IsOK(ecode5)) {
20683 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search_ip" "', argument " "5"" of type '" "size_t""'");
20684 }
20685 arg5 = static_cast< size_t >(val5);
20686 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
20687 if (!SWIG_IsOK(res6)) {
20688 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search_ip" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
20689 }
20690 arg6 = reinterpret_cast< faiss::float_minheap_array_t * >(argp6);
20691 ecode7 = SWIG_AsVal_bool(obj6, &val7);
20692 if (!SWIG_IsOK(ecode7)) {
20693 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ProductQuantizer_search_ip" "', argument " "7"" of type '" "bool""'");
20694 }
20695 arg7 = static_cast< bool >(val7);
20696 {
20697 Py_BEGIN_ALLOW_THREADS
20698 try {
20699 ((faiss::ProductQuantizer const *)arg1)->search_ip((float const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6,arg7);
20700 } catch(faiss::FaissException & e) {
20701 PyEval_RestoreThread(_save);
20702 PyErr_SetString(PyExc_RuntimeError, e.what());
20703 SWIG_fail;
20704 }
20705 Py_END_ALLOW_THREADS
20706 }
20707 resultobj = SWIG_Py_Void();
20708 return resultobj;
20709 fail:
20710 return NULL;
20711 }
20712
20713
20714 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20715 PyObject *resultobj = 0;
20716 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20717 float *arg2 = (float *) 0 ;
20718 size_t arg3 ;
20719 uint8_t *arg4 = (uint8_t *) 0 ;
20720 size_t arg5 ;
20721 faiss::float_minheap_array_t *arg6 = (faiss::float_minheap_array_t *) 0 ;
20722 void *argp1 = 0 ;
20723 int res1 = 0 ;
20724 void *argp2 = 0 ;
20725 int res2 = 0 ;
20726 size_t val3 ;
20727 int ecode3 = 0 ;
20728 void *argp4 = 0 ;
20729 int res4 = 0 ;
20730 size_t val5 ;
20731 int ecode5 = 0 ;
20732 void *argp6 = 0 ;
20733 int res6 = 0 ;
20734 PyObject * obj0 = 0 ;
20735 PyObject * obj1 = 0 ;
20736 PyObject * obj2 = 0 ;
20737 PyObject * obj3 = 0 ;
20738 PyObject * obj4 = 0 ;
20739 PyObject * obj5 = 0 ;
20740
20741 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ProductQuantizer_search_ip",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
20742 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20743 if (!SWIG_IsOK(res1)) {
20744 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search_ip" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
20745 }
20746 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20747 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
20748 if (!SWIG_IsOK(res2)) {
20749 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search_ip" "', argument " "2"" of type '" "float const *""'");
20750 }
20751 arg2 = reinterpret_cast< float * >(argp2);
20752 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
20753 if (!SWIG_IsOK(ecode3)) {
20754 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search_ip" "', argument " "3"" of type '" "size_t""'");
20755 }
20756 arg3 = static_cast< size_t >(val3);
20757 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
20758 if (!SWIG_IsOK(res4)) {
20759 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search_ip" "', argument " "4"" of type '" "uint8_t const *""'");
20760 }
20761 arg4 = reinterpret_cast< uint8_t * >(argp4);
20762 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
20763 if (!SWIG_IsOK(ecode5)) {
20764 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search_ip" "', argument " "5"" of type '" "size_t""'");
20765 }
20766 arg5 = static_cast< size_t >(val5);
20767 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
20768 if (!SWIG_IsOK(res6)) {
20769 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search_ip" "', argument " "6"" of type '" "faiss::float_minheap_array_t *""'");
20770 }
20771 arg6 = reinterpret_cast< faiss::float_minheap_array_t * >(argp6);
20772 {
20773 Py_BEGIN_ALLOW_THREADS
20774 try {
20775 ((faiss::ProductQuantizer const *)arg1)->search_ip((float const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6);
20776 } catch(faiss::FaissException & e) {
20777 PyEval_RestoreThread(_save);
20778 PyErr_SetString(PyExc_RuntimeError, e.what());
20779 SWIG_fail;
20780 }
20781 Py_END_ALLOW_THREADS
20782 }
20783 resultobj = SWIG_Py_Void();
20784 return resultobj;
20785 fail:
20786 return NULL;
20787 }
20788
20789
20790 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_ip(PyObject *self, PyObject *args) {
20791 Py_ssize_t argc;
20792 PyObject *argv[8] = {
20793 0
20794 };
20795 Py_ssize_t ii;
20796
20797 if (!PyTuple_Check(args)) SWIG_fail;
20798 argc = args ? PyObject_Length(args) : 0;
20799 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
20800 argv[ii] = PyTuple_GET_ITEM(args,ii);
20801 }
20802 if (argc == 6) {
20803 int _v;
20804 void *vptr = 0;
20805 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
20806 _v = SWIG_CheckState(res);
20807 if (_v) {
20808 void *vptr = 0;
20809 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
20810 _v = SWIG_CheckState(res);
20811 if (_v) {
20812 {
20813 int res = SWIG_AsVal_size_t(argv[2], NULL);
20814 _v = SWIG_CheckState(res);
20815 }
20816 if (_v) {
20817 void *vptr = 0;
20818 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
20819 _v = SWIG_CheckState(res);
20820 if (_v) {
20821 {
20822 int res = SWIG_AsVal_size_t(argv[4], NULL);
20823 _v = SWIG_CheckState(res);
20824 }
20825 if (_v) {
20826 void *vptr = 0;
20827 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
20828 _v = SWIG_CheckState(res);
20829 if (_v) {
20830 return _wrap_ProductQuantizer_search_ip__SWIG_1(self, args);
20831 }
20832 }
20833 }
20834 }
20835 }
20836 }
20837 }
20838 if (argc == 7) {
20839 int _v;
20840 void *vptr = 0;
20841 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
20842 _v = SWIG_CheckState(res);
20843 if (_v) {
20844 void *vptr = 0;
20845 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_float, 0);
20846 _v = SWIG_CheckState(res);
20847 if (_v) {
20848 {
20849 int res = SWIG_AsVal_size_t(argv[2], NULL);
20850 _v = SWIG_CheckState(res);
20851 }
20852 if (_v) {
20853 void *vptr = 0;
20854 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
20855 _v = SWIG_CheckState(res);
20856 if (_v) {
20857 {
20858 int res = SWIG_AsVal_size_t(argv[4], NULL);
20859 _v = SWIG_CheckState(res);
20860 }
20861 if (_v) {
20862 void *vptr = 0;
20863 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
20864 _v = SWIG_CheckState(res);
20865 if (_v) {
20866 {
20867 int res = SWIG_AsVal_bool(argv[6], NULL);
20868 _v = SWIG_CheckState(res);
20869 }
20870 if (_v) {
20871 return _wrap_ProductQuantizer_search_ip__SWIG_0(self, args);
20872 }
20873 }
20874 }
20875 }
20876 }
20877 }
20878 }
20879 }
20880
20881 fail:
20882 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search_ip'.\n"
20883 " Possible C/C++ prototypes are:\n"
20884 " faiss::ProductQuantizer::search_ip(float const *,size_t,uint8_t const *,size_t const,faiss::float_minheap_array_t *,bool) const\n"
20885 " faiss::ProductQuantizer::search_ip(float const *,size_t,uint8_t const *,size_t const,faiss::float_minheap_array_t *) const\n");
20886 return 0;
20887 }
20888
20889
20890 SWIGINTERN PyObject *_wrap_ProductQuantizer_sdc_table_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20891 PyObject *resultobj = 0;
20892 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20893 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
20894 void *argp1 = 0 ;
20895 int res1 = 0 ;
20896 void *argp2 = 0 ;
20897 int res2 = 0 ;
20898 PyObject * obj0 = 0 ;
20899 PyObject * obj1 = 0 ;
20900
20901 if (!PyArg_ParseTuple(args,(char *)"OO:ProductQuantizer_sdc_table_set",&obj0,&obj1)) SWIG_fail;
20902 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20903 if (!SWIG_IsOK(res1)) {
20904 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_sdc_table_set" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20905 }
20906 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20907 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
20908 if (!SWIG_IsOK(res2)) {
20909 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_sdc_table_set" "', argument " "2"" of type '" "std::vector< float > *""'");
20910 }
20911 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
20912 if (arg1) (arg1)->sdc_table = *arg2;
20913 resultobj = SWIG_Py_Void();
20914 return resultobj;
20915 fail:
20916 return NULL;
20917 }
20918
20919
20920 SWIGINTERN PyObject *_wrap_ProductQuantizer_sdc_table_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20921 PyObject *resultobj = 0;
20922 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20923 void *argp1 = 0 ;
20924 int res1 = 0 ;
20925 PyObject * obj0 = 0 ;
20926 std::vector< float > *result = 0 ;
20927
20928 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_sdc_table_get",&obj0)) SWIG_fail;
20929 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20930 if (!SWIG_IsOK(res1)) {
20931 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_sdc_table_get" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20932 }
20933 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20934 result = (std::vector< float > *)& ((arg1)->sdc_table);
20935 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
20936 return resultobj;
20937 fail:
20938 return NULL;
20939 }
20940
20941
20942 SWIGINTERN PyObject *_wrap_ProductQuantizer_compute_sdc_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20943 PyObject *resultobj = 0;
20944 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20945 void *argp1 = 0 ;
20946 int res1 = 0 ;
20947 PyObject * obj0 = 0 ;
20948
20949 if (!PyArg_ParseTuple(args,(char *)"O:ProductQuantizer_compute_sdc_table",&obj0)) SWIG_fail;
20950 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
20951 if (!SWIG_IsOK(res1)) {
20952 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_compute_sdc_table" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
20953 }
20954 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
20955 {
20956 Py_BEGIN_ALLOW_THREADS
20957 try {
20958 (arg1)->compute_sdc_table();
20959 } catch(faiss::FaissException & e) {
20960 PyEval_RestoreThread(_save);
20961 PyErr_SetString(PyExc_RuntimeError, e.what());
20962 SWIG_fail;
20963 }
20964 Py_END_ALLOW_THREADS
20965 }
20966 resultobj = SWIG_Py_Void();
20967 return resultobj;
20968 fail:
20969 return NULL;
20970 }
20971
20972
20973 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
20974 PyObject *resultobj = 0;
20975 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
20976 uint8_t *arg2 = (uint8_t *) 0 ;
20977 size_t arg3 ;
20978 uint8_t *arg4 = (uint8_t *) 0 ;
20979 size_t arg5 ;
20980 faiss::float_maxheap_array_t *arg6 = (faiss::float_maxheap_array_t *) 0 ;
20981 bool arg7 ;
20982 void *argp1 = 0 ;
20983 int res1 = 0 ;
20984 void *argp2 = 0 ;
20985 int res2 = 0 ;
20986 size_t val3 ;
20987 int ecode3 = 0 ;
20988 void *argp4 = 0 ;
20989 int res4 = 0 ;
20990 size_t val5 ;
20991 int ecode5 = 0 ;
20992 void *argp6 = 0 ;
20993 int res6 = 0 ;
20994 bool val7 ;
20995 int ecode7 = 0 ;
20996 PyObject * obj0 = 0 ;
20997 PyObject * obj1 = 0 ;
20998 PyObject * obj2 = 0 ;
20999 PyObject * obj3 = 0 ;
21000 PyObject * obj4 = 0 ;
21001 PyObject * obj5 = 0 ;
21002 PyObject * obj6 = 0 ;
21003
21004 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:ProductQuantizer_search_sdc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
21005 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21006 if (!SWIG_IsOK(res1)) {
21007 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search_sdc" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21008 }
21009 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21010 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
21011 if (!SWIG_IsOK(res2)) {
21012 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search_sdc" "', argument " "2"" of type '" "uint8_t const *""'");
21013 }
21014 arg2 = reinterpret_cast< uint8_t * >(argp2);
21015 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
21016 if (!SWIG_IsOK(ecode3)) {
21017 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search_sdc" "', argument " "3"" of type '" "size_t""'");
21018 }
21019 arg3 = static_cast< size_t >(val3);
21020 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
21021 if (!SWIG_IsOK(res4)) {
21022 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search_sdc" "', argument " "4"" of type '" "uint8_t const *""'");
21023 }
21024 arg4 = reinterpret_cast< uint8_t * >(argp4);
21025 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
21026 if (!SWIG_IsOK(ecode5)) {
21027 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search_sdc" "', argument " "5"" of type '" "size_t""'");
21028 }
21029 arg5 = static_cast< size_t >(val5);
21030 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
21031 if (!SWIG_IsOK(res6)) {
21032 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search_sdc" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
21033 }
21034 arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
21035 ecode7 = SWIG_AsVal_bool(obj6, &val7);
21036 if (!SWIG_IsOK(ecode7)) {
21037 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "ProductQuantizer_search_sdc" "', argument " "7"" of type '" "bool""'");
21038 }
21039 arg7 = static_cast< bool >(val7);
21040 {
21041 Py_BEGIN_ALLOW_THREADS
21042 try {
21043 ((faiss::ProductQuantizer const *)arg1)->search_sdc((uint8_t const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6,arg7);
21044 } catch(faiss::FaissException & e) {
21045 PyEval_RestoreThread(_save);
21046 PyErr_SetString(PyExc_RuntimeError, e.what());
21047 SWIG_fail;
21048 }
21049 Py_END_ALLOW_THREADS
21050 }
21051 resultobj = SWIG_Py_Void();
21052 return resultobj;
21053 fail:
21054 return NULL;
21055 }
21056
21057
21058 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21059 PyObject *resultobj = 0;
21060 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
21061 uint8_t *arg2 = (uint8_t *) 0 ;
21062 size_t arg3 ;
21063 uint8_t *arg4 = (uint8_t *) 0 ;
21064 size_t arg5 ;
21065 faiss::float_maxheap_array_t *arg6 = (faiss::float_maxheap_array_t *) 0 ;
21066 void *argp1 = 0 ;
21067 int res1 = 0 ;
21068 void *argp2 = 0 ;
21069 int res2 = 0 ;
21070 size_t val3 ;
21071 int ecode3 = 0 ;
21072 void *argp4 = 0 ;
21073 int res4 = 0 ;
21074 size_t val5 ;
21075 int ecode5 = 0 ;
21076 void *argp6 = 0 ;
21077 int res6 = 0 ;
21078 PyObject * obj0 = 0 ;
21079 PyObject * obj1 = 0 ;
21080 PyObject * obj2 = 0 ;
21081 PyObject * obj3 = 0 ;
21082 PyObject * obj4 = 0 ;
21083 PyObject * obj5 = 0 ;
21084
21085 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ProductQuantizer_search_sdc",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
21086 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
21087 if (!SWIG_IsOK(res1)) {
21088 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ProductQuantizer_search_sdc" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
21089 }
21090 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21091 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
21092 if (!SWIG_IsOK(res2)) {
21093 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ProductQuantizer_search_sdc" "', argument " "2"" of type '" "uint8_t const *""'");
21094 }
21095 arg2 = reinterpret_cast< uint8_t * >(argp2);
21096 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
21097 if (!SWIG_IsOK(ecode3)) {
21098 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ProductQuantizer_search_sdc" "', argument " "3"" of type '" "size_t""'");
21099 }
21100 arg3 = static_cast< size_t >(val3);
21101 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
21102 if (!SWIG_IsOK(res4)) {
21103 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ProductQuantizer_search_sdc" "', argument " "4"" of type '" "uint8_t const *""'");
21104 }
21105 arg4 = reinterpret_cast< uint8_t * >(argp4);
21106 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
21107 if (!SWIG_IsOK(ecode5)) {
21108 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "ProductQuantizer_search_sdc" "', argument " "5"" of type '" "size_t""'");
21109 }
21110 arg5 = static_cast< size_t >(val5);
21111 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
21112 if (!SWIG_IsOK(res6)) {
21113 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ProductQuantizer_search_sdc" "', argument " "6"" of type '" "faiss::float_maxheap_array_t *""'");
21114 }
21115 arg6 = reinterpret_cast< faiss::float_maxheap_array_t * >(argp6);
21116 {
21117 Py_BEGIN_ALLOW_THREADS
21118 try {
21119 ((faiss::ProductQuantizer const *)arg1)->search_sdc((uint8_t const *)arg2,arg3,(uint8_t const *)arg4,arg5,arg6);
21120 } catch(faiss::FaissException & e) {
21121 PyEval_RestoreThread(_save);
21122 PyErr_SetString(PyExc_RuntimeError, e.what());
21123 SWIG_fail;
21124 }
21125 Py_END_ALLOW_THREADS
21126 }
21127 resultobj = SWIG_Py_Void();
21128 return resultobj;
21129 fail:
21130 return NULL;
21131 }
21132
21133
21134 SWIGINTERN PyObject *_wrap_ProductQuantizer_search_sdc(PyObject *self, PyObject *args) {
21135 Py_ssize_t argc;
21136 PyObject *argv[8] = {
21137 0
21138 };
21139 Py_ssize_t ii;
21140
21141 if (!PyTuple_Check(args)) SWIG_fail;
21142 argc = args ? PyObject_Length(args) : 0;
21143 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
21144 argv[ii] = PyTuple_GET_ITEM(args,ii);
21145 }
21146 if (argc == 6) {
21147 int _v;
21148 void *vptr = 0;
21149 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21150 _v = SWIG_CheckState(res);
21151 if (_v) {
21152 void *vptr = 0;
21153 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
21154 _v = SWIG_CheckState(res);
21155 if (_v) {
21156 {
21157 int res = SWIG_AsVal_size_t(argv[2], NULL);
21158 _v = SWIG_CheckState(res);
21159 }
21160 if (_v) {
21161 void *vptr = 0;
21162 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
21163 _v = SWIG_CheckState(res);
21164 if (_v) {
21165 {
21166 int res = SWIG_AsVal_size_t(argv[4], NULL);
21167 _v = SWIG_CheckState(res);
21168 }
21169 if (_v) {
21170 void *vptr = 0;
21171 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
21172 _v = SWIG_CheckState(res);
21173 if (_v) {
21174 return _wrap_ProductQuantizer_search_sdc__SWIG_1(self, args);
21175 }
21176 }
21177 }
21178 }
21179 }
21180 }
21181 }
21182 if (argc == 7) {
21183 int _v;
21184 void *vptr = 0;
21185 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
21186 _v = SWIG_CheckState(res);
21187 if (_v) {
21188 void *vptr = 0;
21189 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_unsigned_char, 0);
21190 _v = SWIG_CheckState(res);
21191 if (_v) {
21192 {
21193 int res = SWIG_AsVal_size_t(argv[2], NULL);
21194 _v = SWIG_CheckState(res);
21195 }
21196 if (_v) {
21197 void *vptr = 0;
21198 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_unsigned_char, 0);
21199 _v = SWIG_CheckState(res);
21200 if (_v) {
21201 {
21202 int res = SWIG_AsVal_size_t(argv[4], NULL);
21203 _v = SWIG_CheckState(res);
21204 }
21205 if (_v) {
21206 void *vptr = 0;
21207 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
21208 _v = SWIG_CheckState(res);
21209 if (_v) {
21210 {
21211 int res = SWIG_AsVal_bool(argv[6], NULL);
21212 _v = SWIG_CheckState(res);
21213 }
21214 if (_v) {
21215 return _wrap_ProductQuantizer_search_sdc__SWIG_0(self, args);
21216 }
21217 }
21218 }
21219 }
21220 }
21221 }
21222 }
21223 }
21224
21225 fail:
21226 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ProductQuantizer_search_sdc'.\n"
21227 " Possible C/C++ prototypes are:\n"
21228 " faiss::ProductQuantizer::search_sdc(uint8_t const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *,bool) const\n"
21229 " faiss::ProductQuantizer::search_sdc(uint8_t const *,size_t,uint8_t const *,size_t const,faiss::float_maxheap_array_t *) const\n");
21230 return 0;
21231 }
21232
21233
21234 SWIGINTERN PyObject *_wrap_delete_ProductQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21235 PyObject *resultobj = 0;
21236 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
21237 void *argp1 = 0 ;
21238 int res1 = 0 ;
21239 PyObject * obj0 = 0 ;
21240
21241 if (!PyArg_ParseTuple(args,(char *)"O:delete_ProductQuantizer",&obj0)) SWIG_fail;
21242 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_DISOWN | 0 );
21243 if (!SWIG_IsOK(res1)) {
21244 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ProductQuantizer" "', argument " "1"" of type '" "faiss::ProductQuantizer *""'");
21245 }
21246 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
21247 delete arg1;
21248 resultobj = SWIG_Py_Void();
21249 return resultobj;
21250 fail:
21251 return NULL;
21252 }
21253
21254
21255 SWIGINTERN PyObject *ProductQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21256 PyObject *obj;
21257 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
21258 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ProductQuantizer, SWIG_NewClientData(obj));
21259 return SWIG_Py_Void();
21260 }
21261
21262 SWIGINTERN PyObject *_wrap_VectorTransform_d_in_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21263 PyObject *resultobj = 0;
21264 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21265 int arg2 ;
21266 void *argp1 = 0 ;
21267 int res1 = 0 ;
21268 int val2 ;
21269 int ecode2 = 0 ;
21270 PyObject * obj0 = 0 ;
21271 PyObject * obj1 = 0 ;
21272
21273 if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransform_d_in_set",&obj0,&obj1)) SWIG_fail;
21274 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21275 if (!SWIG_IsOK(res1)) {
21276 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_d_in_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
21277 }
21278 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21279 ecode2 = SWIG_AsVal_int(obj1, &val2);
21280 if (!SWIG_IsOK(ecode2)) {
21281 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_d_in_set" "', argument " "2"" of type '" "int""'");
21282 }
21283 arg2 = static_cast< int >(val2);
21284 if (arg1) (arg1)->d_in = arg2;
21285 resultobj = SWIG_Py_Void();
21286 return resultobj;
21287 fail:
21288 return NULL;
21289 }
21290
21291
21292 SWIGINTERN PyObject *_wrap_VectorTransform_d_in_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21293 PyObject *resultobj = 0;
21294 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21295 void *argp1 = 0 ;
21296 int res1 = 0 ;
21297 PyObject * obj0 = 0 ;
21298 int result;
21299
21300 if (!PyArg_ParseTuple(args,(char *)"O:VectorTransform_d_in_get",&obj0)) SWIG_fail;
21301 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21302 if (!SWIG_IsOK(res1)) {
21303 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_d_in_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
21304 }
21305 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21306 result = (int) ((arg1)->d_in);
21307 resultobj = SWIG_From_int(static_cast< int >(result));
21308 return resultobj;
21309 fail:
21310 return NULL;
21311 }
21312
21313
21314 SWIGINTERN PyObject *_wrap_VectorTransform_d_out_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21315 PyObject *resultobj = 0;
21316 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21317 int arg2 ;
21318 void *argp1 = 0 ;
21319 int res1 = 0 ;
21320 int val2 ;
21321 int ecode2 = 0 ;
21322 PyObject * obj0 = 0 ;
21323 PyObject * obj1 = 0 ;
21324
21325 if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransform_d_out_set",&obj0,&obj1)) SWIG_fail;
21326 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21327 if (!SWIG_IsOK(res1)) {
21328 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_d_out_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
21329 }
21330 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21331 ecode2 = SWIG_AsVal_int(obj1, &val2);
21332 if (!SWIG_IsOK(ecode2)) {
21333 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_d_out_set" "', argument " "2"" of type '" "int""'");
21334 }
21335 arg2 = static_cast< int >(val2);
21336 if (arg1) (arg1)->d_out = arg2;
21337 resultobj = SWIG_Py_Void();
21338 return resultobj;
21339 fail:
21340 return NULL;
21341 }
21342
21343
21344 SWIGINTERN PyObject *_wrap_VectorTransform_d_out_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21345 PyObject *resultobj = 0;
21346 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21347 void *argp1 = 0 ;
21348 int res1 = 0 ;
21349 PyObject * obj0 = 0 ;
21350 int result;
21351
21352 if (!PyArg_ParseTuple(args,(char *)"O:VectorTransform_d_out_get",&obj0)) SWIG_fail;
21353 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21354 if (!SWIG_IsOK(res1)) {
21355 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_d_out_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
21356 }
21357 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21358 result = (int) ((arg1)->d_out);
21359 resultobj = SWIG_From_int(static_cast< int >(result));
21360 return resultobj;
21361 fail:
21362 return NULL;
21363 }
21364
21365
21366 SWIGINTERN PyObject *_wrap_VectorTransform_is_trained_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21367 PyObject *resultobj = 0;
21368 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21369 bool arg2 ;
21370 void *argp1 = 0 ;
21371 int res1 = 0 ;
21372 bool val2 ;
21373 int ecode2 = 0 ;
21374 PyObject * obj0 = 0 ;
21375 PyObject * obj1 = 0 ;
21376
21377 if (!PyArg_ParseTuple(args,(char *)"OO:VectorTransform_is_trained_set",&obj0,&obj1)) SWIG_fail;
21378 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21379 if (!SWIG_IsOK(res1)) {
21380 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_is_trained_set" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
21381 }
21382 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21383 ecode2 = SWIG_AsVal_bool(obj1, &val2);
21384 if (!SWIG_IsOK(ecode2)) {
21385 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_is_trained_set" "', argument " "2"" of type '" "bool""'");
21386 }
21387 arg2 = static_cast< bool >(val2);
21388 if (arg1) (arg1)->is_trained = arg2;
21389 resultobj = SWIG_Py_Void();
21390 return resultobj;
21391 fail:
21392 return NULL;
21393 }
21394
21395
21396 SWIGINTERN PyObject *_wrap_VectorTransform_is_trained_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21397 PyObject *resultobj = 0;
21398 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21399 void *argp1 = 0 ;
21400 int res1 = 0 ;
21401 PyObject * obj0 = 0 ;
21402 bool result;
21403
21404 if (!PyArg_ParseTuple(args,(char *)"O:VectorTransform_is_trained_get",&obj0)) SWIG_fail;
21405 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21406 if (!SWIG_IsOK(res1)) {
21407 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_is_trained_get" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
21408 }
21409 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21410 result = (bool) ((arg1)->is_trained);
21411 resultobj = SWIG_From_bool(static_cast< bool >(result));
21412 return resultobj;
21413 fail:
21414 return NULL;
21415 }
21416
21417
21418 SWIGINTERN PyObject *_wrap_VectorTransform_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21419 PyObject *resultobj = 0;
21420 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21421 faiss::VectorTransform::idx_t arg2 ;
21422 float *arg3 = (float *) 0 ;
21423 void *argp1 = 0 ;
21424 int res1 = 0 ;
21425 long val2 ;
21426 int ecode2 = 0 ;
21427 void *argp3 = 0 ;
21428 int res3 = 0 ;
21429 PyObject * obj0 = 0 ;
21430 PyObject * obj1 = 0 ;
21431 PyObject * obj2 = 0 ;
21432
21433 if (!PyArg_ParseTuple(args,(char *)"OOO:VectorTransform_train",&obj0,&obj1,&obj2)) SWIG_fail;
21434 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21435 if (!SWIG_IsOK(res1)) {
21436 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_train" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
21437 }
21438 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21439 ecode2 = SWIG_AsVal_long(obj1, &val2);
21440 if (!SWIG_IsOK(ecode2)) {
21441 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_train" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
21442 }
21443 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
21444 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21445 if (!SWIG_IsOK(res3)) {
21446 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorTransform_train" "', argument " "3"" of type '" "float const *""'");
21447 }
21448 arg3 = reinterpret_cast< float * >(argp3);
21449 {
21450 Py_BEGIN_ALLOW_THREADS
21451 try {
21452 (arg1)->train(arg2,(float const *)arg3);
21453 } catch(faiss::FaissException & e) {
21454 PyEval_RestoreThread(_save);
21455 PyErr_SetString(PyExc_RuntimeError, e.what());
21456 SWIG_fail;
21457 }
21458 Py_END_ALLOW_THREADS
21459 }
21460 resultobj = SWIG_Py_Void();
21461 return resultobj;
21462 fail:
21463 return NULL;
21464 }
21465
21466
21467 SWIGINTERN PyObject *_wrap_VectorTransform_apply(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21468 PyObject *resultobj = 0;
21469 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21470 faiss::VectorTransform::idx_t arg2 ;
21471 float *arg3 = (float *) 0 ;
21472 void *argp1 = 0 ;
21473 int res1 = 0 ;
21474 long val2 ;
21475 int ecode2 = 0 ;
21476 void *argp3 = 0 ;
21477 int res3 = 0 ;
21478 PyObject * obj0 = 0 ;
21479 PyObject * obj1 = 0 ;
21480 PyObject * obj2 = 0 ;
21481 float *result = 0 ;
21482
21483 if (!PyArg_ParseTuple(args,(char *)"OOO:VectorTransform_apply",&obj0,&obj1,&obj2)) SWIG_fail;
21484 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21485 if (!SWIG_IsOK(res1)) {
21486 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_apply" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
21487 }
21488 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21489 ecode2 = SWIG_AsVal_long(obj1, &val2);
21490 if (!SWIG_IsOK(ecode2)) {
21491 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_apply" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
21492 }
21493 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
21494 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21495 if (!SWIG_IsOK(res3)) {
21496 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorTransform_apply" "', argument " "3"" of type '" "float const *""'");
21497 }
21498 arg3 = reinterpret_cast< float * >(argp3);
21499 {
21500 Py_BEGIN_ALLOW_THREADS
21501 try {
21502 result = (float *)((faiss::VectorTransform const *)arg1)->apply(arg2,(float const *)arg3);
21503 } catch(faiss::FaissException & e) {
21504 PyEval_RestoreThread(_save);
21505 PyErr_SetString(PyExc_RuntimeError, e.what());
21506 SWIG_fail;
21507 }
21508 Py_END_ALLOW_THREADS
21509 }
21510 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
21511 return resultobj;
21512 fail:
21513 return NULL;
21514 }
21515
21516
21517 SWIGINTERN PyObject *_wrap_VectorTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21518 PyObject *resultobj = 0;
21519 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21520 faiss::VectorTransform::idx_t arg2 ;
21521 float *arg3 = (float *) 0 ;
21522 float *arg4 = (float *) 0 ;
21523 void *argp1 = 0 ;
21524 int res1 = 0 ;
21525 long val2 ;
21526 int ecode2 = 0 ;
21527 void *argp3 = 0 ;
21528 int res3 = 0 ;
21529 void *argp4 = 0 ;
21530 int res4 = 0 ;
21531 PyObject * obj0 = 0 ;
21532 PyObject * obj1 = 0 ;
21533 PyObject * obj2 = 0 ;
21534 PyObject * obj3 = 0 ;
21535
21536 if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
21537 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21538 if (!SWIG_IsOK(res1)) {
21539 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
21540 }
21541 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21542 ecode2 = SWIG_AsVal_long(obj1, &val2);
21543 if (!SWIG_IsOK(ecode2)) {
21544 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
21545 }
21546 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
21547 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21548 if (!SWIG_IsOK(res3)) {
21549 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
21550 }
21551 arg3 = reinterpret_cast< float * >(argp3);
21552 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
21553 if (!SWIG_IsOK(res4)) {
21554 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VectorTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
21555 }
21556 arg4 = reinterpret_cast< float * >(argp4);
21557 {
21558 Py_BEGIN_ALLOW_THREADS
21559 try {
21560 ((faiss::VectorTransform const *)arg1)->apply_noalloc(arg2,(float const *)arg3,arg4);
21561 } catch(faiss::FaissException & e) {
21562 PyEval_RestoreThread(_save);
21563 PyErr_SetString(PyExc_RuntimeError, e.what());
21564 SWIG_fail;
21565 }
21566 Py_END_ALLOW_THREADS
21567 }
21568 resultobj = SWIG_Py_Void();
21569 return resultobj;
21570 fail:
21571 return NULL;
21572 }
21573
21574
21575 SWIGINTERN PyObject *_wrap_VectorTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21576 PyObject *resultobj = 0;
21577 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21578 faiss::VectorTransform::idx_t arg2 ;
21579 float *arg3 = (float *) 0 ;
21580 float *arg4 = (float *) 0 ;
21581 void *argp1 = 0 ;
21582 int res1 = 0 ;
21583 long val2 ;
21584 int ecode2 = 0 ;
21585 void *argp3 = 0 ;
21586 int res3 = 0 ;
21587 void *argp4 = 0 ;
21588 int res4 = 0 ;
21589 PyObject * obj0 = 0 ;
21590 PyObject * obj1 = 0 ;
21591 PyObject * obj2 = 0 ;
21592 PyObject * obj3 = 0 ;
21593
21594 if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
21595 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
21596 if (!SWIG_IsOK(res1)) {
21597 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorTransform_reverse_transform" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
21598 }
21599 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21600 ecode2 = SWIG_AsVal_long(obj1, &val2);
21601 if (!SWIG_IsOK(ecode2)) {
21602 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
21603 }
21604 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
21605 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
21606 if (!SWIG_IsOK(res3)) {
21607 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "VectorTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
21608 }
21609 arg3 = reinterpret_cast< float * >(argp3);
21610 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
21611 if (!SWIG_IsOK(res4)) {
21612 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "VectorTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
21613 }
21614 arg4 = reinterpret_cast< float * >(argp4);
21615 {
21616 Py_BEGIN_ALLOW_THREADS
21617 try {
21618 ((faiss::VectorTransform const *)arg1)->reverse_transform(arg2,(float const *)arg3,arg4);
21619 } catch(faiss::FaissException & e) {
21620 PyEval_RestoreThread(_save);
21621 PyErr_SetString(PyExc_RuntimeError, e.what());
21622 SWIG_fail;
21623 }
21624 Py_END_ALLOW_THREADS
21625 }
21626 resultobj = SWIG_Py_Void();
21627 return resultobj;
21628 fail:
21629 return NULL;
21630 }
21631
21632
21633 SWIGINTERN PyObject *_wrap_delete_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21634 PyObject *resultobj = 0;
21635 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
21636 void *argp1 = 0 ;
21637 int res1 = 0 ;
21638 PyObject * obj0 = 0 ;
21639
21640 if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorTransform",&obj0)) SWIG_fail;
21641 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, SWIG_POINTER_DISOWN | 0 );
21642 if (!SWIG_IsOK(res1)) {
21643 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorTransform" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
21644 }
21645 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
21646 {
21647 Py_BEGIN_ALLOW_THREADS
21648 try {
21649 delete arg1;
21650 } catch(faiss::FaissException & e) {
21651 PyEval_RestoreThread(_save);
21652 PyErr_SetString(PyExc_RuntimeError, e.what());
21653 SWIG_fail;
21654 }
21655 Py_END_ALLOW_THREADS
21656 }
21657 resultobj = SWIG_Py_Void();
21658 return resultobj;
21659 fail:
21660 return NULL;
21661 }
21662
21663
21664 SWIGINTERN PyObject *VectorTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21665 PyObject *obj;
21666 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
21667 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VectorTransform, SWIG_NewClientData(obj));
21668 return SWIG_Py_Void();
21669 }
21670
21671 SWIGINTERN PyObject *_wrap_LinearTransform_have_bias_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21672 PyObject *resultobj = 0;
21673 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
21674 bool arg2 ;
21675 void *argp1 = 0 ;
21676 int res1 = 0 ;
21677 bool val2 ;
21678 int ecode2 = 0 ;
21679 PyObject * obj0 = 0 ;
21680 PyObject * obj1 = 0 ;
21681
21682 if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_have_bias_set",&obj0,&obj1)) SWIG_fail;
21683 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
21684 if (!SWIG_IsOK(res1)) {
21685 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_have_bias_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
21686 }
21687 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
21688 ecode2 = SWIG_AsVal_bool(obj1, &val2);
21689 if (!SWIG_IsOK(ecode2)) {
21690 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_have_bias_set" "', argument " "2"" of type '" "bool""'");
21691 }
21692 arg2 = static_cast< bool >(val2);
21693 if (arg1) (arg1)->have_bias = arg2;
21694 resultobj = SWIG_Py_Void();
21695 return resultobj;
21696 fail:
21697 return NULL;
21698 }
21699
21700
21701 SWIGINTERN PyObject *_wrap_LinearTransform_have_bias_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21702 PyObject *resultobj = 0;
21703 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
21704 void *argp1 = 0 ;
21705 int res1 = 0 ;
21706 PyObject * obj0 = 0 ;
21707 bool result;
21708
21709 if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_have_bias_get",&obj0)) SWIG_fail;
21710 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
21711 if (!SWIG_IsOK(res1)) {
21712 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_have_bias_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
21713 }
21714 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
21715 result = (bool) ((arg1)->have_bias);
21716 resultobj = SWIG_From_bool(static_cast< bool >(result));
21717 return resultobj;
21718 fail:
21719 return NULL;
21720 }
21721
21722
21723 SWIGINTERN PyObject *_wrap_LinearTransform_is_orthonormal_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21724 PyObject *resultobj = 0;
21725 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
21726 bool arg2 ;
21727 void *argp1 = 0 ;
21728 int res1 = 0 ;
21729 bool val2 ;
21730 int ecode2 = 0 ;
21731 PyObject * obj0 = 0 ;
21732 PyObject * obj1 = 0 ;
21733
21734 if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_is_orthonormal_set",&obj0,&obj1)) SWIG_fail;
21735 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
21736 if (!SWIG_IsOK(res1)) {
21737 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_is_orthonormal_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
21738 }
21739 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
21740 ecode2 = SWIG_AsVal_bool(obj1, &val2);
21741 if (!SWIG_IsOK(ecode2)) {
21742 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_is_orthonormal_set" "', argument " "2"" of type '" "bool""'");
21743 }
21744 arg2 = static_cast< bool >(val2);
21745 if (arg1) (arg1)->is_orthonormal = arg2;
21746 resultobj = SWIG_Py_Void();
21747 return resultobj;
21748 fail:
21749 return NULL;
21750 }
21751
21752
21753 SWIGINTERN PyObject *_wrap_LinearTransform_is_orthonormal_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21754 PyObject *resultobj = 0;
21755 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
21756 void *argp1 = 0 ;
21757 int res1 = 0 ;
21758 PyObject * obj0 = 0 ;
21759 bool result;
21760
21761 if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_is_orthonormal_get",&obj0)) SWIG_fail;
21762 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
21763 if (!SWIG_IsOK(res1)) {
21764 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_is_orthonormal_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
21765 }
21766 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
21767 result = (bool) ((arg1)->is_orthonormal);
21768 resultobj = SWIG_From_bool(static_cast< bool >(result));
21769 return resultobj;
21770 fail:
21771 return NULL;
21772 }
21773
21774
21775 SWIGINTERN PyObject *_wrap_LinearTransform_A_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21776 PyObject *resultobj = 0;
21777 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
21778 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
21779 void *argp1 = 0 ;
21780 int res1 = 0 ;
21781 void *argp2 = 0 ;
21782 int res2 = 0 ;
21783 PyObject * obj0 = 0 ;
21784 PyObject * obj1 = 0 ;
21785
21786 if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_A_set",&obj0,&obj1)) SWIG_fail;
21787 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
21788 if (!SWIG_IsOK(res1)) {
21789 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_A_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
21790 }
21791 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
21792 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
21793 if (!SWIG_IsOK(res2)) {
21794 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LinearTransform_A_set" "', argument " "2"" of type '" "std::vector< float > *""'");
21795 }
21796 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
21797 if (arg1) (arg1)->A = *arg2;
21798 resultobj = SWIG_Py_Void();
21799 return resultobj;
21800 fail:
21801 return NULL;
21802 }
21803
21804
21805 SWIGINTERN PyObject *_wrap_LinearTransform_A_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21806 PyObject *resultobj = 0;
21807 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
21808 void *argp1 = 0 ;
21809 int res1 = 0 ;
21810 PyObject * obj0 = 0 ;
21811 std::vector< float > *result = 0 ;
21812
21813 if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_A_get",&obj0)) SWIG_fail;
21814 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
21815 if (!SWIG_IsOK(res1)) {
21816 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_A_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
21817 }
21818 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
21819 result = (std::vector< float > *)& ((arg1)->A);
21820 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
21821 return resultobj;
21822 fail:
21823 return NULL;
21824 }
21825
21826
21827 SWIGINTERN PyObject *_wrap_LinearTransform_b_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21828 PyObject *resultobj = 0;
21829 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
21830 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
21831 void *argp1 = 0 ;
21832 int res1 = 0 ;
21833 void *argp2 = 0 ;
21834 int res2 = 0 ;
21835 PyObject * obj0 = 0 ;
21836 PyObject * obj1 = 0 ;
21837
21838 if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_b_set",&obj0,&obj1)) SWIG_fail;
21839 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
21840 if (!SWIG_IsOK(res1)) {
21841 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_b_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
21842 }
21843 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
21844 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
21845 if (!SWIG_IsOK(res2)) {
21846 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "LinearTransform_b_set" "', argument " "2"" of type '" "std::vector< float > *""'");
21847 }
21848 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
21849 if (arg1) (arg1)->b = *arg2;
21850 resultobj = SWIG_Py_Void();
21851 return resultobj;
21852 fail:
21853 return NULL;
21854 }
21855
21856
21857 SWIGINTERN PyObject *_wrap_LinearTransform_b_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21858 PyObject *resultobj = 0;
21859 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
21860 void *argp1 = 0 ;
21861 int res1 = 0 ;
21862 PyObject * obj0 = 0 ;
21863 std::vector< float > *result = 0 ;
21864
21865 if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_b_get",&obj0)) SWIG_fail;
21866 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
21867 if (!SWIG_IsOK(res1)) {
21868 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_b_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
21869 }
21870 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
21871 result = (std::vector< float > *)& ((arg1)->b);
21872 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
21873 return resultobj;
21874 fail:
21875 return NULL;
21876 }
21877
21878
21879 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21880 PyObject *resultobj = 0;
21881 int arg1 ;
21882 int arg2 ;
21883 bool arg3 ;
21884 int val1 ;
21885 int ecode1 = 0 ;
21886 int val2 ;
21887 int ecode2 = 0 ;
21888 bool val3 ;
21889 int ecode3 = 0 ;
21890 PyObject * obj0 = 0 ;
21891 PyObject * obj1 = 0 ;
21892 PyObject * obj2 = 0 ;
21893 faiss::LinearTransform *result = 0 ;
21894
21895 if (!PyArg_ParseTuple(args,(char *)"OOO:new_LinearTransform",&obj0,&obj1,&obj2)) SWIG_fail;
21896 ecode1 = SWIG_AsVal_int(obj0, &val1);
21897 if (!SWIG_IsOK(ecode1)) {
21898 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
21899 }
21900 arg1 = static_cast< int >(val1);
21901 ecode2 = SWIG_AsVal_int(obj1, &val2);
21902 if (!SWIG_IsOK(ecode2)) {
21903 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LinearTransform" "', argument " "2"" of type '" "int""'");
21904 }
21905 arg2 = static_cast< int >(val2);
21906 ecode3 = SWIG_AsVal_bool(obj2, &val3);
21907 if (!SWIG_IsOK(ecode3)) {
21908 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_LinearTransform" "', argument " "3"" of type '" "bool""'");
21909 }
21910 arg3 = static_cast< bool >(val3);
21911 {
21912 Py_BEGIN_ALLOW_THREADS
21913 try {
21914 result = (faiss::LinearTransform *)new faiss::LinearTransform(arg1,arg2,arg3);
21915 } catch(faiss::FaissException & e) {
21916 PyEval_RestoreThread(_save);
21917 PyErr_SetString(PyExc_RuntimeError, e.what());
21918 SWIG_fail;
21919 }
21920 Py_END_ALLOW_THREADS
21921 }
21922 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
21923 return resultobj;
21924 fail:
21925 return NULL;
21926 }
21927
21928
21929 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21930 PyObject *resultobj = 0;
21931 int arg1 ;
21932 int arg2 ;
21933 int val1 ;
21934 int ecode1 = 0 ;
21935 int val2 ;
21936 int ecode2 = 0 ;
21937 PyObject * obj0 = 0 ;
21938 PyObject * obj1 = 0 ;
21939 faiss::LinearTransform *result = 0 ;
21940
21941 if (!PyArg_ParseTuple(args,(char *)"OO:new_LinearTransform",&obj0,&obj1)) SWIG_fail;
21942 ecode1 = SWIG_AsVal_int(obj0, &val1);
21943 if (!SWIG_IsOK(ecode1)) {
21944 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
21945 }
21946 arg1 = static_cast< int >(val1);
21947 ecode2 = SWIG_AsVal_int(obj1, &val2);
21948 if (!SWIG_IsOK(ecode2)) {
21949 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_LinearTransform" "', argument " "2"" of type '" "int""'");
21950 }
21951 arg2 = static_cast< int >(val2);
21952 {
21953 Py_BEGIN_ALLOW_THREADS
21954 try {
21955 result = (faiss::LinearTransform *)new faiss::LinearTransform(arg1,arg2);
21956 } catch(faiss::FaissException & e) {
21957 PyEval_RestoreThread(_save);
21958 PyErr_SetString(PyExc_RuntimeError, e.what());
21959 SWIG_fail;
21960 }
21961 Py_END_ALLOW_THREADS
21962 }
21963 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
21964 return resultobj;
21965 fail:
21966 return NULL;
21967 }
21968
21969
21970 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
21971 PyObject *resultobj = 0;
21972 int arg1 ;
21973 int val1 ;
21974 int ecode1 = 0 ;
21975 PyObject * obj0 = 0 ;
21976 faiss::LinearTransform *result = 0 ;
21977
21978 if (!PyArg_ParseTuple(args,(char *)"O:new_LinearTransform",&obj0)) SWIG_fail;
21979 ecode1 = SWIG_AsVal_int(obj0, &val1);
21980 if (!SWIG_IsOK(ecode1)) {
21981 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_LinearTransform" "', argument " "1"" of type '" "int""'");
21982 }
21983 arg1 = static_cast< int >(val1);
21984 {
21985 Py_BEGIN_ALLOW_THREADS
21986 try {
21987 result = (faiss::LinearTransform *)new faiss::LinearTransform(arg1);
21988 } catch(faiss::FaissException & e) {
21989 PyEval_RestoreThread(_save);
21990 PyErr_SetString(PyExc_RuntimeError, e.what());
21991 SWIG_fail;
21992 }
21993 Py_END_ALLOW_THREADS
21994 }
21995 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
21996 return resultobj;
21997 fail:
21998 return NULL;
21999 }
22000
22001
22002 SWIGINTERN PyObject *_wrap_new_LinearTransform__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22003 PyObject *resultobj = 0;
22004 faiss::LinearTransform *result = 0 ;
22005
22006 if (!PyArg_ParseTuple(args,(char *)":new_LinearTransform")) SWIG_fail;
22007 {
22008 Py_BEGIN_ALLOW_THREADS
22009 try {
22010 result = (faiss::LinearTransform *)new faiss::LinearTransform();
22011 } catch(faiss::FaissException & e) {
22012 PyEval_RestoreThread(_save);
22013 PyErr_SetString(PyExc_RuntimeError, e.what());
22014 SWIG_fail;
22015 }
22016 Py_END_ALLOW_THREADS
22017 }
22018 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_NEW | 0 );
22019 return resultobj;
22020 fail:
22021 return NULL;
22022 }
22023
22024
22025 SWIGINTERN PyObject *_wrap_new_LinearTransform(PyObject *self, PyObject *args) {
22026 Py_ssize_t argc;
22027 PyObject *argv[4] = {
22028 0
22029 };
22030 Py_ssize_t ii;
22031
22032 if (!PyTuple_Check(args)) SWIG_fail;
22033 argc = args ? PyObject_Length(args) : 0;
22034 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
22035 argv[ii] = PyTuple_GET_ITEM(args,ii);
22036 }
22037 if (argc == 0) {
22038 return _wrap_new_LinearTransform__SWIG_3(self, args);
22039 }
22040 if (argc == 1) {
22041 int _v;
22042 {
22043 int res = SWIG_AsVal_int(argv[0], NULL);
22044 _v = SWIG_CheckState(res);
22045 }
22046 if (_v) {
22047 return _wrap_new_LinearTransform__SWIG_2(self, args);
22048 }
22049 }
22050 if (argc == 2) {
22051 int _v;
22052 {
22053 int res = SWIG_AsVal_int(argv[0], NULL);
22054 _v = SWIG_CheckState(res);
22055 }
22056 if (_v) {
22057 {
22058 int res = SWIG_AsVal_int(argv[1], NULL);
22059 _v = SWIG_CheckState(res);
22060 }
22061 if (_v) {
22062 return _wrap_new_LinearTransform__SWIG_1(self, args);
22063 }
22064 }
22065 }
22066 if (argc == 3) {
22067 int _v;
22068 {
22069 int res = SWIG_AsVal_int(argv[0], NULL);
22070 _v = SWIG_CheckState(res);
22071 }
22072 if (_v) {
22073 {
22074 int res = SWIG_AsVal_int(argv[1], NULL);
22075 _v = SWIG_CheckState(res);
22076 }
22077 if (_v) {
22078 {
22079 int res = SWIG_AsVal_bool(argv[2], NULL);
22080 _v = SWIG_CheckState(res);
22081 }
22082 if (_v) {
22083 return _wrap_new_LinearTransform__SWIG_0(self, args);
22084 }
22085 }
22086 }
22087 }
22088
22089 fail:
22090 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_LinearTransform'.\n"
22091 " Possible C/C++ prototypes are:\n"
22092 " faiss::LinearTransform::LinearTransform(int,int,bool)\n"
22093 " faiss::LinearTransform::LinearTransform(int,int)\n"
22094 " faiss::LinearTransform::LinearTransform(int)\n"
22095 " faiss::LinearTransform::LinearTransform()\n");
22096 return 0;
22097 }
22098
22099
22100 SWIGINTERN PyObject *_wrap_LinearTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22101 PyObject *resultobj = 0;
22102 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
22103 faiss::VectorTransform::idx_t arg2 ;
22104 float *arg3 = (float *) 0 ;
22105 float *arg4 = (float *) 0 ;
22106 void *argp1 = 0 ;
22107 int res1 = 0 ;
22108 long val2 ;
22109 int ecode2 = 0 ;
22110 void *argp3 = 0 ;
22111 int res3 = 0 ;
22112 void *argp4 = 0 ;
22113 int res4 = 0 ;
22114 PyObject * obj0 = 0 ;
22115 PyObject * obj1 = 0 ;
22116 PyObject * obj2 = 0 ;
22117 PyObject * obj3 = 0 ;
22118
22119 if (!PyArg_ParseTuple(args,(char *)"OOOO:LinearTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
22120 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22121 if (!SWIG_IsOK(res1)) {
22122 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
22123 }
22124 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
22125 ecode2 = SWIG_AsVal_long(obj1, &val2);
22126 if (!SWIG_IsOK(ecode2)) {
22127 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22128 }
22129 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
22130 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22131 if (!SWIG_IsOK(res3)) {
22132 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LinearTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
22133 }
22134 arg3 = reinterpret_cast< float * >(argp3);
22135 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
22136 if (!SWIG_IsOK(res4)) {
22137 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LinearTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
22138 }
22139 arg4 = reinterpret_cast< float * >(argp4);
22140 {
22141 Py_BEGIN_ALLOW_THREADS
22142 try {
22143 ((faiss::LinearTransform const *)arg1)->apply_noalloc(arg2,(float const *)arg3,arg4);
22144 } catch(faiss::FaissException & e) {
22145 PyEval_RestoreThread(_save);
22146 PyErr_SetString(PyExc_RuntimeError, e.what());
22147 SWIG_fail;
22148 }
22149 Py_END_ALLOW_THREADS
22150 }
22151 resultobj = SWIG_Py_Void();
22152 return resultobj;
22153 fail:
22154 return NULL;
22155 }
22156
22157
22158 SWIGINTERN PyObject *_wrap_LinearTransform_transform_transpose(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22159 PyObject *resultobj = 0;
22160 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
22161 faiss::VectorTransform::idx_t arg2 ;
22162 float *arg3 = (float *) 0 ;
22163 float *arg4 = (float *) 0 ;
22164 void *argp1 = 0 ;
22165 int res1 = 0 ;
22166 long val2 ;
22167 int ecode2 = 0 ;
22168 void *argp3 = 0 ;
22169 int res3 = 0 ;
22170 void *argp4 = 0 ;
22171 int res4 = 0 ;
22172 PyObject * obj0 = 0 ;
22173 PyObject * obj1 = 0 ;
22174 PyObject * obj2 = 0 ;
22175 PyObject * obj3 = 0 ;
22176
22177 if (!PyArg_ParseTuple(args,(char *)"OOOO:LinearTransform_transform_transpose",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
22178 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22179 if (!SWIG_IsOK(res1)) {
22180 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_transform_transpose" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
22181 }
22182 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
22183 ecode2 = SWIG_AsVal_long(obj1, &val2);
22184 if (!SWIG_IsOK(ecode2)) {
22185 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_transform_transpose" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22186 }
22187 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
22188 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22189 if (!SWIG_IsOK(res3)) {
22190 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LinearTransform_transform_transpose" "', argument " "3"" of type '" "float const *""'");
22191 }
22192 arg3 = reinterpret_cast< float * >(argp3);
22193 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
22194 if (!SWIG_IsOK(res4)) {
22195 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LinearTransform_transform_transpose" "', argument " "4"" of type '" "float *""'");
22196 }
22197 arg4 = reinterpret_cast< float * >(argp4);
22198 {
22199 Py_BEGIN_ALLOW_THREADS
22200 try {
22201 ((faiss::LinearTransform const *)arg1)->transform_transpose(arg2,(float const *)arg3,arg4);
22202 } catch(faiss::FaissException & e) {
22203 PyEval_RestoreThread(_save);
22204 PyErr_SetString(PyExc_RuntimeError, e.what());
22205 SWIG_fail;
22206 }
22207 Py_END_ALLOW_THREADS
22208 }
22209 resultobj = SWIG_Py_Void();
22210 return resultobj;
22211 fail:
22212 return NULL;
22213 }
22214
22215
22216 SWIGINTERN PyObject *_wrap_LinearTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22217 PyObject *resultobj = 0;
22218 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
22219 faiss::VectorTransform::idx_t arg2 ;
22220 float *arg3 = (float *) 0 ;
22221 float *arg4 = (float *) 0 ;
22222 void *argp1 = 0 ;
22223 int res1 = 0 ;
22224 long val2 ;
22225 int ecode2 = 0 ;
22226 void *argp3 = 0 ;
22227 int res3 = 0 ;
22228 void *argp4 = 0 ;
22229 int res4 = 0 ;
22230 PyObject * obj0 = 0 ;
22231 PyObject * obj1 = 0 ;
22232 PyObject * obj2 = 0 ;
22233 PyObject * obj3 = 0 ;
22234
22235 if (!PyArg_ParseTuple(args,(char *)"OOOO:LinearTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
22236 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22237 if (!SWIG_IsOK(res1)) {
22238 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_reverse_transform" "', argument " "1"" of type '" "faiss::LinearTransform const *""'");
22239 }
22240 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
22241 ecode2 = SWIG_AsVal_long(obj1, &val2);
22242 if (!SWIG_IsOK(ecode2)) {
22243 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
22244 }
22245 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
22246 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22247 if (!SWIG_IsOK(res3)) {
22248 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "LinearTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
22249 }
22250 arg3 = reinterpret_cast< float * >(argp3);
22251 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
22252 if (!SWIG_IsOK(res4)) {
22253 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "LinearTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
22254 }
22255 arg4 = reinterpret_cast< float * >(argp4);
22256 {
22257 Py_BEGIN_ALLOW_THREADS
22258 try {
22259 ((faiss::LinearTransform const *)arg1)->reverse_transform(arg2,(float const *)arg3,arg4);
22260 } catch(faiss::FaissException & e) {
22261 PyEval_RestoreThread(_save);
22262 PyErr_SetString(PyExc_RuntimeError, e.what());
22263 SWIG_fail;
22264 }
22265 Py_END_ALLOW_THREADS
22266 }
22267 resultobj = SWIG_Py_Void();
22268 return resultobj;
22269 fail:
22270 return NULL;
22271 }
22272
22273
22274 SWIGINTERN PyObject *_wrap_LinearTransform_set_is_orthonormal(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22275 PyObject *resultobj = 0;
22276 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
22277 void *argp1 = 0 ;
22278 int res1 = 0 ;
22279 PyObject * obj0 = 0 ;
22280
22281 if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_set_is_orthonormal",&obj0)) SWIG_fail;
22282 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22283 if (!SWIG_IsOK(res1)) {
22284 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_set_is_orthonormal" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22285 }
22286 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
22287 {
22288 Py_BEGIN_ALLOW_THREADS
22289 try {
22290 (arg1)->set_is_orthonormal();
22291 } catch(faiss::FaissException & e) {
22292 PyEval_RestoreThread(_save);
22293 PyErr_SetString(PyExc_RuntimeError, e.what());
22294 SWIG_fail;
22295 }
22296 Py_END_ALLOW_THREADS
22297 }
22298 resultobj = SWIG_Py_Void();
22299 return resultobj;
22300 fail:
22301 return NULL;
22302 }
22303
22304
22305 SWIGINTERN PyObject *_wrap_LinearTransform_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22306 PyObject *resultobj = 0;
22307 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
22308 bool arg2 ;
22309 void *argp1 = 0 ;
22310 int res1 = 0 ;
22311 bool val2 ;
22312 int ecode2 = 0 ;
22313 PyObject * obj0 = 0 ;
22314 PyObject * obj1 = 0 ;
22315
22316 if (!PyArg_ParseTuple(args,(char *)"OO:LinearTransform_verbose_set",&obj0,&obj1)) SWIG_fail;
22317 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22318 if (!SWIG_IsOK(res1)) {
22319 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_verbose_set" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22320 }
22321 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
22322 ecode2 = SWIG_AsVal_bool(obj1, &val2);
22323 if (!SWIG_IsOK(ecode2)) {
22324 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "LinearTransform_verbose_set" "', argument " "2"" of type '" "bool""'");
22325 }
22326 arg2 = static_cast< bool >(val2);
22327 if (arg1) (arg1)->verbose = arg2;
22328 resultobj = SWIG_Py_Void();
22329 return resultobj;
22330 fail:
22331 return NULL;
22332 }
22333
22334
22335 SWIGINTERN PyObject *_wrap_LinearTransform_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22336 PyObject *resultobj = 0;
22337 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
22338 void *argp1 = 0 ;
22339 int res1 = 0 ;
22340 PyObject * obj0 = 0 ;
22341 bool result;
22342
22343 if (!PyArg_ParseTuple(args,(char *)"O:LinearTransform_verbose_get",&obj0)) SWIG_fail;
22344 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
22345 if (!SWIG_IsOK(res1)) {
22346 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "LinearTransform_verbose_get" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22347 }
22348 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
22349 result = (bool) ((arg1)->verbose);
22350 resultobj = SWIG_From_bool(static_cast< bool >(result));
22351 return resultobj;
22352 fail:
22353 return NULL;
22354 }
22355
22356
22357 SWIGINTERN PyObject *_wrap_delete_LinearTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22358 PyObject *resultobj = 0;
22359 faiss::LinearTransform *arg1 = (faiss::LinearTransform *) 0 ;
22360 void *argp1 = 0 ;
22361 int res1 = 0 ;
22362 PyObject * obj0 = 0 ;
22363
22364 if (!PyArg_ParseTuple(args,(char *)"O:delete_LinearTransform",&obj0)) SWIG_fail;
22365 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__LinearTransform, SWIG_POINTER_DISOWN | 0 );
22366 if (!SWIG_IsOK(res1)) {
22367 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_LinearTransform" "', argument " "1"" of type '" "faiss::LinearTransform *""'");
22368 }
22369 arg1 = reinterpret_cast< faiss::LinearTransform * >(argp1);
22370 {
22371 Py_BEGIN_ALLOW_THREADS
22372 try {
22373 delete arg1;
22374 } catch(faiss::FaissException & e) {
22375 PyEval_RestoreThread(_save);
22376 PyErr_SetString(PyExc_RuntimeError, e.what());
22377 SWIG_fail;
22378 }
22379 Py_END_ALLOW_THREADS
22380 }
22381 resultobj = SWIG_Py_Void();
22382 return resultobj;
22383 fail:
22384 return NULL;
22385 }
22386
22387
22388 SWIGINTERN PyObject *LinearTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22389 PyObject *obj;
22390 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
22391 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__LinearTransform, SWIG_NewClientData(obj));
22392 return SWIG_Py_Void();
22393 }
22394
22395 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22396 PyObject *resultobj = 0;
22397 int arg1 ;
22398 int arg2 ;
22399 int val1 ;
22400 int ecode1 = 0 ;
22401 int val2 ;
22402 int ecode2 = 0 ;
22403 PyObject * obj0 = 0 ;
22404 PyObject * obj1 = 0 ;
22405 faiss::RandomRotationMatrix *result = 0 ;
22406
22407 if (!PyArg_ParseTuple(args,(char *)"OO:new_RandomRotationMatrix",&obj0,&obj1)) SWIG_fail;
22408 ecode1 = SWIG_AsVal_int(obj0, &val1);
22409 if (!SWIG_IsOK(ecode1)) {
22410 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RandomRotationMatrix" "', argument " "1"" of type '" "int""'");
22411 }
22412 arg1 = static_cast< int >(val1);
22413 ecode2 = SWIG_AsVal_int(obj1, &val2);
22414 if (!SWIG_IsOK(ecode2)) {
22415 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RandomRotationMatrix" "', argument " "2"" of type '" "int""'");
22416 }
22417 arg2 = static_cast< int >(val2);
22418 {
22419 Py_BEGIN_ALLOW_THREADS
22420 try {
22421 result = (faiss::RandomRotationMatrix *)new faiss::RandomRotationMatrix(arg1,arg2);
22422 } catch(faiss::FaissException & e) {
22423 PyEval_RestoreThread(_save);
22424 PyErr_SetString(PyExc_RuntimeError, e.what());
22425 SWIG_fail;
22426 }
22427 Py_END_ALLOW_THREADS
22428 }
22429 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_NEW | 0 );
22430 return resultobj;
22431 fail:
22432 return NULL;
22433 }
22434
22435
22436 SWIGINTERN PyObject *_wrap_RandomRotationMatrix_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22437 PyObject *resultobj = 0;
22438 faiss::RandomRotationMatrix *arg1 = (faiss::RandomRotationMatrix *) 0 ;
22439 int arg2 ;
22440 void *argp1 = 0 ;
22441 int res1 = 0 ;
22442 int val2 ;
22443 int ecode2 = 0 ;
22444 PyObject * obj0 = 0 ;
22445 PyObject * obj1 = 0 ;
22446
22447 if (!PyArg_ParseTuple(args,(char *)"OO:RandomRotationMatrix_init",&obj0,&obj1)) SWIG_fail;
22448 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
22449 if (!SWIG_IsOK(res1)) {
22450 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomRotationMatrix_init" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
22451 }
22452 arg1 = reinterpret_cast< faiss::RandomRotationMatrix * >(argp1);
22453 ecode2 = SWIG_AsVal_int(obj1, &val2);
22454 if (!SWIG_IsOK(ecode2)) {
22455 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RandomRotationMatrix_init" "', argument " "2"" of type '" "int""'");
22456 }
22457 arg2 = static_cast< int >(val2);
22458 {
22459 Py_BEGIN_ALLOW_THREADS
22460 try {
22461 (arg1)->init(arg2);
22462 } catch(faiss::FaissException & e) {
22463 PyEval_RestoreThread(_save);
22464 PyErr_SetString(PyExc_RuntimeError, e.what());
22465 SWIG_fail;
22466 }
22467 Py_END_ALLOW_THREADS
22468 }
22469 resultobj = SWIG_Py_Void();
22470 return resultobj;
22471 fail:
22472 return NULL;
22473 }
22474
22475
22476 SWIGINTERN PyObject *_wrap_RandomRotationMatrix_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22477 PyObject *resultobj = 0;
22478 faiss::RandomRotationMatrix *arg1 = (faiss::RandomRotationMatrix *) 0 ;
22479 faiss::Index::idx_t arg2 ;
22480 float *arg3 = (float *) 0 ;
22481 void *argp1 = 0 ;
22482 int res1 = 0 ;
22483 long val2 ;
22484 int ecode2 = 0 ;
22485 void *argp3 = 0 ;
22486 int res3 = 0 ;
22487 PyObject * obj0 = 0 ;
22488 PyObject * obj1 = 0 ;
22489 PyObject * obj2 = 0 ;
22490
22491 if (!PyArg_ParseTuple(args,(char *)"OOO:RandomRotationMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
22492 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
22493 if (!SWIG_IsOK(res1)) {
22494 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RandomRotationMatrix_train" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
22495 }
22496 arg1 = reinterpret_cast< faiss::RandomRotationMatrix * >(argp1);
22497 ecode2 = SWIG_AsVal_long(obj1, &val2);
22498 if (!SWIG_IsOK(ecode2)) {
22499 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RandomRotationMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
22500 }
22501 arg2 = static_cast< faiss::Index::idx_t >(val2);
22502 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
22503 if (!SWIG_IsOK(res3)) {
22504 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RandomRotationMatrix_train" "', argument " "3"" of type '" "float const *""'");
22505 }
22506 arg3 = reinterpret_cast< float * >(argp3);
22507 {
22508 Py_BEGIN_ALLOW_THREADS
22509 try {
22510 (arg1)->train(arg2,(float const *)arg3);
22511 } catch(faiss::FaissException & e) {
22512 PyEval_RestoreThread(_save);
22513 PyErr_SetString(PyExc_RuntimeError, e.what());
22514 SWIG_fail;
22515 }
22516 Py_END_ALLOW_THREADS
22517 }
22518 resultobj = SWIG_Py_Void();
22519 return resultobj;
22520 fail:
22521 return NULL;
22522 }
22523
22524
22525 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22526 PyObject *resultobj = 0;
22527 faiss::RandomRotationMatrix *result = 0 ;
22528
22529 if (!PyArg_ParseTuple(args,(char *)":new_RandomRotationMatrix")) SWIG_fail;
22530 {
22531 Py_BEGIN_ALLOW_THREADS
22532 try {
22533 result = (faiss::RandomRotationMatrix *)new faiss::RandomRotationMatrix();
22534 } catch(faiss::FaissException & e) {
22535 PyEval_RestoreThread(_save);
22536 PyErr_SetString(PyExc_RuntimeError, e.what());
22537 SWIG_fail;
22538 }
22539 Py_END_ALLOW_THREADS
22540 }
22541 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_NEW | 0 );
22542 return resultobj;
22543 fail:
22544 return NULL;
22545 }
22546
22547
22548 SWIGINTERN PyObject *_wrap_new_RandomRotationMatrix(PyObject *self, PyObject *args) {
22549 Py_ssize_t argc;
22550 PyObject *argv[3] = {
22551 0
22552 };
22553 Py_ssize_t ii;
22554
22555 if (!PyTuple_Check(args)) SWIG_fail;
22556 argc = args ? PyObject_Length(args) : 0;
22557 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
22558 argv[ii] = PyTuple_GET_ITEM(args,ii);
22559 }
22560 if (argc == 0) {
22561 return _wrap_new_RandomRotationMatrix__SWIG_1(self, args);
22562 }
22563 if (argc == 2) {
22564 int _v;
22565 {
22566 int res = SWIG_AsVal_int(argv[0], NULL);
22567 _v = SWIG_CheckState(res);
22568 }
22569 if (_v) {
22570 {
22571 int res = SWIG_AsVal_int(argv[1], NULL);
22572 _v = SWIG_CheckState(res);
22573 }
22574 if (_v) {
22575 return _wrap_new_RandomRotationMatrix__SWIG_0(self, args);
22576 }
22577 }
22578 }
22579
22580 fail:
22581 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RandomRotationMatrix'.\n"
22582 " Possible C/C++ prototypes are:\n"
22583 " faiss::RandomRotationMatrix::RandomRotationMatrix(int,int)\n"
22584 " faiss::RandomRotationMatrix::RandomRotationMatrix()\n");
22585 return 0;
22586 }
22587
22588
22589 SWIGINTERN PyObject *_wrap_delete_RandomRotationMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22590 PyObject *resultobj = 0;
22591 faiss::RandomRotationMatrix *arg1 = (faiss::RandomRotationMatrix *) 0 ;
22592 void *argp1 = 0 ;
22593 int res1 = 0 ;
22594 PyObject * obj0 = 0 ;
22595
22596 if (!PyArg_ParseTuple(args,(char *)"O:delete_RandomRotationMatrix",&obj0)) SWIG_fail;
22597 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_POINTER_DISOWN | 0 );
22598 if (!SWIG_IsOK(res1)) {
22599 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RandomRotationMatrix" "', argument " "1"" of type '" "faiss::RandomRotationMatrix *""'");
22600 }
22601 arg1 = reinterpret_cast< faiss::RandomRotationMatrix * >(argp1);
22602 delete arg1;
22603 resultobj = SWIG_Py_Void();
22604 return resultobj;
22605 fail:
22606 return NULL;
22607 }
22608
22609
22610 SWIGINTERN PyObject *RandomRotationMatrix_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22611 PyObject *obj;
22612 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
22613 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RandomRotationMatrix, SWIG_NewClientData(obj));
22614 return SWIG_Py_Void();
22615 }
22616
22617 SWIGINTERN PyObject *_wrap_PCAMatrix_eigen_power_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22618 PyObject *resultobj = 0;
22619 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22620 float arg2 ;
22621 void *argp1 = 0 ;
22622 int res1 = 0 ;
22623 float val2 ;
22624 int ecode2 = 0 ;
22625 PyObject * obj0 = 0 ;
22626 PyObject * obj1 = 0 ;
22627
22628 if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_eigen_power_set",&obj0,&obj1)) SWIG_fail;
22629 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22630 if (!SWIG_IsOK(res1)) {
22631 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_eigen_power_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22632 }
22633 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22634 ecode2 = SWIG_AsVal_float(obj1, &val2);
22635 if (!SWIG_IsOK(ecode2)) {
22636 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_eigen_power_set" "', argument " "2"" of type '" "float""'");
22637 }
22638 arg2 = static_cast< float >(val2);
22639 if (arg1) (arg1)->eigen_power = arg2;
22640 resultobj = SWIG_Py_Void();
22641 return resultobj;
22642 fail:
22643 return NULL;
22644 }
22645
22646
22647 SWIGINTERN PyObject *_wrap_PCAMatrix_eigen_power_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22648 PyObject *resultobj = 0;
22649 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22650 void *argp1 = 0 ;
22651 int res1 = 0 ;
22652 PyObject * obj0 = 0 ;
22653 float result;
22654
22655 if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_eigen_power_get",&obj0)) SWIG_fail;
22656 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22657 if (!SWIG_IsOK(res1)) {
22658 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_eigen_power_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22659 }
22660 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22661 result = (float) ((arg1)->eigen_power);
22662 resultobj = SWIG_From_float(static_cast< float >(result));
22663 return resultobj;
22664 fail:
22665 return NULL;
22666 }
22667
22668
22669 SWIGINTERN PyObject *_wrap_PCAMatrix_random_rotation_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22670 PyObject *resultobj = 0;
22671 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22672 bool arg2 ;
22673 void *argp1 = 0 ;
22674 int res1 = 0 ;
22675 bool val2 ;
22676 int ecode2 = 0 ;
22677 PyObject * obj0 = 0 ;
22678 PyObject * obj1 = 0 ;
22679
22680 if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_random_rotation_set",&obj0,&obj1)) SWIG_fail;
22681 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22682 if (!SWIG_IsOK(res1)) {
22683 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_random_rotation_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22684 }
22685 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22686 ecode2 = SWIG_AsVal_bool(obj1, &val2);
22687 if (!SWIG_IsOK(ecode2)) {
22688 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_random_rotation_set" "', argument " "2"" of type '" "bool""'");
22689 }
22690 arg2 = static_cast< bool >(val2);
22691 if (arg1) (arg1)->random_rotation = arg2;
22692 resultobj = SWIG_Py_Void();
22693 return resultobj;
22694 fail:
22695 return NULL;
22696 }
22697
22698
22699 SWIGINTERN PyObject *_wrap_PCAMatrix_random_rotation_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22700 PyObject *resultobj = 0;
22701 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22702 void *argp1 = 0 ;
22703 int res1 = 0 ;
22704 PyObject * obj0 = 0 ;
22705 bool result;
22706
22707 if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_random_rotation_get",&obj0)) SWIG_fail;
22708 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22709 if (!SWIG_IsOK(res1)) {
22710 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_random_rotation_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22711 }
22712 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22713 result = (bool) ((arg1)->random_rotation);
22714 resultobj = SWIG_From_bool(static_cast< bool >(result));
22715 return resultobj;
22716 fail:
22717 return NULL;
22718 }
22719
22720
22721 SWIGINTERN PyObject *_wrap_PCAMatrix_max_points_per_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22722 PyObject *resultobj = 0;
22723 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22724 size_t arg2 ;
22725 void *argp1 = 0 ;
22726 int res1 = 0 ;
22727 size_t val2 ;
22728 int ecode2 = 0 ;
22729 PyObject * obj0 = 0 ;
22730 PyObject * obj1 = 0 ;
22731
22732 if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_max_points_per_d_set",&obj0,&obj1)) SWIG_fail;
22733 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22734 if (!SWIG_IsOK(res1)) {
22735 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_max_points_per_d_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22736 }
22737 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22738 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
22739 if (!SWIG_IsOK(ecode2)) {
22740 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_max_points_per_d_set" "', argument " "2"" of type '" "size_t""'");
22741 }
22742 arg2 = static_cast< size_t >(val2);
22743 if (arg1) (arg1)->max_points_per_d = arg2;
22744 resultobj = SWIG_Py_Void();
22745 return resultobj;
22746 fail:
22747 return NULL;
22748 }
22749
22750
22751 SWIGINTERN PyObject *_wrap_PCAMatrix_max_points_per_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22752 PyObject *resultobj = 0;
22753 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22754 void *argp1 = 0 ;
22755 int res1 = 0 ;
22756 PyObject * obj0 = 0 ;
22757 size_t result;
22758
22759 if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_max_points_per_d_get",&obj0)) SWIG_fail;
22760 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22761 if (!SWIG_IsOK(res1)) {
22762 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_max_points_per_d_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22763 }
22764 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22765 result = (size_t) ((arg1)->max_points_per_d);
22766 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
22767 return resultobj;
22768 fail:
22769 return NULL;
22770 }
22771
22772
22773 SWIGINTERN PyObject *_wrap_PCAMatrix_balanced_bins_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22774 PyObject *resultobj = 0;
22775 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22776 int arg2 ;
22777 void *argp1 = 0 ;
22778 int res1 = 0 ;
22779 int val2 ;
22780 int ecode2 = 0 ;
22781 PyObject * obj0 = 0 ;
22782 PyObject * obj1 = 0 ;
22783
22784 if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_balanced_bins_set",&obj0,&obj1)) SWIG_fail;
22785 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22786 if (!SWIG_IsOK(res1)) {
22787 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_balanced_bins_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22788 }
22789 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22790 ecode2 = SWIG_AsVal_int(obj1, &val2);
22791 if (!SWIG_IsOK(ecode2)) {
22792 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_balanced_bins_set" "', argument " "2"" of type '" "int""'");
22793 }
22794 arg2 = static_cast< int >(val2);
22795 if (arg1) (arg1)->balanced_bins = arg2;
22796 resultobj = SWIG_Py_Void();
22797 return resultobj;
22798 fail:
22799 return NULL;
22800 }
22801
22802
22803 SWIGINTERN PyObject *_wrap_PCAMatrix_balanced_bins_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22804 PyObject *resultobj = 0;
22805 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22806 void *argp1 = 0 ;
22807 int res1 = 0 ;
22808 PyObject * obj0 = 0 ;
22809 int result;
22810
22811 if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_balanced_bins_get",&obj0)) SWIG_fail;
22812 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22813 if (!SWIG_IsOK(res1)) {
22814 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_balanced_bins_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22815 }
22816 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22817 result = (int) ((arg1)->balanced_bins);
22818 resultobj = SWIG_From_int(static_cast< int >(result));
22819 return resultobj;
22820 fail:
22821 return NULL;
22822 }
22823
22824
22825 SWIGINTERN PyObject *_wrap_PCAMatrix_mean_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22826 PyObject *resultobj = 0;
22827 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22828 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
22829 void *argp1 = 0 ;
22830 int res1 = 0 ;
22831 void *argp2 = 0 ;
22832 int res2 = 0 ;
22833 PyObject * obj0 = 0 ;
22834 PyObject * obj1 = 0 ;
22835
22836 if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_mean_set",&obj0,&obj1)) SWIG_fail;
22837 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22838 if (!SWIG_IsOK(res1)) {
22839 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_mean_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22840 }
22841 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22842 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22843 if (!SWIG_IsOK(res2)) {
22844 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PCAMatrix_mean_set" "', argument " "2"" of type '" "std::vector< float > *""'");
22845 }
22846 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
22847 if (arg1) (arg1)->mean = *arg2;
22848 resultobj = SWIG_Py_Void();
22849 return resultobj;
22850 fail:
22851 return NULL;
22852 }
22853
22854
22855 SWIGINTERN PyObject *_wrap_PCAMatrix_mean_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22856 PyObject *resultobj = 0;
22857 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22858 void *argp1 = 0 ;
22859 int res1 = 0 ;
22860 PyObject * obj0 = 0 ;
22861 std::vector< float > *result = 0 ;
22862
22863 if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_mean_get",&obj0)) SWIG_fail;
22864 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22865 if (!SWIG_IsOK(res1)) {
22866 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_mean_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22867 }
22868 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22869 result = (std::vector< float > *)& ((arg1)->mean);
22870 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22871 return resultobj;
22872 fail:
22873 return NULL;
22874 }
22875
22876
22877 SWIGINTERN PyObject *_wrap_PCAMatrix_eigenvalues_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22878 PyObject *resultobj = 0;
22879 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22880 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
22881 void *argp1 = 0 ;
22882 int res1 = 0 ;
22883 void *argp2 = 0 ;
22884 int res2 = 0 ;
22885 PyObject * obj0 = 0 ;
22886 PyObject * obj1 = 0 ;
22887
22888 if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_eigenvalues_set",&obj0,&obj1)) SWIG_fail;
22889 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22890 if (!SWIG_IsOK(res1)) {
22891 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_eigenvalues_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22892 }
22893 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22894 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22895 if (!SWIG_IsOK(res2)) {
22896 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PCAMatrix_eigenvalues_set" "', argument " "2"" of type '" "std::vector< float > *""'");
22897 }
22898 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
22899 if (arg1) (arg1)->eigenvalues = *arg2;
22900 resultobj = SWIG_Py_Void();
22901 return resultobj;
22902 fail:
22903 return NULL;
22904 }
22905
22906
22907 SWIGINTERN PyObject *_wrap_PCAMatrix_eigenvalues_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22908 PyObject *resultobj = 0;
22909 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22910 void *argp1 = 0 ;
22911 int res1 = 0 ;
22912 PyObject * obj0 = 0 ;
22913 std::vector< float > *result = 0 ;
22914
22915 if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_eigenvalues_get",&obj0)) SWIG_fail;
22916 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22917 if (!SWIG_IsOK(res1)) {
22918 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_eigenvalues_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22919 }
22920 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22921 result = (std::vector< float > *)& ((arg1)->eigenvalues);
22922 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22923 return resultobj;
22924 fail:
22925 return NULL;
22926 }
22927
22928
22929 SWIGINTERN PyObject *_wrap_PCAMatrix_PCAMat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22930 PyObject *resultobj = 0;
22931 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22932 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
22933 void *argp1 = 0 ;
22934 int res1 = 0 ;
22935 void *argp2 = 0 ;
22936 int res2 = 0 ;
22937 PyObject * obj0 = 0 ;
22938 PyObject * obj1 = 0 ;
22939
22940 if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_PCAMat_set",&obj0,&obj1)) SWIG_fail;
22941 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22942 if (!SWIG_IsOK(res1)) {
22943 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_PCAMat_set" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22944 }
22945 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22946 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22947 if (!SWIG_IsOK(res2)) {
22948 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PCAMatrix_PCAMat_set" "', argument " "2"" of type '" "std::vector< float > *""'");
22949 }
22950 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
22951 if (arg1) (arg1)->PCAMat = *arg2;
22952 resultobj = SWIG_Py_Void();
22953 return resultobj;
22954 fail:
22955 return NULL;
22956 }
22957
22958
22959 SWIGINTERN PyObject *_wrap_PCAMatrix_PCAMat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22960 PyObject *resultobj = 0;
22961 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
22962 void *argp1 = 0 ;
22963 int res1 = 0 ;
22964 PyObject * obj0 = 0 ;
22965 std::vector< float > *result = 0 ;
22966
22967 if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_PCAMat_get",&obj0)) SWIG_fail;
22968 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
22969 if (!SWIG_IsOK(res1)) {
22970 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_PCAMat_get" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
22971 }
22972 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
22973 result = (std::vector< float > *)& ((arg1)->PCAMat);
22974 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
22975 return resultobj;
22976 fail:
22977 return NULL;
22978 }
22979
22980
22981 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
22982 PyObject *resultobj = 0;
22983 int arg1 ;
22984 int arg2 ;
22985 float arg3 ;
22986 bool arg4 ;
22987 int val1 ;
22988 int ecode1 = 0 ;
22989 int val2 ;
22990 int ecode2 = 0 ;
22991 float val3 ;
22992 int ecode3 = 0 ;
22993 bool val4 ;
22994 int ecode4 = 0 ;
22995 PyObject * obj0 = 0 ;
22996 PyObject * obj1 = 0 ;
22997 PyObject * obj2 = 0 ;
22998 PyObject * obj3 = 0 ;
22999 faiss::PCAMatrix *result = 0 ;
23000
23001 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_PCAMatrix",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
23002 ecode1 = SWIG_AsVal_int(obj0, &val1);
23003 if (!SWIG_IsOK(ecode1)) {
23004 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
23005 }
23006 arg1 = static_cast< int >(val1);
23007 ecode2 = SWIG_AsVal_int(obj1, &val2);
23008 if (!SWIG_IsOK(ecode2)) {
23009 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
23010 }
23011 arg2 = static_cast< int >(val2);
23012 ecode3 = SWIG_AsVal_float(obj2, &val3);
23013 if (!SWIG_IsOK(ecode3)) {
23014 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_PCAMatrix" "', argument " "3"" of type '" "float""'");
23015 }
23016 arg3 = static_cast< float >(val3);
23017 ecode4 = SWIG_AsVal_bool(obj3, &val4);
23018 if (!SWIG_IsOK(ecode4)) {
23019 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_PCAMatrix" "', argument " "4"" of type '" "bool""'");
23020 }
23021 arg4 = static_cast< bool >(val4);
23022 {
23023 Py_BEGIN_ALLOW_THREADS
23024 try {
23025 result = (faiss::PCAMatrix *)new faiss::PCAMatrix(arg1,arg2,arg3,arg4);
23026 } catch(faiss::FaissException & e) {
23027 PyEval_RestoreThread(_save);
23028 PyErr_SetString(PyExc_RuntimeError, e.what());
23029 SWIG_fail;
23030 }
23031 Py_END_ALLOW_THREADS
23032 }
23033 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
23034 return resultobj;
23035 fail:
23036 return NULL;
23037 }
23038
23039
23040 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23041 PyObject *resultobj = 0;
23042 int arg1 ;
23043 int arg2 ;
23044 float arg3 ;
23045 int val1 ;
23046 int ecode1 = 0 ;
23047 int val2 ;
23048 int ecode2 = 0 ;
23049 float val3 ;
23050 int ecode3 = 0 ;
23051 PyObject * obj0 = 0 ;
23052 PyObject * obj1 = 0 ;
23053 PyObject * obj2 = 0 ;
23054 faiss::PCAMatrix *result = 0 ;
23055
23056 if (!PyArg_ParseTuple(args,(char *)"OOO:new_PCAMatrix",&obj0,&obj1,&obj2)) SWIG_fail;
23057 ecode1 = SWIG_AsVal_int(obj0, &val1);
23058 if (!SWIG_IsOK(ecode1)) {
23059 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
23060 }
23061 arg1 = static_cast< int >(val1);
23062 ecode2 = SWIG_AsVal_int(obj1, &val2);
23063 if (!SWIG_IsOK(ecode2)) {
23064 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
23065 }
23066 arg2 = static_cast< int >(val2);
23067 ecode3 = SWIG_AsVal_float(obj2, &val3);
23068 if (!SWIG_IsOK(ecode3)) {
23069 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_PCAMatrix" "', argument " "3"" of type '" "float""'");
23070 }
23071 arg3 = static_cast< float >(val3);
23072 {
23073 Py_BEGIN_ALLOW_THREADS
23074 try {
23075 result = (faiss::PCAMatrix *)new faiss::PCAMatrix(arg1,arg2,arg3);
23076 } catch(faiss::FaissException & e) {
23077 PyEval_RestoreThread(_save);
23078 PyErr_SetString(PyExc_RuntimeError, e.what());
23079 SWIG_fail;
23080 }
23081 Py_END_ALLOW_THREADS
23082 }
23083 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
23084 return resultobj;
23085 fail:
23086 return NULL;
23087 }
23088
23089
23090 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23091 PyObject *resultobj = 0;
23092 int arg1 ;
23093 int arg2 ;
23094 int val1 ;
23095 int ecode1 = 0 ;
23096 int val2 ;
23097 int ecode2 = 0 ;
23098 PyObject * obj0 = 0 ;
23099 PyObject * obj1 = 0 ;
23100 faiss::PCAMatrix *result = 0 ;
23101
23102 if (!PyArg_ParseTuple(args,(char *)"OO:new_PCAMatrix",&obj0,&obj1)) SWIG_fail;
23103 ecode1 = SWIG_AsVal_int(obj0, &val1);
23104 if (!SWIG_IsOK(ecode1)) {
23105 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
23106 }
23107 arg1 = static_cast< int >(val1);
23108 ecode2 = SWIG_AsVal_int(obj1, &val2);
23109 if (!SWIG_IsOK(ecode2)) {
23110 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_PCAMatrix" "', argument " "2"" of type '" "int""'");
23111 }
23112 arg2 = static_cast< int >(val2);
23113 {
23114 Py_BEGIN_ALLOW_THREADS
23115 try {
23116 result = (faiss::PCAMatrix *)new faiss::PCAMatrix(arg1,arg2);
23117 } catch(faiss::FaissException & e) {
23118 PyEval_RestoreThread(_save);
23119 PyErr_SetString(PyExc_RuntimeError, e.what());
23120 SWIG_fail;
23121 }
23122 Py_END_ALLOW_THREADS
23123 }
23124 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
23125 return resultobj;
23126 fail:
23127 return NULL;
23128 }
23129
23130
23131 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23132 PyObject *resultobj = 0;
23133 int arg1 ;
23134 int val1 ;
23135 int ecode1 = 0 ;
23136 PyObject * obj0 = 0 ;
23137 faiss::PCAMatrix *result = 0 ;
23138
23139 if (!PyArg_ParseTuple(args,(char *)"O:new_PCAMatrix",&obj0)) SWIG_fail;
23140 ecode1 = SWIG_AsVal_int(obj0, &val1);
23141 if (!SWIG_IsOK(ecode1)) {
23142 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_PCAMatrix" "', argument " "1"" of type '" "int""'");
23143 }
23144 arg1 = static_cast< int >(val1);
23145 {
23146 Py_BEGIN_ALLOW_THREADS
23147 try {
23148 result = (faiss::PCAMatrix *)new faiss::PCAMatrix(arg1);
23149 } catch(faiss::FaissException & e) {
23150 PyEval_RestoreThread(_save);
23151 PyErr_SetString(PyExc_RuntimeError, e.what());
23152 SWIG_fail;
23153 }
23154 Py_END_ALLOW_THREADS
23155 }
23156 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
23157 return resultobj;
23158 fail:
23159 return NULL;
23160 }
23161
23162
23163 SWIGINTERN PyObject *_wrap_new_PCAMatrix__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23164 PyObject *resultobj = 0;
23165 faiss::PCAMatrix *result = 0 ;
23166
23167 if (!PyArg_ParseTuple(args,(char *)":new_PCAMatrix")) SWIG_fail;
23168 {
23169 Py_BEGIN_ALLOW_THREADS
23170 try {
23171 result = (faiss::PCAMatrix *)new faiss::PCAMatrix();
23172 } catch(faiss::FaissException & e) {
23173 PyEval_RestoreThread(_save);
23174 PyErr_SetString(PyExc_RuntimeError, e.what());
23175 SWIG_fail;
23176 }
23177 Py_END_ALLOW_THREADS
23178 }
23179 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_NEW | 0 );
23180 return resultobj;
23181 fail:
23182 return NULL;
23183 }
23184
23185
23186 SWIGINTERN PyObject *_wrap_new_PCAMatrix(PyObject *self, PyObject *args) {
23187 Py_ssize_t argc;
23188 PyObject *argv[5] = {
23189 0
23190 };
23191 Py_ssize_t ii;
23192
23193 if (!PyTuple_Check(args)) SWIG_fail;
23194 argc = args ? PyObject_Length(args) : 0;
23195 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
23196 argv[ii] = PyTuple_GET_ITEM(args,ii);
23197 }
23198 if (argc == 0) {
23199 return _wrap_new_PCAMatrix__SWIG_4(self, args);
23200 }
23201 if (argc == 1) {
23202 int _v;
23203 {
23204 int res = SWIG_AsVal_int(argv[0], NULL);
23205 _v = SWIG_CheckState(res);
23206 }
23207 if (_v) {
23208 return _wrap_new_PCAMatrix__SWIG_3(self, args);
23209 }
23210 }
23211 if (argc == 2) {
23212 int _v;
23213 {
23214 int res = SWIG_AsVal_int(argv[0], NULL);
23215 _v = SWIG_CheckState(res);
23216 }
23217 if (_v) {
23218 {
23219 int res = SWIG_AsVal_int(argv[1], NULL);
23220 _v = SWIG_CheckState(res);
23221 }
23222 if (_v) {
23223 return _wrap_new_PCAMatrix__SWIG_2(self, args);
23224 }
23225 }
23226 }
23227 if (argc == 3) {
23228 int _v;
23229 {
23230 int res = SWIG_AsVal_int(argv[0], NULL);
23231 _v = SWIG_CheckState(res);
23232 }
23233 if (_v) {
23234 {
23235 int res = SWIG_AsVal_int(argv[1], NULL);
23236 _v = SWIG_CheckState(res);
23237 }
23238 if (_v) {
23239 {
23240 int res = SWIG_AsVal_float(argv[2], NULL);
23241 _v = SWIG_CheckState(res);
23242 }
23243 if (_v) {
23244 return _wrap_new_PCAMatrix__SWIG_1(self, args);
23245 }
23246 }
23247 }
23248 }
23249 if (argc == 4) {
23250 int _v;
23251 {
23252 int res = SWIG_AsVal_int(argv[0], NULL);
23253 _v = SWIG_CheckState(res);
23254 }
23255 if (_v) {
23256 {
23257 int res = SWIG_AsVal_int(argv[1], NULL);
23258 _v = SWIG_CheckState(res);
23259 }
23260 if (_v) {
23261 {
23262 int res = SWIG_AsVal_float(argv[2], NULL);
23263 _v = SWIG_CheckState(res);
23264 }
23265 if (_v) {
23266 {
23267 int res = SWIG_AsVal_bool(argv[3], NULL);
23268 _v = SWIG_CheckState(res);
23269 }
23270 if (_v) {
23271 return _wrap_new_PCAMatrix__SWIG_0(self, args);
23272 }
23273 }
23274 }
23275 }
23276 }
23277
23278 fail:
23279 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_PCAMatrix'.\n"
23280 " Possible C/C++ prototypes are:\n"
23281 " faiss::PCAMatrix::PCAMatrix(int,int,float,bool)\n"
23282 " faiss::PCAMatrix::PCAMatrix(int,int,float)\n"
23283 " faiss::PCAMatrix::PCAMatrix(int,int)\n"
23284 " faiss::PCAMatrix::PCAMatrix(int)\n"
23285 " faiss::PCAMatrix::PCAMatrix()\n");
23286 return 0;
23287 }
23288
23289
23290 SWIGINTERN PyObject *_wrap_PCAMatrix_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23291 PyObject *resultobj = 0;
23292 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
23293 faiss::Index::idx_t arg2 ;
23294 float *arg3 = (float *) 0 ;
23295 void *argp1 = 0 ;
23296 int res1 = 0 ;
23297 long val2 ;
23298 int ecode2 = 0 ;
23299 void *argp3 = 0 ;
23300 int res3 = 0 ;
23301 PyObject * obj0 = 0 ;
23302 PyObject * obj1 = 0 ;
23303 PyObject * obj2 = 0 ;
23304
23305 if (!PyArg_ParseTuple(args,(char *)"OOO:PCAMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
23306 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23307 if (!SWIG_IsOK(res1)) {
23308 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_train" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23309 }
23310 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
23311 ecode2 = SWIG_AsVal_long(obj1, &val2);
23312 if (!SWIG_IsOK(ecode2)) {
23313 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PCAMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
23314 }
23315 arg2 = static_cast< faiss::Index::idx_t >(val2);
23316 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
23317 if (!SWIG_IsOK(res3)) {
23318 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "PCAMatrix_train" "', argument " "3"" of type '" "float const *""'");
23319 }
23320 arg3 = reinterpret_cast< float * >(argp3);
23321 {
23322 Py_BEGIN_ALLOW_THREADS
23323 try {
23324 (arg1)->train(arg2,(float const *)arg3);
23325 } catch(faiss::FaissException & e) {
23326 PyEval_RestoreThread(_save);
23327 PyErr_SetString(PyExc_RuntimeError, e.what());
23328 SWIG_fail;
23329 }
23330 Py_END_ALLOW_THREADS
23331 }
23332 resultobj = SWIG_Py_Void();
23333 return resultobj;
23334 fail:
23335 return NULL;
23336 }
23337
23338
23339 SWIGINTERN PyObject *_wrap_PCAMatrix_copy_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23340 PyObject *resultobj = 0;
23341 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
23342 faiss::PCAMatrix *arg2 = 0 ;
23343 void *argp1 = 0 ;
23344 int res1 = 0 ;
23345 void *argp2 = 0 ;
23346 int res2 = 0 ;
23347 PyObject * obj0 = 0 ;
23348 PyObject * obj1 = 0 ;
23349
23350 if (!PyArg_ParseTuple(args,(char *)"OO:PCAMatrix_copy_from",&obj0,&obj1)) SWIG_fail;
23351 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23352 if (!SWIG_IsOK(res1)) {
23353 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_copy_from" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23354 }
23355 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
23356 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__PCAMatrix, 0 | 0);
23357 if (!SWIG_IsOK(res2)) {
23358 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PCAMatrix_copy_from" "', argument " "2"" of type '" "faiss::PCAMatrix const &""'");
23359 }
23360 if (!argp2) {
23361 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PCAMatrix_copy_from" "', argument " "2"" of type '" "faiss::PCAMatrix const &""'");
23362 }
23363 arg2 = reinterpret_cast< faiss::PCAMatrix * >(argp2);
23364 {
23365 Py_BEGIN_ALLOW_THREADS
23366 try {
23367 (arg1)->copy_from((faiss::PCAMatrix const &)*arg2);
23368 } catch(faiss::FaissException & e) {
23369 PyEval_RestoreThread(_save);
23370 PyErr_SetString(PyExc_RuntimeError, e.what());
23371 SWIG_fail;
23372 }
23373 Py_END_ALLOW_THREADS
23374 }
23375 resultobj = SWIG_Py_Void();
23376 return resultobj;
23377 fail:
23378 return NULL;
23379 }
23380
23381
23382 SWIGINTERN PyObject *_wrap_PCAMatrix_prepare_Ab(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23383 PyObject *resultobj = 0;
23384 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
23385 void *argp1 = 0 ;
23386 int res1 = 0 ;
23387 PyObject * obj0 = 0 ;
23388
23389 if (!PyArg_ParseTuple(args,(char *)"O:PCAMatrix_prepare_Ab",&obj0)) SWIG_fail;
23390 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, 0 | 0 );
23391 if (!SWIG_IsOK(res1)) {
23392 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PCAMatrix_prepare_Ab" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23393 }
23394 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
23395 {
23396 Py_BEGIN_ALLOW_THREADS
23397 try {
23398 (arg1)->prepare_Ab();
23399 } catch(faiss::FaissException & e) {
23400 PyEval_RestoreThread(_save);
23401 PyErr_SetString(PyExc_RuntimeError, e.what());
23402 SWIG_fail;
23403 }
23404 Py_END_ALLOW_THREADS
23405 }
23406 resultobj = SWIG_Py_Void();
23407 return resultobj;
23408 fail:
23409 return NULL;
23410 }
23411
23412
23413 SWIGINTERN PyObject *_wrap_delete_PCAMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23414 PyObject *resultobj = 0;
23415 faiss::PCAMatrix *arg1 = (faiss::PCAMatrix *) 0 ;
23416 void *argp1 = 0 ;
23417 int res1 = 0 ;
23418 PyObject * obj0 = 0 ;
23419
23420 if (!PyArg_ParseTuple(args,(char *)"O:delete_PCAMatrix",&obj0)) SWIG_fail;
23421 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PCAMatrix, SWIG_POINTER_DISOWN | 0 );
23422 if (!SWIG_IsOK(res1)) {
23423 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PCAMatrix" "', argument " "1"" of type '" "faiss::PCAMatrix *""'");
23424 }
23425 arg1 = reinterpret_cast< faiss::PCAMatrix * >(argp1);
23426 delete arg1;
23427 resultobj = SWIG_Py_Void();
23428 return resultobj;
23429 fail:
23430 return NULL;
23431 }
23432
23433
23434 SWIGINTERN PyObject *PCAMatrix_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23435 PyObject *obj;
23436 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
23437 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__PCAMatrix, SWIG_NewClientData(obj));
23438 return SWIG_Py_Void();
23439 }
23440
23441 SWIGINTERN PyObject *_wrap_OPQMatrix_M_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23442 PyObject *resultobj = 0;
23443 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23444 int arg2 ;
23445 void *argp1 = 0 ;
23446 int res1 = 0 ;
23447 int val2 ;
23448 int ecode2 = 0 ;
23449 PyObject * obj0 = 0 ;
23450 PyObject * obj1 = 0 ;
23451
23452 if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_M_set",&obj0,&obj1)) SWIG_fail;
23453 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23454 if (!SWIG_IsOK(res1)) {
23455 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_M_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23456 }
23457 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23458 ecode2 = SWIG_AsVal_int(obj1, &val2);
23459 if (!SWIG_IsOK(ecode2)) {
23460 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_M_set" "', argument " "2"" of type '" "int""'");
23461 }
23462 arg2 = static_cast< int >(val2);
23463 if (arg1) (arg1)->M = arg2;
23464 resultobj = SWIG_Py_Void();
23465 return resultobj;
23466 fail:
23467 return NULL;
23468 }
23469
23470
23471 SWIGINTERN PyObject *_wrap_OPQMatrix_M_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23472 PyObject *resultobj = 0;
23473 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23474 void *argp1 = 0 ;
23475 int res1 = 0 ;
23476 PyObject * obj0 = 0 ;
23477 int result;
23478
23479 if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_M_get",&obj0)) SWIG_fail;
23480 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23481 if (!SWIG_IsOK(res1)) {
23482 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_M_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23483 }
23484 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23485 result = (int) ((arg1)->M);
23486 resultobj = SWIG_From_int(static_cast< int >(result));
23487 return resultobj;
23488 fail:
23489 return NULL;
23490 }
23491
23492
23493 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23494 PyObject *resultobj = 0;
23495 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23496 int arg2 ;
23497 void *argp1 = 0 ;
23498 int res1 = 0 ;
23499 int val2 ;
23500 int ecode2 = 0 ;
23501 PyObject * obj0 = 0 ;
23502 PyObject * obj1 = 0 ;
23503
23504 if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_niter_set",&obj0,&obj1)) SWIG_fail;
23505 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23506 if (!SWIG_IsOK(res1)) {
23507 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23508 }
23509 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23510 ecode2 = SWIG_AsVal_int(obj1, &val2);
23511 if (!SWIG_IsOK(ecode2)) {
23512 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_niter_set" "', argument " "2"" of type '" "int""'");
23513 }
23514 arg2 = static_cast< int >(val2);
23515 if (arg1) (arg1)->niter = arg2;
23516 resultobj = SWIG_Py_Void();
23517 return resultobj;
23518 fail:
23519 return NULL;
23520 }
23521
23522
23523 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23524 PyObject *resultobj = 0;
23525 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23526 void *argp1 = 0 ;
23527 int res1 = 0 ;
23528 PyObject * obj0 = 0 ;
23529 int result;
23530
23531 if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_niter_get",&obj0)) SWIG_fail;
23532 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23533 if (!SWIG_IsOK(res1)) {
23534 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23535 }
23536 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23537 result = (int) ((arg1)->niter);
23538 resultobj = SWIG_From_int(static_cast< int >(result));
23539 return resultobj;
23540 fail:
23541 return NULL;
23542 }
23543
23544
23545 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23546 PyObject *resultobj = 0;
23547 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23548 int arg2 ;
23549 void *argp1 = 0 ;
23550 int res1 = 0 ;
23551 int val2 ;
23552 int ecode2 = 0 ;
23553 PyObject * obj0 = 0 ;
23554 PyObject * obj1 = 0 ;
23555
23556 if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_niter_pq_set",&obj0,&obj1)) SWIG_fail;
23557 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23558 if (!SWIG_IsOK(res1)) {
23559 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_pq_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23560 }
23561 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23562 ecode2 = SWIG_AsVal_int(obj1, &val2);
23563 if (!SWIG_IsOK(ecode2)) {
23564 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_niter_pq_set" "', argument " "2"" of type '" "int""'");
23565 }
23566 arg2 = static_cast< int >(val2);
23567 if (arg1) (arg1)->niter_pq = arg2;
23568 resultobj = SWIG_Py_Void();
23569 return resultobj;
23570 fail:
23571 return NULL;
23572 }
23573
23574
23575 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23576 PyObject *resultobj = 0;
23577 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23578 void *argp1 = 0 ;
23579 int res1 = 0 ;
23580 PyObject * obj0 = 0 ;
23581 int result;
23582
23583 if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_niter_pq_get",&obj0)) SWIG_fail;
23584 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23585 if (!SWIG_IsOK(res1)) {
23586 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_pq_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23587 }
23588 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23589 result = (int) ((arg1)->niter_pq);
23590 resultobj = SWIG_From_int(static_cast< int >(result));
23591 return resultobj;
23592 fail:
23593 return NULL;
23594 }
23595
23596
23597 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_0_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23598 PyObject *resultobj = 0;
23599 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23600 int arg2 ;
23601 void *argp1 = 0 ;
23602 int res1 = 0 ;
23603 int val2 ;
23604 int ecode2 = 0 ;
23605 PyObject * obj0 = 0 ;
23606 PyObject * obj1 = 0 ;
23607
23608 if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_niter_pq_0_set",&obj0,&obj1)) SWIG_fail;
23609 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23610 if (!SWIG_IsOK(res1)) {
23611 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_pq_0_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23612 }
23613 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23614 ecode2 = SWIG_AsVal_int(obj1, &val2);
23615 if (!SWIG_IsOK(ecode2)) {
23616 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_niter_pq_0_set" "', argument " "2"" of type '" "int""'");
23617 }
23618 arg2 = static_cast< int >(val2);
23619 if (arg1) (arg1)->niter_pq_0 = arg2;
23620 resultobj = SWIG_Py_Void();
23621 return resultobj;
23622 fail:
23623 return NULL;
23624 }
23625
23626
23627 SWIGINTERN PyObject *_wrap_OPQMatrix_niter_pq_0_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23628 PyObject *resultobj = 0;
23629 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23630 void *argp1 = 0 ;
23631 int res1 = 0 ;
23632 PyObject * obj0 = 0 ;
23633 int result;
23634
23635 if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_niter_pq_0_get",&obj0)) SWIG_fail;
23636 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23637 if (!SWIG_IsOK(res1)) {
23638 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_niter_pq_0_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23639 }
23640 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23641 result = (int) ((arg1)->niter_pq_0);
23642 resultobj = SWIG_From_int(static_cast< int >(result));
23643 return resultobj;
23644 fail:
23645 return NULL;
23646 }
23647
23648
23649 SWIGINTERN PyObject *_wrap_OPQMatrix_max_train_points_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23650 PyObject *resultobj = 0;
23651 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23652 size_t arg2 ;
23653 void *argp1 = 0 ;
23654 int res1 = 0 ;
23655 size_t val2 ;
23656 int ecode2 = 0 ;
23657 PyObject * obj0 = 0 ;
23658 PyObject * obj1 = 0 ;
23659
23660 if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_max_train_points_set",&obj0,&obj1)) SWIG_fail;
23661 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23662 if (!SWIG_IsOK(res1)) {
23663 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_max_train_points_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23664 }
23665 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23666 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
23667 if (!SWIG_IsOK(ecode2)) {
23668 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_max_train_points_set" "', argument " "2"" of type '" "size_t""'");
23669 }
23670 arg2 = static_cast< size_t >(val2);
23671 if (arg1) (arg1)->max_train_points = arg2;
23672 resultobj = SWIG_Py_Void();
23673 return resultobj;
23674 fail:
23675 return NULL;
23676 }
23677
23678
23679 SWIGINTERN PyObject *_wrap_OPQMatrix_max_train_points_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23680 PyObject *resultobj = 0;
23681 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23682 void *argp1 = 0 ;
23683 int res1 = 0 ;
23684 PyObject * obj0 = 0 ;
23685 size_t result;
23686
23687 if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_max_train_points_get",&obj0)) SWIG_fail;
23688 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23689 if (!SWIG_IsOK(res1)) {
23690 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_max_train_points_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23691 }
23692 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23693 result = (size_t) ((arg1)->max_train_points);
23694 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
23695 return resultobj;
23696 fail:
23697 return NULL;
23698 }
23699
23700
23701 SWIGINTERN PyObject *_wrap_OPQMatrix_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23702 PyObject *resultobj = 0;
23703 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23704 bool arg2 ;
23705 void *argp1 = 0 ;
23706 int res1 = 0 ;
23707 bool val2 ;
23708 int ecode2 = 0 ;
23709 PyObject * obj0 = 0 ;
23710 PyObject * obj1 = 0 ;
23711
23712 if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_verbose_set",&obj0,&obj1)) SWIG_fail;
23713 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23714 if (!SWIG_IsOK(res1)) {
23715 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_verbose_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23716 }
23717 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23718 ecode2 = SWIG_AsVal_bool(obj1, &val2);
23719 if (!SWIG_IsOK(ecode2)) {
23720 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_verbose_set" "', argument " "2"" of type '" "bool""'");
23721 }
23722 arg2 = static_cast< bool >(val2);
23723 if (arg1) (arg1)->verbose = arg2;
23724 resultobj = SWIG_Py_Void();
23725 return resultobj;
23726 fail:
23727 return NULL;
23728 }
23729
23730
23731 SWIGINTERN PyObject *_wrap_OPQMatrix_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23732 PyObject *resultobj = 0;
23733 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23734 void *argp1 = 0 ;
23735 int res1 = 0 ;
23736 PyObject * obj0 = 0 ;
23737 bool result;
23738
23739 if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_verbose_get",&obj0)) SWIG_fail;
23740 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23741 if (!SWIG_IsOK(res1)) {
23742 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_verbose_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23743 }
23744 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23745 result = (bool) ((arg1)->verbose);
23746 resultobj = SWIG_From_bool(static_cast< bool >(result));
23747 return resultobj;
23748 fail:
23749 return NULL;
23750 }
23751
23752
23753 SWIGINTERN PyObject *_wrap_OPQMatrix_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23754 PyObject *resultobj = 0;
23755 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23756 faiss::ProductQuantizer *arg2 = (faiss::ProductQuantizer *) 0 ;
23757 void *argp1 = 0 ;
23758 int res1 = 0 ;
23759 void *argp2 = 0 ;
23760 int res2 = 0 ;
23761 PyObject * obj0 = 0 ;
23762 PyObject * obj1 = 0 ;
23763
23764 if (!PyArg_ParseTuple(args,(char *)"OO:OPQMatrix_pq_set",&obj0,&obj1)) SWIG_fail;
23765 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23766 if (!SWIG_IsOK(res1)) {
23767 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_pq_set" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23768 }
23769 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23770 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_DISOWN | 0 );
23771 if (!SWIG_IsOK(res2)) {
23772 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OPQMatrix_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
23773 }
23774 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
23775 if (arg1) (arg1)->pq = arg2;
23776 resultobj = SWIG_Py_Void();
23777 return resultobj;
23778 fail:
23779 return NULL;
23780 }
23781
23782
23783 SWIGINTERN PyObject *_wrap_OPQMatrix_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23784 PyObject *resultobj = 0;
23785 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
23786 void *argp1 = 0 ;
23787 int res1 = 0 ;
23788 PyObject * obj0 = 0 ;
23789 faiss::ProductQuantizer *result = 0 ;
23790
23791 if (!PyArg_ParseTuple(args,(char *)"O:OPQMatrix_pq_get",&obj0)) SWIG_fail;
23792 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
23793 if (!SWIG_IsOK(res1)) {
23794 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_pq_get" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
23795 }
23796 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
23797 result = (faiss::ProductQuantizer *) ((arg1)->pq);
23798 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
23799 return resultobj;
23800 fail:
23801 return NULL;
23802 }
23803
23804
23805 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23806 PyObject *resultobj = 0;
23807 int arg1 ;
23808 int arg2 ;
23809 int arg3 ;
23810 int val1 ;
23811 int ecode1 = 0 ;
23812 int val2 ;
23813 int ecode2 = 0 ;
23814 int val3 ;
23815 int ecode3 = 0 ;
23816 PyObject * obj0 = 0 ;
23817 PyObject * obj1 = 0 ;
23818 PyObject * obj2 = 0 ;
23819 faiss::OPQMatrix *result = 0 ;
23820
23821 if (!PyArg_ParseTuple(args,(char *)"OOO:new_OPQMatrix",&obj0,&obj1,&obj2)) SWIG_fail;
23822 ecode1 = SWIG_AsVal_int(obj0, &val1);
23823 if (!SWIG_IsOK(ecode1)) {
23824 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
23825 }
23826 arg1 = static_cast< int >(val1);
23827 ecode2 = SWIG_AsVal_int(obj1, &val2);
23828 if (!SWIG_IsOK(ecode2)) {
23829 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OPQMatrix" "', argument " "2"" of type '" "int""'");
23830 }
23831 arg2 = static_cast< int >(val2);
23832 ecode3 = SWIG_AsVal_int(obj2, &val3);
23833 if (!SWIG_IsOK(ecode3)) {
23834 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_OPQMatrix" "', argument " "3"" of type '" "int""'");
23835 }
23836 arg3 = static_cast< int >(val3);
23837 {
23838 Py_BEGIN_ALLOW_THREADS
23839 try {
23840 result = (faiss::OPQMatrix *)new faiss::OPQMatrix(arg1,arg2,arg3);
23841 } catch(faiss::FaissException & e) {
23842 PyEval_RestoreThread(_save);
23843 PyErr_SetString(PyExc_RuntimeError, e.what());
23844 SWIG_fail;
23845 }
23846 Py_END_ALLOW_THREADS
23847 }
23848 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
23849 return resultobj;
23850 fail:
23851 return NULL;
23852 }
23853
23854
23855 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23856 PyObject *resultobj = 0;
23857 int arg1 ;
23858 int arg2 ;
23859 int val1 ;
23860 int ecode1 = 0 ;
23861 int val2 ;
23862 int ecode2 = 0 ;
23863 PyObject * obj0 = 0 ;
23864 PyObject * obj1 = 0 ;
23865 faiss::OPQMatrix *result = 0 ;
23866
23867 if (!PyArg_ParseTuple(args,(char *)"OO:new_OPQMatrix",&obj0,&obj1)) SWIG_fail;
23868 ecode1 = SWIG_AsVal_int(obj0, &val1);
23869 if (!SWIG_IsOK(ecode1)) {
23870 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
23871 }
23872 arg1 = static_cast< int >(val1);
23873 ecode2 = SWIG_AsVal_int(obj1, &val2);
23874 if (!SWIG_IsOK(ecode2)) {
23875 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OPQMatrix" "', argument " "2"" of type '" "int""'");
23876 }
23877 arg2 = static_cast< int >(val2);
23878 {
23879 Py_BEGIN_ALLOW_THREADS
23880 try {
23881 result = (faiss::OPQMatrix *)new faiss::OPQMatrix(arg1,arg2);
23882 } catch(faiss::FaissException & e) {
23883 PyEval_RestoreThread(_save);
23884 PyErr_SetString(PyExc_RuntimeError, e.what());
23885 SWIG_fail;
23886 }
23887 Py_END_ALLOW_THREADS
23888 }
23889 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
23890 return resultobj;
23891 fail:
23892 return NULL;
23893 }
23894
23895
23896 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23897 PyObject *resultobj = 0;
23898 int arg1 ;
23899 int val1 ;
23900 int ecode1 = 0 ;
23901 PyObject * obj0 = 0 ;
23902 faiss::OPQMatrix *result = 0 ;
23903
23904 if (!PyArg_ParseTuple(args,(char *)"O:new_OPQMatrix",&obj0)) SWIG_fail;
23905 ecode1 = SWIG_AsVal_int(obj0, &val1);
23906 if (!SWIG_IsOK(ecode1)) {
23907 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OPQMatrix" "', argument " "1"" of type '" "int""'");
23908 }
23909 arg1 = static_cast< int >(val1);
23910 {
23911 Py_BEGIN_ALLOW_THREADS
23912 try {
23913 result = (faiss::OPQMatrix *)new faiss::OPQMatrix(arg1);
23914 } catch(faiss::FaissException & e) {
23915 PyEval_RestoreThread(_save);
23916 PyErr_SetString(PyExc_RuntimeError, e.what());
23917 SWIG_fail;
23918 }
23919 Py_END_ALLOW_THREADS
23920 }
23921 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
23922 return resultobj;
23923 fail:
23924 return NULL;
23925 }
23926
23927
23928 SWIGINTERN PyObject *_wrap_new_OPQMatrix__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
23929 PyObject *resultobj = 0;
23930 faiss::OPQMatrix *result = 0 ;
23931
23932 if (!PyArg_ParseTuple(args,(char *)":new_OPQMatrix")) SWIG_fail;
23933 {
23934 Py_BEGIN_ALLOW_THREADS
23935 try {
23936 result = (faiss::OPQMatrix *)new faiss::OPQMatrix();
23937 } catch(faiss::FaissException & e) {
23938 PyEval_RestoreThread(_save);
23939 PyErr_SetString(PyExc_RuntimeError, e.what());
23940 SWIG_fail;
23941 }
23942 Py_END_ALLOW_THREADS
23943 }
23944 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_NEW | 0 );
23945 return resultobj;
23946 fail:
23947 return NULL;
23948 }
23949
23950
23951 SWIGINTERN PyObject *_wrap_new_OPQMatrix(PyObject *self, PyObject *args) {
23952 Py_ssize_t argc;
23953 PyObject *argv[4] = {
23954 0
23955 };
23956 Py_ssize_t ii;
23957
23958 if (!PyTuple_Check(args)) SWIG_fail;
23959 argc = args ? PyObject_Length(args) : 0;
23960 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
23961 argv[ii] = PyTuple_GET_ITEM(args,ii);
23962 }
23963 if (argc == 0) {
23964 return _wrap_new_OPQMatrix__SWIG_3(self, args);
23965 }
23966 if (argc == 1) {
23967 int _v;
23968 {
23969 int res = SWIG_AsVal_int(argv[0], NULL);
23970 _v = SWIG_CheckState(res);
23971 }
23972 if (_v) {
23973 return _wrap_new_OPQMatrix__SWIG_2(self, args);
23974 }
23975 }
23976 if (argc == 2) {
23977 int _v;
23978 {
23979 int res = SWIG_AsVal_int(argv[0], NULL);
23980 _v = SWIG_CheckState(res);
23981 }
23982 if (_v) {
23983 {
23984 int res = SWIG_AsVal_int(argv[1], NULL);
23985 _v = SWIG_CheckState(res);
23986 }
23987 if (_v) {
23988 return _wrap_new_OPQMatrix__SWIG_1(self, args);
23989 }
23990 }
23991 }
23992 if (argc == 3) {
23993 int _v;
23994 {
23995 int res = SWIG_AsVal_int(argv[0], NULL);
23996 _v = SWIG_CheckState(res);
23997 }
23998 if (_v) {
23999 {
24000 int res = SWIG_AsVal_int(argv[1], NULL);
24001 _v = SWIG_CheckState(res);
24002 }
24003 if (_v) {
24004 {
24005 int res = SWIG_AsVal_int(argv[2], NULL);
24006 _v = SWIG_CheckState(res);
24007 }
24008 if (_v) {
24009 return _wrap_new_OPQMatrix__SWIG_0(self, args);
24010 }
24011 }
24012 }
24013 }
24014
24015 fail:
24016 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_OPQMatrix'.\n"
24017 " Possible C/C++ prototypes are:\n"
24018 " faiss::OPQMatrix::OPQMatrix(int,int,int)\n"
24019 " faiss::OPQMatrix::OPQMatrix(int,int)\n"
24020 " faiss::OPQMatrix::OPQMatrix(int)\n"
24021 " faiss::OPQMatrix::OPQMatrix()\n");
24022 return 0;
24023 }
24024
24025
24026 SWIGINTERN PyObject *_wrap_OPQMatrix_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24027 PyObject *resultobj = 0;
24028 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24029 faiss::Index::idx_t arg2 ;
24030 float *arg3 = (float *) 0 ;
24031 void *argp1 = 0 ;
24032 int res1 = 0 ;
24033 long val2 ;
24034 int ecode2 = 0 ;
24035 void *argp3 = 0 ;
24036 int res3 = 0 ;
24037 PyObject * obj0 = 0 ;
24038 PyObject * obj1 = 0 ;
24039 PyObject * obj2 = 0 ;
24040
24041 if (!PyArg_ParseTuple(args,(char *)"OOO:OPQMatrix_train",&obj0,&obj1,&obj2)) SWIG_fail;
24042 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, 0 | 0 );
24043 if (!SWIG_IsOK(res1)) {
24044 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OPQMatrix_train" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24045 }
24046 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24047 ecode2 = SWIG_AsVal_long(obj1, &val2);
24048 if (!SWIG_IsOK(ecode2)) {
24049 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OPQMatrix_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
24050 }
24051 arg2 = static_cast< faiss::Index::idx_t >(val2);
24052 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
24053 if (!SWIG_IsOK(res3)) {
24054 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "OPQMatrix_train" "', argument " "3"" of type '" "float const *""'");
24055 }
24056 arg3 = reinterpret_cast< float * >(argp3);
24057 {
24058 Py_BEGIN_ALLOW_THREADS
24059 try {
24060 (arg1)->train(arg2,(float const *)arg3);
24061 } catch(faiss::FaissException & e) {
24062 PyEval_RestoreThread(_save);
24063 PyErr_SetString(PyExc_RuntimeError, e.what());
24064 SWIG_fail;
24065 }
24066 Py_END_ALLOW_THREADS
24067 }
24068 resultobj = SWIG_Py_Void();
24069 return resultobj;
24070 fail:
24071 return NULL;
24072 }
24073
24074
24075 SWIGINTERN PyObject *_wrap_delete_OPQMatrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24076 PyObject *resultobj = 0;
24077 faiss::OPQMatrix *arg1 = (faiss::OPQMatrix *) 0 ;
24078 void *argp1 = 0 ;
24079 int res1 = 0 ;
24080 PyObject * obj0 = 0 ;
24081
24082 if (!PyArg_ParseTuple(args,(char *)"O:delete_OPQMatrix",&obj0)) SWIG_fail;
24083 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OPQMatrix, SWIG_POINTER_DISOWN | 0 );
24084 if (!SWIG_IsOK(res1)) {
24085 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OPQMatrix" "', argument " "1"" of type '" "faiss::OPQMatrix *""'");
24086 }
24087 arg1 = reinterpret_cast< faiss::OPQMatrix * >(argp1);
24088 delete arg1;
24089 resultobj = SWIG_Py_Void();
24090 return resultobj;
24091 fail:
24092 return NULL;
24093 }
24094
24095
24096 SWIGINTERN PyObject *OPQMatrix_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24097 PyObject *obj;
24098 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
24099 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OPQMatrix, SWIG_NewClientData(obj));
24100 return SWIG_Py_Void();
24101 }
24102
24103 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24104 PyObject *resultobj = 0;
24105 faiss::RemapDimensionsTransform *arg1 = (faiss::RemapDimensionsTransform *) 0 ;
24106 std::vector< int > *arg2 = (std::vector< int > *) 0 ;
24107 void *argp1 = 0 ;
24108 int res1 = 0 ;
24109 void *argp2 = 0 ;
24110 int res2 = 0 ;
24111 PyObject * obj0 = 0 ;
24112 PyObject * obj1 = 0 ;
24113
24114 if (!PyArg_ParseTuple(args,(char *)"OO:RemapDimensionsTransform_map_set",&obj0,&obj1)) SWIG_fail;
24115 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
24116 if (!SWIG_IsOK(res1)) {
24117 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemapDimensionsTransform_map_set" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
24118 }
24119 arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
24120 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
24121 if (!SWIG_IsOK(res2)) {
24122 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RemapDimensionsTransform_map_set" "', argument " "2"" of type '" "std::vector< int > *""'");
24123 }
24124 arg2 = reinterpret_cast< std::vector< int > * >(argp2);
24125 if (arg1) (arg1)->map = *arg2;
24126 resultobj = SWIG_Py_Void();
24127 return resultobj;
24128 fail:
24129 return NULL;
24130 }
24131
24132
24133 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24134 PyObject *resultobj = 0;
24135 faiss::RemapDimensionsTransform *arg1 = (faiss::RemapDimensionsTransform *) 0 ;
24136 void *argp1 = 0 ;
24137 int res1 = 0 ;
24138 PyObject * obj0 = 0 ;
24139 std::vector< int > *result = 0 ;
24140
24141 if (!PyArg_ParseTuple(args,(char *)"O:RemapDimensionsTransform_map_get",&obj0)) SWIG_fail;
24142 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
24143 if (!SWIG_IsOK(res1)) {
24144 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemapDimensionsTransform_map_get" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
24145 }
24146 arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
24147 result = (std::vector< int > *)& ((arg1)->map);
24148 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
24149 return resultobj;
24150 fail:
24151 return NULL;
24152 }
24153
24154
24155 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24156 PyObject *resultobj = 0;
24157 int arg1 ;
24158 int arg2 ;
24159 int *arg3 = (int *) 0 ;
24160 int val1 ;
24161 int ecode1 = 0 ;
24162 int val2 ;
24163 int ecode2 = 0 ;
24164 void *argp3 = 0 ;
24165 int res3 = 0 ;
24166 PyObject * obj0 = 0 ;
24167 PyObject * obj1 = 0 ;
24168 PyObject * obj2 = 0 ;
24169 faiss::RemapDimensionsTransform *result = 0 ;
24170
24171 if (!PyArg_ParseTuple(args,(char *)"OOO:new_RemapDimensionsTransform",&obj0,&obj1,&obj2)) SWIG_fail;
24172 ecode1 = SWIG_AsVal_int(obj0, &val1);
24173 if (!SWIG_IsOK(ecode1)) {
24174 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
24175 }
24176 arg1 = static_cast< int >(val1);
24177 ecode2 = SWIG_AsVal_int(obj1, &val2);
24178 if (!SWIG_IsOK(ecode2)) {
24179 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
24180 }
24181 arg2 = static_cast< int >(val2);
24182 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
24183 if (!SWIG_IsOK(res3)) {
24184 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_RemapDimensionsTransform" "', argument " "3"" of type '" "int const *""'");
24185 }
24186 arg3 = reinterpret_cast< int * >(argp3);
24187 {
24188 Py_BEGIN_ALLOW_THREADS
24189 try {
24190 result = (faiss::RemapDimensionsTransform *)new faiss::RemapDimensionsTransform(arg1,arg2,(int const *)arg3);
24191 } catch(faiss::FaissException & e) {
24192 PyEval_RestoreThread(_save);
24193 PyErr_SetString(PyExc_RuntimeError, e.what());
24194 SWIG_fail;
24195 }
24196 Py_END_ALLOW_THREADS
24197 }
24198 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
24199 return resultobj;
24200 fail:
24201 return NULL;
24202 }
24203
24204
24205 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24206 PyObject *resultobj = 0;
24207 int arg1 ;
24208 int arg2 ;
24209 bool arg3 ;
24210 int val1 ;
24211 int ecode1 = 0 ;
24212 int val2 ;
24213 int ecode2 = 0 ;
24214 bool val3 ;
24215 int ecode3 = 0 ;
24216 PyObject * obj0 = 0 ;
24217 PyObject * obj1 = 0 ;
24218 PyObject * obj2 = 0 ;
24219 faiss::RemapDimensionsTransform *result = 0 ;
24220
24221 if (!PyArg_ParseTuple(args,(char *)"OOO:new_RemapDimensionsTransform",&obj0,&obj1,&obj2)) SWIG_fail;
24222 ecode1 = SWIG_AsVal_int(obj0, &val1);
24223 if (!SWIG_IsOK(ecode1)) {
24224 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
24225 }
24226 arg1 = static_cast< int >(val1);
24227 ecode2 = SWIG_AsVal_int(obj1, &val2);
24228 if (!SWIG_IsOK(ecode2)) {
24229 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
24230 }
24231 arg2 = static_cast< int >(val2);
24232 ecode3 = SWIG_AsVal_bool(obj2, &val3);
24233 if (!SWIG_IsOK(ecode3)) {
24234 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_RemapDimensionsTransform" "', argument " "3"" of type '" "bool""'");
24235 }
24236 arg3 = static_cast< bool >(val3);
24237 {
24238 Py_BEGIN_ALLOW_THREADS
24239 try {
24240 result = (faiss::RemapDimensionsTransform *)new faiss::RemapDimensionsTransform(arg1,arg2,arg3);
24241 } catch(faiss::FaissException & e) {
24242 PyEval_RestoreThread(_save);
24243 PyErr_SetString(PyExc_RuntimeError, e.what());
24244 SWIG_fail;
24245 }
24246 Py_END_ALLOW_THREADS
24247 }
24248 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
24249 return resultobj;
24250 fail:
24251 return NULL;
24252 }
24253
24254
24255 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24256 PyObject *resultobj = 0;
24257 int arg1 ;
24258 int arg2 ;
24259 int val1 ;
24260 int ecode1 = 0 ;
24261 int val2 ;
24262 int ecode2 = 0 ;
24263 PyObject * obj0 = 0 ;
24264 PyObject * obj1 = 0 ;
24265 faiss::RemapDimensionsTransform *result = 0 ;
24266
24267 if (!PyArg_ParseTuple(args,(char *)"OO:new_RemapDimensionsTransform",&obj0,&obj1)) SWIG_fail;
24268 ecode1 = SWIG_AsVal_int(obj0, &val1);
24269 if (!SWIG_IsOK(ecode1)) {
24270 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RemapDimensionsTransform" "', argument " "1"" of type '" "int""'");
24271 }
24272 arg1 = static_cast< int >(val1);
24273 ecode2 = SWIG_AsVal_int(obj1, &val2);
24274 if (!SWIG_IsOK(ecode2)) {
24275 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RemapDimensionsTransform" "', argument " "2"" of type '" "int""'");
24276 }
24277 arg2 = static_cast< int >(val2);
24278 {
24279 Py_BEGIN_ALLOW_THREADS
24280 try {
24281 result = (faiss::RemapDimensionsTransform *)new faiss::RemapDimensionsTransform(arg1,arg2);
24282 } catch(faiss::FaissException & e) {
24283 PyEval_RestoreThread(_save);
24284 PyErr_SetString(PyExc_RuntimeError, e.what());
24285 SWIG_fail;
24286 }
24287 Py_END_ALLOW_THREADS
24288 }
24289 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
24290 return resultobj;
24291 fail:
24292 return NULL;
24293 }
24294
24295
24296 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24297 PyObject *resultobj = 0;
24298 faiss::RemapDimensionsTransform *arg1 = (faiss::RemapDimensionsTransform *) 0 ;
24299 faiss::VectorTransform::idx_t arg2 ;
24300 float *arg3 = (float *) 0 ;
24301 float *arg4 = (float *) 0 ;
24302 void *argp1 = 0 ;
24303 int res1 = 0 ;
24304 long val2 ;
24305 int ecode2 = 0 ;
24306 void *argp3 = 0 ;
24307 int res3 = 0 ;
24308 void *argp4 = 0 ;
24309 int res4 = 0 ;
24310 PyObject * obj0 = 0 ;
24311 PyObject * obj1 = 0 ;
24312 PyObject * obj2 = 0 ;
24313 PyObject * obj3 = 0 ;
24314
24315 if (!PyArg_ParseTuple(args,(char *)"OOOO:RemapDimensionsTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
24316 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
24317 if (!SWIG_IsOK(res1)) {
24318 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform const *""'");
24319 }
24320 arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
24321 ecode2 = SWIG_AsVal_long(obj1, &val2);
24322 if (!SWIG_IsOK(ecode2)) {
24323 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
24324 }
24325 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
24326 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
24327 if (!SWIG_IsOK(res3)) {
24328 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
24329 }
24330 arg3 = reinterpret_cast< float * >(argp3);
24331 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
24332 if (!SWIG_IsOK(res4)) {
24333 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RemapDimensionsTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
24334 }
24335 arg4 = reinterpret_cast< float * >(argp4);
24336 {
24337 Py_BEGIN_ALLOW_THREADS
24338 try {
24339 ((faiss::RemapDimensionsTransform const *)arg1)->apply_noalloc(arg2,(float const *)arg3,arg4);
24340 } catch(faiss::FaissException & e) {
24341 PyEval_RestoreThread(_save);
24342 PyErr_SetString(PyExc_RuntimeError, e.what());
24343 SWIG_fail;
24344 }
24345 Py_END_ALLOW_THREADS
24346 }
24347 resultobj = SWIG_Py_Void();
24348 return resultobj;
24349 fail:
24350 return NULL;
24351 }
24352
24353
24354 SWIGINTERN PyObject *_wrap_RemapDimensionsTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24355 PyObject *resultobj = 0;
24356 faiss::RemapDimensionsTransform *arg1 = (faiss::RemapDimensionsTransform *) 0 ;
24357 faiss::VectorTransform::idx_t arg2 ;
24358 float *arg3 = (float *) 0 ;
24359 float *arg4 = (float *) 0 ;
24360 void *argp1 = 0 ;
24361 int res1 = 0 ;
24362 long val2 ;
24363 int ecode2 = 0 ;
24364 void *argp3 = 0 ;
24365 int res3 = 0 ;
24366 void *argp4 = 0 ;
24367 int res4 = 0 ;
24368 PyObject * obj0 = 0 ;
24369 PyObject * obj1 = 0 ;
24370 PyObject * obj2 = 0 ;
24371 PyObject * obj3 = 0 ;
24372
24373 if (!PyArg_ParseTuple(args,(char *)"OOOO:RemapDimensionsTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
24374 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, 0 | 0 );
24375 if (!SWIG_IsOK(res1)) {
24376 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform const *""'");
24377 }
24378 arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
24379 ecode2 = SWIG_AsVal_long(obj1, &val2);
24380 if (!SWIG_IsOK(ecode2)) {
24381 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
24382 }
24383 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
24384 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
24385 if (!SWIG_IsOK(res3)) {
24386 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
24387 }
24388 arg3 = reinterpret_cast< float * >(argp3);
24389 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
24390 if (!SWIG_IsOK(res4)) {
24391 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "RemapDimensionsTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
24392 }
24393 arg4 = reinterpret_cast< float * >(argp4);
24394 {
24395 Py_BEGIN_ALLOW_THREADS
24396 try {
24397 ((faiss::RemapDimensionsTransform const *)arg1)->reverse_transform(arg2,(float const *)arg3,arg4);
24398 } catch(faiss::FaissException & e) {
24399 PyEval_RestoreThread(_save);
24400 PyErr_SetString(PyExc_RuntimeError, e.what());
24401 SWIG_fail;
24402 }
24403 Py_END_ALLOW_THREADS
24404 }
24405 resultobj = SWIG_Py_Void();
24406 return resultobj;
24407 fail:
24408 return NULL;
24409 }
24410
24411
24412 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24413 PyObject *resultobj = 0;
24414 faiss::RemapDimensionsTransform *result = 0 ;
24415
24416 if (!PyArg_ParseTuple(args,(char *)":new_RemapDimensionsTransform")) SWIG_fail;
24417 {
24418 Py_BEGIN_ALLOW_THREADS
24419 try {
24420 result = (faiss::RemapDimensionsTransform *)new faiss::RemapDimensionsTransform();
24421 } catch(faiss::FaissException & e) {
24422 PyEval_RestoreThread(_save);
24423 PyErr_SetString(PyExc_RuntimeError, e.what());
24424 SWIG_fail;
24425 }
24426 Py_END_ALLOW_THREADS
24427 }
24428 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_NEW | 0 );
24429 return resultobj;
24430 fail:
24431 return NULL;
24432 }
24433
24434
24435 SWIGINTERN PyObject *_wrap_new_RemapDimensionsTransform(PyObject *self, PyObject *args) {
24436 Py_ssize_t argc;
24437 PyObject *argv[4] = {
24438 0
24439 };
24440 Py_ssize_t ii;
24441
24442 if (!PyTuple_Check(args)) SWIG_fail;
24443 argc = args ? PyObject_Length(args) : 0;
24444 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
24445 argv[ii] = PyTuple_GET_ITEM(args,ii);
24446 }
24447 if (argc == 0) {
24448 return _wrap_new_RemapDimensionsTransform__SWIG_3(self, args);
24449 }
24450 if (argc == 2) {
24451 int _v;
24452 {
24453 int res = SWIG_AsVal_int(argv[0], NULL);
24454 _v = SWIG_CheckState(res);
24455 }
24456 if (_v) {
24457 {
24458 int res = SWIG_AsVal_int(argv[1], NULL);
24459 _v = SWIG_CheckState(res);
24460 }
24461 if (_v) {
24462 return _wrap_new_RemapDimensionsTransform__SWIG_2(self, args);
24463 }
24464 }
24465 }
24466 if (argc == 3) {
24467 int _v;
24468 {
24469 int res = SWIG_AsVal_int(argv[0], NULL);
24470 _v = SWIG_CheckState(res);
24471 }
24472 if (_v) {
24473 {
24474 int res = SWIG_AsVal_int(argv[1], NULL);
24475 _v = SWIG_CheckState(res);
24476 }
24477 if (_v) {
24478 void *vptr = 0;
24479 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
24480 _v = SWIG_CheckState(res);
24481 if (_v) {
24482 return _wrap_new_RemapDimensionsTransform__SWIG_0(self, args);
24483 }
24484 }
24485 }
24486 }
24487 if (argc == 3) {
24488 int _v;
24489 {
24490 int res = SWIG_AsVal_int(argv[0], NULL);
24491 _v = SWIG_CheckState(res);
24492 }
24493 if (_v) {
24494 {
24495 int res = SWIG_AsVal_int(argv[1], NULL);
24496 _v = SWIG_CheckState(res);
24497 }
24498 if (_v) {
24499 {
24500 int res = SWIG_AsVal_bool(argv[2], NULL);
24501 _v = SWIG_CheckState(res);
24502 }
24503 if (_v) {
24504 return _wrap_new_RemapDimensionsTransform__SWIG_1(self, args);
24505 }
24506 }
24507 }
24508 }
24509
24510 fail:
24511 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RemapDimensionsTransform'.\n"
24512 " Possible C/C++ prototypes are:\n"
24513 " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int,int const *)\n"
24514 " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int,bool)\n"
24515 " faiss::RemapDimensionsTransform::RemapDimensionsTransform(int,int)\n"
24516 " faiss::RemapDimensionsTransform::RemapDimensionsTransform()\n");
24517 return 0;
24518 }
24519
24520
24521 SWIGINTERN PyObject *_wrap_delete_RemapDimensionsTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24522 PyObject *resultobj = 0;
24523 faiss::RemapDimensionsTransform *arg1 = (faiss::RemapDimensionsTransform *) 0 ;
24524 void *argp1 = 0 ;
24525 int res1 = 0 ;
24526 PyObject * obj0 = 0 ;
24527
24528 if (!PyArg_ParseTuple(args,(char *)"O:delete_RemapDimensionsTransform",&obj0)) SWIG_fail;
24529 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_POINTER_DISOWN | 0 );
24530 if (!SWIG_IsOK(res1)) {
24531 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RemapDimensionsTransform" "', argument " "1"" of type '" "faiss::RemapDimensionsTransform *""'");
24532 }
24533 arg1 = reinterpret_cast< faiss::RemapDimensionsTransform * >(argp1);
24534 delete arg1;
24535 resultobj = SWIG_Py_Void();
24536 return resultobj;
24537 fail:
24538 return NULL;
24539 }
24540
24541
24542 SWIGINTERN PyObject *RemapDimensionsTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24543 PyObject *obj;
24544 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
24545 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RemapDimensionsTransform, SWIG_NewClientData(obj));
24546 return SWIG_Py_Void();
24547 }
24548
24549 SWIGINTERN PyObject *_wrap_NormalizationTransform_norm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24550 PyObject *resultobj = 0;
24551 faiss::NormalizationTransform *arg1 = (faiss::NormalizationTransform *) 0 ;
24552 float arg2 ;
24553 void *argp1 = 0 ;
24554 int res1 = 0 ;
24555 float val2 ;
24556 int ecode2 = 0 ;
24557 PyObject * obj0 = 0 ;
24558 PyObject * obj1 = 0 ;
24559
24560 if (!PyArg_ParseTuple(args,(char *)"OO:NormalizationTransform_norm_set",&obj0,&obj1)) SWIG_fail;
24561 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
24562 if (!SWIG_IsOK(res1)) {
24563 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalizationTransform_norm_set" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
24564 }
24565 arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
24566 ecode2 = SWIG_AsVal_float(obj1, &val2);
24567 if (!SWIG_IsOK(ecode2)) {
24568 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NormalizationTransform_norm_set" "', argument " "2"" of type '" "float""'");
24569 }
24570 arg2 = static_cast< float >(val2);
24571 if (arg1) (arg1)->norm = arg2;
24572 resultobj = SWIG_Py_Void();
24573 return resultobj;
24574 fail:
24575 return NULL;
24576 }
24577
24578
24579 SWIGINTERN PyObject *_wrap_NormalizationTransform_norm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24580 PyObject *resultobj = 0;
24581 faiss::NormalizationTransform *arg1 = (faiss::NormalizationTransform *) 0 ;
24582 void *argp1 = 0 ;
24583 int res1 = 0 ;
24584 PyObject * obj0 = 0 ;
24585 float result;
24586
24587 if (!PyArg_ParseTuple(args,(char *)"O:NormalizationTransform_norm_get",&obj0)) SWIG_fail;
24588 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
24589 if (!SWIG_IsOK(res1)) {
24590 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalizationTransform_norm_get" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
24591 }
24592 arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
24593 result = (float) ((arg1)->norm);
24594 resultobj = SWIG_From_float(static_cast< float >(result));
24595 return resultobj;
24596 fail:
24597 return NULL;
24598 }
24599
24600
24601 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24602 PyObject *resultobj = 0;
24603 int arg1 ;
24604 float arg2 ;
24605 int val1 ;
24606 int ecode1 = 0 ;
24607 float val2 ;
24608 int ecode2 = 0 ;
24609 PyObject * obj0 = 0 ;
24610 PyObject * obj1 = 0 ;
24611 faiss::NormalizationTransform *result = 0 ;
24612
24613 if (!PyArg_ParseTuple(args,(char *)"OO:new_NormalizationTransform",&obj0,&obj1)) SWIG_fail;
24614 ecode1 = SWIG_AsVal_int(obj0, &val1);
24615 if (!SWIG_IsOK(ecode1)) {
24616 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NormalizationTransform" "', argument " "1"" of type '" "int""'");
24617 }
24618 arg1 = static_cast< int >(val1);
24619 ecode2 = SWIG_AsVal_float(obj1, &val2);
24620 if (!SWIG_IsOK(ecode2)) {
24621 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_NormalizationTransform" "', argument " "2"" of type '" "float""'");
24622 }
24623 arg2 = static_cast< float >(val2);
24624 {
24625 Py_BEGIN_ALLOW_THREADS
24626 try {
24627 result = (faiss::NormalizationTransform *)new faiss::NormalizationTransform(arg1,arg2);
24628 } catch(faiss::FaissException & e) {
24629 PyEval_RestoreThread(_save);
24630 PyErr_SetString(PyExc_RuntimeError, e.what());
24631 SWIG_fail;
24632 }
24633 Py_END_ALLOW_THREADS
24634 }
24635 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
24636 return resultobj;
24637 fail:
24638 return NULL;
24639 }
24640
24641
24642 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24643 PyObject *resultobj = 0;
24644 int arg1 ;
24645 int val1 ;
24646 int ecode1 = 0 ;
24647 PyObject * obj0 = 0 ;
24648 faiss::NormalizationTransform *result = 0 ;
24649
24650 if (!PyArg_ParseTuple(args,(char *)"O:new_NormalizationTransform",&obj0)) SWIG_fail;
24651 ecode1 = SWIG_AsVal_int(obj0, &val1);
24652 if (!SWIG_IsOK(ecode1)) {
24653 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_NormalizationTransform" "', argument " "1"" of type '" "int""'");
24654 }
24655 arg1 = static_cast< int >(val1);
24656 {
24657 Py_BEGIN_ALLOW_THREADS
24658 try {
24659 result = (faiss::NormalizationTransform *)new faiss::NormalizationTransform(arg1);
24660 } catch(faiss::FaissException & e) {
24661 PyEval_RestoreThread(_save);
24662 PyErr_SetString(PyExc_RuntimeError, e.what());
24663 SWIG_fail;
24664 }
24665 Py_END_ALLOW_THREADS
24666 }
24667 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
24668 return resultobj;
24669 fail:
24670 return NULL;
24671 }
24672
24673
24674 SWIGINTERN PyObject *_wrap_new_NormalizationTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24675 PyObject *resultobj = 0;
24676 faiss::NormalizationTransform *result = 0 ;
24677
24678 if (!PyArg_ParseTuple(args,(char *)":new_NormalizationTransform")) SWIG_fail;
24679 {
24680 Py_BEGIN_ALLOW_THREADS
24681 try {
24682 result = (faiss::NormalizationTransform *)new faiss::NormalizationTransform();
24683 } catch(faiss::FaissException & e) {
24684 PyEval_RestoreThread(_save);
24685 PyErr_SetString(PyExc_RuntimeError, e.what());
24686 SWIG_fail;
24687 }
24688 Py_END_ALLOW_THREADS
24689 }
24690 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_NEW | 0 );
24691 return resultobj;
24692 fail:
24693 return NULL;
24694 }
24695
24696
24697 SWIGINTERN PyObject *_wrap_new_NormalizationTransform(PyObject *self, PyObject *args) {
24698 Py_ssize_t argc;
24699 PyObject *argv[3] = {
24700 0
24701 };
24702 Py_ssize_t ii;
24703
24704 if (!PyTuple_Check(args)) SWIG_fail;
24705 argc = args ? PyObject_Length(args) : 0;
24706 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
24707 argv[ii] = PyTuple_GET_ITEM(args,ii);
24708 }
24709 if (argc == 0) {
24710 return _wrap_new_NormalizationTransform__SWIG_2(self, args);
24711 }
24712 if (argc == 1) {
24713 int _v;
24714 {
24715 int res = SWIG_AsVal_int(argv[0], NULL);
24716 _v = SWIG_CheckState(res);
24717 }
24718 if (_v) {
24719 return _wrap_new_NormalizationTransform__SWIG_1(self, args);
24720 }
24721 }
24722 if (argc == 2) {
24723 int _v;
24724 {
24725 int res = SWIG_AsVal_int(argv[0], NULL);
24726 _v = SWIG_CheckState(res);
24727 }
24728 if (_v) {
24729 {
24730 int res = SWIG_AsVal_float(argv[1], NULL);
24731 _v = SWIG_CheckState(res);
24732 }
24733 if (_v) {
24734 return _wrap_new_NormalizationTransform__SWIG_0(self, args);
24735 }
24736 }
24737 }
24738
24739 fail:
24740 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_NormalizationTransform'.\n"
24741 " Possible C/C++ prototypes are:\n"
24742 " faiss::NormalizationTransform::NormalizationTransform(int,float)\n"
24743 " faiss::NormalizationTransform::NormalizationTransform(int)\n"
24744 " faiss::NormalizationTransform::NormalizationTransform()\n");
24745 return 0;
24746 }
24747
24748
24749 SWIGINTERN PyObject *_wrap_NormalizationTransform_apply_noalloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24750 PyObject *resultobj = 0;
24751 faiss::NormalizationTransform *arg1 = (faiss::NormalizationTransform *) 0 ;
24752 faiss::VectorTransform::idx_t arg2 ;
24753 float *arg3 = (float *) 0 ;
24754 float *arg4 = (float *) 0 ;
24755 void *argp1 = 0 ;
24756 int res1 = 0 ;
24757 long val2 ;
24758 int ecode2 = 0 ;
24759 void *argp3 = 0 ;
24760 int res3 = 0 ;
24761 void *argp4 = 0 ;
24762 int res4 = 0 ;
24763 PyObject * obj0 = 0 ;
24764 PyObject * obj1 = 0 ;
24765 PyObject * obj2 = 0 ;
24766 PyObject * obj3 = 0 ;
24767
24768 if (!PyArg_ParseTuple(args,(char *)"OOOO:NormalizationTransform_apply_noalloc",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
24769 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
24770 if (!SWIG_IsOK(res1)) {
24771 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalizationTransform_apply_noalloc" "', argument " "1"" of type '" "faiss::NormalizationTransform const *""'");
24772 }
24773 arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
24774 ecode2 = SWIG_AsVal_long(obj1, &val2);
24775 if (!SWIG_IsOK(ecode2)) {
24776 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NormalizationTransform_apply_noalloc" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
24777 }
24778 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
24779 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
24780 if (!SWIG_IsOK(res3)) {
24781 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NormalizationTransform_apply_noalloc" "', argument " "3"" of type '" "float const *""'");
24782 }
24783 arg3 = reinterpret_cast< float * >(argp3);
24784 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
24785 if (!SWIG_IsOK(res4)) {
24786 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "NormalizationTransform_apply_noalloc" "', argument " "4"" of type '" "float *""'");
24787 }
24788 arg4 = reinterpret_cast< float * >(argp4);
24789 {
24790 Py_BEGIN_ALLOW_THREADS
24791 try {
24792 ((faiss::NormalizationTransform const *)arg1)->apply_noalloc(arg2,(float const *)arg3,arg4);
24793 } catch(faiss::FaissException & e) {
24794 PyEval_RestoreThread(_save);
24795 PyErr_SetString(PyExc_RuntimeError, e.what());
24796 SWIG_fail;
24797 }
24798 Py_END_ALLOW_THREADS
24799 }
24800 resultobj = SWIG_Py_Void();
24801 return resultobj;
24802 fail:
24803 return NULL;
24804 }
24805
24806
24807 SWIGINTERN PyObject *_wrap_NormalizationTransform_reverse_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24808 PyObject *resultobj = 0;
24809 faiss::NormalizationTransform *arg1 = (faiss::NormalizationTransform *) 0 ;
24810 faiss::VectorTransform::idx_t arg2 ;
24811 float *arg3 = (float *) 0 ;
24812 float *arg4 = (float *) 0 ;
24813 void *argp1 = 0 ;
24814 int res1 = 0 ;
24815 long val2 ;
24816 int ecode2 = 0 ;
24817 void *argp3 = 0 ;
24818 int res3 = 0 ;
24819 void *argp4 = 0 ;
24820 int res4 = 0 ;
24821 PyObject * obj0 = 0 ;
24822 PyObject * obj1 = 0 ;
24823 PyObject * obj2 = 0 ;
24824 PyObject * obj3 = 0 ;
24825
24826 if (!PyArg_ParseTuple(args,(char *)"OOOO:NormalizationTransform_reverse_transform",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
24827 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, 0 | 0 );
24828 if (!SWIG_IsOK(res1)) {
24829 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "NormalizationTransform_reverse_transform" "', argument " "1"" of type '" "faiss::NormalizationTransform const *""'");
24830 }
24831 arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
24832 ecode2 = SWIG_AsVal_long(obj1, &val2);
24833 if (!SWIG_IsOK(ecode2)) {
24834 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "NormalizationTransform_reverse_transform" "', argument " "2"" of type '" "faiss::VectorTransform::idx_t""'");
24835 }
24836 arg2 = static_cast< faiss::VectorTransform::idx_t >(val2);
24837 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
24838 if (!SWIG_IsOK(res3)) {
24839 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "NormalizationTransform_reverse_transform" "', argument " "3"" of type '" "float const *""'");
24840 }
24841 arg3 = reinterpret_cast< float * >(argp3);
24842 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
24843 if (!SWIG_IsOK(res4)) {
24844 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "NormalizationTransform_reverse_transform" "', argument " "4"" of type '" "float *""'");
24845 }
24846 arg4 = reinterpret_cast< float * >(argp4);
24847 {
24848 Py_BEGIN_ALLOW_THREADS
24849 try {
24850 ((faiss::NormalizationTransform const *)arg1)->reverse_transform(arg2,(float const *)arg3,arg4);
24851 } catch(faiss::FaissException & e) {
24852 PyEval_RestoreThread(_save);
24853 PyErr_SetString(PyExc_RuntimeError, e.what());
24854 SWIG_fail;
24855 }
24856 Py_END_ALLOW_THREADS
24857 }
24858 resultobj = SWIG_Py_Void();
24859 return resultobj;
24860 fail:
24861 return NULL;
24862 }
24863
24864
24865 SWIGINTERN PyObject *_wrap_delete_NormalizationTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24866 PyObject *resultobj = 0;
24867 faiss::NormalizationTransform *arg1 = (faiss::NormalizationTransform *) 0 ;
24868 void *argp1 = 0 ;
24869 int res1 = 0 ;
24870 PyObject * obj0 = 0 ;
24871
24872 if (!PyArg_ParseTuple(args,(char *)"O:delete_NormalizationTransform",&obj0)) SWIG_fail;
24873 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__NormalizationTransform, SWIG_POINTER_DISOWN | 0 );
24874 if (!SWIG_IsOK(res1)) {
24875 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_NormalizationTransform" "', argument " "1"" of type '" "faiss::NormalizationTransform *""'");
24876 }
24877 arg1 = reinterpret_cast< faiss::NormalizationTransform * >(argp1);
24878 delete arg1;
24879 resultobj = SWIG_Py_Void();
24880 return resultobj;
24881 fail:
24882 return NULL;
24883 }
24884
24885
24886 SWIGINTERN PyObject *NormalizationTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24887 PyObject *obj;
24888 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
24889 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__NormalizationTransform, SWIG_NewClientData(obj));
24890 return SWIG_Py_Void();
24891 }
24892
24893 SWIGINTERN PyObject *_wrap_IndexPreTransform_chain_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24894 PyObject *resultobj = 0;
24895 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
24896 std::vector< faiss::VectorTransform * > *arg2 = (std::vector< faiss::VectorTransform * > *) 0 ;
24897 void *argp1 = 0 ;
24898 int res1 = 0 ;
24899 void *argp2 = 0 ;
24900 int res2 = 0 ;
24901 PyObject * obj0 = 0 ;
24902 PyObject * obj1 = 0 ;
24903
24904 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_chain_set",&obj0,&obj1)) SWIG_fail;
24905 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
24906 if (!SWIG_IsOK(res1)) {
24907 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_chain_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
24908 }
24909 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
24910 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
24911 if (!SWIG_IsOK(res2)) {
24912 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPreTransform_chain_set" "', argument " "2"" of type '" "std::vector< faiss::VectorTransform * > *""'");
24913 }
24914 arg2 = reinterpret_cast< std::vector< faiss::VectorTransform * > * >(argp2);
24915 if (arg1) (arg1)->chain = *arg2;
24916 resultobj = SWIG_Py_Void();
24917 return resultobj;
24918 fail:
24919 return NULL;
24920 }
24921
24922
24923 SWIGINTERN PyObject *_wrap_IndexPreTransform_chain_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24924 PyObject *resultobj = 0;
24925 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
24926 void *argp1 = 0 ;
24927 int res1 = 0 ;
24928 PyObject * obj0 = 0 ;
24929 std::vector< faiss::VectorTransform * > *result = 0 ;
24930
24931 if (!PyArg_ParseTuple(args,(char *)"O:IndexPreTransform_chain_get",&obj0)) SWIG_fail;
24932 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
24933 if (!SWIG_IsOK(res1)) {
24934 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_chain_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
24935 }
24936 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
24937 result = (std::vector< faiss::VectorTransform * > *)& ((arg1)->chain);
24938 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__VectorTransform_p_t, 0 | 0 );
24939 return resultobj;
24940 fail:
24941 return NULL;
24942 }
24943
24944
24945 SWIGINTERN PyObject *_wrap_IndexPreTransform_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24946 PyObject *resultobj = 0;
24947 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
24948 faiss::Index *arg2 = (faiss::Index *) 0 ;
24949 void *argp1 = 0 ;
24950 int res1 = 0 ;
24951 void *argp2 = 0 ;
24952 int res2 = 0 ;
24953 PyObject * obj0 = 0 ;
24954 PyObject * obj1 = 0 ;
24955
24956 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_index_set",&obj0,&obj1)) SWIG_fail;
24957 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
24958 if (!SWIG_IsOK(res1)) {
24959 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_index_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
24960 }
24961 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
24962 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
24963 if (!SWIG_IsOK(res2)) {
24964 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPreTransform_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
24965 }
24966 arg2 = reinterpret_cast< faiss::Index * >(argp2);
24967 if (arg1) (arg1)->index = arg2;
24968 resultobj = SWIG_Py_Void();
24969 return resultobj;
24970 fail:
24971 return NULL;
24972 }
24973
24974
24975 SWIGINTERN PyObject *_wrap_IndexPreTransform_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24976 PyObject *resultobj = 0;
24977 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
24978 void *argp1 = 0 ;
24979 int res1 = 0 ;
24980 PyObject * obj0 = 0 ;
24981 faiss::Index *result = 0 ;
24982
24983 if (!PyArg_ParseTuple(args,(char *)"O:IndexPreTransform_index_get",&obj0)) SWIG_fail;
24984 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
24985 if (!SWIG_IsOK(res1)) {
24986 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_index_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
24987 }
24988 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
24989 result = (faiss::Index *) ((arg1)->index);
24990 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
24991 return resultobj;
24992 fail:
24993 return NULL;
24994 }
24995
24996
24997 SWIGINTERN PyObject *_wrap_IndexPreTransform_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
24998 PyObject *resultobj = 0;
24999 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25000 bool arg2 ;
25001 void *argp1 = 0 ;
25002 int res1 = 0 ;
25003 bool val2 ;
25004 int ecode2 = 0 ;
25005 PyObject * obj0 = 0 ;
25006 PyObject * obj1 = 0 ;
25007
25008 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_own_fields_set",&obj0,&obj1)) SWIG_fail;
25009 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25010 if (!SWIG_IsOK(res1)) {
25011 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_own_fields_set" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25012 }
25013 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25014 ecode2 = SWIG_AsVal_bool(obj1, &val2);
25015 if (!SWIG_IsOK(ecode2)) {
25016 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_own_fields_set" "', argument " "2"" of type '" "bool""'");
25017 }
25018 arg2 = static_cast< bool >(val2);
25019 if (arg1) (arg1)->own_fields = arg2;
25020 resultobj = SWIG_Py_Void();
25021 return resultobj;
25022 fail:
25023 return NULL;
25024 }
25025
25026
25027 SWIGINTERN PyObject *_wrap_IndexPreTransform_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25028 PyObject *resultobj = 0;
25029 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25030 void *argp1 = 0 ;
25031 int res1 = 0 ;
25032 PyObject * obj0 = 0 ;
25033 bool result;
25034
25035 if (!PyArg_ParseTuple(args,(char *)"O:IndexPreTransform_own_fields_get",&obj0)) SWIG_fail;
25036 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25037 if (!SWIG_IsOK(res1)) {
25038 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_own_fields_get" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25039 }
25040 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25041 result = (bool) ((arg1)->own_fields);
25042 resultobj = SWIG_From_bool(static_cast< bool >(result));
25043 return resultobj;
25044 fail:
25045 return NULL;
25046 }
25047
25048
25049 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25050 PyObject *resultobj = 0;
25051 faiss::Index *arg1 = (faiss::Index *) 0 ;
25052 void *argp1 = 0 ;
25053 int res1 = 0 ;
25054 PyObject * obj0 = 0 ;
25055 faiss::IndexPreTransform *result = 0 ;
25056
25057 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexPreTransform",&obj0)) SWIG_fail;
25058 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
25059 if (!SWIG_IsOK(res1)) {
25060 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexPreTransform" "', argument " "1"" of type '" "faiss::Index *""'");
25061 }
25062 arg1 = reinterpret_cast< faiss::Index * >(argp1);
25063 {
25064 Py_BEGIN_ALLOW_THREADS
25065 try {
25066 result = (faiss::IndexPreTransform *)new faiss::IndexPreTransform(arg1);
25067 } catch(faiss::FaissException & e) {
25068 PyEval_RestoreThread(_save);
25069 PyErr_SetString(PyExc_RuntimeError, e.what());
25070 SWIG_fail;
25071 }
25072 Py_END_ALLOW_THREADS
25073 }
25074 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
25075 return resultobj;
25076 fail:
25077 return NULL;
25078 }
25079
25080
25081 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25082 PyObject *resultobj = 0;
25083 faiss::IndexPreTransform *result = 0 ;
25084
25085 if (!PyArg_ParseTuple(args,(char *)":new_IndexPreTransform")) SWIG_fail;
25086 {
25087 Py_BEGIN_ALLOW_THREADS
25088 try {
25089 result = (faiss::IndexPreTransform *)new faiss::IndexPreTransform();
25090 } catch(faiss::FaissException & e) {
25091 PyEval_RestoreThread(_save);
25092 PyErr_SetString(PyExc_RuntimeError, e.what());
25093 SWIG_fail;
25094 }
25095 Py_END_ALLOW_THREADS
25096 }
25097 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
25098 return resultobj;
25099 fail:
25100 return NULL;
25101 }
25102
25103
25104 SWIGINTERN PyObject *_wrap_new_IndexPreTransform__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25105 PyObject *resultobj = 0;
25106 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
25107 faiss::Index *arg2 = (faiss::Index *) 0 ;
25108 void *argp1 = 0 ;
25109 int res1 = 0 ;
25110 void *argp2 = 0 ;
25111 int res2 = 0 ;
25112 PyObject * obj0 = 0 ;
25113 PyObject * obj1 = 0 ;
25114 faiss::IndexPreTransform *result = 0 ;
25115
25116 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexPreTransform",&obj0,&obj1)) SWIG_fail;
25117 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
25118 if (!SWIG_IsOK(res1)) {
25119 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexPreTransform" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
25120 }
25121 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
25122 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
25123 if (!SWIG_IsOK(res2)) {
25124 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IndexPreTransform" "', argument " "2"" of type '" "faiss::Index *""'");
25125 }
25126 arg2 = reinterpret_cast< faiss::Index * >(argp2);
25127 {
25128 Py_BEGIN_ALLOW_THREADS
25129 try {
25130 result = (faiss::IndexPreTransform *)new faiss::IndexPreTransform(arg1,arg2);
25131 } catch(faiss::FaissException & e) {
25132 PyEval_RestoreThread(_save);
25133 PyErr_SetString(PyExc_RuntimeError, e.what());
25134 SWIG_fail;
25135 }
25136 Py_END_ALLOW_THREADS
25137 }
25138 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_NEW | 0 );
25139 return resultobj;
25140 fail:
25141 return NULL;
25142 }
25143
25144
25145 SWIGINTERN PyObject *_wrap_new_IndexPreTransform(PyObject *self, PyObject *args) {
25146 Py_ssize_t argc;
25147 PyObject *argv[3] = {
25148 0
25149 };
25150 Py_ssize_t ii;
25151
25152 if (!PyTuple_Check(args)) SWIG_fail;
25153 argc = args ? PyObject_Length(args) : 0;
25154 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
25155 argv[ii] = PyTuple_GET_ITEM(args,ii);
25156 }
25157 if (argc == 0) {
25158 return _wrap_new_IndexPreTransform__SWIG_1(self, args);
25159 }
25160 if (argc == 1) {
25161 int _v;
25162 void *vptr = 0;
25163 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
25164 _v = SWIG_CheckState(res);
25165 if (_v) {
25166 return _wrap_new_IndexPreTransform__SWIG_0(self, args);
25167 }
25168 }
25169 if (argc == 2) {
25170 int _v;
25171 void *vptr = 0;
25172 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__VectorTransform, 0);
25173 _v = SWIG_CheckState(res);
25174 if (_v) {
25175 void *vptr = 0;
25176 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__Index, 0);
25177 _v = SWIG_CheckState(res);
25178 if (_v) {
25179 return _wrap_new_IndexPreTransform__SWIG_2(self, args);
25180 }
25181 }
25182 }
25183
25184 fail:
25185 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexPreTransform'.\n"
25186 " Possible C/C++ prototypes are:\n"
25187 " faiss::IndexPreTransform::IndexPreTransform(faiss::Index *)\n"
25188 " faiss::IndexPreTransform::IndexPreTransform()\n"
25189 " faiss::IndexPreTransform::IndexPreTransform(faiss::VectorTransform *,faiss::Index *)\n");
25190 return 0;
25191 }
25192
25193
25194 SWIGINTERN PyObject *_wrap_IndexPreTransform_prepend_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25195 PyObject *resultobj = 0;
25196 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25197 faiss::VectorTransform *arg2 = (faiss::VectorTransform *) 0 ;
25198 void *argp1 = 0 ;
25199 int res1 = 0 ;
25200 void *argp2 = 0 ;
25201 int res2 = 0 ;
25202 PyObject * obj0 = 0 ;
25203 PyObject * obj1 = 0 ;
25204
25205 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_prepend_transform",&obj0,&obj1)) SWIG_fail;
25206 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25207 if (!SWIG_IsOK(res1)) {
25208 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_prepend_transform" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25209 }
25210 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25211 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
25212 if (!SWIG_IsOK(res2)) {
25213 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPreTransform_prepend_transform" "', argument " "2"" of type '" "faiss::VectorTransform *""'");
25214 }
25215 arg2 = reinterpret_cast< faiss::VectorTransform * >(argp2);
25216 {
25217 Py_BEGIN_ALLOW_THREADS
25218 try {
25219 (arg1)->prepend_transform(arg2);
25220 } catch(faiss::FaissException & e) {
25221 PyEval_RestoreThread(_save);
25222 PyErr_SetString(PyExc_RuntimeError, e.what());
25223 SWIG_fail;
25224 }
25225 Py_END_ALLOW_THREADS
25226 }
25227 resultobj = SWIG_Py_Void();
25228 return resultobj;
25229 fail:
25230 return NULL;
25231 }
25232
25233
25234 SWIGINTERN PyObject *_wrap_IndexPreTransform_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25235 PyObject *resultobj = 0;
25236 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25237 faiss::Index::idx_t arg2 ;
25238 float *arg3 = (float *) 0 ;
25239 void *argp1 = 0 ;
25240 int res1 = 0 ;
25241 long val2 ;
25242 int ecode2 = 0 ;
25243 void *argp3 = 0 ;
25244 int res3 = 0 ;
25245 PyObject * obj0 = 0 ;
25246 PyObject * obj1 = 0 ;
25247 PyObject * obj2 = 0 ;
25248
25249 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPreTransform_train",&obj0,&obj1,&obj2)) SWIG_fail;
25250 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25251 if (!SWIG_IsOK(res1)) {
25252 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_train" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25253 }
25254 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25255 ecode2 = SWIG_AsVal_long(obj1, &val2);
25256 if (!SWIG_IsOK(ecode2)) {
25257 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25258 }
25259 arg2 = static_cast< faiss::Index::idx_t >(val2);
25260 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25261 if (!SWIG_IsOK(res3)) {
25262 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_train" "', argument " "3"" of type '" "float const *""'");
25263 }
25264 arg3 = reinterpret_cast< float * >(argp3);
25265 {
25266 Py_BEGIN_ALLOW_THREADS
25267 try {
25268 (arg1)->train(arg2,(float const *)arg3);
25269 } catch(faiss::FaissException & e) {
25270 PyEval_RestoreThread(_save);
25271 PyErr_SetString(PyExc_RuntimeError, e.what());
25272 SWIG_fail;
25273 }
25274 Py_END_ALLOW_THREADS
25275 }
25276 resultobj = SWIG_Py_Void();
25277 return resultobj;
25278 fail:
25279 return NULL;
25280 }
25281
25282
25283 SWIGINTERN PyObject *_wrap_IndexPreTransform_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25284 PyObject *resultobj = 0;
25285 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25286 faiss::Index::idx_t arg2 ;
25287 float *arg3 = (float *) 0 ;
25288 void *argp1 = 0 ;
25289 int res1 = 0 ;
25290 long val2 ;
25291 int ecode2 = 0 ;
25292 void *argp3 = 0 ;
25293 int res3 = 0 ;
25294 PyObject * obj0 = 0 ;
25295 PyObject * obj1 = 0 ;
25296 PyObject * obj2 = 0 ;
25297
25298 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPreTransform_add",&obj0,&obj1,&obj2)) SWIG_fail;
25299 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25300 if (!SWIG_IsOK(res1)) {
25301 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_add" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25302 }
25303 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25304 ecode2 = SWIG_AsVal_long(obj1, &val2);
25305 if (!SWIG_IsOK(ecode2)) {
25306 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25307 }
25308 arg2 = static_cast< faiss::Index::idx_t >(val2);
25309 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25310 if (!SWIG_IsOK(res3)) {
25311 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_add" "', argument " "3"" of type '" "float const *""'");
25312 }
25313 arg3 = reinterpret_cast< float * >(argp3);
25314 {
25315 Py_BEGIN_ALLOW_THREADS
25316 try {
25317 (arg1)->add(arg2,(float const *)arg3);
25318 } catch(faiss::FaissException & e) {
25319 PyEval_RestoreThread(_save);
25320 PyErr_SetString(PyExc_RuntimeError, e.what());
25321 SWIG_fail;
25322 }
25323 Py_END_ALLOW_THREADS
25324 }
25325 resultobj = SWIG_Py_Void();
25326 return resultobj;
25327 fail:
25328 return NULL;
25329 }
25330
25331
25332 SWIGINTERN PyObject *_wrap_IndexPreTransform_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25333 PyObject *resultobj = 0;
25334 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25335 faiss::Index::idx_t arg2 ;
25336 float *arg3 = (float *) 0 ;
25337 long *arg4 = (long *) 0 ;
25338 void *argp1 = 0 ;
25339 int res1 = 0 ;
25340 long val2 ;
25341 int ecode2 = 0 ;
25342 void *argp3 = 0 ;
25343 int res3 = 0 ;
25344 void *argp4 = 0 ;
25345 int res4 = 0 ;
25346 PyObject * obj0 = 0 ;
25347 PyObject * obj1 = 0 ;
25348 PyObject * obj2 = 0 ;
25349 PyObject * obj3 = 0 ;
25350
25351 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPreTransform_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
25352 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25353 if (!SWIG_IsOK(res1)) {
25354 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_add_with_ids" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25355 }
25356 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25357 ecode2 = SWIG_AsVal_long(obj1, &val2);
25358 if (!SWIG_IsOK(ecode2)) {
25359 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25360 }
25361 arg2 = static_cast< faiss::Index::idx_t >(val2);
25362 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25363 if (!SWIG_IsOK(res3)) {
25364 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_add_with_ids" "', argument " "3"" of type '" "float const *""'");
25365 }
25366 arg3 = reinterpret_cast< float * >(argp3);
25367 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
25368 if (!SWIG_IsOK(res4)) {
25369 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPreTransform_add_with_ids" "', argument " "4"" of type '" "long const *""'");
25370 }
25371 arg4 = reinterpret_cast< long * >(argp4);
25372 {
25373 Py_BEGIN_ALLOW_THREADS
25374 try {
25375 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
25376 } catch(faiss::FaissException & e) {
25377 PyEval_RestoreThread(_save);
25378 PyErr_SetString(PyExc_RuntimeError, e.what());
25379 SWIG_fail;
25380 }
25381 Py_END_ALLOW_THREADS
25382 }
25383 resultobj = SWIG_Py_Void();
25384 return resultobj;
25385 fail:
25386 return NULL;
25387 }
25388
25389
25390 SWIGINTERN PyObject *_wrap_IndexPreTransform_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25391 PyObject *resultobj = 0;
25392 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25393 void *argp1 = 0 ;
25394 int res1 = 0 ;
25395 PyObject * obj0 = 0 ;
25396
25397 if (!PyArg_ParseTuple(args,(char *)"O:IndexPreTransform_reset",&obj0)) SWIG_fail;
25398 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25399 if (!SWIG_IsOK(res1)) {
25400 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_reset" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25401 }
25402 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25403 {
25404 Py_BEGIN_ALLOW_THREADS
25405 try {
25406 (arg1)->reset();
25407 } catch(faiss::FaissException & e) {
25408 PyEval_RestoreThread(_save);
25409 PyErr_SetString(PyExc_RuntimeError, e.what());
25410 SWIG_fail;
25411 }
25412 Py_END_ALLOW_THREADS
25413 }
25414 resultobj = SWIG_Py_Void();
25415 return resultobj;
25416 fail:
25417 return NULL;
25418 }
25419
25420
25421 SWIGINTERN PyObject *_wrap_IndexPreTransform_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25422 PyObject *resultobj = 0;
25423 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25424 faiss::IDSelector *arg2 = 0 ;
25425 void *argp1 = 0 ;
25426 int res1 = 0 ;
25427 void *argp2 = 0 ;
25428 int res2 = 0 ;
25429 PyObject * obj0 = 0 ;
25430 PyObject * obj1 = 0 ;
25431 long result;
25432
25433 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPreTransform_remove_ids",&obj0,&obj1)) SWIG_fail;
25434 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25435 if (!SWIG_IsOK(res1)) {
25436 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_remove_ids" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25437 }
25438 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25439 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
25440 if (!SWIG_IsOK(res2)) {
25441 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPreTransform_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
25442 }
25443 if (!argp2) {
25444 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexPreTransform_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
25445 }
25446 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
25447 {
25448 Py_BEGIN_ALLOW_THREADS
25449 try {
25450 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
25451 } catch(faiss::FaissException & e) {
25452 PyEval_RestoreThread(_save);
25453 PyErr_SetString(PyExc_RuntimeError, e.what());
25454 SWIG_fail;
25455 }
25456 Py_END_ALLOW_THREADS
25457 }
25458 resultobj = SWIG_From_long(static_cast< long >(result));
25459 return resultobj;
25460 fail:
25461 return NULL;
25462 }
25463
25464
25465 SWIGINTERN PyObject *_wrap_IndexPreTransform_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25466 PyObject *resultobj = 0;
25467 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25468 faiss::Index::idx_t arg2 ;
25469 float *arg3 = (float *) 0 ;
25470 faiss::Index::idx_t arg4 ;
25471 float *arg5 = (float *) 0 ;
25472 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
25473 void *argp1 = 0 ;
25474 int res1 = 0 ;
25475 long val2 ;
25476 int ecode2 = 0 ;
25477 void *argp3 = 0 ;
25478 int res3 = 0 ;
25479 long val4 ;
25480 int ecode4 = 0 ;
25481 void *argp5 = 0 ;
25482 int res5 = 0 ;
25483 void *argp6 = 0 ;
25484 int res6 = 0 ;
25485 PyObject * obj0 = 0 ;
25486 PyObject * obj1 = 0 ;
25487 PyObject * obj2 = 0 ;
25488 PyObject * obj3 = 0 ;
25489 PyObject * obj4 = 0 ;
25490 PyObject * obj5 = 0 ;
25491
25492 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexPreTransform_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
25493 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25494 if (!SWIG_IsOK(res1)) {
25495 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_search" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
25496 }
25497 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25498 ecode2 = SWIG_AsVal_long(obj1, &val2);
25499 if (!SWIG_IsOK(ecode2)) {
25500 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25501 }
25502 arg2 = static_cast< faiss::Index::idx_t >(val2);
25503 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25504 if (!SWIG_IsOK(res3)) {
25505 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_search" "', argument " "3"" of type '" "float const *""'");
25506 }
25507 arg3 = reinterpret_cast< float * >(argp3);
25508 ecode4 = SWIG_AsVal_long(obj3, &val4);
25509 if (!SWIG_IsOK(ecode4)) {
25510 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPreTransform_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
25511 }
25512 arg4 = static_cast< faiss::Index::idx_t >(val4);
25513 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
25514 if (!SWIG_IsOK(res5)) {
25515 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPreTransform_search" "', argument " "5"" of type '" "float *""'");
25516 }
25517 arg5 = reinterpret_cast< float * >(argp5);
25518 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
25519 if (!SWIG_IsOK(res6)) {
25520 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPreTransform_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
25521 }
25522 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
25523 {
25524 Py_BEGIN_ALLOW_THREADS
25525 try {
25526 ((faiss::IndexPreTransform const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
25527 } catch(faiss::FaissException & e) {
25528 PyEval_RestoreThread(_save);
25529 PyErr_SetString(PyExc_RuntimeError, e.what());
25530 SWIG_fail;
25531 }
25532 Py_END_ALLOW_THREADS
25533 }
25534 resultobj = SWIG_Py_Void();
25535 return resultobj;
25536 fail:
25537 return NULL;
25538 }
25539
25540
25541 SWIGINTERN PyObject *_wrap_IndexPreTransform_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25542 PyObject *resultobj = 0;
25543 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25544 faiss::Index::idx_t arg2 ;
25545 float *arg3 = (float *) 0 ;
25546 void *argp1 = 0 ;
25547 int res1 = 0 ;
25548 long val2 ;
25549 int ecode2 = 0 ;
25550 void *argp3 = 0 ;
25551 int res3 = 0 ;
25552 PyObject * obj0 = 0 ;
25553 PyObject * obj1 = 0 ;
25554 PyObject * obj2 = 0 ;
25555
25556 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPreTransform_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
25557 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25558 if (!SWIG_IsOK(res1)) {
25559 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_reconstruct" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
25560 }
25561 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25562 ecode2 = SWIG_AsVal_long(obj1, &val2);
25563 if (!SWIG_IsOK(ecode2)) {
25564 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25565 }
25566 arg2 = static_cast< faiss::Index::idx_t >(val2);
25567 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25568 if (!SWIG_IsOK(res3)) {
25569 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_reconstruct" "', argument " "3"" of type '" "float *""'");
25570 }
25571 arg3 = reinterpret_cast< float * >(argp3);
25572 {
25573 Py_BEGIN_ALLOW_THREADS
25574 try {
25575 ((faiss::IndexPreTransform const *)arg1)->reconstruct(arg2,arg3);
25576 } catch(faiss::FaissException & e) {
25577 PyEval_RestoreThread(_save);
25578 PyErr_SetString(PyExc_RuntimeError, e.what());
25579 SWIG_fail;
25580 }
25581 Py_END_ALLOW_THREADS
25582 }
25583 resultobj = SWIG_Py_Void();
25584 return resultobj;
25585 fail:
25586 return NULL;
25587 }
25588
25589
25590 SWIGINTERN PyObject *_wrap_IndexPreTransform_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25591 PyObject *resultobj = 0;
25592 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25593 faiss::Index::idx_t arg2 ;
25594 faiss::Index::idx_t arg3 ;
25595 float *arg4 = (float *) 0 ;
25596 void *argp1 = 0 ;
25597 int res1 = 0 ;
25598 long val2 ;
25599 int ecode2 = 0 ;
25600 long val3 ;
25601 int ecode3 = 0 ;
25602 void *argp4 = 0 ;
25603 int res4 = 0 ;
25604 PyObject * obj0 = 0 ;
25605 PyObject * obj1 = 0 ;
25606 PyObject * obj2 = 0 ;
25607 PyObject * obj3 = 0 ;
25608
25609 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPreTransform_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
25610 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25611 if (!SWIG_IsOK(res1)) {
25612 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
25613 }
25614 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25615 ecode2 = SWIG_AsVal_long(obj1, &val2);
25616 if (!SWIG_IsOK(ecode2)) {
25617 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25618 }
25619 arg2 = static_cast< faiss::Index::idx_t >(val2);
25620 ecode3 = SWIG_AsVal_long(obj2, &val3);
25621 if (!SWIG_IsOK(ecode3)) {
25622 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexPreTransform_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
25623 }
25624 arg3 = static_cast< faiss::Index::idx_t >(val3);
25625 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
25626 if (!SWIG_IsOK(res4)) {
25627 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPreTransform_reconstruct_n" "', argument " "4"" of type '" "float *""'");
25628 }
25629 arg4 = reinterpret_cast< float * >(argp4);
25630 {
25631 Py_BEGIN_ALLOW_THREADS
25632 try {
25633 ((faiss::IndexPreTransform const *)arg1)->reconstruct_n(arg2,arg3,arg4);
25634 } catch(faiss::FaissException & e) {
25635 PyEval_RestoreThread(_save);
25636 PyErr_SetString(PyExc_RuntimeError, e.what());
25637 SWIG_fail;
25638 }
25639 Py_END_ALLOW_THREADS
25640 }
25641 resultobj = SWIG_Py_Void();
25642 return resultobj;
25643 fail:
25644 return NULL;
25645 }
25646
25647
25648 SWIGINTERN PyObject *_wrap_IndexPreTransform_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25649 PyObject *resultobj = 0;
25650 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25651 faiss::Index::idx_t arg2 ;
25652 float *arg3 = (float *) 0 ;
25653 faiss::Index::idx_t arg4 ;
25654 float *arg5 = (float *) 0 ;
25655 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
25656 float *arg7 = (float *) 0 ;
25657 void *argp1 = 0 ;
25658 int res1 = 0 ;
25659 long val2 ;
25660 int ecode2 = 0 ;
25661 void *argp3 = 0 ;
25662 int res3 = 0 ;
25663 long val4 ;
25664 int ecode4 = 0 ;
25665 void *argp5 = 0 ;
25666 int res5 = 0 ;
25667 void *argp6 = 0 ;
25668 int res6 = 0 ;
25669 void *argp7 = 0 ;
25670 int res7 = 0 ;
25671 PyObject * obj0 = 0 ;
25672 PyObject * obj1 = 0 ;
25673 PyObject * obj2 = 0 ;
25674 PyObject * obj3 = 0 ;
25675 PyObject * obj4 = 0 ;
25676 PyObject * obj5 = 0 ;
25677 PyObject * obj6 = 0 ;
25678
25679 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:IndexPreTransform_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
25680 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25681 if (!SWIG_IsOK(res1)) {
25682 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
25683 }
25684 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25685 ecode2 = SWIG_AsVal_long(obj1, &val2);
25686 if (!SWIG_IsOK(ecode2)) {
25687 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25688 }
25689 arg2 = static_cast< faiss::Index::idx_t >(val2);
25690 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25691 if (!SWIG_IsOK(res3)) {
25692 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "3"" of type '" "float const *""'");
25693 }
25694 arg3 = reinterpret_cast< float * >(argp3);
25695 ecode4 = SWIG_AsVal_long(obj3, &val4);
25696 if (!SWIG_IsOK(ecode4)) {
25697 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
25698 }
25699 arg4 = static_cast< faiss::Index::idx_t >(val4);
25700 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
25701 if (!SWIG_IsOK(res5)) {
25702 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "5"" of type '" "float *""'");
25703 }
25704 arg5 = reinterpret_cast< float * >(argp5);
25705 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
25706 if (!SWIG_IsOK(res6)) {
25707 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
25708 }
25709 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
25710 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
25711 if (!SWIG_IsOK(res7)) {
25712 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexPreTransform_search_and_reconstruct" "', argument " "7"" of type '" "float *""'");
25713 }
25714 arg7 = reinterpret_cast< float * >(argp7);
25715 {
25716 Py_BEGIN_ALLOW_THREADS
25717 try {
25718 ((faiss::IndexPreTransform const *)arg1)->search_and_reconstruct(arg2,(float const *)arg3,arg4,arg5,arg6,arg7);
25719 } catch(faiss::FaissException & e) {
25720 PyEval_RestoreThread(_save);
25721 PyErr_SetString(PyExc_RuntimeError, e.what());
25722 SWIG_fail;
25723 }
25724 Py_END_ALLOW_THREADS
25725 }
25726 resultobj = SWIG_Py_Void();
25727 return resultobj;
25728 fail:
25729 return NULL;
25730 }
25731
25732
25733 SWIGINTERN PyObject *_wrap_IndexPreTransform_apply_chain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25734 PyObject *resultobj = 0;
25735 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25736 faiss::Index::idx_t arg2 ;
25737 float *arg3 = (float *) 0 ;
25738 void *argp1 = 0 ;
25739 int res1 = 0 ;
25740 long val2 ;
25741 int ecode2 = 0 ;
25742 void *argp3 = 0 ;
25743 int res3 = 0 ;
25744 PyObject * obj0 = 0 ;
25745 PyObject * obj1 = 0 ;
25746 PyObject * obj2 = 0 ;
25747 float *result = 0 ;
25748
25749 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPreTransform_apply_chain",&obj0,&obj1,&obj2)) SWIG_fail;
25750 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25751 if (!SWIG_IsOK(res1)) {
25752 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_apply_chain" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
25753 }
25754 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25755 ecode2 = SWIG_AsVal_long(obj1, &val2);
25756 if (!SWIG_IsOK(ecode2)) {
25757 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_apply_chain" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25758 }
25759 arg2 = static_cast< faiss::Index::idx_t >(val2);
25760 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25761 if (!SWIG_IsOK(res3)) {
25762 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_apply_chain" "', argument " "3"" of type '" "float const *""'");
25763 }
25764 arg3 = reinterpret_cast< float * >(argp3);
25765 {
25766 Py_BEGIN_ALLOW_THREADS
25767 try {
25768 result = (float *)((faiss::IndexPreTransform const *)arg1)->apply_chain(arg2,(float const *)arg3);
25769 } catch(faiss::FaissException & e) {
25770 PyEval_RestoreThread(_save);
25771 PyErr_SetString(PyExc_RuntimeError, e.what());
25772 SWIG_fail;
25773 }
25774 Py_END_ALLOW_THREADS
25775 }
25776 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
25777 return resultobj;
25778 fail:
25779 return NULL;
25780 }
25781
25782
25783 SWIGINTERN PyObject *_wrap_IndexPreTransform_reverse_chain(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25784 PyObject *resultobj = 0;
25785 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25786 faiss::Index::idx_t arg2 ;
25787 float *arg3 = (float *) 0 ;
25788 float *arg4 = (float *) 0 ;
25789 void *argp1 = 0 ;
25790 int res1 = 0 ;
25791 long val2 ;
25792 int ecode2 = 0 ;
25793 void *argp3 = 0 ;
25794 int res3 = 0 ;
25795 void *argp4 = 0 ;
25796 int res4 = 0 ;
25797 PyObject * obj0 = 0 ;
25798 PyObject * obj1 = 0 ;
25799 PyObject * obj2 = 0 ;
25800 PyObject * obj3 = 0 ;
25801
25802 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPreTransform_reverse_chain",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
25803 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, 0 | 0 );
25804 if (!SWIG_IsOK(res1)) {
25805 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPreTransform_reverse_chain" "', argument " "1"" of type '" "faiss::IndexPreTransform const *""'");
25806 }
25807 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25808 ecode2 = SWIG_AsVal_long(obj1, &val2);
25809 if (!SWIG_IsOK(ecode2)) {
25810 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPreTransform_reverse_chain" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
25811 }
25812 arg2 = static_cast< faiss::Index::idx_t >(val2);
25813 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
25814 if (!SWIG_IsOK(res3)) {
25815 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPreTransform_reverse_chain" "', argument " "3"" of type '" "float const *""'");
25816 }
25817 arg3 = reinterpret_cast< float * >(argp3);
25818 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
25819 if (!SWIG_IsOK(res4)) {
25820 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPreTransform_reverse_chain" "', argument " "4"" of type '" "float *""'");
25821 }
25822 arg4 = reinterpret_cast< float * >(argp4);
25823 {
25824 Py_BEGIN_ALLOW_THREADS
25825 try {
25826 ((faiss::IndexPreTransform const *)arg1)->reverse_chain(arg2,(float const *)arg3,arg4);
25827 } catch(faiss::FaissException & e) {
25828 PyEval_RestoreThread(_save);
25829 PyErr_SetString(PyExc_RuntimeError, e.what());
25830 SWIG_fail;
25831 }
25832 Py_END_ALLOW_THREADS
25833 }
25834 resultobj = SWIG_Py_Void();
25835 return resultobj;
25836 fail:
25837 return NULL;
25838 }
25839
25840
25841 SWIGINTERN PyObject *_wrap_delete_IndexPreTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25842 PyObject *resultobj = 0;
25843 faiss::IndexPreTransform *arg1 = (faiss::IndexPreTransform *) 0 ;
25844 void *argp1 = 0 ;
25845 int res1 = 0 ;
25846 PyObject * obj0 = 0 ;
25847
25848 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexPreTransform",&obj0)) SWIG_fail;
25849 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPreTransform, SWIG_POINTER_DISOWN | 0 );
25850 if (!SWIG_IsOK(res1)) {
25851 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexPreTransform" "', argument " "1"" of type '" "faiss::IndexPreTransform *""'");
25852 }
25853 arg1 = reinterpret_cast< faiss::IndexPreTransform * >(argp1);
25854 {
25855 Py_BEGIN_ALLOW_THREADS
25856 try {
25857 delete arg1;
25858 } catch(faiss::FaissException & e) {
25859 PyEval_RestoreThread(_save);
25860 PyErr_SetString(PyExc_RuntimeError, e.what());
25861 SWIG_fail;
25862 }
25863 Py_END_ALLOW_THREADS
25864 }
25865 resultobj = SWIG_Py_Void();
25866 return resultobj;
25867 fail:
25868 return NULL;
25869 }
25870
25871
25872 SWIGINTERN PyObject *IndexPreTransform_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25873 PyObject *obj;
25874 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
25875 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexPreTransform, SWIG_NewClientData(obj));
25876 return SWIG_Py_Void();
25877 }
25878
25879 SWIGINTERN PyObject *_wrap_IndexFlat_xb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25880 PyObject *resultobj = 0;
25881 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
25882 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
25883 void *argp1 = 0 ;
25884 int res1 = 0 ;
25885 void *argp2 = 0 ;
25886 int res2 = 0 ;
25887 PyObject * obj0 = 0 ;
25888 PyObject * obj1 = 0 ;
25889
25890 if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlat_xb_set",&obj0,&obj1)) SWIG_fail;
25891 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
25892 if (!SWIG_IsOK(res1)) {
25893 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_xb_set" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
25894 }
25895 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
25896 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
25897 if (!SWIG_IsOK(res2)) {
25898 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexFlat_xb_set" "', argument " "2"" of type '" "std::vector< float > *""'");
25899 }
25900 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
25901 if (arg1) (arg1)->xb = *arg2;
25902 resultobj = SWIG_Py_Void();
25903 return resultobj;
25904 fail:
25905 return NULL;
25906 }
25907
25908
25909 SWIGINTERN PyObject *_wrap_IndexFlat_xb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25910 PyObject *resultobj = 0;
25911 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
25912 void *argp1 = 0 ;
25913 int res1 = 0 ;
25914 PyObject * obj0 = 0 ;
25915 std::vector< float > *result = 0 ;
25916
25917 if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat_xb_get",&obj0)) SWIG_fail;
25918 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
25919 if (!SWIG_IsOK(res1)) {
25920 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_xb_get" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
25921 }
25922 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
25923 result = (std::vector< float > *)& ((arg1)->xb);
25924 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
25925 return resultobj;
25926 fail:
25927 return NULL;
25928 }
25929
25930
25931 SWIGINTERN PyObject *_wrap_new_IndexFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25932 PyObject *resultobj = 0;
25933 faiss::Index::idx_t arg1 ;
25934 faiss::MetricType arg2 ;
25935 long val1 ;
25936 int ecode1 = 0 ;
25937 int val2 ;
25938 int ecode2 = 0 ;
25939 PyObject * obj0 = 0 ;
25940 PyObject * obj1 = 0 ;
25941 faiss::IndexFlat *result = 0 ;
25942
25943 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexFlat",&obj0,&obj1)) SWIG_fail;
25944 ecode1 = SWIG_AsVal_long(obj0, &val1);
25945 if (!SWIG_IsOK(ecode1)) {
25946 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlat" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
25947 }
25948 arg1 = static_cast< faiss::Index::idx_t >(val1);
25949 ecode2 = SWIG_AsVal_int(obj1, &val2);
25950 if (!SWIG_IsOK(ecode2)) {
25951 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexFlat" "', argument " "2"" of type '" "faiss::MetricType""'");
25952 }
25953 arg2 = static_cast< faiss::MetricType >(val2);
25954 {
25955 Py_BEGIN_ALLOW_THREADS
25956 try {
25957 result = (faiss::IndexFlat *)new faiss::IndexFlat(arg1,arg2);
25958 } catch(faiss::FaissException & e) {
25959 PyEval_RestoreThread(_save);
25960 PyErr_SetString(PyExc_RuntimeError, e.what());
25961 SWIG_fail;
25962 }
25963 Py_END_ALLOW_THREADS
25964 }
25965 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_NEW | 0 );
25966 return resultobj;
25967 fail:
25968 return NULL;
25969 }
25970
25971
25972 SWIGINTERN PyObject *_wrap_new_IndexFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
25973 PyObject *resultobj = 0;
25974 faiss::Index::idx_t arg1 ;
25975 long val1 ;
25976 int ecode1 = 0 ;
25977 PyObject * obj0 = 0 ;
25978 faiss::IndexFlat *result = 0 ;
25979
25980 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexFlat",&obj0)) SWIG_fail;
25981 ecode1 = SWIG_AsVal_long(obj0, &val1);
25982 if (!SWIG_IsOK(ecode1)) {
25983 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlat" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
25984 }
25985 arg1 = static_cast< faiss::Index::idx_t >(val1);
25986 {
25987 Py_BEGIN_ALLOW_THREADS
25988 try {
25989 result = (faiss::IndexFlat *)new faiss::IndexFlat(arg1);
25990 } catch(faiss::FaissException & e) {
25991 PyEval_RestoreThread(_save);
25992 PyErr_SetString(PyExc_RuntimeError, e.what());
25993 SWIG_fail;
25994 }
25995 Py_END_ALLOW_THREADS
25996 }
25997 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_NEW | 0 );
25998 return resultobj;
25999 fail:
26000 return NULL;
26001 }
26002
26003
26004 SWIGINTERN PyObject *_wrap_IndexFlat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26005 PyObject *resultobj = 0;
26006 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
26007 faiss::Index::idx_t arg2 ;
26008 float *arg3 = (float *) 0 ;
26009 void *argp1 = 0 ;
26010 int res1 = 0 ;
26011 long val2 ;
26012 int ecode2 = 0 ;
26013 void *argp3 = 0 ;
26014 int res3 = 0 ;
26015 PyObject * obj0 = 0 ;
26016 PyObject * obj1 = 0 ;
26017 PyObject * obj2 = 0 ;
26018
26019 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
26020 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26021 if (!SWIG_IsOK(res1)) {
26022 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_add" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
26023 }
26024 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
26025 ecode2 = SWIG_AsVal_long(obj1, &val2);
26026 if (!SWIG_IsOK(ecode2)) {
26027 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26028 }
26029 arg2 = static_cast< faiss::Index::idx_t >(val2);
26030 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26031 if (!SWIG_IsOK(res3)) {
26032 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_add" "', argument " "3"" of type '" "float const *""'");
26033 }
26034 arg3 = reinterpret_cast< float * >(argp3);
26035 {
26036 Py_BEGIN_ALLOW_THREADS
26037 try {
26038 (arg1)->add(arg2,(float const *)arg3);
26039 } catch(faiss::FaissException & e) {
26040 PyEval_RestoreThread(_save);
26041 PyErr_SetString(PyExc_RuntimeError, e.what());
26042 SWIG_fail;
26043 }
26044 Py_END_ALLOW_THREADS
26045 }
26046 resultobj = SWIG_Py_Void();
26047 return resultobj;
26048 fail:
26049 return NULL;
26050 }
26051
26052
26053 SWIGINTERN PyObject *_wrap_IndexFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26054 PyObject *resultobj = 0;
26055 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
26056 void *argp1 = 0 ;
26057 int res1 = 0 ;
26058 PyObject * obj0 = 0 ;
26059
26060 if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat_reset",&obj0)) SWIG_fail;
26061 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26062 if (!SWIG_IsOK(res1)) {
26063 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_reset" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
26064 }
26065 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
26066 {
26067 Py_BEGIN_ALLOW_THREADS
26068 try {
26069 (arg1)->reset();
26070 } catch(faiss::FaissException & e) {
26071 PyEval_RestoreThread(_save);
26072 PyErr_SetString(PyExc_RuntimeError, e.what());
26073 SWIG_fail;
26074 }
26075 Py_END_ALLOW_THREADS
26076 }
26077 resultobj = SWIG_Py_Void();
26078 return resultobj;
26079 fail:
26080 return NULL;
26081 }
26082
26083
26084 SWIGINTERN PyObject *_wrap_IndexFlat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26085 PyObject *resultobj = 0;
26086 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
26087 faiss::Index::idx_t arg2 ;
26088 float *arg3 = (float *) 0 ;
26089 faiss::Index::idx_t arg4 ;
26090 float *arg5 = (float *) 0 ;
26091 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
26092 void *argp1 = 0 ;
26093 int res1 = 0 ;
26094 long val2 ;
26095 int ecode2 = 0 ;
26096 void *argp3 = 0 ;
26097 int res3 = 0 ;
26098 long val4 ;
26099 int ecode4 = 0 ;
26100 void *argp5 = 0 ;
26101 int res5 = 0 ;
26102 void *argp6 = 0 ;
26103 int res6 = 0 ;
26104 PyObject * obj0 = 0 ;
26105 PyObject * obj1 = 0 ;
26106 PyObject * obj2 = 0 ;
26107 PyObject * obj3 = 0 ;
26108 PyObject * obj4 = 0 ;
26109 PyObject * obj5 = 0 ;
26110
26111 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
26112 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26113 if (!SWIG_IsOK(res1)) {
26114 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_search" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
26115 }
26116 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
26117 ecode2 = SWIG_AsVal_long(obj1, &val2);
26118 if (!SWIG_IsOK(ecode2)) {
26119 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26120 }
26121 arg2 = static_cast< faiss::Index::idx_t >(val2);
26122 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26123 if (!SWIG_IsOK(res3)) {
26124 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_search" "', argument " "3"" of type '" "float const *""'");
26125 }
26126 arg3 = reinterpret_cast< float * >(argp3);
26127 ecode4 = SWIG_AsVal_long(obj3, &val4);
26128 if (!SWIG_IsOK(ecode4)) {
26129 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlat_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
26130 }
26131 arg4 = static_cast< faiss::Index::idx_t >(val4);
26132 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
26133 if (!SWIG_IsOK(res5)) {
26134 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlat_search" "', argument " "5"" of type '" "float *""'");
26135 }
26136 arg5 = reinterpret_cast< float * >(argp5);
26137 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
26138 if (!SWIG_IsOK(res6)) {
26139 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexFlat_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
26140 }
26141 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
26142 {
26143 Py_BEGIN_ALLOW_THREADS
26144 try {
26145 ((faiss::IndexFlat const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
26146 } catch(faiss::FaissException & e) {
26147 PyEval_RestoreThread(_save);
26148 PyErr_SetString(PyExc_RuntimeError, e.what());
26149 SWIG_fail;
26150 }
26151 Py_END_ALLOW_THREADS
26152 }
26153 resultobj = SWIG_Py_Void();
26154 return resultobj;
26155 fail:
26156 return NULL;
26157 }
26158
26159
26160 SWIGINTERN PyObject *_wrap_IndexFlat_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26161 PyObject *resultobj = 0;
26162 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
26163 faiss::Index::idx_t arg2 ;
26164 float *arg3 = (float *) 0 ;
26165 float arg4 ;
26166 faiss::RangeSearchResult *arg5 = (faiss::RangeSearchResult *) 0 ;
26167 void *argp1 = 0 ;
26168 int res1 = 0 ;
26169 long val2 ;
26170 int ecode2 = 0 ;
26171 void *argp3 = 0 ;
26172 int res3 = 0 ;
26173 float val4 ;
26174 int ecode4 = 0 ;
26175 void *argp5 = 0 ;
26176 int res5 = 0 ;
26177 PyObject * obj0 = 0 ;
26178 PyObject * obj1 = 0 ;
26179 PyObject * obj2 = 0 ;
26180 PyObject * obj3 = 0 ;
26181 PyObject * obj4 = 0 ;
26182
26183 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexFlat_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
26184 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26185 if (!SWIG_IsOK(res1)) {
26186 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_range_search" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
26187 }
26188 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
26189 ecode2 = SWIG_AsVal_long(obj1, &val2);
26190 if (!SWIG_IsOK(ecode2)) {
26191 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26192 }
26193 arg2 = static_cast< faiss::Index::idx_t >(val2);
26194 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26195 if (!SWIG_IsOK(res3)) {
26196 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_range_search" "', argument " "3"" of type '" "float const *""'");
26197 }
26198 arg3 = reinterpret_cast< float * >(argp3);
26199 ecode4 = SWIG_AsVal_float(obj3, &val4);
26200 if (!SWIG_IsOK(ecode4)) {
26201 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlat_range_search" "', argument " "4"" of type '" "float""'");
26202 }
26203 arg4 = static_cast< float >(val4);
26204 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
26205 if (!SWIG_IsOK(res5)) {
26206 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlat_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
26207 }
26208 arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
26209 {
26210 Py_BEGIN_ALLOW_THREADS
26211 try {
26212 ((faiss::IndexFlat const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
26213 } catch(faiss::FaissException & e) {
26214 PyEval_RestoreThread(_save);
26215 PyErr_SetString(PyExc_RuntimeError, e.what());
26216 SWIG_fail;
26217 }
26218 Py_END_ALLOW_THREADS
26219 }
26220 resultobj = SWIG_Py_Void();
26221 return resultobj;
26222 fail:
26223 return NULL;
26224 }
26225
26226
26227 SWIGINTERN PyObject *_wrap_IndexFlat_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26228 PyObject *resultobj = 0;
26229 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
26230 faiss::Index::idx_t arg2 ;
26231 float *arg3 = (float *) 0 ;
26232 void *argp1 = 0 ;
26233 int res1 = 0 ;
26234 long val2 ;
26235 int ecode2 = 0 ;
26236 void *argp3 = 0 ;
26237 int res3 = 0 ;
26238 PyObject * obj0 = 0 ;
26239 PyObject * obj1 = 0 ;
26240 PyObject * obj2 = 0 ;
26241
26242 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexFlat_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
26243 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26244 if (!SWIG_IsOK(res1)) {
26245 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_reconstruct" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
26246 }
26247 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
26248 ecode2 = SWIG_AsVal_long(obj1, &val2);
26249 if (!SWIG_IsOK(ecode2)) {
26250 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26251 }
26252 arg2 = static_cast< faiss::Index::idx_t >(val2);
26253 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26254 if (!SWIG_IsOK(res3)) {
26255 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_reconstruct" "', argument " "3"" of type '" "float *""'");
26256 }
26257 arg3 = reinterpret_cast< float * >(argp3);
26258 {
26259 Py_BEGIN_ALLOW_THREADS
26260 try {
26261 ((faiss::IndexFlat const *)arg1)->reconstruct(arg2,arg3);
26262 } catch(faiss::FaissException & e) {
26263 PyEval_RestoreThread(_save);
26264 PyErr_SetString(PyExc_RuntimeError, e.what());
26265 SWIG_fail;
26266 }
26267 Py_END_ALLOW_THREADS
26268 }
26269 resultobj = SWIG_Py_Void();
26270 return resultobj;
26271 fail:
26272 return NULL;
26273 }
26274
26275
26276 SWIGINTERN PyObject *_wrap_IndexFlat_compute_distance_subset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26277 PyObject *resultobj = 0;
26278 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
26279 faiss::Index::idx_t arg2 ;
26280 float *arg3 = (float *) 0 ;
26281 faiss::Index::idx_t arg4 ;
26282 float *arg5 = (float *) 0 ;
26283 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
26284 void *argp1 = 0 ;
26285 int res1 = 0 ;
26286 long val2 ;
26287 int ecode2 = 0 ;
26288 void *argp3 = 0 ;
26289 int res3 = 0 ;
26290 long val4 ;
26291 int ecode4 = 0 ;
26292 void *argp5 = 0 ;
26293 int res5 = 0 ;
26294 void *argp6 = 0 ;
26295 int res6 = 0 ;
26296 PyObject * obj0 = 0 ;
26297 PyObject * obj1 = 0 ;
26298 PyObject * obj2 = 0 ;
26299 PyObject * obj3 = 0 ;
26300 PyObject * obj4 = 0 ;
26301 PyObject * obj5 = 0 ;
26302
26303 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexFlat_compute_distance_subset",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
26304 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26305 if (!SWIG_IsOK(res1)) {
26306 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_compute_distance_subset" "', argument " "1"" of type '" "faiss::IndexFlat const *""'");
26307 }
26308 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
26309 ecode2 = SWIG_AsVal_long(obj1, &val2);
26310 if (!SWIG_IsOK(ecode2)) {
26311 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat_compute_distance_subset" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26312 }
26313 arg2 = static_cast< faiss::Index::idx_t >(val2);
26314 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26315 if (!SWIG_IsOK(res3)) {
26316 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat_compute_distance_subset" "', argument " "3"" of type '" "float const *""'");
26317 }
26318 arg3 = reinterpret_cast< float * >(argp3);
26319 ecode4 = SWIG_AsVal_long(obj3, &val4);
26320 if (!SWIG_IsOK(ecode4)) {
26321 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlat_compute_distance_subset" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
26322 }
26323 arg4 = static_cast< faiss::Index::idx_t >(val4);
26324 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
26325 if (!SWIG_IsOK(res5)) {
26326 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlat_compute_distance_subset" "', argument " "5"" of type '" "float *""'");
26327 }
26328 arg5 = reinterpret_cast< float * >(argp5);
26329 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
26330 if (!SWIG_IsOK(res6)) {
26331 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexFlat_compute_distance_subset" "', argument " "6"" of type '" "faiss::Index::idx_t const *""'");
26332 }
26333 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
26334 {
26335 Py_BEGIN_ALLOW_THREADS
26336 try {
26337 ((faiss::IndexFlat const *)arg1)->compute_distance_subset(arg2,(float const *)arg3,arg4,arg5,(faiss::Index::idx_t const *)arg6);
26338 } catch(faiss::FaissException & e) {
26339 PyEval_RestoreThread(_save);
26340 PyErr_SetString(PyExc_RuntimeError, e.what());
26341 SWIG_fail;
26342 }
26343 Py_END_ALLOW_THREADS
26344 }
26345 resultobj = SWIG_Py_Void();
26346 return resultobj;
26347 fail:
26348 return NULL;
26349 }
26350
26351
26352 SWIGINTERN PyObject *_wrap_IndexFlat_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26353 PyObject *resultobj = 0;
26354 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
26355 faiss::IDSelector *arg2 = 0 ;
26356 void *argp1 = 0 ;
26357 int res1 = 0 ;
26358 void *argp2 = 0 ;
26359 int res2 = 0 ;
26360 PyObject * obj0 = 0 ;
26361 PyObject * obj1 = 0 ;
26362 long result;
26363
26364 if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlat_remove_ids",&obj0,&obj1)) SWIG_fail;
26365 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26366 if (!SWIG_IsOK(res1)) {
26367 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat_remove_ids" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
26368 }
26369 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
26370 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
26371 if (!SWIG_IsOK(res2)) {
26372 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexFlat_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
26373 }
26374 if (!argp2) {
26375 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexFlat_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
26376 }
26377 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
26378 {
26379 Py_BEGIN_ALLOW_THREADS
26380 try {
26381 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
26382 } catch(faiss::FaissException & e) {
26383 PyEval_RestoreThread(_save);
26384 PyErr_SetString(PyExc_RuntimeError, e.what());
26385 SWIG_fail;
26386 }
26387 Py_END_ALLOW_THREADS
26388 }
26389 resultobj = SWIG_From_long(static_cast< long >(result));
26390 return resultobj;
26391 fail:
26392 return NULL;
26393 }
26394
26395
26396 SWIGINTERN PyObject *_wrap_new_IndexFlat__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26397 PyObject *resultobj = 0;
26398 faiss::IndexFlat *result = 0 ;
26399
26400 if (!PyArg_ParseTuple(args,(char *)":new_IndexFlat")) SWIG_fail;
26401 {
26402 Py_BEGIN_ALLOW_THREADS
26403 try {
26404 result = (faiss::IndexFlat *)new faiss::IndexFlat();
26405 } catch(faiss::FaissException & e) {
26406 PyEval_RestoreThread(_save);
26407 PyErr_SetString(PyExc_RuntimeError, e.what());
26408 SWIG_fail;
26409 }
26410 Py_END_ALLOW_THREADS
26411 }
26412 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_NEW | 0 );
26413 return resultobj;
26414 fail:
26415 return NULL;
26416 }
26417
26418
26419 SWIGINTERN PyObject *_wrap_new_IndexFlat(PyObject *self, PyObject *args) {
26420 Py_ssize_t argc;
26421 PyObject *argv[3] = {
26422 0
26423 };
26424 Py_ssize_t ii;
26425
26426 if (!PyTuple_Check(args)) SWIG_fail;
26427 argc = args ? PyObject_Length(args) : 0;
26428 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
26429 argv[ii] = PyTuple_GET_ITEM(args,ii);
26430 }
26431 if (argc == 0) {
26432 return _wrap_new_IndexFlat__SWIG_2(self, args);
26433 }
26434 if (argc == 1) {
26435 int _v;
26436 {
26437 int res = SWIG_AsVal_long(argv[0], NULL);
26438 _v = SWIG_CheckState(res);
26439 }
26440 if (_v) {
26441 return _wrap_new_IndexFlat__SWIG_1(self, args);
26442 }
26443 }
26444 if (argc == 2) {
26445 int _v;
26446 {
26447 int res = SWIG_AsVal_long(argv[0], NULL);
26448 _v = SWIG_CheckState(res);
26449 }
26450 if (_v) {
26451 {
26452 int res = SWIG_AsVal_int(argv[1], NULL);
26453 _v = SWIG_CheckState(res);
26454 }
26455 if (_v) {
26456 return _wrap_new_IndexFlat__SWIG_0(self, args);
26457 }
26458 }
26459 }
26460
26461 fail:
26462 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexFlat'.\n"
26463 " Possible C/C++ prototypes are:\n"
26464 " faiss::IndexFlat::IndexFlat(faiss::Index::idx_t,faiss::MetricType)\n"
26465 " faiss::IndexFlat::IndexFlat(faiss::Index::idx_t)\n"
26466 " faiss::IndexFlat::IndexFlat()\n");
26467 return 0;
26468 }
26469
26470
26471 SWIGINTERN PyObject *_wrap_delete_IndexFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26472 PyObject *resultobj = 0;
26473 faiss::IndexFlat *arg1 = (faiss::IndexFlat *) 0 ;
26474 void *argp1 = 0 ;
26475 int res1 = 0 ;
26476 PyObject * obj0 = 0 ;
26477
26478 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlat",&obj0)) SWIG_fail;
26479 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat, SWIG_POINTER_DISOWN | 0 );
26480 if (!SWIG_IsOK(res1)) {
26481 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlat" "', argument " "1"" of type '" "faiss::IndexFlat *""'");
26482 }
26483 arg1 = reinterpret_cast< faiss::IndexFlat * >(argp1);
26484 delete arg1;
26485 resultobj = SWIG_Py_Void();
26486 return resultobj;
26487 fail:
26488 return NULL;
26489 }
26490
26491
26492 SWIGINTERN PyObject *IndexFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26493 PyObject *obj;
26494 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
26495 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlat, SWIG_NewClientData(obj));
26496 return SWIG_Py_Void();
26497 }
26498
26499 SWIGINTERN PyObject *_wrap_new_IndexFlatIP__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26500 PyObject *resultobj = 0;
26501 faiss::Index::idx_t arg1 ;
26502 long val1 ;
26503 int ecode1 = 0 ;
26504 PyObject * obj0 = 0 ;
26505 faiss::IndexFlatIP *result = 0 ;
26506
26507 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexFlatIP",&obj0)) SWIG_fail;
26508 ecode1 = SWIG_AsVal_long(obj0, &val1);
26509 if (!SWIG_IsOK(ecode1)) {
26510 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlatIP" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
26511 }
26512 arg1 = static_cast< faiss::Index::idx_t >(val1);
26513 {
26514 Py_BEGIN_ALLOW_THREADS
26515 try {
26516 result = (faiss::IndexFlatIP *)new faiss::IndexFlatIP(arg1);
26517 } catch(faiss::FaissException & e) {
26518 PyEval_RestoreThread(_save);
26519 PyErr_SetString(PyExc_RuntimeError, e.what());
26520 SWIG_fail;
26521 }
26522 Py_END_ALLOW_THREADS
26523 }
26524 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatIP, SWIG_POINTER_NEW | 0 );
26525 return resultobj;
26526 fail:
26527 return NULL;
26528 }
26529
26530
26531 SWIGINTERN PyObject *_wrap_new_IndexFlatIP__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26532 PyObject *resultobj = 0;
26533 faiss::IndexFlatIP *result = 0 ;
26534
26535 if (!PyArg_ParseTuple(args,(char *)":new_IndexFlatIP")) SWIG_fail;
26536 {
26537 Py_BEGIN_ALLOW_THREADS
26538 try {
26539 result = (faiss::IndexFlatIP *)new faiss::IndexFlatIP();
26540 } catch(faiss::FaissException & e) {
26541 PyEval_RestoreThread(_save);
26542 PyErr_SetString(PyExc_RuntimeError, e.what());
26543 SWIG_fail;
26544 }
26545 Py_END_ALLOW_THREADS
26546 }
26547 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatIP, SWIG_POINTER_NEW | 0 );
26548 return resultobj;
26549 fail:
26550 return NULL;
26551 }
26552
26553
26554 SWIGINTERN PyObject *_wrap_new_IndexFlatIP(PyObject *self, PyObject *args) {
26555 Py_ssize_t argc;
26556 PyObject *argv[2] = {
26557 0
26558 };
26559 Py_ssize_t ii;
26560
26561 if (!PyTuple_Check(args)) SWIG_fail;
26562 argc = args ? PyObject_Length(args) : 0;
26563 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
26564 argv[ii] = PyTuple_GET_ITEM(args,ii);
26565 }
26566 if (argc == 0) {
26567 return _wrap_new_IndexFlatIP__SWIG_1(self, args);
26568 }
26569 if (argc == 1) {
26570 int _v;
26571 {
26572 int res = SWIG_AsVal_long(argv[0], NULL);
26573 _v = SWIG_CheckState(res);
26574 }
26575 if (_v) {
26576 return _wrap_new_IndexFlatIP__SWIG_0(self, args);
26577 }
26578 }
26579
26580 fail:
26581 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexFlatIP'.\n"
26582 " Possible C/C++ prototypes are:\n"
26583 " faiss::IndexFlatIP::IndexFlatIP(faiss::Index::idx_t)\n"
26584 " faiss::IndexFlatIP::IndexFlatIP()\n");
26585 return 0;
26586 }
26587
26588
26589 SWIGINTERN PyObject *_wrap_delete_IndexFlatIP(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26590 PyObject *resultobj = 0;
26591 faiss::IndexFlatIP *arg1 = (faiss::IndexFlatIP *) 0 ;
26592 void *argp1 = 0 ;
26593 int res1 = 0 ;
26594 PyObject * obj0 = 0 ;
26595
26596 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlatIP",&obj0)) SWIG_fail;
26597 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatIP, SWIG_POINTER_DISOWN | 0 );
26598 if (!SWIG_IsOK(res1)) {
26599 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlatIP" "', argument " "1"" of type '" "faiss::IndexFlatIP *""'");
26600 }
26601 arg1 = reinterpret_cast< faiss::IndexFlatIP * >(argp1);
26602 delete arg1;
26603 resultobj = SWIG_Py_Void();
26604 return resultobj;
26605 fail:
26606 return NULL;
26607 }
26608
26609
26610 SWIGINTERN PyObject *IndexFlatIP_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26611 PyObject *obj;
26612 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
26613 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlatIP, SWIG_NewClientData(obj));
26614 return SWIG_Py_Void();
26615 }
26616
26617 SWIGINTERN PyObject *_wrap_new_IndexFlatL2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26618 PyObject *resultobj = 0;
26619 faiss::Index::idx_t arg1 ;
26620 long val1 ;
26621 int ecode1 = 0 ;
26622 PyObject * obj0 = 0 ;
26623 faiss::IndexFlatL2 *result = 0 ;
26624
26625 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexFlatL2",&obj0)) SWIG_fail;
26626 ecode1 = SWIG_AsVal_long(obj0, &val1);
26627 if (!SWIG_IsOK(ecode1)) {
26628 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlatL2" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
26629 }
26630 arg1 = static_cast< faiss::Index::idx_t >(val1);
26631 {
26632 Py_BEGIN_ALLOW_THREADS
26633 try {
26634 result = (faiss::IndexFlatL2 *)new faiss::IndexFlatL2(arg1);
26635 } catch(faiss::FaissException & e) {
26636 PyEval_RestoreThread(_save);
26637 PyErr_SetString(PyExc_RuntimeError, e.what());
26638 SWIG_fail;
26639 }
26640 Py_END_ALLOW_THREADS
26641 }
26642 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatL2, SWIG_POINTER_NEW | 0 );
26643 return resultobj;
26644 fail:
26645 return NULL;
26646 }
26647
26648
26649 SWIGINTERN PyObject *_wrap_new_IndexFlatL2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26650 PyObject *resultobj = 0;
26651 faiss::IndexFlatL2 *result = 0 ;
26652
26653 if (!PyArg_ParseTuple(args,(char *)":new_IndexFlatL2")) SWIG_fail;
26654 {
26655 Py_BEGIN_ALLOW_THREADS
26656 try {
26657 result = (faiss::IndexFlatL2 *)new faiss::IndexFlatL2();
26658 } catch(faiss::FaissException & e) {
26659 PyEval_RestoreThread(_save);
26660 PyErr_SetString(PyExc_RuntimeError, e.what());
26661 SWIG_fail;
26662 }
26663 Py_END_ALLOW_THREADS
26664 }
26665 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatL2, SWIG_POINTER_NEW | 0 );
26666 return resultobj;
26667 fail:
26668 return NULL;
26669 }
26670
26671
26672 SWIGINTERN PyObject *_wrap_new_IndexFlatL2(PyObject *self, PyObject *args) {
26673 Py_ssize_t argc;
26674 PyObject *argv[2] = {
26675 0
26676 };
26677 Py_ssize_t ii;
26678
26679 if (!PyTuple_Check(args)) SWIG_fail;
26680 argc = args ? PyObject_Length(args) : 0;
26681 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
26682 argv[ii] = PyTuple_GET_ITEM(args,ii);
26683 }
26684 if (argc == 0) {
26685 return _wrap_new_IndexFlatL2__SWIG_1(self, args);
26686 }
26687 if (argc == 1) {
26688 int _v;
26689 {
26690 int res = SWIG_AsVal_long(argv[0], NULL);
26691 _v = SWIG_CheckState(res);
26692 }
26693 if (_v) {
26694 return _wrap_new_IndexFlatL2__SWIG_0(self, args);
26695 }
26696 }
26697
26698 fail:
26699 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexFlatL2'.\n"
26700 " Possible C/C++ prototypes are:\n"
26701 " faiss::IndexFlatL2::IndexFlatL2(faiss::Index::idx_t)\n"
26702 " faiss::IndexFlatL2::IndexFlatL2()\n");
26703 return 0;
26704 }
26705
26706
26707 SWIGINTERN PyObject *_wrap_delete_IndexFlatL2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26708 PyObject *resultobj = 0;
26709 faiss::IndexFlatL2 *arg1 = (faiss::IndexFlatL2 *) 0 ;
26710 void *argp1 = 0 ;
26711 int res1 = 0 ;
26712 PyObject * obj0 = 0 ;
26713
26714 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlatL2",&obj0)) SWIG_fail;
26715 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2, SWIG_POINTER_DISOWN | 0 );
26716 if (!SWIG_IsOK(res1)) {
26717 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlatL2" "', argument " "1"" of type '" "faiss::IndexFlatL2 *""'");
26718 }
26719 arg1 = reinterpret_cast< faiss::IndexFlatL2 * >(argp1);
26720 delete arg1;
26721 resultobj = SWIG_Py_Void();
26722 return resultobj;
26723 fail:
26724 return NULL;
26725 }
26726
26727
26728 SWIGINTERN PyObject *IndexFlatL2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26729 PyObject *obj;
26730 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
26731 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlatL2, SWIG_NewClientData(obj));
26732 return SWIG_Py_Void();
26733 }
26734
26735 SWIGINTERN PyObject *_wrap_IndexFlatL2BaseShift_shift_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26736 PyObject *resultobj = 0;
26737 faiss::IndexFlatL2BaseShift *arg1 = (faiss::IndexFlatL2BaseShift *) 0 ;
26738 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
26739 void *argp1 = 0 ;
26740 int res1 = 0 ;
26741 void *argp2 = 0 ;
26742 int res2 = 0 ;
26743 PyObject * obj0 = 0 ;
26744 PyObject * obj1 = 0 ;
26745
26746 if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlatL2BaseShift_shift_set",&obj0,&obj1)) SWIG_fail;
26747 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2BaseShift, 0 | 0 );
26748 if (!SWIG_IsOK(res1)) {
26749 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlatL2BaseShift_shift_set" "', argument " "1"" of type '" "faiss::IndexFlatL2BaseShift *""'");
26750 }
26751 arg1 = reinterpret_cast< faiss::IndexFlatL2BaseShift * >(argp1);
26752 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
26753 if (!SWIG_IsOK(res2)) {
26754 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexFlatL2BaseShift_shift_set" "', argument " "2"" of type '" "std::vector< float > *""'");
26755 }
26756 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
26757 if (arg1) (arg1)->shift = *arg2;
26758 resultobj = SWIG_Py_Void();
26759 return resultobj;
26760 fail:
26761 return NULL;
26762 }
26763
26764
26765 SWIGINTERN PyObject *_wrap_IndexFlatL2BaseShift_shift_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26766 PyObject *resultobj = 0;
26767 faiss::IndexFlatL2BaseShift *arg1 = (faiss::IndexFlatL2BaseShift *) 0 ;
26768 void *argp1 = 0 ;
26769 int res1 = 0 ;
26770 PyObject * obj0 = 0 ;
26771 std::vector< float > *result = 0 ;
26772
26773 if (!PyArg_ParseTuple(args,(char *)"O:IndexFlatL2BaseShift_shift_get",&obj0)) SWIG_fail;
26774 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2BaseShift, 0 | 0 );
26775 if (!SWIG_IsOK(res1)) {
26776 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlatL2BaseShift_shift_get" "', argument " "1"" of type '" "faiss::IndexFlatL2BaseShift *""'");
26777 }
26778 arg1 = reinterpret_cast< faiss::IndexFlatL2BaseShift * >(argp1);
26779 result = (std::vector< float > *)& ((arg1)->shift);
26780 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
26781 return resultobj;
26782 fail:
26783 return NULL;
26784 }
26785
26786
26787 SWIGINTERN PyObject *_wrap_new_IndexFlatL2BaseShift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26788 PyObject *resultobj = 0;
26789 faiss::Index::idx_t arg1 ;
26790 size_t arg2 ;
26791 float *arg3 = (float *) 0 ;
26792 long val1 ;
26793 int ecode1 = 0 ;
26794 size_t val2 ;
26795 int ecode2 = 0 ;
26796 void *argp3 = 0 ;
26797 int res3 = 0 ;
26798 PyObject * obj0 = 0 ;
26799 PyObject * obj1 = 0 ;
26800 PyObject * obj2 = 0 ;
26801 faiss::IndexFlatL2BaseShift *result = 0 ;
26802
26803 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexFlatL2BaseShift",&obj0,&obj1,&obj2)) SWIG_fail;
26804 ecode1 = SWIG_AsVal_long(obj0, &val1);
26805 if (!SWIG_IsOK(ecode1)) {
26806 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlatL2BaseShift" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
26807 }
26808 arg1 = static_cast< faiss::Index::idx_t >(val1);
26809 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
26810 if (!SWIG_IsOK(ecode2)) {
26811 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexFlatL2BaseShift" "', argument " "2"" of type '" "size_t""'");
26812 }
26813 arg2 = static_cast< size_t >(val2);
26814 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26815 if (!SWIG_IsOK(res3)) {
26816 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_IndexFlatL2BaseShift" "', argument " "3"" of type '" "float const *""'");
26817 }
26818 arg3 = reinterpret_cast< float * >(argp3);
26819 {
26820 Py_BEGIN_ALLOW_THREADS
26821 try {
26822 result = (faiss::IndexFlatL2BaseShift *)new faiss::IndexFlatL2BaseShift(arg1,arg2,(float const *)arg3);
26823 } catch(faiss::FaissException & e) {
26824 PyEval_RestoreThread(_save);
26825 PyErr_SetString(PyExc_RuntimeError, e.what());
26826 SWIG_fail;
26827 }
26828 Py_END_ALLOW_THREADS
26829 }
26830 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlatL2BaseShift, SWIG_POINTER_NEW | 0 );
26831 return resultobj;
26832 fail:
26833 return NULL;
26834 }
26835
26836
26837 SWIGINTERN PyObject *_wrap_IndexFlatL2BaseShift_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26838 PyObject *resultobj = 0;
26839 faiss::IndexFlatL2BaseShift *arg1 = (faiss::IndexFlatL2BaseShift *) 0 ;
26840 faiss::Index::idx_t arg2 ;
26841 float *arg3 = (float *) 0 ;
26842 faiss::Index::idx_t arg4 ;
26843 float *arg5 = (float *) 0 ;
26844 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
26845 void *argp1 = 0 ;
26846 int res1 = 0 ;
26847 long val2 ;
26848 int ecode2 = 0 ;
26849 void *argp3 = 0 ;
26850 int res3 = 0 ;
26851 long val4 ;
26852 int ecode4 = 0 ;
26853 void *argp5 = 0 ;
26854 int res5 = 0 ;
26855 void *argp6 = 0 ;
26856 int res6 = 0 ;
26857 PyObject * obj0 = 0 ;
26858 PyObject * obj1 = 0 ;
26859 PyObject * obj2 = 0 ;
26860 PyObject * obj3 = 0 ;
26861 PyObject * obj4 = 0 ;
26862 PyObject * obj5 = 0 ;
26863
26864 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexFlatL2BaseShift_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
26865 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2BaseShift, 0 | 0 );
26866 if (!SWIG_IsOK(res1)) {
26867 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlatL2BaseShift_search" "', argument " "1"" of type '" "faiss::IndexFlatL2BaseShift const *""'");
26868 }
26869 arg1 = reinterpret_cast< faiss::IndexFlatL2BaseShift * >(argp1);
26870 ecode2 = SWIG_AsVal_long(obj1, &val2);
26871 if (!SWIG_IsOK(ecode2)) {
26872 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlatL2BaseShift_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
26873 }
26874 arg2 = static_cast< faiss::Index::idx_t >(val2);
26875 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
26876 if (!SWIG_IsOK(res3)) {
26877 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlatL2BaseShift_search" "', argument " "3"" of type '" "float const *""'");
26878 }
26879 arg3 = reinterpret_cast< float * >(argp3);
26880 ecode4 = SWIG_AsVal_long(obj3, &val4);
26881 if (!SWIG_IsOK(ecode4)) {
26882 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlatL2BaseShift_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
26883 }
26884 arg4 = static_cast< faiss::Index::idx_t >(val4);
26885 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
26886 if (!SWIG_IsOK(res5)) {
26887 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlatL2BaseShift_search" "', argument " "5"" of type '" "float *""'");
26888 }
26889 arg5 = reinterpret_cast< float * >(argp5);
26890 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
26891 if (!SWIG_IsOK(res6)) {
26892 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexFlatL2BaseShift_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
26893 }
26894 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
26895 {
26896 Py_BEGIN_ALLOW_THREADS
26897 try {
26898 ((faiss::IndexFlatL2BaseShift const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
26899 } catch(faiss::FaissException & e) {
26900 PyEval_RestoreThread(_save);
26901 PyErr_SetString(PyExc_RuntimeError, e.what());
26902 SWIG_fail;
26903 }
26904 Py_END_ALLOW_THREADS
26905 }
26906 resultobj = SWIG_Py_Void();
26907 return resultobj;
26908 fail:
26909 return NULL;
26910 }
26911
26912
26913 SWIGINTERN PyObject *_wrap_delete_IndexFlatL2BaseShift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26914 PyObject *resultobj = 0;
26915 faiss::IndexFlatL2BaseShift *arg1 = (faiss::IndexFlatL2BaseShift *) 0 ;
26916 void *argp1 = 0 ;
26917 int res1 = 0 ;
26918 PyObject * obj0 = 0 ;
26919
26920 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlatL2BaseShift",&obj0)) SWIG_fail;
26921 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlatL2BaseShift, SWIG_POINTER_DISOWN | 0 );
26922 if (!SWIG_IsOK(res1)) {
26923 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlatL2BaseShift" "', argument " "1"" of type '" "faiss::IndexFlatL2BaseShift *""'");
26924 }
26925 arg1 = reinterpret_cast< faiss::IndexFlatL2BaseShift * >(argp1);
26926 delete arg1;
26927 resultobj = SWIG_Py_Void();
26928 return resultobj;
26929 fail:
26930 return NULL;
26931 }
26932
26933
26934 SWIGINTERN PyObject *IndexFlatL2BaseShift_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26935 PyObject *obj;
26936 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
26937 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlatL2BaseShift, SWIG_NewClientData(obj));
26938 return SWIG_Py_Void();
26939 }
26940
26941 SWIGINTERN PyObject *_wrap_IndexRefineFlat_refine_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26942 PyObject *resultobj = 0;
26943 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
26944 faiss::IndexFlat *arg2 = (faiss::IndexFlat *) 0 ;
26945 void *argp1 = 0 ;
26946 int res1 = 0 ;
26947 void *argp2 = 0 ;
26948 int res2 = 0 ;
26949 PyObject * obj0 = 0 ;
26950 PyObject * obj1 = 0 ;
26951
26952 if (!PyArg_ParseTuple(args,(char *)"OO:IndexRefineFlat_refine_index_set",&obj0,&obj1)) SWIG_fail;
26953 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
26954 if (!SWIG_IsOK(res1)) {
26955 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_refine_index_set" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
26956 }
26957 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
26958 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26959 if (!SWIG_IsOK(res2)) {
26960 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexRefineFlat_refine_index_set" "', argument " "2"" of type '" "faiss::IndexFlat *""'");
26961 }
26962 arg2 = reinterpret_cast< faiss::IndexFlat * >(argp2);
26963 if (arg1) (arg1)->refine_index = *arg2;
26964 resultobj = SWIG_Py_Void();
26965 return resultobj;
26966 fail:
26967 return NULL;
26968 }
26969
26970
26971 SWIGINTERN PyObject *_wrap_IndexRefineFlat_refine_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26972 PyObject *resultobj = 0;
26973 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
26974 void *argp1 = 0 ;
26975 int res1 = 0 ;
26976 PyObject * obj0 = 0 ;
26977 faiss::IndexFlat *result = 0 ;
26978
26979 if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_refine_index_get",&obj0)) SWIG_fail;
26980 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
26981 if (!SWIG_IsOK(res1)) {
26982 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_refine_index_get" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
26983 }
26984 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
26985 result = (faiss::IndexFlat *)& ((arg1)->refine_index);
26986 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat, 0 | 0 );
26987 return resultobj;
26988 fail:
26989 return NULL;
26990 }
26991
26992
26993 SWIGINTERN PyObject *_wrap_IndexRefineFlat_base_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
26994 PyObject *resultobj = 0;
26995 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
26996 faiss::Index *arg2 = (faiss::Index *) 0 ;
26997 void *argp1 = 0 ;
26998 int res1 = 0 ;
26999 void *argp2 = 0 ;
27000 int res2 = 0 ;
27001 PyObject * obj0 = 0 ;
27002 PyObject * obj1 = 0 ;
27003
27004 if (!PyArg_ParseTuple(args,(char *)"OO:IndexRefineFlat_base_index_set",&obj0,&obj1)) SWIG_fail;
27005 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27006 if (!SWIG_IsOK(res1)) {
27007 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_base_index_set" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27008 }
27009 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27010 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
27011 if (!SWIG_IsOK(res2)) {
27012 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexRefineFlat_base_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
27013 }
27014 arg2 = reinterpret_cast< faiss::Index * >(argp2);
27015 if (arg1) (arg1)->base_index = arg2;
27016 resultobj = SWIG_Py_Void();
27017 return resultobj;
27018 fail:
27019 return NULL;
27020 }
27021
27022
27023 SWIGINTERN PyObject *_wrap_IndexRefineFlat_base_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27024 PyObject *resultobj = 0;
27025 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27026 void *argp1 = 0 ;
27027 int res1 = 0 ;
27028 PyObject * obj0 = 0 ;
27029 faiss::Index *result = 0 ;
27030
27031 if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_base_index_get",&obj0)) SWIG_fail;
27032 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27033 if (!SWIG_IsOK(res1)) {
27034 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_base_index_get" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27035 }
27036 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27037 result = (faiss::Index *) ((arg1)->base_index);
27038 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
27039 return resultobj;
27040 fail:
27041 return NULL;
27042 }
27043
27044
27045 SWIGINTERN PyObject *_wrap_IndexRefineFlat_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27046 PyObject *resultobj = 0;
27047 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27048 bool arg2 ;
27049 void *argp1 = 0 ;
27050 int res1 = 0 ;
27051 bool val2 ;
27052 int ecode2 = 0 ;
27053 PyObject * obj0 = 0 ;
27054 PyObject * obj1 = 0 ;
27055
27056 if (!PyArg_ParseTuple(args,(char *)"OO:IndexRefineFlat_own_fields_set",&obj0,&obj1)) SWIG_fail;
27057 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27058 if (!SWIG_IsOK(res1)) {
27059 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_own_fields_set" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27060 }
27061 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27062 ecode2 = SWIG_AsVal_bool(obj1, &val2);
27063 if (!SWIG_IsOK(ecode2)) {
27064 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_own_fields_set" "', argument " "2"" of type '" "bool""'");
27065 }
27066 arg2 = static_cast< bool >(val2);
27067 if (arg1) (arg1)->own_fields = arg2;
27068 resultobj = SWIG_Py_Void();
27069 return resultobj;
27070 fail:
27071 return NULL;
27072 }
27073
27074
27075 SWIGINTERN PyObject *_wrap_IndexRefineFlat_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27076 PyObject *resultobj = 0;
27077 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27078 void *argp1 = 0 ;
27079 int res1 = 0 ;
27080 PyObject * obj0 = 0 ;
27081 bool result;
27082
27083 if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_own_fields_get",&obj0)) SWIG_fail;
27084 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27085 if (!SWIG_IsOK(res1)) {
27086 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_own_fields_get" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27087 }
27088 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27089 result = (bool) ((arg1)->own_fields);
27090 resultobj = SWIG_From_bool(static_cast< bool >(result));
27091 return resultobj;
27092 fail:
27093 return NULL;
27094 }
27095
27096
27097 SWIGINTERN PyObject *_wrap_IndexRefineFlat_k_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27098 PyObject *resultobj = 0;
27099 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27100 float arg2 ;
27101 void *argp1 = 0 ;
27102 int res1 = 0 ;
27103 float val2 ;
27104 int ecode2 = 0 ;
27105 PyObject * obj0 = 0 ;
27106 PyObject * obj1 = 0 ;
27107
27108 if (!PyArg_ParseTuple(args,(char *)"OO:IndexRefineFlat_k_factor_set",&obj0,&obj1)) SWIG_fail;
27109 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27110 if (!SWIG_IsOK(res1)) {
27111 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_k_factor_set" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27112 }
27113 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27114 ecode2 = SWIG_AsVal_float(obj1, &val2);
27115 if (!SWIG_IsOK(ecode2)) {
27116 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_k_factor_set" "', argument " "2"" of type '" "float""'");
27117 }
27118 arg2 = static_cast< float >(val2);
27119 if (arg1) (arg1)->k_factor = arg2;
27120 resultobj = SWIG_Py_Void();
27121 return resultobj;
27122 fail:
27123 return NULL;
27124 }
27125
27126
27127 SWIGINTERN PyObject *_wrap_IndexRefineFlat_k_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27128 PyObject *resultobj = 0;
27129 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27130 void *argp1 = 0 ;
27131 int res1 = 0 ;
27132 PyObject * obj0 = 0 ;
27133 float result;
27134
27135 if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_k_factor_get",&obj0)) SWIG_fail;
27136 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27137 if (!SWIG_IsOK(res1)) {
27138 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_k_factor_get" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27139 }
27140 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27141 result = (float) ((arg1)->k_factor);
27142 resultobj = SWIG_From_float(static_cast< float >(result));
27143 return resultobj;
27144 fail:
27145 return NULL;
27146 }
27147
27148
27149 SWIGINTERN PyObject *_wrap_new_IndexRefineFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27150 PyObject *resultobj = 0;
27151 faiss::Index *arg1 = (faiss::Index *) 0 ;
27152 void *argp1 = 0 ;
27153 int res1 = 0 ;
27154 PyObject * obj0 = 0 ;
27155 faiss::IndexRefineFlat *result = 0 ;
27156
27157 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexRefineFlat",&obj0)) SWIG_fail;
27158 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
27159 if (!SWIG_IsOK(res1)) {
27160 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexRefineFlat" "', argument " "1"" of type '" "faiss::Index *""'");
27161 }
27162 arg1 = reinterpret_cast< faiss::Index * >(argp1);
27163 {
27164 Py_BEGIN_ALLOW_THREADS
27165 try {
27166 result = (faiss::IndexRefineFlat *)new faiss::IndexRefineFlat(arg1);
27167 } catch(faiss::FaissException & e) {
27168 PyEval_RestoreThread(_save);
27169 PyErr_SetString(PyExc_RuntimeError, e.what());
27170 SWIG_fail;
27171 }
27172 Py_END_ALLOW_THREADS
27173 }
27174 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexRefineFlat, SWIG_POINTER_NEW | 0 );
27175 return resultobj;
27176 fail:
27177 return NULL;
27178 }
27179
27180
27181 SWIGINTERN PyObject *_wrap_new_IndexRefineFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27182 PyObject *resultobj = 0;
27183 faiss::IndexRefineFlat *result = 0 ;
27184
27185 if (!PyArg_ParseTuple(args,(char *)":new_IndexRefineFlat")) SWIG_fail;
27186 {
27187 Py_BEGIN_ALLOW_THREADS
27188 try {
27189 result = (faiss::IndexRefineFlat *)new faiss::IndexRefineFlat();
27190 } catch(faiss::FaissException & e) {
27191 PyEval_RestoreThread(_save);
27192 PyErr_SetString(PyExc_RuntimeError, e.what());
27193 SWIG_fail;
27194 }
27195 Py_END_ALLOW_THREADS
27196 }
27197 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexRefineFlat, SWIG_POINTER_NEW | 0 );
27198 return resultobj;
27199 fail:
27200 return NULL;
27201 }
27202
27203
27204 SWIGINTERN PyObject *_wrap_new_IndexRefineFlat(PyObject *self, PyObject *args) {
27205 Py_ssize_t argc;
27206 PyObject *argv[2] = {
27207 0
27208 };
27209 Py_ssize_t ii;
27210
27211 if (!PyTuple_Check(args)) SWIG_fail;
27212 argc = args ? PyObject_Length(args) : 0;
27213 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
27214 argv[ii] = PyTuple_GET_ITEM(args,ii);
27215 }
27216 if (argc == 0) {
27217 return _wrap_new_IndexRefineFlat__SWIG_1(self, args);
27218 }
27219 if (argc == 1) {
27220 int _v;
27221 void *vptr = 0;
27222 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
27223 _v = SWIG_CheckState(res);
27224 if (_v) {
27225 return _wrap_new_IndexRefineFlat__SWIG_0(self, args);
27226 }
27227 }
27228
27229 fail:
27230 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexRefineFlat'.\n"
27231 " Possible C/C++ prototypes are:\n"
27232 " faiss::IndexRefineFlat::IndexRefineFlat(faiss::Index *)\n"
27233 " faiss::IndexRefineFlat::IndexRefineFlat()\n");
27234 return 0;
27235 }
27236
27237
27238 SWIGINTERN PyObject *_wrap_IndexRefineFlat_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27239 PyObject *resultobj = 0;
27240 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27241 faiss::Index::idx_t arg2 ;
27242 float *arg3 = (float *) 0 ;
27243 void *argp1 = 0 ;
27244 int res1 = 0 ;
27245 long val2 ;
27246 int ecode2 = 0 ;
27247 void *argp3 = 0 ;
27248 int res3 = 0 ;
27249 PyObject * obj0 = 0 ;
27250 PyObject * obj1 = 0 ;
27251 PyObject * obj2 = 0 ;
27252
27253 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexRefineFlat_train",&obj0,&obj1,&obj2)) SWIG_fail;
27254 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27255 if (!SWIG_IsOK(res1)) {
27256 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_train" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27257 }
27258 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27259 ecode2 = SWIG_AsVal_long(obj1, &val2);
27260 if (!SWIG_IsOK(ecode2)) {
27261 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27262 }
27263 arg2 = static_cast< faiss::Index::idx_t >(val2);
27264 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27265 if (!SWIG_IsOK(res3)) {
27266 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexRefineFlat_train" "', argument " "3"" of type '" "float const *""'");
27267 }
27268 arg3 = reinterpret_cast< float * >(argp3);
27269 {
27270 Py_BEGIN_ALLOW_THREADS
27271 try {
27272 (arg1)->train(arg2,(float const *)arg3);
27273 } catch(faiss::FaissException & e) {
27274 PyEval_RestoreThread(_save);
27275 PyErr_SetString(PyExc_RuntimeError, e.what());
27276 SWIG_fail;
27277 }
27278 Py_END_ALLOW_THREADS
27279 }
27280 resultobj = SWIG_Py_Void();
27281 return resultobj;
27282 fail:
27283 return NULL;
27284 }
27285
27286
27287 SWIGINTERN PyObject *_wrap_IndexRefineFlat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27288 PyObject *resultobj = 0;
27289 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27290 faiss::Index::idx_t arg2 ;
27291 float *arg3 = (float *) 0 ;
27292 void *argp1 = 0 ;
27293 int res1 = 0 ;
27294 long val2 ;
27295 int ecode2 = 0 ;
27296 void *argp3 = 0 ;
27297 int res3 = 0 ;
27298 PyObject * obj0 = 0 ;
27299 PyObject * obj1 = 0 ;
27300 PyObject * obj2 = 0 ;
27301
27302 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexRefineFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
27303 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27304 if (!SWIG_IsOK(res1)) {
27305 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_add" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27306 }
27307 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27308 ecode2 = SWIG_AsVal_long(obj1, &val2);
27309 if (!SWIG_IsOK(ecode2)) {
27310 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27311 }
27312 arg2 = static_cast< faiss::Index::idx_t >(val2);
27313 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27314 if (!SWIG_IsOK(res3)) {
27315 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexRefineFlat_add" "', argument " "3"" of type '" "float const *""'");
27316 }
27317 arg3 = reinterpret_cast< float * >(argp3);
27318 {
27319 Py_BEGIN_ALLOW_THREADS
27320 try {
27321 (arg1)->add(arg2,(float const *)arg3);
27322 } catch(faiss::FaissException & e) {
27323 PyEval_RestoreThread(_save);
27324 PyErr_SetString(PyExc_RuntimeError, e.what());
27325 SWIG_fail;
27326 }
27327 Py_END_ALLOW_THREADS
27328 }
27329 resultobj = SWIG_Py_Void();
27330 return resultobj;
27331 fail:
27332 return NULL;
27333 }
27334
27335
27336 SWIGINTERN PyObject *_wrap_IndexRefineFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27337 PyObject *resultobj = 0;
27338 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27339 void *argp1 = 0 ;
27340 int res1 = 0 ;
27341 PyObject * obj0 = 0 ;
27342
27343 if (!PyArg_ParseTuple(args,(char *)"O:IndexRefineFlat_reset",&obj0)) SWIG_fail;
27344 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27345 if (!SWIG_IsOK(res1)) {
27346 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_reset" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27347 }
27348 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27349 {
27350 Py_BEGIN_ALLOW_THREADS
27351 try {
27352 (arg1)->reset();
27353 } catch(faiss::FaissException & e) {
27354 PyEval_RestoreThread(_save);
27355 PyErr_SetString(PyExc_RuntimeError, e.what());
27356 SWIG_fail;
27357 }
27358 Py_END_ALLOW_THREADS
27359 }
27360 resultobj = SWIG_Py_Void();
27361 return resultobj;
27362 fail:
27363 return NULL;
27364 }
27365
27366
27367 SWIGINTERN PyObject *_wrap_IndexRefineFlat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27368 PyObject *resultobj = 0;
27369 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27370 faiss::Index::idx_t arg2 ;
27371 float *arg3 = (float *) 0 ;
27372 faiss::Index::idx_t arg4 ;
27373 float *arg5 = (float *) 0 ;
27374 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
27375 void *argp1 = 0 ;
27376 int res1 = 0 ;
27377 long val2 ;
27378 int ecode2 = 0 ;
27379 void *argp3 = 0 ;
27380 int res3 = 0 ;
27381 long val4 ;
27382 int ecode4 = 0 ;
27383 void *argp5 = 0 ;
27384 int res5 = 0 ;
27385 void *argp6 = 0 ;
27386 int res6 = 0 ;
27387 PyObject * obj0 = 0 ;
27388 PyObject * obj1 = 0 ;
27389 PyObject * obj2 = 0 ;
27390 PyObject * obj3 = 0 ;
27391 PyObject * obj4 = 0 ;
27392 PyObject * obj5 = 0 ;
27393
27394 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexRefineFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
27395 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, 0 | 0 );
27396 if (!SWIG_IsOK(res1)) {
27397 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexRefineFlat_search" "', argument " "1"" of type '" "faiss::IndexRefineFlat const *""'");
27398 }
27399 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27400 ecode2 = SWIG_AsVal_long(obj1, &val2);
27401 if (!SWIG_IsOK(ecode2)) {
27402 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexRefineFlat_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27403 }
27404 arg2 = static_cast< faiss::Index::idx_t >(val2);
27405 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27406 if (!SWIG_IsOK(res3)) {
27407 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexRefineFlat_search" "', argument " "3"" of type '" "float const *""'");
27408 }
27409 arg3 = reinterpret_cast< float * >(argp3);
27410 ecode4 = SWIG_AsVal_long(obj3, &val4);
27411 if (!SWIG_IsOK(ecode4)) {
27412 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexRefineFlat_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
27413 }
27414 arg4 = static_cast< faiss::Index::idx_t >(val4);
27415 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
27416 if (!SWIG_IsOK(res5)) {
27417 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexRefineFlat_search" "', argument " "5"" of type '" "float *""'");
27418 }
27419 arg5 = reinterpret_cast< float * >(argp5);
27420 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
27421 if (!SWIG_IsOK(res6)) {
27422 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexRefineFlat_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
27423 }
27424 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
27425 {
27426 Py_BEGIN_ALLOW_THREADS
27427 try {
27428 ((faiss::IndexRefineFlat const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
27429 } catch(faiss::FaissException & e) {
27430 PyEval_RestoreThread(_save);
27431 PyErr_SetString(PyExc_RuntimeError, e.what());
27432 SWIG_fail;
27433 }
27434 Py_END_ALLOW_THREADS
27435 }
27436 resultobj = SWIG_Py_Void();
27437 return resultobj;
27438 fail:
27439 return NULL;
27440 }
27441
27442
27443 SWIGINTERN PyObject *_wrap_delete_IndexRefineFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27444 PyObject *resultobj = 0;
27445 faiss::IndexRefineFlat *arg1 = (faiss::IndexRefineFlat *) 0 ;
27446 void *argp1 = 0 ;
27447 int res1 = 0 ;
27448 PyObject * obj0 = 0 ;
27449
27450 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexRefineFlat",&obj0)) SWIG_fail;
27451 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexRefineFlat, SWIG_POINTER_DISOWN | 0 );
27452 if (!SWIG_IsOK(res1)) {
27453 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexRefineFlat" "', argument " "1"" of type '" "faiss::IndexRefineFlat *""'");
27454 }
27455 arg1 = reinterpret_cast< faiss::IndexRefineFlat * >(argp1);
27456 {
27457 Py_BEGIN_ALLOW_THREADS
27458 try {
27459 delete arg1;
27460 } catch(faiss::FaissException & e) {
27461 PyEval_RestoreThread(_save);
27462 PyErr_SetString(PyExc_RuntimeError, e.what());
27463 SWIG_fail;
27464 }
27465 Py_END_ALLOW_THREADS
27466 }
27467 resultobj = SWIG_Py_Void();
27468 return resultobj;
27469 fail:
27470 return NULL;
27471 }
27472
27473
27474 SWIGINTERN PyObject *IndexRefineFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27475 PyObject *obj;
27476 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
27477 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexRefineFlat, SWIG_NewClientData(obj));
27478 return SWIG_Py_Void();
27479 }
27480
27481 SWIGINTERN PyObject *_wrap_IndexFlat1D_continuous_update_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27482 PyObject *resultobj = 0;
27483 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27484 bool arg2 ;
27485 void *argp1 = 0 ;
27486 int res1 = 0 ;
27487 bool val2 ;
27488 int ecode2 = 0 ;
27489 PyObject * obj0 = 0 ;
27490 PyObject * obj1 = 0 ;
27491
27492 if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlat1D_continuous_update_set",&obj0,&obj1)) SWIG_fail;
27493 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
27494 if (!SWIG_IsOK(res1)) {
27495 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_continuous_update_set" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
27496 }
27497 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27498 ecode2 = SWIG_AsVal_bool(obj1, &val2);
27499 if (!SWIG_IsOK(ecode2)) {
27500 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat1D_continuous_update_set" "', argument " "2"" of type '" "bool""'");
27501 }
27502 arg2 = static_cast< bool >(val2);
27503 if (arg1) (arg1)->continuous_update = arg2;
27504 resultobj = SWIG_Py_Void();
27505 return resultobj;
27506 fail:
27507 return NULL;
27508 }
27509
27510
27511 SWIGINTERN PyObject *_wrap_IndexFlat1D_continuous_update_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27512 PyObject *resultobj = 0;
27513 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27514 void *argp1 = 0 ;
27515 int res1 = 0 ;
27516 PyObject * obj0 = 0 ;
27517 bool result;
27518
27519 if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat1D_continuous_update_get",&obj0)) SWIG_fail;
27520 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
27521 if (!SWIG_IsOK(res1)) {
27522 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_continuous_update_get" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
27523 }
27524 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27525 result = (bool) ((arg1)->continuous_update);
27526 resultobj = SWIG_From_bool(static_cast< bool >(result));
27527 return resultobj;
27528 fail:
27529 return NULL;
27530 }
27531
27532
27533 SWIGINTERN PyObject *_wrap_IndexFlat1D_perm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27534 PyObject *resultobj = 0;
27535 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27536 std::vector< faiss::Index::idx_t > *arg2 = (std::vector< faiss::Index::idx_t > *) 0 ;
27537 void *argp1 = 0 ;
27538 int res1 = 0 ;
27539 void *argp2 = 0 ;
27540 int res2 = 0 ;
27541 PyObject * obj0 = 0 ;
27542 PyObject * obj1 = 0 ;
27543
27544 if (!PyArg_ParseTuple(args,(char *)"OO:IndexFlat1D_perm_set",&obj0,&obj1)) SWIG_fail;
27545 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
27546 if (!SWIG_IsOK(res1)) {
27547 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_perm_set" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
27548 }
27549 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27550 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
27551 if (!SWIG_IsOK(res2)) {
27552 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexFlat1D_perm_set" "', argument " "2"" of type '" "std::vector< faiss::Index::idx_t > *""'");
27553 }
27554 arg2 = reinterpret_cast< std::vector< faiss::Index::idx_t > * >(argp2);
27555 if (arg1) (arg1)->perm = *arg2;
27556 resultobj = SWIG_Py_Void();
27557 return resultobj;
27558 fail:
27559 return NULL;
27560 }
27561
27562
27563 SWIGINTERN PyObject *_wrap_IndexFlat1D_perm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27564 PyObject *resultobj = 0;
27565 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27566 void *argp1 = 0 ;
27567 int res1 = 0 ;
27568 PyObject * obj0 = 0 ;
27569 std::vector< faiss::Index::idx_t > *result = 0 ;
27570
27571 if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat1D_perm_get",&obj0)) SWIG_fail;
27572 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
27573 if (!SWIG_IsOK(res1)) {
27574 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_perm_get" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
27575 }
27576 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27577 result = (std::vector< faiss::Index::idx_t > *)& ((arg1)->perm);
27578 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
27579 return resultobj;
27580 fail:
27581 return NULL;
27582 }
27583
27584
27585 SWIGINTERN PyObject *_wrap_new_IndexFlat1D__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27586 PyObject *resultobj = 0;
27587 bool arg1 ;
27588 bool val1 ;
27589 int ecode1 = 0 ;
27590 PyObject * obj0 = 0 ;
27591 faiss::IndexFlat1D *result = 0 ;
27592
27593 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexFlat1D",&obj0)) SWIG_fail;
27594 ecode1 = SWIG_AsVal_bool(obj0, &val1);
27595 if (!SWIG_IsOK(ecode1)) {
27596 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexFlat1D" "', argument " "1"" of type '" "bool""'");
27597 }
27598 arg1 = static_cast< bool >(val1);
27599 {
27600 Py_BEGIN_ALLOW_THREADS
27601 try {
27602 result = (faiss::IndexFlat1D *)new faiss::IndexFlat1D(arg1);
27603 } catch(faiss::FaissException & e) {
27604 PyEval_RestoreThread(_save);
27605 PyErr_SetString(PyExc_RuntimeError, e.what());
27606 SWIG_fail;
27607 }
27608 Py_END_ALLOW_THREADS
27609 }
27610 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat1D, SWIG_POINTER_NEW | 0 );
27611 return resultobj;
27612 fail:
27613 return NULL;
27614 }
27615
27616
27617 SWIGINTERN PyObject *_wrap_new_IndexFlat1D__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27618 PyObject *resultobj = 0;
27619 faiss::IndexFlat1D *result = 0 ;
27620
27621 if (!PyArg_ParseTuple(args,(char *)":new_IndexFlat1D")) SWIG_fail;
27622 {
27623 Py_BEGIN_ALLOW_THREADS
27624 try {
27625 result = (faiss::IndexFlat1D *)new faiss::IndexFlat1D();
27626 } catch(faiss::FaissException & e) {
27627 PyEval_RestoreThread(_save);
27628 PyErr_SetString(PyExc_RuntimeError, e.what());
27629 SWIG_fail;
27630 }
27631 Py_END_ALLOW_THREADS
27632 }
27633 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexFlat1D, SWIG_POINTER_NEW | 0 );
27634 return resultobj;
27635 fail:
27636 return NULL;
27637 }
27638
27639
27640 SWIGINTERN PyObject *_wrap_new_IndexFlat1D(PyObject *self, PyObject *args) {
27641 Py_ssize_t argc;
27642 PyObject *argv[2] = {
27643 0
27644 };
27645 Py_ssize_t ii;
27646
27647 if (!PyTuple_Check(args)) SWIG_fail;
27648 argc = args ? PyObject_Length(args) : 0;
27649 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
27650 argv[ii] = PyTuple_GET_ITEM(args,ii);
27651 }
27652 if (argc == 0) {
27653 return _wrap_new_IndexFlat1D__SWIG_1(self, args);
27654 }
27655 if (argc == 1) {
27656 int _v;
27657 {
27658 int res = SWIG_AsVal_bool(argv[0], NULL);
27659 _v = SWIG_CheckState(res);
27660 }
27661 if (_v) {
27662 return _wrap_new_IndexFlat1D__SWIG_0(self, args);
27663 }
27664 }
27665
27666 fail:
27667 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexFlat1D'.\n"
27668 " Possible C/C++ prototypes are:\n"
27669 " faiss::IndexFlat1D::IndexFlat1D(bool)\n"
27670 " faiss::IndexFlat1D::IndexFlat1D()\n");
27671 return 0;
27672 }
27673
27674
27675 SWIGINTERN PyObject *_wrap_IndexFlat1D_update_permutation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27676 PyObject *resultobj = 0;
27677 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27678 void *argp1 = 0 ;
27679 int res1 = 0 ;
27680 PyObject * obj0 = 0 ;
27681
27682 if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat1D_update_permutation",&obj0)) SWIG_fail;
27683 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
27684 if (!SWIG_IsOK(res1)) {
27685 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_update_permutation" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
27686 }
27687 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27688 {
27689 Py_BEGIN_ALLOW_THREADS
27690 try {
27691 (arg1)->update_permutation();
27692 } catch(faiss::FaissException & e) {
27693 PyEval_RestoreThread(_save);
27694 PyErr_SetString(PyExc_RuntimeError, e.what());
27695 SWIG_fail;
27696 }
27697 Py_END_ALLOW_THREADS
27698 }
27699 resultobj = SWIG_Py_Void();
27700 return resultobj;
27701 fail:
27702 return NULL;
27703 }
27704
27705
27706 SWIGINTERN PyObject *_wrap_IndexFlat1D_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27707 PyObject *resultobj = 0;
27708 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27709 faiss::Index::idx_t arg2 ;
27710 float *arg3 = (float *) 0 ;
27711 void *argp1 = 0 ;
27712 int res1 = 0 ;
27713 long val2 ;
27714 int ecode2 = 0 ;
27715 void *argp3 = 0 ;
27716 int res3 = 0 ;
27717 PyObject * obj0 = 0 ;
27718 PyObject * obj1 = 0 ;
27719 PyObject * obj2 = 0 ;
27720
27721 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexFlat1D_add",&obj0,&obj1,&obj2)) SWIG_fail;
27722 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
27723 if (!SWIG_IsOK(res1)) {
27724 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_add" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
27725 }
27726 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27727 ecode2 = SWIG_AsVal_long(obj1, &val2);
27728 if (!SWIG_IsOK(ecode2)) {
27729 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat1D_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27730 }
27731 arg2 = static_cast< faiss::Index::idx_t >(val2);
27732 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27733 if (!SWIG_IsOK(res3)) {
27734 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat1D_add" "', argument " "3"" of type '" "float const *""'");
27735 }
27736 arg3 = reinterpret_cast< float * >(argp3);
27737 {
27738 Py_BEGIN_ALLOW_THREADS
27739 try {
27740 (arg1)->add(arg2,(float const *)arg3);
27741 } catch(faiss::FaissException & e) {
27742 PyEval_RestoreThread(_save);
27743 PyErr_SetString(PyExc_RuntimeError, e.what());
27744 SWIG_fail;
27745 }
27746 Py_END_ALLOW_THREADS
27747 }
27748 resultobj = SWIG_Py_Void();
27749 return resultobj;
27750 fail:
27751 return NULL;
27752 }
27753
27754
27755 SWIGINTERN PyObject *_wrap_IndexFlat1D_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27756 PyObject *resultobj = 0;
27757 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27758 void *argp1 = 0 ;
27759 int res1 = 0 ;
27760 PyObject * obj0 = 0 ;
27761
27762 if (!PyArg_ParseTuple(args,(char *)"O:IndexFlat1D_reset",&obj0)) SWIG_fail;
27763 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
27764 if (!SWIG_IsOK(res1)) {
27765 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_reset" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
27766 }
27767 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27768 {
27769 Py_BEGIN_ALLOW_THREADS
27770 try {
27771 (arg1)->reset();
27772 } catch(faiss::FaissException & e) {
27773 PyEval_RestoreThread(_save);
27774 PyErr_SetString(PyExc_RuntimeError, e.what());
27775 SWIG_fail;
27776 }
27777 Py_END_ALLOW_THREADS
27778 }
27779 resultobj = SWIG_Py_Void();
27780 return resultobj;
27781 fail:
27782 return NULL;
27783 }
27784
27785
27786 SWIGINTERN PyObject *_wrap_IndexFlat1D_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27787 PyObject *resultobj = 0;
27788 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27789 faiss::Index::idx_t arg2 ;
27790 float *arg3 = (float *) 0 ;
27791 faiss::Index::idx_t arg4 ;
27792 float *arg5 = (float *) 0 ;
27793 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
27794 void *argp1 = 0 ;
27795 int res1 = 0 ;
27796 long val2 ;
27797 int ecode2 = 0 ;
27798 void *argp3 = 0 ;
27799 int res3 = 0 ;
27800 long val4 ;
27801 int ecode4 = 0 ;
27802 void *argp5 = 0 ;
27803 int res5 = 0 ;
27804 void *argp6 = 0 ;
27805 int res6 = 0 ;
27806 PyObject * obj0 = 0 ;
27807 PyObject * obj1 = 0 ;
27808 PyObject * obj2 = 0 ;
27809 PyObject * obj3 = 0 ;
27810 PyObject * obj4 = 0 ;
27811 PyObject * obj5 = 0 ;
27812
27813 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexFlat1D_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
27814 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, 0 | 0 );
27815 if (!SWIG_IsOK(res1)) {
27816 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexFlat1D_search" "', argument " "1"" of type '" "faiss::IndexFlat1D const *""'");
27817 }
27818 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27819 ecode2 = SWIG_AsVal_long(obj1, &val2);
27820 if (!SWIG_IsOK(ecode2)) {
27821 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexFlat1D_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
27822 }
27823 arg2 = static_cast< faiss::Index::idx_t >(val2);
27824 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
27825 if (!SWIG_IsOK(res3)) {
27826 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexFlat1D_search" "', argument " "3"" of type '" "float const *""'");
27827 }
27828 arg3 = reinterpret_cast< float * >(argp3);
27829 ecode4 = SWIG_AsVal_long(obj3, &val4);
27830 if (!SWIG_IsOK(ecode4)) {
27831 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexFlat1D_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
27832 }
27833 arg4 = static_cast< faiss::Index::idx_t >(val4);
27834 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
27835 if (!SWIG_IsOK(res5)) {
27836 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexFlat1D_search" "', argument " "5"" of type '" "float *""'");
27837 }
27838 arg5 = reinterpret_cast< float * >(argp5);
27839 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
27840 if (!SWIG_IsOK(res6)) {
27841 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexFlat1D_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
27842 }
27843 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
27844 {
27845 Py_BEGIN_ALLOW_THREADS
27846 try {
27847 ((faiss::IndexFlat1D const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
27848 } catch(faiss::FaissException & e) {
27849 PyEval_RestoreThread(_save);
27850 PyErr_SetString(PyExc_RuntimeError, e.what());
27851 SWIG_fail;
27852 }
27853 Py_END_ALLOW_THREADS
27854 }
27855 resultobj = SWIG_Py_Void();
27856 return resultobj;
27857 fail:
27858 return NULL;
27859 }
27860
27861
27862 SWIGINTERN PyObject *_wrap_delete_IndexFlat1D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27863 PyObject *resultobj = 0;
27864 faiss::IndexFlat1D *arg1 = (faiss::IndexFlat1D *) 0 ;
27865 void *argp1 = 0 ;
27866 int res1 = 0 ;
27867 PyObject * obj0 = 0 ;
27868
27869 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexFlat1D",&obj0)) SWIG_fail;
27870 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexFlat1D, SWIG_POINTER_DISOWN | 0 );
27871 if (!SWIG_IsOK(res1)) {
27872 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexFlat1D" "', argument " "1"" of type '" "faiss::IndexFlat1D *""'");
27873 }
27874 arg1 = reinterpret_cast< faiss::IndexFlat1D * >(argp1);
27875 delete arg1;
27876 resultobj = SWIG_Py_Void();
27877 return resultobj;
27878 fail:
27879 return NULL;
27880 }
27881
27882
27883 SWIGINTERN PyObject *IndexFlat1D_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27884 PyObject *obj;
27885 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
27886 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexFlat1D, SWIG_NewClientData(obj));
27887 return SWIG_Py_Void();
27888 }
27889
27890 SWIGINTERN PyObject *_wrap_IndexLSH_nbits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27891 PyObject *resultobj = 0;
27892 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
27893 int arg2 ;
27894 void *argp1 = 0 ;
27895 int res1 = 0 ;
27896 int val2 ;
27897 int ecode2 = 0 ;
27898 PyObject * obj0 = 0 ;
27899 PyObject * obj1 = 0 ;
27900
27901 if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_nbits_set",&obj0,&obj1)) SWIG_fail;
27902 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
27903 if (!SWIG_IsOK(res1)) {
27904 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_nbits_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
27905 }
27906 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
27907 ecode2 = SWIG_AsVal_int(obj1, &val2);
27908 if (!SWIG_IsOK(ecode2)) {
27909 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_nbits_set" "', argument " "2"" of type '" "int""'");
27910 }
27911 arg2 = static_cast< int >(val2);
27912 if (arg1) (arg1)->nbits = arg2;
27913 resultobj = SWIG_Py_Void();
27914 return resultobj;
27915 fail:
27916 return NULL;
27917 }
27918
27919
27920 SWIGINTERN PyObject *_wrap_IndexLSH_nbits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27921 PyObject *resultobj = 0;
27922 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
27923 void *argp1 = 0 ;
27924 int res1 = 0 ;
27925 PyObject * obj0 = 0 ;
27926 int result;
27927
27928 if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_nbits_get",&obj0)) SWIG_fail;
27929 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
27930 if (!SWIG_IsOK(res1)) {
27931 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_nbits_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
27932 }
27933 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
27934 result = (int) ((arg1)->nbits);
27935 resultobj = SWIG_From_int(static_cast< int >(result));
27936 return resultobj;
27937 fail:
27938 return NULL;
27939 }
27940
27941
27942 SWIGINTERN PyObject *_wrap_IndexLSH_bytes_per_vec_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27943 PyObject *resultobj = 0;
27944 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
27945 int arg2 ;
27946 void *argp1 = 0 ;
27947 int res1 = 0 ;
27948 int val2 ;
27949 int ecode2 = 0 ;
27950 PyObject * obj0 = 0 ;
27951 PyObject * obj1 = 0 ;
27952
27953 if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_bytes_per_vec_set",&obj0,&obj1)) SWIG_fail;
27954 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
27955 if (!SWIG_IsOK(res1)) {
27956 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_bytes_per_vec_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
27957 }
27958 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
27959 ecode2 = SWIG_AsVal_int(obj1, &val2);
27960 if (!SWIG_IsOK(ecode2)) {
27961 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_bytes_per_vec_set" "', argument " "2"" of type '" "int""'");
27962 }
27963 arg2 = static_cast< int >(val2);
27964 if (arg1) (arg1)->bytes_per_vec = arg2;
27965 resultobj = SWIG_Py_Void();
27966 return resultobj;
27967 fail:
27968 return NULL;
27969 }
27970
27971
27972 SWIGINTERN PyObject *_wrap_IndexLSH_bytes_per_vec_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27973 PyObject *resultobj = 0;
27974 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
27975 void *argp1 = 0 ;
27976 int res1 = 0 ;
27977 PyObject * obj0 = 0 ;
27978 int result;
27979
27980 if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_bytes_per_vec_get",&obj0)) SWIG_fail;
27981 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
27982 if (!SWIG_IsOK(res1)) {
27983 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_bytes_per_vec_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
27984 }
27985 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
27986 result = (int) ((arg1)->bytes_per_vec);
27987 resultobj = SWIG_From_int(static_cast< int >(result));
27988 return resultobj;
27989 fail:
27990 return NULL;
27991 }
27992
27993
27994 SWIGINTERN PyObject *_wrap_IndexLSH_rotate_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
27995 PyObject *resultobj = 0;
27996 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
27997 bool arg2 ;
27998 void *argp1 = 0 ;
27999 int res1 = 0 ;
28000 bool val2 ;
28001 int ecode2 = 0 ;
28002 PyObject * obj0 = 0 ;
28003 PyObject * obj1 = 0 ;
28004
28005 if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_rotate_data_set",&obj0,&obj1)) SWIG_fail;
28006 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28007 if (!SWIG_IsOK(res1)) {
28008 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_rotate_data_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28009 }
28010 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28011 ecode2 = SWIG_AsVal_bool(obj1, &val2);
28012 if (!SWIG_IsOK(ecode2)) {
28013 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_rotate_data_set" "', argument " "2"" of type '" "bool""'");
28014 }
28015 arg2 = static_cast< bool >(val2);
28016 if (arg1) (arg1)->rotate_data = arg2;
28017 resultobj = SWIG_Py_Void();
28018 return resultobj;
28019 fail:
28020 return NULL;
28021 }
28022
28023
28024 SWIGINTERN PyObject *_wrap_IndexLSH_rotate_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28025 PyObject *resultobj = 0;
28026 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28027 void *argp1 = 0 ;
28028 int res1 = 0 ;
28029 PyObject * obj0 = 0 ;
28030 bool result;
28031
28032 if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_rotate_data_get",&obj0)) SWIG_fail;
28033 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28034 if (!SWIG_IsOK(res1)) {
28035 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_rotate_data_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28036 }
28037 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28038 result = (bool) ((arg1)->rotate_data);
28039 resultobj = SWIG_From_bool(static_cast< bool >(result));
28040 return resultobj;
28041 fail:
28042 return NULL;
28043 }
28044
28045
28046 SWIGINTERN PyObject *_wrap_IndexLSH_train_thresholds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28047 PyObject *resultobj = 0;
28048 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28049 bool arg2 ;
28050 void *argp1 = 0 ;
28051 int res1 = 0 ;
28052 bool val2 ;
28053 int ecode2 = 0 ;
28054 PyObject * obj0 = 0 ;
28055 PyObject * obj1 = 0 ;
28056
28057 if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_train_thresholds_set",&obj0,&obj1)) SWIG_fail;
28058 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28059 if (!SWIG_IsOK(res1)) {
28060 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_train_thresholds_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28061 }
28062 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28063 ecode2 = SWIG_AsVal_bool(obj1, &val2);
28064 if (!SWIG_IsOK(ecode2)) {
28065 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_train_thresholds_set" "', argument " "2"" of type '" "bool""'");
28066 }
28067 arg2 = static_cast< bool >(val2);
28068 if (arg1) (arg1)->train_thresholds = arg2;
28069 resultobj = SWIG_Py_Void();
28070 return resultobj;
28071 fail:
28072 return NULL;
28073 }
28074
28075
28076 SWIGINTERN PyObject *_wrap_IndexLSH_train_thresholds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28077 PyObject *resultobj = 0;
28078 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28079 void *argp1 = 0 ;
28080 int res1 = 0 ;
28081 PyObject * obj0 = 0 ;
28082 bool result;
28083
28084 if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_train_thresholds_get",&obj0)) SWIG_fail;
28085 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28086 if (!SWIG_IsOK(res1)) {
28087 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_train_thresholds_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28088 }
28089 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28090 result = (bool) ((arg1)->train_thresholds);
28091 resultobj = SWIG_From_bool(static_cast< bool >(result));
28092 return resultobj;
28093 fail:
28094 return NULL;
28095 }
28096
28097
28098 SWIGINTERN PyObject *_wrap_IndexLSH_rrot_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28099 PyObject *resultobj = 0;
28100 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28101 faiss::RandomRotationMatrix *arg2 = (faiss::RandomRotationMatrix *) 0 ;
28102 void *argp1 = 0 ;
28103 int res1 = 0 ;
28104 void *argp2 = 0 ;
28105 int res2 = 0 ;
28106 PyObject * obj0 = 0 ;
28107 PyObject * obj1 = 0 ;
28108
28109 if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_rrot_set",&obj0,&obj1)) SWIG_fail;
28110 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28111 if (!SWIG_IsOK(res1)) {
28112 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_rrot_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28113 }
28114 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28115 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
28116 if (!SWIG_IsOK(res2)) {
28117 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexLSH_rrot_set" "', argument " "2"" of type '" "faiss::RandomRotationMatrix *""'");
28118 }
28119 arg2 = reinterpret_cast< faiss::RandomRotationMatrix * >(argp2);
28120 if (arg1) (arg1)->rrot = *arg2;
28121 resultobj = SWIG_Py_Void();
28122 return resultobj;
28123 fail:
28124 return NULL;
28125 }
28126
28127
28128 SWIGINTERN PyObject *_wrap_IndexLSH_rrot_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28129 PyObject *resultobj = 0;
28130 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28131 void *argp1 = 0 ;
28132 int res1 = 0 ;
28133 PyObject * obj0 = 0 ;
28134 faiss::RandomRotationMatrix *result = 0 ;
28135
28136 if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_rrot_get",&obj0)) SWIG_fail;
28137 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28138 if (!SWIG_IsOK(res1)) {
28139 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_rrot_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28140 }
28141 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28142 result = (faiss::RandomRotationMatrix *)& ((arg1)->rrot);
28143 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomRotationMatrix, 0 | 0 );
28144 return resultobj;
28145 fail:
28146 return NULL;
28147 }
28148
28149
28150 SWIGINTERN PyObject *_wrap_IndexLSH_thresholds_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28151 PyObject *resultobj = 0;
28152 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28153 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
28154 void *argp1 = 0 ;
28155 int res1 = 0 ;
28156 void *argp2 = 0 ;
28157 int res2 = 0 ;
28158 PyObject * obj0 = 0 ;
28159 PyObject * obj1 = 0 ;
28160
28161 if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_thresholds_set",&obj0,&obj1)) SWIG_fail;
28162 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28163 if (!SWIG_IsOK(res1)) {
28164 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_thresholds_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28165 }
28166 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28167 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
28168 if (!SWIG_IsOK(res2)) {
28169 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexLSH_thresholds_set" "', argument " "2"" of type '" "std::vector< float > *""'");
28170 }
28171 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
28172 if (arg1) (arg1)->thresholds = *arg2;
28173 resultobj = SWIG_Py_Void();
28174 return resultobj;
28175 fail:
28176 return NULL;
28177 }
28178
28179
28180 SWIGINTERN PyObject *_wrap_IndexLSH_thresholds_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28181 PyObject *resultobj = 0;
28182 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28183 void *argp1 = 0 ;
28184 int res1 = 0 ;
28185 PyObject * obj0 = 0 ;
28186 std::vector< float > *result = 0 ;
28187
28188 if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_thresholds_get",&obj0)) SWIG_fail;
28189 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28190 if (!SWIG_IsOK(res1)) {
28191 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_thresholds_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28192 }
28193 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28194 result = (std::vector< float > *)& ((arg1)->thresholds);
28195 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
28196 return resultobj;
28197 fail:
28198 return NULL;
28199 }
28200
28201
28202 SWIGINTERN PyObject *_wrap_IndexLSH_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28203 PyObject *resultobj = 0;
28204 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28205 std::vector< faiss::IndexLSH::uint8_t > *arg2 = (std::vector< faiss::IndexLSH::uint8_t > *) 0 ;
28206 void *argp1 = 0 ;
28207 int res1 = 0 ;
28208 void *argp2 = 0 ;
28209 int res2 = 0 ;
28210 PyObject * obj0 = 0 ;
28211 PyObject * obj1 = 0 ;
28212
28213 if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_codes_set",&obj0,&obj1)) SWIG_fail;
28214 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28215 if (!SWIG_IsOK(res1)) {
28216 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_codes_set" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28217 }
28218 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28219 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
28220 if (!SWIG_IsOK(res2)) {
28221 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexLSH_codes_set" "', argument " "2"" of type '" "std::vector< faiss::IndexLSH::uint8_t > *""'");
28222 }
28223 arg2 = reinterpret_cast< std::vector< faiss::IndexLSH::uint8_t > * >(argp2);
28224 if (arg1) (arg1)->codes = *arg2;
28225 resultobj = SWIG_Py_Void();
28226 return resultobj;
28227 fail:
28228 return NULL;
28229 }
28230
28231
28232 SWIGINTERN PyObject *_wrap_IndexLSH_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28233 PyObject *resultobj = 0;
28234 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28235 void *argp1 = 0 ;
28236 int res1 = 0 ;
28237 PyObject * obj0 = 0 ;
28238 std::vector< faiss::IndexLSH::uint8_t > *result = 0 ;
28239
28240 if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_codes_get",&obj0)) SWIG_fail;
28241 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28242 if (!SWIG_IsOK(res1)) {
28243 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_codes_get" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28244 }
28245 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28246 result = (std::vector< faiss::IndexLSH::uint8_t > *)& ((arg1)->codes);
28247 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
28248 return resultobj;
28249 fail:
28250 return NULL;
28251 }
28252
28253
28254 SWIGINTERN PyObject *_wrap_new_IndexLSH__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28255 PyObject *resultobj = 0;
28256 faiss::Index::idx_t arg1 ;
28257 int arg2 ;
28258 bool arg3 ;
28259 bool arg4 ;
28260 long val1 ;
28261 int ecode1 = 0 ;
28262 int val2 ;
28263 int ecode2 = 0 ;
28264 bool val3 ;
28265 int ecode3 = 0 ;
28266 bool val4 ;
28267 int ecode4 = 0 ;
28268 PyObject * obj0 = 0 ;
28269 PyObject * obj1 = 0 ;
28270 PyObject * obj2 = 0 ;
28271 PyObject * obj3 = 0 ;
28272 faiss::IndexLSH *result = 0 ;
28273
28274 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexLSH",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
28275 ecode1 = SWIG_AsVal_long(obj0, &val1);
28276 if (!SWIG_IsOK(ecode1)) {
28277 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexLSH" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
28278 }
28279 arg1 = static_cast< faiss::Index::idx_t >(val1);
28280 ecode2 = SWIG_AsVal_int(obj1, &val2);
28281 if (!SWIG_IsOK(ecode2)) {
28282 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexLSH" "', argument " "2"" of type '" "int""'");
28283 }
28284 arg2 = static_cast< int >(val2);
28285 ecode3 = SWIG_AsVal_bool(obj2, &val3);
28286 if (!SWIG_IsOK(ecode3)) {
28287 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexLSH" "', argument " "3"" of type '" "bool""'");
28288 }
28289 arg3 = static_cast< bool >(val3);
28290 ecode4 = SWIG_AsVal_bool(obj3, &val4);
28291 if (!SWIG_IsOK(ecode4)) {
28292 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexLSH" "', argument " "4"" of type '" "bool""'");
28293 }
28294 arg4 = static_cast< bool >(val4);
28295 {
28296 Py_BEGIN_ALLOW_THREADS
28297 try {
28298 result = (faiss::IndexLSH *)new faiss::IndexLSH(arg1,arg2,arg3,arg4);
28299 } catch(faiss::FaissException & e) {
28300 PyEval_RestoreThread(_save);
28301 PyErr_SetString(PyExc_RuntimeError, e.what());
28302 SWIG_fail;
28303 }
28304 Py_END_ALLOW_THREADS
28305 }
28306 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_NEW | 0 );
28307 return resultobj;
28308 fail:
28309 return NULL;
28310 }
28311
28312
28313 SWIGINTERN PyObject *_wrap_new_IndexLSH__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28314 PyObject *resultobj = 0;
28315 faiss::Index::idx_t arg1 ;
28316 int arg2 ;
28317 bool arg3 ;
28318 long val1 ;
28319 int ecode1 = 0 ;
28320 int val2 ;
28321 int ecode2 = 0 ;
28322 bool val3 ;
28323 int ecode3 = 0 ;
28324 PyObject * obj0 = 0 ;
28325 PyObject * obj1 = 0 ;
28326 PyObject * obj2 = 0 ;
28327 faiss::IndexLSH *result = 0 ;
28328
28329 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexLSH",&obj0,&obj1,&obj2)) SWIG_fail;
28330 ecode1 = SWIG_AsVal_long(obj0, &val1);
28331 if (!SWIG_IsOK(ecode1)) {
28332 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexLSH" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
28333 }
28334 arg1 = static_cast< faiss::Index::idx_t >(val1);
28335 ecode2 = SWIG_AsVal_int(obj1, &val2);
28336 if (!SWIG_IsOK(ecode2)) {
28337 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexLSH" "', argument " "2"" of type '" "int""'");
28338 }
28339 arg2 = static_cast< int >(val2);
28340 ecode3 = SWIG_AsVal_bool(obj2, &val3);
28341 if (!SWIG_IsOK(ecode3)) {
28342 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexLSH" "', argument " "3"" of type '" "bool""'");
28343 }
28344 arg3 = static_cast< bool >(val3);
28345 {
28346 Py_BEGIN_ALLOW_THREADS
28347 try {
28348 result = (faiss::IndexLSH *)new faiss::IndexLSH(arg1,arg2,arg3);
28349 } catch(faiss::FaissException & e) {
28350 PyEval_RestoreThread(_save);
28351 PyErr_SetString(PyExc_RuntimeError, e.what());
28352 SWIG_fail;
28353 }
28354 Py_END_ALLOW_THREADS
28355 }
28356 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_NEW | 0 );
28357 return resultobj;
28358 fail:
28359 return NULL;
28360 }
28361
28362
28363 SWIGINTERN PyObject *_wrap_new_IndexLSH__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28364 PyObject *resultobj = 0;
28365 faiss::Index::idx_t arg1 ;
28366 int arg2 ;
28367 long val1 ;
28368 int ecode1 = 0 ;
28369 int val2 ;
28370 int ecode2 = 0 ;
28371 PyObject * obj0 = 0 ;
28372 PyObject * obj1 = 0 ;
28373 faiss::IndexLSH *result = 0 ;
28374
28375 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexLSH",&obj0,&obj1)) SWIG_fail;
28376 ecode1 = SWIG_AsVal_long(obj0, &val1);
28377 if (!SWIG_IsOK(ecode1)) {
28378 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexLSH" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
28379 }
28380 arg1 = static_cast< faiss::Index::idx_t >(val1);
28381 ecode2 = SWIG_AsVal_int(obj1, &val2);
28382 if (!SWIG_IsOK(ecode2)) {
28383 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexLSH" "', argument " "2"" of type '" "int""'");
28384 }
28385 arg2 = static_cast< int >(val2);
28386 {
28387 Py_BEGIN_ALLOW_THREADS
28388 try {
28389 result = (faiss::IndexLSH *)new faiss::IndexLSH(arg1,arg2);
28390 } catch(faiss::FaissException & e) {
28391 PyEval_RestoreThread(_save);
28392 PyErr_SetString(PyExc_RuntimeError, e.what());
28393 SWIG_fail;
28394 }
28395 Py_END_ALLOW_THREADS
28396 }
28397 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_NEW | 0 );
28398 return resultobj;
28399 fail:
28400 return NULL;
28401 }
28402
28403
28404 SWIGINTERN PyObject *_wrap_IndexLSH_apply_preprocess(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28405 PyObject *resultobj = 0;
28406 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28407 faiss::Index::idx_t arg2 ;
28408 float *arg3 = (float *) 0 ;
28409 void *argp1 = 0 ;
28410 int res1 = 0 ;
28411 long val2 ;
28412 int ecode2 = 0 ;
28413 void *argp3 = 0 ;
28414 int res3 = 0 ;
28415 PyObject * obj0 = 0 ;
28416 PyObject * obj1 = 0 ;
28417 PyObject * obj2 = 0 ;
28418 float *result = 0 ;
28419
28420 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexLSH_apply_preprocess",&obj0,&obj1,&obj2)) SWIG_fail;
28421 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28422 if (!SWIG_IsOK(res1)) {
28423 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_apply_preprocess" "', argument " "1"" of type '" "faiss::IndexLSH const *""'");
28424 }
28425 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28426 ecode2 = SWIG_AsVal_long(obj1, &val2);
28427 if (!SWIG_IsOK(ecode2)) {
28428 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_apply_preprocess" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
28429 }
28430 arg2 = static_cast< faiss::Index::idx_t >(val2);
28431 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28432 if (!SWIG_IsOK(res3)) {
28433 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexLSH_apply_preprocess" "', argument " "3"" of type '" "float const *""'");
28434 }
28435 arg3 = reinterpret_cast< float * >(argp3);
28436 {
28437 Py_BEGIN_ALLOW_THREADS
28438 try {
28439 result = (float *)((faiss::IndexLSH const *)arg1)->apply_preprocess(arg2,(float const *)arg3);
28440 } catch(faiss::FaissException & e) {
28441 PyEval_RestoreThread(_save);
28442 PyErr_SetString(PyExc_RuntimeError, e.what());
28443 SWIG_fail;
28444 }
28445 Py_END_ALLOW_THREADS
28446 }
28447 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
28448 return resultobj;
28449 fail:
28450 return NULL;
28451 }
28452
28453
28454 SWIGINTERN PyObject *_wrap_IndexLSH_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28455 PyObject *resultobj = 0;
28456 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28457 faiss::Index::idx_t arg2 ;
28458 float *arg3 = (float *) 0 ;
28459 void *argp1 = 0 ;
28460 int res1 = 0 ;
28461 long val2 ;
28462 int ecode2 = 0 ;
28463 void *argp3 = 0 ;
28464 int res3 = 0 ;
28465 PyObject * obj0 = 0 ;
28466 PyObject * obj1 = 0 ;
28467 PyObject * obj2 = 0 ;
28468
28469 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexLSH_train",&obj0,&obj1,&obj2)) SWIG_fail;
28470 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28471 if (!SWIG_IsOK(res1)) {
28472 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_train" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28473 }
28474 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28475 ecode2 = SWIG_AsVal_long(obj1, &val2);
28476 if (!SWIG_IsOK(ecode2)) {
28477 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
28478 }
28479 arg2 = static_cast< faiss::Index::idx_t >(val2);
28480 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28481 if (!SWIG_IsOK(res3)) {
28482 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexLSH_train" "', argument " "3"" of type '" "float const *""'");
28483 }
28484 arg3 = reinterpret_cast< float * >(argp3);
28485 {
28486 Py_BEGIN_ALLOW_THREADS
28487 try {
28488 (arg1)->train(arg2,(float const *)arg3);
28489 } catch(faiss::FaissException & e) {
28490 PyEval_RestoreThread(_save);
28491 PyErr_SetString(PyExc_RuntimeError, e.what());
28492 SWIG_fail;
28493 }
28494 Py_END_ALLOW_THREADS
28495 }
28496 resultobj = SWIG_Py_Void();
28497 return resultobj;
28498 fail:
28499 return NULL;
28500 }
28501
28502
28503 SWIGINTERN PyObject *_wrap_IndexLSH_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28504 PyObject *resultobj = 0;
28505 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28506 faiss::Index::idx_t arg2 ;
28507 float *arg3 = (float *) 0 ;
28508 void *argp1 = 0 ;
28509 int res1 = 0 ;
28510 long val2 ;
28511 int ecode2 = 0 ;
28512 void *argp3 = 0 ;
28513 int res3 = 0 ;
28514 PyObject * obj0 = 0 ;
28515 PyObject * obj1 = 0 ;
28516 PyObject * obj2 = 0 ;
28517
28518 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexLSH_add",&obj0,&obj1,&obj2)) SWIG_fail;
28519 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28520 if (!SWIG_IsOK(res1)) {
28521 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_add" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28522 }
28523 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28524 ecode2 = SWIG_AsVal_long(obj1, &val2);
28525 if (!SWIG_IsOK(ecode2)) {
28526 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
28527 }
28528 arg2 = static_cast< faiss::Index::idx_t >(val2);
28529 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28530 if (!SWIG_IsOK(res3)) {
28531 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexLSH_add" "', argument " "3"" of type '" "float const *""'");
28532 }
28533 arg3 = reinterpret_cast< float * >(argp3);
28534 {
28535 Py_BEGIN_ALLOW_THREADS
28536 try {
28537 (arg1)->add(arg2,(float const *)arg3);
28538 } catch(faiss::FaissException & e) {
28539 PyEval_RestoreThread(_save);
28540 PyErr_SetString(PyExc_RuntimeError, e.what());
28541 SWIG_fail;
28542 }
28543 Py_END_ALLOW_THREADS
28544 }
28545 resultobj = SWIG_Py_Void();
28546 return resultobj;
28547 fail:
28548 return NULL;
28549 }
28550
28551
28552 SWIGINTERN PyObject *_wrap_IndexLSH_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28553 PyObject *resultobj = 0;
28554 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28555 faiss::Index::idx_t arg2 ;
28556 float *arg3 = (float *) 0 ;
28557 faiss::Index::idx_t arg4 ;
28558 float *arg5 = (float *) 0 ;
28559 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
28560 void *argp1 = 0 ;
28561 int res1 = 0 ;
28562 long val2 ;
28563 int ecode2 = 0 ;
28564 void *argp3 = 0 ;
28565 int res3 = 0 ;
28566 long val4 ;
28567 int ecode4 = 0 ;
28568 void *argp5 = 0 ;
28569 int res5 = 0 ;
28570 void *argp6 = 0 ;
28571 int res6 = 0 ;
28572 PyObject * obj0 = 0 ;
28573 PyObject * obj1 = 0 ;
28574 PyObject * obj2 = 0 ;
28575 PyObject * obj3 = 0 ;
28576 PyObject * obj4 = 0 ;
28577 PyObject * obj5 = 0 ;
28578
28579 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexLSH_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
28580 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28581 if (!SWIG_IsOK(res1)) {
28582 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_search" "', argument " "1"" of type '" "faiss::IndexLSH const *""'");
28583 }
28584 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28585 ecode2 = SWIG_AsVal_long(obj1, &val2);
28586 if (!SWIG_IsOK(ecode2)) {
28587 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexLSH_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
28588 }
28589 arg2 = static_cast< faiss::Index::idx_t >(val2);
28590 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
28591 if (!SWIG_IsOK(res3)) {
28592 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexLSH_search" "', argument " "3"" of type '" "float const *""'");
28593 }
28594 arg3 = reinterpret_cast< float * >(argp3);
28595 ecode4 = SWIG_AsVal_long(obj3, &val4);
28596 if (!SWIG_IsOK(ecode4)) {
28597 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexLSH_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
28598 }
28599 arg4 = static_cast< faiss::Index::idx_t >(val4);
28600 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
28601 if (!SWIG_IsOK(res5)) {
28602 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexLSH_search" "', argument " "5"" of type '" "float *""'");
28603 }
28604 arg5 = reinterpret_cast< float * >(argp5);
28605 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
28606 if (!SWIG_IsOK(res6)) {
28607 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexLSH_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
28608 }
28609 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
28610 {
28611 Py_BEGIN_ALLOW_THREADS
28612 try {
28613 ((faiss::IndexLSH const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
28614 } catch(faiss::FaissException & e) {
28615 PyEval_RestoreThread(_save);
28616 PyErr_SetString(PyExc_RuntimeError, e.what());
28617 SWIG_fail;
28618 }
28619 Py_END_ALLOW_THREADS
28620 }
28621 resultobj = SWIG_Py_Void();
28622 return resultobj;
28623 fail:
28624 return NULL;
28625 }
28626
28627
28628 SWIGINTERN PyObject *_wrap_IndexLSH_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28629 PyObject *resultobj = 0;
28630 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28631 void *argp1 = 0 ;
28632 int res1 = 0 ;
28633 PyObject * obj0 = 0 ;
28634
28635 if (!PyArg_ParseTuple(args,(char *)"O:IndexLSH_reset",&obj0)) SWIG_fail;
28636 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28637 if (!SWIG_IsOK(res1)) {
28638 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_reset" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28639 }
28640 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28641 {
28642 Py_BEGIN_ALLOW_THREADS
28643 try {
28644 (arg1)->reset();
28645 } catch(faiss::FaissException & e) {
28646 PyEval_RestoreThread(_save);
28647 PyErr_SetString(PyExc_RuntimeError, e.what());
28648 SWIG_fail;
28649 }
28650 Py_END_ALLOW_THREADS
28651 }
28652 resultobj = SWIG_Py_Void();
28653 return resultobj;
28654 fail:
28655 return NULL;
28656 }
28657
28658
28659 SWIGINTERN PyObject *_wrap_IndexLSH_transfer_thresholds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28660 PyObject *resultobj = 0;
28661 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28662 faiss::LinearTransform *arg2 = (faiss::LinearTransform *) 0 ;
28663 void *argp1 = 0 ;
28664 int res1 = 0 ;
28665 void *argp2 = 0 ;
28666 int res2 = 0 ;
28667 PyObject * obj0 = 0 ;
28668 PyObject * obj1 = 0 ;
28669
28670 if (!PyArg_ParseTuple(args,(char *)"OO:IndexLSH_transfer_thresholds",&obj0,&obj1)) SWIG_fail;
28671 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, 0 | 0 );
28672 if (!SWIG_IsOK(res1)) {
28673 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexLSH_transfer_thresholds" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28674 }
28675 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28676 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__LinearTransform, 0 | 0 );
28677 if (!SWIG_IsOK(res2)) {
28678 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexLSH_transfer_thresholds" "', argument " "2"" of type '" "faiss::LinearTransform *""'");
28679 }
28680 arg2 = reinterpret_cast< faiss::LinearTransform * >(argp2);
28681 {
28682 Py_BEGIN_ALLOW_THREADS
28683 try {
28684 (arg1)->transfer_thresholds(arg2);
28685 } catch(faiss::FaissException & e) {
28686 PyEval_RestoreThread(_save);
28687 PyErr_SetString(PyExc_RuntimeError, e.what());
28688 SWIG_fail;
28689 }
28690 Py_END_ALLOW_THREADS
28691 }
28692 resultobj = SWIG_Py_Void();
28693 return resultobj;
28694 fail:
28695 return NULL;
28696 }
28697
28698
28699 SWIGINTERN PyObject *_wrap_delete_IndexLSH(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28700 PyObject *resultobj = 0;
28701 faiss::IndexLSH *arg1 = (faiss::IndexLSH *) 0 ;
28702 void *argp1 = 0 ;
28703 int res1 = 0 ;
28704 PyObject * obj0 = 0 ;
28705
28706 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexLSH",&obj0)) SWIG_fail;
28707 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_DISOWN | 0 );
28708 if (!SWIG_IsOK(res1)) {
28709 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexLSH" "', argument " "1"" of type '" "faiss::IndexLSH *""'");
28710 }
28711 arg1 = reinterpret_cast< faiss::IndexLSH * >(argp1);
28712 {
28713 Py_BEGIN_ALLOW_THREADS
28714 try {
28715 delete arg1;
28716 } catch(faiss::FaissException & e) {
28717 PyEval_RestoreThread(_save);
28718 PyErr_SetString(PyExc_RuntimeError, e.what());
28719 SWIG_fail;
28720 }
28721 Py_END_ALLOW_THREADS
28722 }
28723 resultobj = SWIG_Py_Void();
28724 return resultobj;
28725 fail:
28726 return NULL;
28727 }
28728
28729
28730 SWIGINTERN PyObject *_wrap_new_IndexLSH__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28731 PyObject *resultobj = 0;
28732 faiss::IndexLSH *result = 0 ;
28733
28734 if (!PyArg_ParseTuple(args,(char *)":new_IndexLSH")) SWIG_fail;
28735 {
28736 Py_BEGIN_ALLOW_THREADS
28737 try {
28738 result = (faiss::IndexLSH *)new faiss::IndexLSH();
28739 } catch(faiss::FaissException & e) {
28740 PyEval_RestoreThread(_save);
28741 PyErr_SetString(PyExc_RuntimeError, e.what());
28742 SWIG_fail;
28743 }
28744 Py_END_ALLOW_THREADS
28745 }
28746 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexLSH, SWIG_POINTER_NEW | 0 );
28747 return resultobj;
28748 fail:
28749 return NULL;
28750 }
28751
28752
28753 SWIGINTERN PyObject *_wrap_new_IndexLSH(PyObject *self, PyObject *args) {
28754 Py_ssize_t argc;
28755 PyObject *argv[5] = {
28756 0
28757 };
28758 Py_ssize_t ii;
28759
28760 if (!PyTuple_Check(args)) SWIG_fail;
28761 argc = args ? PyObject_Length(args) : 0;
28762 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
28763 argv[ii] = PyTuple_GET_ITEM(args,ii);
28764 }
28765 if (argc == 0) {
28766 return _wrap_new_IndexLSH__SWIG_3(self, args);
28767 }
28768 if (argc == 2) {
28769 int _v;
28770 {
28771 int res = SWIG_AsVal_long(argv[0], NULL);
28772 _v = SWIG_CheckState(res);
28773 }
28774 if (_v) {
28775 {
28776 int res = SWIG_AsVal_int(argv[1], NULL);
28777 _v = SWIG_CheckState(res);
28778 }
28779 if (_v) {
28780 return _wrap_new_IndexLSH__SWIG_2(self, args);
28781 }
28782 }
28783 }
28784 if (argc == 3) {
28785 int _v;
28786 {
28787 int res = SWIG_AsVal_long(argv[0], NULL);
28788 _v = SWIG_CheckState(res);
28789 }
28790 if (_v) {
28791 {
28792 int res = SWIG_AsVal_int(argv[1], NULL);
28793 _v = SWIG_CheckState(res);
28794 }
28795 if (_v) {
28796 {
28797 int res = SWIG_AsVal_bool(argv[2], NULL);
28798 _v = SWIG_CheckState(res);
28799 }
28800 if (_v) {
28801 return _wrap_new_IndexLSH__SWIG_1(self, args);
28802 }
28803 }
28804 }
28805 }
28806 if (argc == 4) {
28807 int _v;
28808 {
28809 int res = SWIG_AsVal_long(argv[0], NULL);
28810 _v = SWIG_CheckState(res);
28811 }
28812 if (_v) {
28813 {
28814 int res = SWIG_AsVal_int(argv[1], NULL);
28815 _v = SWIG_CheckState(res);
28816 }
28817 if (_v) {
28818 {
28819 int res = SWIG_AsVal_bool(argv[2], NULL);
28820 _v = SWIG_CheckState(res);
28821 }
28822 if (_v) {
28823 {
28824 int res = SWIG_AsVal_bool(argv[3], NULL);
28825 _v = SWIG_CheckState(res);
28826 }
28827 if (_v) {
28828 return _wrap_new_IndexLSH__SWIG_0(self, args);
28829 }
28830 }
28831 }
28832 }
28833 }
28834
28835 fail:
28836 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexLSH'.\n"
28837 " Possible C/C++ prototypes are:\n"
28838 " faiss::IndexLSH::IndexLSH(faiss::Index::idx_t,int,bool,bool)\n"
28839 " faiss::IndexLSH::IndexLSH(faiss::Index::idx_t,int,bool)\n"
28840 " faiss::IndexLSH::IndexLSH(faiss::Index::idx_t,int)\n"
28841 " faiss::IndexLSH::IndexLSH()\n");
28842 return 0;
28843 }
28844
28845
28846 SWIGINTERN PyObject *IndexLSH_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28847 PyObject *obj;
28848 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
28849 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexLSH, SWIG_NewClientData(obj));
28850 return SWIG_Py_Void();
28851 }
28852
28853 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_init_temperature_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28854 PyObject *resultobj = 0;
28855 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
28856 double arg2 ;
28857 void *argp1 = 0 ;
28858 int res1 = 0 ;
28859 double val2 ;
28860 int ecode2 = 0 ;
28861 PyObject * obj0 = 0 ;
28862 PyObject * obj1 = 0 ;
28863
28864 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_init_temperature_set",&obj0,&obj1)) SWIG_fail;
28865 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
28866 if (!SWIG_IsOK(res1)) {
28867 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_init_temperature_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
28868 }
28869 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
28870 ecode2 = SWIG_AsVal_double(obj1, &val2);
28871 if (!SWIG_IsOK(ecode2)) {
28872 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_init_temperature_set" "', argument " "2"" of type '" "double""'");
28873 }
28874 arg2 = static_cast< double >(val2);
28875 if (arg1) (arg1)->init_temperature = arg2;
28876 resultobj = SWIG_Py_Void();
28877 return resultobj;
28878 fail:
28879 return NULL;
28880 }
28881
28882
28883 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_init_temperature_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28884 PyObject *resultobj = 0;
28885 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
28886 void *argp1 = 0 ;
28887 int res1 = 0 ;
28888 PyObject * obj0 = 0 ;
28889 double result;
28890
28891 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_init_temperature_get",&obj0)) SWIG_fail;
28892 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
28893 if (!SWIG_IsOK(res1)) {
28894 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_init_temperature_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
28895 }
28896 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
28897 result = (double) ((arg1)->init_temperature);
28898 resultobj = SWIG_From_double(static_cast< double >(result));
28899 return resultobj;
28900 fail:
28901 return NULL;
28902 }
28903
28904
28905 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_temperature_decay_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28906 PyObject *resultobj = 0;
28907 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
28908 double arg2 ;
28909 void *argp1 = 0 ;
28910 int res1 = 0 ;
28911 double val2 ;
28912 int ecode2 = 0 ;
28913 PyObject * obj0 = 0 ;
28914 PyObject * obj1 = 0 ;
28915
28916 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_temperature_decay_set",&obj0,&obj1)) SWIG_fail;
28917 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
28918 if (!SWIG_IsOK(res1)) {
28919 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_temperature_decay_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
28920 }
28921 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
28922 ecode2 = SWIG_AsVal_double(obj1, &val2);
28923 if (!SWIG_IsOK(ecode2)) {
28924 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_temperature_decay_set" "', argument " "2"" of type '" "double""'");
28925 }
28926 arg2 = static_cast< double >(val2);
28927 if (arg1) (arg1)->temperature_decay = arg2;
28928 resultobj = SWIG_Py_Void();
28929 return resultobj;
28930 fail:
28931 return NULL;
28932 }
28933
28934
28935 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_temperature_decay_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28936 PyObject *resultobj = 0;
28937 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
28938 void *argp1 = 0 ;
28939 int res1 = 0 ;
28940 PyObject * obj0 = 0 ;
28941 double result;
28942
28943 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_temperature_decay_get",&obj0)) SWIG_fail;
28944 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
28945 if (!SWIG_IsOK(res1)) {
28946 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_temperature_decay_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
28947 }
28948 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
28949 result = (double) ((arg1)->temperature_decay);
28950 resultobj = SWIG_From_double(static_cast< double >(result));
28951 return resultobj;
28952 fail:
28953 return NULL;
28954 }
28955
28956
28957 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_n_iter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28958 PyObject *resultobj = 0;
28959 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
28960 int arg2 ;
28961 void *argp1 = 0 ;
28962 int res1 = 0 ;
28963 int val2 ;
28964 int ecode2 = 0 ;
28965 PyObject * obj0 = 0 ;
28966 PyObject * obj1 = 0 ;
28967
28968 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_n_iter_set",&obj0,&obj1)) SWIG_fail;
28969 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
28970 if (!SWIG_IsOK(res1)) {
28971 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_n_iter_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
28972 }
28973 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
28974 ecode2 = SWIG_AsVal_int(obj1, &val2);
28975 if (!SWIG_IsOK(ecode2)) {
28976 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_n_iter_set" "', argument " "2"" of type '" "int""'");
28977 }
28978 arg2 = static_cast< int >(val2);
28979 if (arg1) (arg1)->n_iter = arg2;
28980 resultobj = SWIG_Py_Void();
28981 return resultobj;
28982 fail:
28983 return NULL;
28984 }
28985
28986
28987 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_n_iter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
28988 PyObject *resultobj = 0;
28989 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
28990 void *argp1 = 0 ;
28991 int res1 = 0 ;
28992 PyObject * obj0 = 0 ;
28993 int result;
28994
28995 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_n_iter_get",&obj0)) SWIG_fail;
28996 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
28997 if (!SWIG_IsOK(res1)) {
28998 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_n_iter_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
28999 }
29000 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29001 result = (int) ((arg1)->n_iter);
29002 resultobj = SWIG_From_int(static_cast< int >(result));
29003 return resultobj;
29004 fail:
29005 return NULL;
29006 }
29007
29008
29009 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_n_redo_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29010 PyObject *resultobj = 0;
29011 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29012 int arg2 ;
29013 void *argp1 = 0 ;
29014 int res1 = 0 ;
29015 int val2 ;
29016 int ecode2 = 0 ;
29017 PyObject * obj0 = 0 ;
29018 PyObject * obj1 = 0 ;
29019
29020 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_n_redo_set",&obj0,&obj1)) SWIG_fail;
29021 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29022 if (!SWIG_IsOK(res1)) {
29023 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_n_redo_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29024 }
29025 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29026 ecode2 = SWIG_AsVal_int(obj1, &val2);
29027 if (!SWIG_IsOK(ecode2)) {
29028 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_n_redo_set" "', argument " "2"" of type '" "int""'");
29029 }
29030 arg2 = static_cast< int >(val2);
29031 if (arg1) (arg1)->n_redo = arg2;
29032 resultobj = SWIG_Py_Void();
29033 return resultobj;
29034 fail:
29035 return NULL;
29036 }
29037
29038
29039 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_n_redo_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29040 PyObject *resultobj = 0;
29041 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29042 void *argp1 = 0 ;
29043 int res1 = 0 ;
29044 PyObject * obj0 = 0 ;
29045 int result;
29046
29047 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_n_redo_get",&obj0)) SWIG_fail;
29048 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29049 if (!SWIG_IsOK(res1)) {
29050 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_n_redo_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29051 }
29052 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29053 result = (int) ((arg1)->n_redo);
29054 resultobj = SWIG_From_int(static_cast< int >(result));
29055 return resultobj;
29056 fail:
29057 return NULL;
29058 }
29059
29060
29061 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_seed_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29062 PyObject *resultobj = 0;
29063 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29064 int arg2 ;
29065 void *argp1 = 0 ;
29066 int res1 = 0 ;
29067 int val2 ;
29068 int ecode2 = 0 ;
29069 PyObject * obj0 = 0 ;
29070 PyObject * obj1 = 0 ;
29071
29072 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_seed_set",&obj0,&obj1)) SWIG_fail;
29073 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29074 if (!SWIG_IsOK(res1)) {
29075 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_seed_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29076 }
29077 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29078 ecode2 = SWIG_AsVal_int(obj1, &val2);
29079 if (!SWIG_IsOK(ecode2)) {
29080 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_seed_set" "', argument " "2"" of type '" "int""'");
29081 }
29082 arg2 = static_cast< int >(val2);
29083 if (arg1) (arg1)->seed = arg2;
29084 resultobj = SWIG_Py_Void();
29085 return resultobj;
29086 fail:
29087 return NULL;
29088 }
29089
29090
29091 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_seed_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29092 PyObject *resultobj = 0;
29093 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29094 void *argp1 = 0 ;
29095 int res1 = 0 ;
29096 PyObject * obj0 = 0 ;
29097 int result;
29098
29099 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_seed_get",&obj0)) SWIG_fail;
29100 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29101 if (!SWIG_IsOK(res1)) {
29102 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_seed_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29103 }
29104 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29105 result = (int) ((arg1)->seed);
29106 resultobj = SWIG_From_int(static_cast< int >(result));
29107 return resultobj;
29108 fail:
29109 return NULL;
29110 }
29111
29112
29113 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29114 PyObject *resultobj = 0;
29115 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29116 int arg2 ;
29117 void *argp1 = 0 ;
29118 int res1 = 0 ;
29119 int val2 ;
29120 int ecode2 = 0 ;
29121 PyObject * obj0 = 0 ;
29122 PyObject * obj1 = 0 ;
29123
29124 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_verbose_set",&obj0,&obj1)) SWIG_fail;
29125 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29126 if (!SWIG_IsOK(res1)) {
29127 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_verbose_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29128 }
29129 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29130 ecode2 = SWIG_AsVal_int(obj1, &val2);
29131 if (!SWIG_IsOK(ecode2)) {
29132 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_verbose_set" "', argument " "2"" of type '" "int""'");
29133 }
29134 arg2 = static_cast< int >(val2);
29135 if (arg1) (arg1)->verbose = arg2;
29136 resultobj = SWIG_Py_Void();
29137 return resultobj;
29138 fail:
29139 return NULL;
29140 }
29141
29142
29143 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29144 PyObject *resultobj = 0;
29145 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29146 void *argp1 = 0 ;
29147 int res1 = 0 ;
29148 PyObject * obj0 = 0 ;
29149 int result;
29150
29151 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_verbose_get",&obj0)) SWIG_fail;
29152 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29153 if (!SWIG_IsOK(res1)) {
29154 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_verbose_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29155 }
29156 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29157 result = (int) ((arg1)->verbose);
29158 resultobj = SWIG_From_int(static_cast< int >(result));
29159 return resultobj;
29160 fail:
29161 return NULL;
29162 }
29163
29164
29165 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_only_bit_flips_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29166 PyObject *resultobj = 0;
29167 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29168 bool arg2 ;
29169 void *argp1 = 0 ;
29170 int res1 = 0 ;
29171 bool val2 ;
29172 int ecode2 = 0 ;
29173 PyObject * obj0 = 0 ;
29174 PyObject * obj1 = 0 ;
29175
29176 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_only_bit_flips_set",&obj0,&obj1)) SWIG_fail;
29177 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29178 if (!SWIG_IsOK(res1)) {
29179 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_only_bit_flips_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29180 }
29181 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29182 ecode2 = SWIG_AsVal_bool(obj1, &val2);
29183 if (!SWIG_IsOK(ecode2)) {
29184 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_only_bit_flips_set" "', argument " "2"" of type '" "bool""'");
29185 }
29186 arg2 = static_cast< bool >(val2);
29187 if (arg1) (arg1)->only_bit_flips = arg2;
29188 resultobj = SWIG_Py_Void();
29189 return resultobj;
29190 fail:
29191 return NULL;
29192 }
29193
29194
29195 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_only_bit_flips_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29196 PyObject *resultobj = 0;
29197 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29198 void *argp1 = 0 ;
29199 int res1 = 0 ;
29200 PyObject * obj0 = 0 ;
29201 bool result;
29202
29203 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_only_bit_flips_get",&obj0)) SWIG_fail;
29204 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29205 if (!SWIG_IsOK(res1)) {
29206 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_only_bit_flips_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29207 }
29208 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29209 result = (bool) ((arg1)->only_bit_flips);
29210 resultobj = SWIG_From_bool(static_cast< bool >(result));
29211 return resultobj;
29212 fail:
29213 return NULL;
29214 }
29215
29216
29217 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_init_random_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29218 PyObject *resultobj = 0;
29219 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29220 bool arg2 ;
29221 void *argp1 = 0 ;
29222 int res1 = 0 ;
29223 bool val2 ;
29224 int ecode2 = 0 ;
29225 PyObject * obj0 = 0 ;
29226 PyObject * obj1 = 0 ;
29227
29228 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingParameters_init_random_set",&obj0,&obj1)) SWIG_fail;
29229 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29230 if (!SWIG_IsOK(res1)) {
29231 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_init_random_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29232 }
29233 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29234 ecode2 = SWIG_AsVal_bool(obj1, &val2);
29235 if (!SWIG_IsOK(ecode2)) {
29236 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingParameters_init_random_set" "', argument " "2"" of type '" "bool""'");
29237 }
29238 arg2 = static_cast< bool >(val2);
29239 if (arg1) (arg1)->init_random = arg2;
29240 resultobj = SWIG_Py_Void();
29241 return resultobj;
29242 fail:
29243 return NULL;
29244 }
29245
29246
29247 SWIGINTERN PyObject *_wrap_SimulatedAnnealingParameters_init_random_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29248 PyObject *resultobj = 0;
29249 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29250 void *argp1 = 0 ;
29251 int res1 = 0 ;
29252 PyObject * obj0 = 0 ;
29253 bool result;
29254
29255 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingParameters_init_random_get",&obj0)) SWIG_fail;
29256 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0 );
29257 if (!SWIG_IsOK(res1)) {
29258 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingParameters_init_random_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29259 }
29260 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29261 result = (bool) ((arg1)->init_random);
29262 resultobj = SWIG_From_bool(static_cast< bool >(result));
29263 return resultobj;
29264 fail:
29265 return NULL;
29266 }
29267
29268
29269 SWIGINTERN PyObject *_wrap_new_SimulatedAnnealingParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29270 PyObject *resultobj = 0;
29271 faiss::SimulatedAnnealingParameters *result = 0 ;
29272
29273 if (!PyArg_ParseTuple(args,(char *)":new_SimulatedAnnealingParameters")) SWIG_fail;
29274 {
29275 Py_BEGIN_ALLOW_THREADS
29276 try {
29277 result = (faiss::SimulatedAnnealingParameters *)new faiss::SimulatedAnnealingParameters();
29278 } catch(faiss::FaissException & e) {
29279 PyEval_RestoreThread(_save);
29280 PyErr_SetString(PyExc_RuntimeError, e.what());
29281 SWIG_fail;
29282 }
29283 Py_END_ALLOW_THREADS
29284 }
29285 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__SimulatedAnnealingParameters, SWIG_POINTER_NEW | 0 );
29286 return resultobj;
29287 fail:
29288 return NULL;
29289 }
29290
29291
29292 SWIGINTERN PyObject *_wrap_delete_SimulatedAnnealingParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29293 PyObject *resultobj = 0;
29294 faiss::SimulatedAnnealingParameters *arg1 = (faiss::SimulatedAnnealingParameters *) 0 ;
29295 void *argp1 = 0 ;
29296 int res1 = 0 ;
29297 PyObject * obj0 = 0 ;
29298
29299 if (!PyArg_ParseTuple(args,(char *)"O:delete_SimulatedAnnealingParameters",&obj0)) SWIG_fail;
29300 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingParameters, SWIG_POINTER_DISOWN | 0 );
29301 if (!SWIG_IsOK(res1)) {
29302 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimulatedAnnealingParameters" "', argument " "1"" of type '" "faiss::SimulatedAnnealingParameters *""'");
29303 }
29304 arg1 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp1);
29305 delete arg1;
29306 resultobj = SWIG_Py_Void();
29307 return resultobj;
29308 fail:
29309 return NULL;
29310 }
29311
29312
29313 SWIGINTERN PyObject *SimulatedAnnealingParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29314 PyObject *obj;
29315 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
29316 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__SimulatedAnnealingParameters, SWIG_NewClientData(obj));
29317 return SWIG_Py_Void();
29318 }
29319
29320 SWIGINTERN PyObject *_wrap_PermutationObjective_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29321 PyObject *resultobj = 0;
29322 faiss::PermutationObjective *arg1 = (faiss::PermutationObjective *) 0 ;
29323 int arg2 ;
29324 void *argp1 = 0 ;
29325 int res1 = 0 ;
29326 int val2 ;
29327 int ecode2 = 0 ;
29328 PyObject * obj0 = 0 ;
29329 PyObject * obj1 = 0 ;
29330
29331 if (!PyArg_ParseTuple(args,(char *)"OO:PermutationObjective_n_set",&obj0,&obj1)) SWIG_fail;
29332 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
29333 if (!SWIG_IsOK(res1)) {
29334 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PermutationObjective_n_set" "', argument " "1"" of type '" "faiss::PermutationObjective *""'");
29335 }
29336 arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
29337 ecode2 = SWIG_AsVal_int(obj1, &val2);
29338 if (!SWIG_IsOK(ecode2)) {
29339 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PermutationObjective_n_set" "', argument " "2"" of type '" "int""'");
29340 }
29341 arg2 = static_cast< int >(val2);
29342 if (arg1) (arg1)->n = arg2;
29343 resultobj = SWIG_Py_Void();
29344 return resultobj;
29345 fail:
29346 return NULL;
29347 }
29348
29349
29350 SWIGINTERN PyObject *_wrap_PermutationObjective_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29351 PyObject *resultobj = 0;
29352 faiss::PermutationObjective *arg1 = (faiss::PermutationObjective *) 0 ;
29353 void *argp1 = 0 ;
29354 int res1 = 0 ;
29355 PyObject * obj0 = 0 ;
29356 int result;
29357
29358 if (!PyArg_ParseTuple(args,(char *)"O:PermutationObjective_n_get",&obj0)) SWIG_fail;
29359 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
29360 if (!SWIG_IsOK(res1)) {
29361 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PermutationObjective_n_get" "', argument " "1"" of type '" "faiss::PermutationObjective *""'");
29362 }
29363 arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
29364 result = (int) ((arg1)->n);
29365 resultobj = SWIG_From_int(static_cast< int >(result));
29366 return resultobj;
29367 fail:
29368 return NULL;
29369 }
29370
29371
29372 SWIGINTERN PyObject *_wrap_PermutationObjective_compute_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29373 PyObject *resultobj = 0;
29374 faiss::PermutationObjective *arg1 = (faiss::PermutationObjective *) 0 ;
29375 int *arg2 = (int *) 0 ;
29376 void *argp1 = 0 ;
29377 int res1 = 0 ;
29378 void *argp2 = 0 ;
29379 int res2 = 0 ;
29380 PyObject * obj0 = 0 ;
29381 PyObject * obj1 = 0 ;
29382 double result;
29383
29384 if (!PyArg_ParseTuple(args,(char *)"OO:PermutationObjective_compute_cost",&obj0,&obj1)) SWIG_fail;
29385 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
29386 if (!SWIG_IsOK(res1)) {
29387 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PermutationObjective_compute_cost" "', argument " "1"" of type '" "faiss::PermutationObjective const *""'");
29388 }
29389 arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
29390 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
29391 if (!SWIG_IsOK(res2)) {
29392 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PermutationObjective_compute_cost" "', argument " "2"" of type '" "int const *""'");
29393 }
29394 arg2 = reinterpret_cast< int * >(argp2);
29395 {
29396 Py_BEGIN_ALLOW_THREADS
29397 try {
29398 result = (double)((faiss::PermutationObjective const *)arg1)->compute_cost((int const *)arg2);
29399 } catch(faiss::FaissException & e) {
29400 PyEval_RestoreThread(_save);
29401 PyErr_SetString(PyExc_RuntimeError, e.what());
29402 SWIG_fail;
29403 }
29404 Py_END_ALLOW_THREADS
29405 }
29406 resultobj = SWIG_From_double(static_cast< double >(result));
29407 return resultobj;
29408 fail:
29409 return NULL;
29410 }
29411
29412
29413 SWIGINTERN PyObject *_wrap_PermutationObjective_cost_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29414 PyObject *resultobj = 0;
29415 faiss::PermutationObjective *arg1 = (faiss::PermutationObjective *) 0 ;
29416 int *arg2 = (int *) 0 ;
29417 int arg3 ;
29418 int arg4 ;
29419 void *argp1 = 0 ;
29420 int res1 = 0 ;
29421 void *argp2 = 0 ;
29422 int res2 = 0 ;
29423 int val3 ;
29424 int ecode3 = 0 ;
29425 int val4 ;
29426 int ecode4 = 0 ;
29427 PyObject * obj0 = 0 ;
29428 PyObject * obj1 = 0 ;
29429 PyObject * obj2 = 0 ;
29430 PyObject * obj3 = 0 ;
29431 double result;
29432
29433 if (!PyArg_ParseTuple(args,(char *)"OOOO:PermutationObjective_cost_update",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
29434 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
29435 if (!SWIG_IsOK(res1)) {
29436 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PermutationObjective_cost_update" "', argument " "1"" of type '" "faiss::PermutationObjective const *""'");
29437 }
29438 arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
29439 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
29440 if (!SWIG_IsOK(res2)) {
29441 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PermutationObjective_cost_update" "', argument " "2"" of type '" "int const *""'");
29442 }
29443 arg2 = reinterpret_cast< int * >(argp2);
29444 ecode3 = SWIG_AsVal_int(obj2, &val3);
29445 if (!SWIG_IsOK(ecode3)) {
29446 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PermutationObjective_cost_update" "', argument " "3"" of type '" "int""'");
29447 }
29448 arg3 = static_cast< int >(val3);
29449 ecode4 = SWIG_AsVal_int(obj3, &val4);
29450 if (!SWIG_IsOK(ecode4)) {
29451 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "PermutationObjective_cost_update" "', argument " "4"" of type '" "int""'");
29452 }
29453 arg4 = static_cast< int >(val4);
29454 {
29455 Py_BEGIN_ALLOW_THREADS
29456 try {
29457 result = (double)((faiss::PermutationObjective const *)arg1)->cost_update((int const *)arg2,arg3,arg4);
29458 } catch(faiss::FaissException & e) {
29459 PyEval_RestoreThread(_save);
29460 PyErr_SetString(PyExc_RuntimeError, e.what());
29461 SWIG_fail;
29462 }
29463 Py_END_ALLOW_THREADS
29464 }
29465 resultobj = SWIG_From_double(static_cast< double >(result));
29466 return resultobj;
29467 fail:
29468 return NULL;
29469 }
29470
29471
29472 SWIGINTERN PyObject *_wrap_delete_PermutationObjective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29473 PyObject *resultobj = 0;
29474 faiss::PermutationObjective *arg1 = (faiss::PermutationObjective *) 0 ;
29475 void *argp1 = 0 ;
29476 int res1 = 0 ;
29477 PyObject * obj0 = 0 ;
29478
29479 if (!PyArg_ParseTuple(args,(char *)"O:delete_PermutationObjective",&obj0)) SWIG_fail;
29480 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, SWIG_POINTER_DISOWN | 0 );
29481 if (!SWIG_IsOK(res1)) {
29482 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PermutationObjective" "', argument " "1"" of type '" "faiss::PermutationObjective *""'");
29483 }
29484 arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
29485 {
29486 Py_BEGIN_ALLOW_THREADS
29487 try {
29488 delete arg1;
29489 } catch(faiss::FaissException & e) {
29490 PyEval_RestoreThread(_save);
29491 PyErr_SetString(PyExc_RuntimeError, e.what());
29492 SWIG_fail;
29493 }
29494 Py_END_ALLOW_THREADS
29495 }
29496 resultobj = SWIG_Py_Void();
29497 return resultobj;
29498 fail:
29499 return NULL;
29500 }
29501
29502
29503 SWIGINTERN PyObject *PermutationObjective_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29504 PyObject *obj;
29505 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
29506 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__PermutationObjective, SWIG_NewClientData(obj));
29507 return SWIG_Py_Void();
29508 }
29509
29510 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_dis_weight_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29511 PyObject *resultobj = 0;
29512 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29513 double arg2 ;
29514 void *argp1 = 0 ;
29515 int res1 = 0 ;
29516 double val2 ;
29517 int ecode2 = 0 ;
29518 PyObject * obj0 = 0 ;
29519 PyObject * obj1 = 0 ;
29520
29521 if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_dis_weight_factor_set",&obj0,&obj1)) SWIG_fail;
29522 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29523 if (!SWIG_IsOK(res1)) {
29524 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_dis_weight_factor_set" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
29525 }
29526 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29527 ecode2 = SWIG_AsVal_double(obj1, &val2);
29528 if (!SWIG_IsOK(ecode2)) {
29529 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReproduceDistancesObjective_dis_weight_factor_set" "', argument " "2"" of type '" "double""'");
29530 }
29531 arg2 = static_cast< double >(val2);
29532 if (arg1) (arg1)->dis_weight_factor = arg2;
29533 resultobj = SWIG_Py_Void();
29534 return resultobj;
29535 fail:
29536 return NULL;
29537 }
29538
29539
29540 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_dis_weight_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29541 PyObject *resultobj = 0;
29542 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29543 void *argp1 = 0 ;
29544 int res1 = 0 ;
29545 PyObject * obj0 = 0 ;
29546 double result;
29547
29548 if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_dis_weight_factor_get",&obj0)) SWIG_fail;
29549 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29550 if (!SWIG_IsOK(res1)) {
29551 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_dis_weight_factor_get" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
29552 }
29553 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29554 result = (double) ((arg1)->dis_weight_factor);
29555 resultobj = SWIG_From_double(static_cast< double >(result));
29556 return resultobj;
29557 fail:
29558 return NULL;
29559 }
29560
29561
29562 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_sqr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29563 PyObject *resultobj = 0;
29564 double arg1 ;
29565 double val1 ;
29566 int ecode1 = 0 ;
29567 PyObject * obj0 = 0 ;
29568 double result;
29569
29570 if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_sqr",&obj0)) SWIG_fail;
29571 ecode1 = SWIG_AsVal_double(obj0, &val1);
29572 if (!SWIG_IsOK(ecode1)) {
29573 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ReproduceDistancesObjective_sqr" "', argument " "1"" of type '" "double""'");
29574 }
29575 arg1 = static_cast< double >(val1);
29576 {
29577 Py_BEGIN_ALLOW_THREADS
29578 try {
29579 result = (double)faiss::ReproduceDistancesObjective::sqr(arg1);
29580 } catch(faiss::FaissException & e) {
29581 PyEval_RestoreThread(_save);
29582 PyErr_SetString(PyExc_RuntimeError, e.what());
29583 SWIG_fail;
29584 }
29585 Py_END_ALLOW_THREADS
29586 }
29587 resultobj = SWIG_From_double(static_cast< double >(result));
29588 return resultobj;
29589 fail:
29590 return NULL;
29591 }
29592
29593
29594 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_dis_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29595 PyObject *resultobj = 0;
29596 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29597 double arg2 ;
29598 void *argp1 = 0 ;
29599 int res1 = 0 ;
29600 double val2 ;
29601 int ecode2 = 0 ;
29602 PyObject * obj0 = 0 ;
29603 PyObject * obj1 = 0 ;
29604 double result;
29605
29606 if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_dis_weight",&obj0,&obj1)) SWIG_fail;
29607 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29608 if (!SWIG_IsOK(res1)) {
29609 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_dis_weight" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective const *""'");
29610 }
29611 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29612 ecode2 = SWIG_AsVal_double(obj1, &val2);
29613 if (!SWIG_IsOK(ecode2)) {
29614 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReproduceDistancesObjective_dis_weight" "', argument " "2"" of type '" "double""'");
29615 }
29616 arg2 = static_cast< double >(val2);
29617 {
29618 Py_BEGIN_ALLOW_THREADS
29619 try {
29620 result = (double)((faiss::ReproduceDistancesObjective const *)arg1)->dis_weight(arg2);
29621 } catch(faiss::FaissException & e) {
29622 PyEval_RestoreThread(_save);
29623 PyErr_SetString(PyExc_RuntimeError, e.what());
29624 SWIG_fail;
29625 }
29626 Py_END_ALLOW_THREADS
29627 }
29628 resultobj = SWIG_From_double(static_cast< double >(result));
29629 return resultobj;
29630 fail:
29631 return NULL;
29632 }
29633
29634
29635 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_source_dis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29636 PyObject *resultobj = 0;
29637 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29638 std::vector< double > *arg2 = (std::vector< double > *) 0 ;
29639 void *argp1 = 0 ;
29640 int res1 = 0 ;
29641 void *argp2 = 0 ;
29642 int res2 = 0 ;
29643 PyObject * obj0 = 0 ;
29644 PyObject * obj1 = 0 ;
29645
29646 if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_source_dis_set",&obj0,&obj1)) SWIG_fail;
29647 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29648 if (!SWIG_IsOK(res1)) {
29649 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_source_dis_set" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
29650 }
29651 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29652 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
29653 if (!SWIG_IsOK(res2)) {
29654 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_source_dis_set" "', argument " "2"" of type '" "std::vector< double > *""'");
29655 }
29656 arg2 = reinterpret_cast< std::vector< double > * >(argp2);
29657 if (arg1) (arg1)->source_dis = *arg2;
29658 resultobj = SWIG_Py_Void();
29659 return resultobj;
29660 fail:
29661 return NULL;
29662 }
29663
29664
29665 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_source_dis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29666 PyObject *resultobj = 0;
29667 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29668 void *argp1 = 0 ;
29669 int res1 = 0 ;
29670 PyObject * obj0 = 0 ;
29671 std::vector< double > *result = 0 ;
29672
29673 if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_source_dis_get",&obj0)) SWIG_fail;
29674 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29675 if (!SWIG_IsOK(res1)) {
29676 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_source_dis_get" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
29677 }
29678 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29679 result = (std::vector< double > *)& ((arg1)->source_dis);
29680 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
29681 return resultobj;
29682 fail:
29683 return NULL;
29684 }
29685
29686
29687 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_target_dis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29688 PyObject *resultobj = 0;
29689 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29690 double *arg2 = (double *) 0 ;
29691 void *argp1 = 0 ;
29692 int res1 = 0 ;
29693 void *argp2 = 0 ;
29694 int res2 = 0 ;
29695 PyObject * obj0 = 0 ;
29696 PyObject * obj1 = 0 ;
29697
29698 if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_target_dis_set",&obj0,&obj1)) SWIG_fail;
29699 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29700 if (!SWIG_IsOK(res1)) {
29701 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_target_dis_set" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
29702 }
29703 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29704 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, SWIG_POINTER_DISOWN | 0 );
29705 if (!SWIG_IsOK(res2)) {
29706 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_target_dis_set" "', argument " "2"" of type '" "double const *""'");
29707 }
29708 arg2 = reinterpret_cast< double * >(argp2);
29709 if (arg1) (arg1)->target_dis = (double const *)arg2;
29710 resultobj = SWIG_Py_Void();
29711 return resultobj;
29712 fail:
29713 return NULL;
29714 }
29715
29716
29717 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_target_dis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29718 PyObject *resultobj = 0;
29719 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29720 void *argp1 = 0 ;
29721 int res1 = 0 ;
29722 PyObject * obj0 = 0 ;
29723 double *result = 0 ;
29724
29725 if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_target_dis_get",&obj0)) SWIG_fail;
29726 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29727 if (!SWIG_IsOK(res1)) {
29728 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_target_dis_get" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
29729 }
29730 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29731 result = (double *) ((arg1)->target_dis);
29732 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 | 0 );
29733 return resultobj;
29734 fail:
29735 return NULL;
29736 }
29737
29738
29739 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_weights_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29740 PyObject *resultobj = 0;
29741 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29742 std::vector< double > *arg2 = (std::vector< double > *) 0 ;
29743 void *argp1 = 0 ;
29744 int res1 = 0 ;
29745 void *argp2 = 0 ;
29746 int res2 = 0 ;
29747 PyObject * obj0 = 0 ;
29748 PyObject * obj1 = 0 ;
29749
29750 if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_weights_set",&obj0,&obj1)) SWIG_fail;
29751 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29752 if (!SWIG_IsOK(res1)) {
29753 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_weights_set" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
29754 }
29755 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29756 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
29757 if (!SWIG_IsOK(res2)) {
29758 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_weights_set" "', argument " "2"" of type '" "std::vector< double > *""'");
29759 }
29760 arg2 = reinterpret_cast< std::vector< double > * >(argp2);
29761 if (arg1) (arg1)->weights = *arg2;
29762 resultobj = SWIG_Py_Void();
29763 return resultobj;
29764 fail:
29765 return NULL;
29766 }
29767
29768
29769 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_weights_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29770 PyObject *resultobj = 0;
29771 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29772 void *argp1 = 0 ;
29773 int res1 = 0 ;
29774 PyObject * obj0 = 0 ;
29775 std::vector< double > *result = 0 ;
29776
29777 if (!PyArg_ParseTuple(args,(char *)"O:ReproduceDistancesObjective_weights_get",&obj0)) SWIG_fail;
29778 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29779 if (!SWIG_IsOK(res1)) {
29780 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_weights_get" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
29781 }
29782 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29783 result = (std::vector< double > *)& ((arg1)->weights);
29784 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
29785 return resultobj;
29786 fail:
29787 return NULL;
29788 }
29789
29790
29791 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_get_source_dis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29792 PyObject *resultobj = 0;
29793 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29794 int arg2 ;
29795 int arg3 ;
29796 void *argp1 = 0 ;
29797 int res1 = 0 ;
29798 int val2 ;
29799 int ecode2 = 0 ;
29800 int val3 ;
29801 int ecode3 = 0 ;
29802 PyObject * obj0 = 0 ;
29803 PyObject * obj1 = 0 ;
29804 PyObject * obj2 = 0 ;
29805 double result;
29806
29807 if (!PyArg_ParseTuple(args,(char *)"OOO:ReproduceDistancesObjective_get_source_dis",&obj0,&obj1,&obj2)) SWIG_fail;
29808 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29809 if (!SWIG_IsOK(res1)) {
29810 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_get_source_dis" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective const *""'");
29811 }
29812 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29813 ecode2 = SWIG_AsVal_int(obj1, &val2);
29814 if (!SWIG_IsOK(ecode2)) {
29815 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReproduceDistancesObjective_get_source_dis" "', argument " "2"" of type '" "int""'");
29816 }
29817 arg2 = static_cast< int >(val2);
29818 ecode3 = SWIG_AsVal_int(obj2, &val3);
29819 if (!SWIG_IsOK(ecode3)) {
29820 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReproduceDistancesObjective_get_source_dis" "', argument " "3"" of type '" "int""'");
29821 }
29822 arg3 = static_cast< int >(val3);
29823 {
29824 Py_BEGIN_ALLOW_THREADS
29825 try {
29826 result = (double)((faiss::ReproduceDistancesObjective const *)arg1)->get_source_dis(arg2,arg3);
29827 } catch(faiss::FaissException & e) {
29828 PyEval_RestoreThread(_save);
29829 PyErr_SetString(PyExc_RuntimeError, e.what());
29830 SWIG_fail;
29831 }
29832 Py_END_ALLOW_THREADS
29833 }
29834 resultobj = SWIG_From_double(static_cast< double >(result));
29835 return resultobj;
29836 fail:
29837 return NULL;
29838 }
29839
29840
29841 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_compute_cost(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29842 PyObject *resultobj = 0;
29843 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29844 int *arg2 = (int *) 0 ;
29845 void *argp1 = 0 ;
29846 int res1 = 0 ;
29847 void *argp2 = 0 ;
29848 int res2 = 0 ;
29849 PyObject * obj0 = 0 ;
29850 PyObject * obj1 = 0 ;
29851 double result;
29852
29853 if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_compute_cost",&obj0,&obj1)) SWIG_fail;
29854 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29855 if (!SWIG_IsOK(res1)) {
29856 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_compute_cost" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective const *""'");
29857 }
29858 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29859 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
29860 if (!SWIG_IsOK(res2)) {
29861 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_compute_cost" "', argument " "2"" of type '" "int const *""'");
29862 }
29863 arg2 = reinterpret_cast< int * >(argp2);
29864 {
29865 Py_BEGIN_ALLOW_THREADS
29866 try {
29867 result = (double)((faiss::ReproduceDistancesObjective const *)arg1)->compute_cost((int const *)arg2);
29868 } catch(faiss::FaissException & e) {
29869 PyEval_RestoreThread(_save);
29870 PyErr_SetString(PyExc_RuntimeError, e.what());
29871 SWIG_fail;
29872 }
29873 Py_END_ALLOW_THREADS
29874 }
29875 resultobj = SWIG_From_double(static_cast< double >(result));
29876 return resultobj;
29877 fail:
29878 return NULL;
29879 }
29880
29881
29882 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_cost_update(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29883 PyObject *resultobj = 0;
29884 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
29885 int *arg2 = (int *) 0 ;
29886 int arg3 ;
29887 int arg4 ;
29888 void *argp1 = 0 ;
29889 int res1 = 0 ;
29890 void *argp2 = 0 ;
29891 int res2 = 0 ;
29892 int val3 ;
29893 int ecode3 = 0 ;
29894 int val4 ;
29895 int ecode4 = 0 ;
29896 PyObject * obj0 = 0 ;
29897 PyObject * obj1 = 0 ;
29898 PyObject * obj2 = 0 ;
29899 PyObject * obj3 = 0 ;
29900 double result;
29901
29902 if (!PyArg_ParseTuple(args,(char *)"OOOO:ReproduceDistancesObjective_cost_update",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
29903 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
29904 if (!SWIG_IsOK(res1)) {
29905 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_cost_update" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective const *""'");
29906 }
29907 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
29908 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
29909 if (!SWIG_IsOK(res2)) {
29910 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_cost_update" "', argument " "2"" of type '" "int const *""'");
29911 }
29912 arg2 = reinterpret_cast< int * >(argp2);
29913 ecode3 = SWIG_AsVal_int(obj2, &val3);
29914 if (!SWIG_IsOK(ecode3)) {
29915 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReproduceDistancesObjective_cost_update" "', argument " "3"" of type '" "int""'");
29916 }
29917 arg3 = static_cast< int >(val3);
29918 ecode4 = SWIG_AsVal_int(obj3, &val4);
29919 if (!SWIG_IsOK(ecode4)) {
29920 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ReproduceDistancesObjective_cost_update" "', argument " "4"" of type '" "int""'");
29921 }
29922 arg4 = static_cast< int >(val4);
29923 {
29924 Py_BEGIN_ALLOW_THREADS
29925 try {
29926 result = (double)((faiss::ReproduceDistancesObjective const *)arg1)->cost_update((int const *)arg2,arg3,arg4);
29927 } catch(faiss::FaissException & e) {
29928 PyEval_RestoreThread(_save);
29929 PyErr_SetString(PyExc_RuntimeError, e.what());
29930 SWIG_fail;
29931 }
29932 Py_END_ALLOW_THREADS
29933 }
29934 resultobj = SWIG_From_double(static_cast< double >(result));
29935 return resultobj;
29936 fail:
29937 return NULL;
29938 }
29939
29940
29941 SWIGINTERN PyObject *_wrap_new_ReproduceDistancesObjective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
29942 PyObject *resultobj = 0;
29943 int arg1 ;
29944 double *arg2 = (double *) 0 ;
29945 double *arg3 = (double *) 0 ;
29946 double arg4 ;
29947 int val1 ;
29948 int ecode1 = 0 ;
29949 void *argp2 = 0 ;
29950 int res2 = 0 ;
29951 void *argp3 = 0 ;
29952 int res3 = 0 ;
29953 double val4 ;
29954 int ecode4 = 0 ;
29955 PyObject * obj0 = 0 ;
29956 PyObject * obj1 = 0 ;
29957 PyObject * obj2 = 0 ;
29958 PyObject * obj3 = 0 ;
29959 faiss::ReproduceDistancesObjective *result = 0 ;
29960
29961 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_ReproduceDistancesObjective",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
29962 ecode1 = SWIG_AsVal_int(obj0, &val1);
29963 if (!SWIG_IsOK(ecode1)) {
29964 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ReproduceDistancesObjective" "', argument " "1"" of type '" "int""'");
29965 }
29966 arg1 = static_cast< int >(val1);
29967 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 );
29968 if (!SWIG_IsOK(res2)) {
29969 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ReproduceDistancesObjective" "', argument " "2"" of type '" "double const *""'");
29970 }
29971 arg2 = reinterpret_cast< double * >(argp2);
29972 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 );
29973 if (!SWIG_IsOK(res3)) {
29974 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_ReproduceDistancesObjective" "', argument " "3"" of type '" "double const *""'");
29975 }
29976 arg3 = reinterpret_cast< double * >(argp3);
29977 ecode4 = SWIG_AsVal_double(obj3, &val4);
29978 if (!SWIG_IsOK(ecode4)) {
29979 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_ReproduceDistancesObjective" "', argument " "4"" of type '" "double""'");
29980 }
29981 arg4 = static_cast< double >(val4);
29982 {
29983 Py_BEGIN_ALLOW_THREADS
29984 try {
29985 result = (faiss::ReproduceDistancesObjective *)new faiss::ReproduceDistancesObjective(arg1,(double const *)arg2,(double const *)arg3,arg4);
29986 } catch(faiss::FaissException & e) {
29987 PyEval_RestoreThread(_save);
29988 PyErr_SetString(PyExc_RuntimeError, e.what());
29989 SWIG_fail;
29990 }
29991 Py_END_ALLOW_THREADS
29992 }
29993 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReproduceDistancesObjective, SWIG_POINTER_NEW | 0 );
29994 return resultobj;
29995 fail:
29996 return NULL;
29997 }
29998
29999
30000 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_compute_mean_stdev(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30001 PyObject *resultobj = 0;
30002 double *arg1 = (double *) 0 ;
30003 size_t arg2 ;
30004 double *arg3 = (double *) 0 ;
30005 double *arg4 = (double *) 0 ;
30006 void *argp1 = 0 ;
30007 int res1 = 0 ;
30008 size_t val2 ;
30009 int ecode2 = 0 ;
30010 void *argp3 = 0 ;
30011 int res3 = 0 ;
30012 void *argp4 = 0 ;
30013 int res4 = 0 ;
30014 PyObject * obj0 = 0 ;
30015 PyObject * obj1 = 0 ;
30016 PyObject * obj2 = 0 ;
30017 PyObject * obj3 = 0 ;
30018
30019 if (!PyArg_ParseTuple(args,(char *)"OOOO:ReproduceDistancesObjective_compute_mean_stdev",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
30020 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_double, 0 | 0 );
30021 if (!SWIG_IsOK(res1)) {
30022 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_compute_mean_stdev" "', argument " "1"" of type '" "double const *""'");
30023 }
30024 arg1 = reinterpret_cast< double * >(argp1);
30025 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
30026 if (!SWIG_IsOK(ecode2)) {
30027 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReproduceDistancesObjective_compute_mean_stdev" "', argument " "2"" of type '" "size_t""'");
30028 }
30029 arg2 = static_cast< size_t >(val2);
30030 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_double, 0 | 0 );
30031 if (!SWIG_IsOK(res3)) {
30032 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReproduceDistancesObjective_compute_mean_stdev" "', argument " "3"" of type '" "double *""'");
30033 }
30034 arg3 = reinterpret_cast< double * >(argp3);
30035 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 );
30036 if (!SWIG_IsOK(res4)) {
30037 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReproduceDistancesObjective_compute_mean_stdev" "', argument " "4"" of type '" "double *""'");
30038 }
30039 arg4 = reinterpret_cast< double * >(argp4);
30040 {
30041 Py_BEGIN_ALLOW_THREADS
30042 try {
30043 faiss::ReproduceDistancesObjective::compute_mean_stdev((double const *)arg1,arg2,arg3,arg4);
30044 } catch(faiss::FaissException & e) {
30045 PyEval_RestoreThread(_save);
30046 PyErr_SetString(PyExc_RuntimeError, e.what());
30047 SWIG_fail;
30048 }
30049 Py_END_ALLOW_THREADS
30050 }
30051 resultobj = SWIG_Py_Void();
30052 return resultobj;
30053 fail:
30054 return NULL;
30055 }
30056
30057
30058 SWIGINTERN PyObject *_wrap_ReproduceDistancesObjective_set_affine_target_dis(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30059 PyObject *resultobj = 0;
30060 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
30061 double *arg2 = (double *) 0 ;
30062 void *argp1 = 0 ;
30063 int res1 = 0 ;
30064 void *argp2 = 0 ;
30065 int res2 = 0 ;
30066 PyObject * obj0 = 0 ;
30067 PyObject * obj1 = 0 ;
30068
30069 if (!PyArg_ParseTuple(args,(char *)"OO:ReproduceDistancesObjective_set_affine_target_dis",&obj0,&obj1)) SWIG_fail;
30070 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, 0 | 0 );
30071 if (!SWIG_IsOK(res1)) {
30072 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReproduceDistancesObjective_set_affine_target_dis" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
30073 }
30074 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
30075 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_double, 0 | 0 );
30076 if (!SWIG_IsOK(res2)) {
30077 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReproduceDistancesObjective_set_affine_target_dis" "', argument " "2"" of type '" "double const *""'");
30078 }
30079 arg2 = reinterpret_cast< double * >(argp2);
30080 {
30081 Py_BEGIN_ALLOW_THREADS
30082 try {
30083 (arg1)->set_affine_target_dis((double const *)arg2);
30084 } catch(faiss::FaissException & e) {
30085 PyEval_RestoreThread(_save);
30086 PyErr_SetString(PyExc_RuntimeError, e.what());
30087 SWIG_fail;
30088 }
30089 Py_END_ALLOW_THREADS
30090 }
30091 resultobj = SWIG_Py_Void();
30092 return resultobj;
30093 fail:
30094 return NULL;
30095 }
30096
30097
30098 SWIGINTERN PyObject *_wrap_delete_ReproduceDistancesObjective(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30099 PyObject *resultobj = 0;
30100 faiss::ReproduceDistancesObjective *arg1 = (faiss::ReproduceDistancesObjective *) 0 ;
30101 void *argp1 = 0 ;
30102 int res1 = 0 ;
30103 PyObject * obj0 = 0 ;
30104
30105 if (!PyArg_ParseTuple(args,(char *)"O:delete_ReproduceDistancesObjective",&obj0)) SWIG_fail;
30106 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReproduceDistancesObjective, SWIG_POINTER_DISOWN | 0 );
30107 if (!SWIG_IsOK(res1)) {
30108 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReproduceDistancesObjective" "', argument " "1"" of type '" "faiss::ReproduceDistancesObjective *""'");
30109 }
30110 arg1 = reinterpret_cast< faiss::ReproduceDistancesObjective * >(argp1);
30111 {
30112 Py_BEGIN_ALLOW_THREADS
30113 try {
30114 delete arg1;
30115 } catch(faiss::FaissException & e) {
30116 PyEval_RestoreThread(_save);
30117 PyErr_SetString(PyExc_RuntimeError, e.what());
30118 SWIG_fail;
30119 }
30120 Py_END_ALLOW_THREADS
30121 }
30122 resultobj = SWIG_Py_Void();
30123 return resultobj;
30124 fail:
30125 return NULL;
30126 }
30127
30128
30129 SWIGINTERN PyObject *ReproduceDistancesObjective_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30130 PyObject *obj;
30131 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
30132 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ReproduceDistancesObjective, SWIG_NewClientData(obj));
30133 return SWIG_Py_Void();
30134 }
30135
30136 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_obj_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30137 PyObject *resultobj = 0;
30138 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30139 faiss::PermutationObjective *arg2 = (faiss::PermutationObjective *) 0 ;
30140 void *argp1 = 0 ;
30141 int res1 = 0 ;
30142 void *argp2 = 0 ;
30143 int res2 = 0 ;
30144 PyObject * obj0 = 0 ;
30145 PyObject * obj1 = 0 ;
30146
30147 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_obj_set",&obj0,&obj1)) SWIG_fail;
30148 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30149 if (!SWIG_IsOK(res1)) {
30150 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_obj_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30151 }
30152 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30153 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__PermutationObjective, SWIG_POINTER_DISOWN | 0 );
30154 if (!SWIG_IsOK(res2)) {
30155 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_obj_set" "', argument " "2"" of type '" "faiss::PermutationObjective *""'");
30156 }
30157 arg2 = reinterpret_cast< faiss::PermutationObjective * >(argp2);
30158 if (arg1) (arg1)->obj = arg2;
30159 resultobj = SWIG_Py_Void();
30160 return resultobj;
30161 fail:
30162 return NULL;
30163 }
30164
30165
30166 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_obj_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30167 PyObject *resultobj = 0;
30168 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30169 void *argp1 = 0 ;
30170 int res1 = 0 ;
30171 PyObject * obj0 = 0 ;
30172 faiss::PermutationObjective *result = 0 ;
30173
30174 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_obj_get",&obj0)) SWIG_fail;
30175 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30176 if (!SWIG_IsOK(res1)) {
30177 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_obj_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30178 }
30179 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30180 result = (faiss::PermutationObjective *) ((arg1)->obj);
30181 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
30182 return resultobj;
30183 fail:
30184 return NULL;
30185 }
30186
30187
30188 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_n_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30189 PyObject *resultobj = 0;
30190 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30191 int arg2 ;
30192 void *argp1 = 0 ;
30193 int res1 = 0 ;
30194 int val2 ;
30195 int ecode2 = 0 ;
30196 PyObject * obj0 = 0 ;
30197 PyObject * obj1 = 0 ;
30198
30199 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_n_set",&obj0,&obj1)) SWIG_fail;
30200 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30201 if (!SWIG_IsOK(res1)) {
30202 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_n_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30203 }
30204 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30205 ecode2 = SWIG_AsVal_int(obj1, &val2);
30206 if (!SWIG_IsOK(ecode2)) {
30207 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingOptimizer_n_set" "', argument " "2"" of type '" "int""'");
30208 }
30209 arg2 = static_cast< int >(val2);
30210 if (arg1) (arg1)->n = arg2;
30211 resultobj = SWIG_Py_Void();
30212 return resultobj;
30213 fail:
30214 return NULL;
30215 }
30216
30217
30218 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_n_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30219 PyObject *resultobj = 0;
30220 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30221 void *argp1 = 0 ;
30222 int res1 = 0 ;
30223 PyObject * obj0 = 0 ;
30224 int result;
30225
30226 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_n_get",&obj0)) SWIG_fail;
30227 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30228 if (!SWIG_IsOK(res1)) {
30229 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_n_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30230 }
30231 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30232 result = (int) ((arg1)->n);
30233 resultobj = SWIG_From_int(static_cast< int >(result));
30234 return resultobj;
30235 fail:
30236 return NULL;
30237 }
30238
30239
30240 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_logfile_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30241 PyObject *resultobj = 0;
30242 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30243 FILE *arg2 = (FILE *) 0 ;
30244 void *argp1 = 0 ;
30245 int res1 = 0 ;
30246 void *argp2 = 0 ;
30247 int res2 = 0 ;
30248 PyObject * obj0 = 0 ;
30249 PyObject * obj1 = 0 ;
30250
30251 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_logfile_set",&obj0,&obj1)) SWIG_fail;
30252 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30253 if (!SWIG_IsOK(res1)) {
30254 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_logfile_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30255 }
30256 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30257 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FILE, SWIG_POINTER_DISOWN | 0 );
30258 if (!SWIG_IsOK(res2)) {
30259 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_logfile_set" "', argument " "2"" of type '" "FILE *""'");
30260 }
30261 arg2 = reinterpret_cast< FILE * >(argp2);
30262 if (arg1) (arg1)->logfile = arg2;
30263 resultobj = SWIG_Py_Void();
30264 return resultobj;
30265 fail:
30266 return NULL;
30267 }
30268
30269
30270 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_logfile_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30271 PyObject *resultobj = 0;
30272 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30273 void *argp1 = 0 ;
30274 int res1 = 0 ;
30275 PyObject * obj0 = 0 ;
30276 FILE *result = 0 ;
30277
30278 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_logfile_get",&obj0)) SWIG_fail;
30279 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30280 if (!SWIG_IsOK(res1)) {
30281 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_logfile_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30282 }
30283 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30284 result = (FILE *) ((arg1)->logfile);
30285 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_FILE, 0 | 0 );
30286 return resultobj;
30287 fail:
30288 return NULL;
30289 }
30290
30291
30292 SWIGINTERN PyObject *_wrap_new_SimulatedAnnealingOptimizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30293 PyObject *resultobj = 0;
30294 faiss::PermutationObjective *arg1 = (faiss::PermutationObjective *) 0 ;
30295 faiss::SimulatedAnnealingParameters *arg2 = 0 ;
30296 void *argp1 = 0 ;
30297 int res1 = 0 ;
30298 void *argp2 = 0 ;
30299 int res2 = 0 ;
30300 PyObject * obj0 = 0 ;
30301 PyObject * obj1 = 0 ;
30302 faiss::SimulatedAnnealingOptimizer *result = 0 ;
30303
30304 if (!PyArg_ParseTuple(args,(char *)"OO:new_SimulatedAnnealingOptimizer",&obj0,&obj1)) SWIG_fail;
30305 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PermutationObjective, 0 | 0 );
30306 if (!SWIG_IsOK(res1)) {
30307 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SimulatedAnnealingOptimizer" "', argument " "1"" of type '" "faiss::PermutationObjective *""'");
30308 }
30309 arg1 = reinterpret_cast< faiss::PermutationObjective * >(argp1);
30310 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__SimulatedAnnealingParameters, 0 | 0);
30311 if (!SWIG_IsOK(res2)) {
30312 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_SimulatedAnnealingOptimizer" "', argument " "2"" of type '" "faiss::SimulatedAnnealingParameters const &""'");
30313 }
30314 if (!argp2) {
30315 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_SimulatedAnnealingOptimizer" "', argument " "2"" of type '" "faiss::SimulatedAnnealingParameters const &""'");
30316 }
30317 arg2 = reinterpret_cast< faiss::SimulatedAnnealingParameters * >(argp2);
30318 {
30319 Py_BEGIN_ALLOW_THREADS
30320 try {
30321 result = (faiss::SimulatedAnnealingOptimizer *)new faiss::SimulatedAnnealingOptimizer(arg1,(faiss::SimulatedAnnealingParameters const &)*arg2);
30322 } catch(faiss::FaissException & e) {
30323 PyEval_RestoreThread(_save);
30324 PyErr_SetString(PyExc_RuntimeError, e.what());
30325 SWIG_fail;
30326 }
30327 Py_END_ALLOW_THREADS
30328 }
30329 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, SWIG_POINTER_NEW | 0 );
30330 return resultobj;
30331 fail:
30332 return NULL;
30333 }
30334
30335
30336 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_rnd_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30337 PyObject *resultobj = 0;
30338 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30339 faiss::RandomGenerator *arg2 = (faiss::RandomGenerator *) 0 ;
30340 void *argp1 = 0 ;
30341 int res1 = 0 ;
30342 void *argp2 = 0 ;
30343 int res2 = 0 ;
30344 PyObject * obj0 = 0 ;
30345 PyObject * obj1 = 0 ;
30346
30347 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_rnd_set",&obj0,&obj1)) SWIG_fail;
30348 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30349 if (!SWIG_IsOK(res1)) {
30350 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_rnd_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30351 }
30352 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30353 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__RandomGenerator, SWIG_POINTER_DISOWN | 0 );
30354 if (!SWIG_IsOK(res2)) {
30355 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_rnd_set" "', argument " "2"" of type '" "faiss::RandomGenerator *""'");
30356 }
30357 arg2 = reinterpret_cast< faiss::RandomGenerator * >(argp2);
30358 if (arg1) (arg1)->rnd = arg2;
30359 resultobj = SWIG_Py_Void();
30360 return resultobj;
30361 fail:
30362 return NULL;
30363 }
30364
30365
30366 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_rnd_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30367 PyObject *resultobj = 0;
30368 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30369 void *argp1 = 0 ;
30370 int res1 = 0 ;
30371 PyObject * obj0 = 0 ;
30372 faiss::RandomGenerator *result = 0 ;
30373
30374 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_rnd_get",&obj0)) SWIG_fail;
30375 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30376 if (!SWIG_IsOK(res1)) {
30377 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_rnd_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30378 }
30379 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30380 result = (faiss::RandomGenerator *) ((arg1)->rnd);
30381 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
30382 return resultobj;
30383 fail:
30384 return NULL;
30385 }
30386
30387
30388 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_init_cost_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30389 PyObject *resultobj = 0;
30390 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30391 double arg2 ;
30392 void *argp1 = 0 ;
30393 int res1 = 0 ;
30394 double val2 ;
30395 int ecode2 = 0 ;
30396 PyObject * obj0 = 0 ;
30397 PyObject * obj1 = 0 ;
30398
30399 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_init_cost_set",&obj0,&obj1)) SWIG_fail;
30400 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30401 if (!SWIG_IsOK(res1)) {
30402 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_init_cost_set" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30403 }
30404 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30405 ecode2 = SWIG_AsVal_double(obj1, &val2);
30406 if (!SWIG_IsOK(ecode2)) {
30407 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SimulatedAnnealingOptimizer_init_cost_set" "', argument " "2"" of type '" "double""'");
30408 }
30409 arg2 = static_cast< double >(val2);
30410 if (arg1) (arg1)->init_cost = arg2;
30411 resultobj = SWIG_Py_Void();
30412 return resultobj;
30413 fail:
30414 return NULL;
30415 }
30416
30417
30418 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_init_cost_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30419 PyObject *resultobj = 0;
30420 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30421 void *argp1 = 0 ;
30422 int res1 = 0 ;
30423 PyObject * obj0 = 0 ;
30424 double result;
30425
30426 if (!PyArg_ParseTuple(args,(char *)"O:SimulatedAnnealingOptimizer_init_cost_get",&obj0)) SWIG_fail;
30427 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30428 if (!SWIG_IsOK(res1)) {
30429 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_init_cost_get" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30430 }
30431 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30432 result = (double) ((arg1)->init_cost);
30433 resultobj = SWIG_From_double(static_cast< double >(result));
30434 return resultobj;
30435 fail:
30436 return NULL;
30437 }
30438
30439
30440 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_optimize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30441 PyObject *resultobj = 0;
30442 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30443 int *arg2 = (int *) 0 ;
30444 void *argp1 = 0 ;
30445 int res1 = 0 ;
30446 void *argp2 = 0 ;
30447 int res2 = 0 ;
30448 PyObject * obj0 = 0 ;
30449 PyObject * obj1 = 0 ;
30450 double result;
30451
30452 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_optimize",&obj0,&obj1)) SWIG_fail;
30453 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30454 if (!SWIG_IsOK(res1)) {
30455 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_optimize" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30456 }
30457 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30458 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
30459 if (!SWIG_IsOK(res2)) {
30460 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_optimize" "', argument " "2"" of type '" "int *""'");
30461 }
30462 arg2 = reinterpret_cast< int * >(argp2);
30463 {
30464 Py_BEGIN_ALLOW_THREADS
30465 try {
30466 result = (double)(arg1)->optimize(arg2);
30467 } catch(faiss::FaissException & e) {
30468 PyEval_RestoreThread(_save);
30469 PyErr_SetString(PyExc_RuntimeError, e.what());
30470 SWIG_fail;
30471 }
30472 Py_END_ALLOW_THREADS
30473 }
30474 resultobj = SWIG_From_double(static_cast< double >(result));
30475 return resultobj;
30476 fail:
30477 return NULL;
30478 }
30479
30480
30481 SWIGINTERN PyObject *_wrap_SimulatedAnnealingOptimizer_run_optimization(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30482 PyObject *resultobj = 0;
30483 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30484 int *arg2 = (int *) 0 ;
30485 void *argp1 = 0 ;
30486 int res1 = 0 ;
30487 void *argp2 = 0 ;
30488 int res2 = 0 ;
30489 PyObject * obj0 = 0 ;
30490 PyObject * obj1 = 0 ;
30491 double result;
30492
30493 if (!PyArg_ParseTuple(args,(char *)"OO:SimulatedAnnealingOptimizer_run_optimization",&obj0,&obj1)) SWIG_fail;
30494 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, 0 | 0 );
30495 if (!SWIG_IsOK(res1)) {
30496 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SimulatedAnnealingOptimizer_run_optimization" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30497 }
30498 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30499 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
30500 if (!SWIG_IsOK(res2)) {
30501 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SimulatedAnnealingOptimizer_run_optimization" "', argument " "2"" of type '" "int *""'");
30502 }
30503 arg2 = reinterpret_cast< int * >(argp2);
30504 {
30505 Py_BEGIN_ALLOW_THREADS
30506 try {
30507 result = (double)(arg1)->run_optimization(arg2);
30508 } catch(faiss::FaissException & e) {
30509 PyEval_RestoreThread(_save);
30510 PyErr_SetString(PyExc_RuntimeError, e.what());
30511 SWIG_fail;
30512 }
30513 Py_END_ALLOW_THREADS
30514 }
30515 resultobj = SWIG_From_double(static_cast< double >(result));
30516 return resultobj;
30517 fail:
30518 return NULL;
30519 }
30520
30521
30522 SWIGINTERN PyObject *_wrap_delete_SimulatedAnnealingOptimizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30523 PyObject *resultobj = 0;
30524 faiss::SimulatedAnnealingOptimizer *arg1 = (faiss::SimulatedAnnealingOptimizer *) 0 ;
30525 void *argp1 = 0 ;
30526 int res1 = 0 ;
30527 PyObject * obj0 = 0 ;
30528
30529 if (!PyArg_ParseTuple(args,(char *)"O:delete_SimulatedAnnealingOptimizer",&obj0)) SWIG_fail;
30530 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, SWIG_POINTER_DISOWN | 0 );
30531 if (!SWIG_IsOK(res1)) {
30532 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SimulatedAnnealingOptimizer" "', argument " "1"" of type '" "faiss::SimulatedAnnealingOptimizer *""'");
30533 }
30534 arg1 = reinterpret_cast< faiss::SimulatedAnnealingOptimizer * >(argp1);
30535 {
30536 Py_BEGIN_ALLOW_THREADS
30537 try {
30538 delete arg1;
30539 } catch(faiss::FaissException & e) {
30540 PyEval_RestoreThread(_save);
30541 PyErr_SetString(PyExc_RuntimeError, e.what());
30542 SWIG_fail;
30543 }
30544 Py_END_ALLOW_THREADS
30545 }
30546 resultobj = SWIG_Py_Void();
30547 return resultobj;
30548 fail:
30549 return NULL;
30550 }
30551
30552
30553 SWIGINTERN PyObject *SimulatedAnnealingOptimizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30554 PyObject *obj;
30555 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
30556 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__SimulatedAnnealingOptimizer, SWIG_NewClientData(obj));
30557 return SWIG_Py_Void();
30558 }
30559
30560 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimization_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30561 PyObject *resultobj = 0;
30562 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30563 faiss::PolysemousTraining::Optimization_type_t arg2 ;
30564 void *argp1 = 0 ;
30565 int res1 = 0 ;
30566 int val2 ;
30567 int ecode2 = 0 ;
30568 PyObject * obj0 = 0 ;
30569 PyObject * obj1 = 0 ;
30570
30571 if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_optimization_type_set",&obj0,&obj1)) SWIG_fail;
30572 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30573 if (!SWIG_IsOK(res1)) {
30574 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimization_type_set" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30575 }
30576 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30577 ecode2 = SWIG_AsVal_int(obj1, &val2);
30578 if (!SWIG_IsOK(ecode2)) {
30579 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PolysemousTraining_optimization_type_set" "', argument " "2"" of type '" "faiss::PolysemousTraining::Optimization_type_t""'");
30580 }
30581 arg2 = static_cast< faiss::PolysemousTraining::Optimization_type_t >(val2);
30582 if (arg1) (arg1)->optimization_type = arg2;
30583 resultobj = SWIG_Py_Void();
30584 return resultobj;
30585 fail:
30586 return NULL;
30587 }
30588
30589
30590 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimization_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30591 PyObject *resultobj = 0;
30592 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30593 void *argp1 = 0 ;
30594 int res1 = 0 ;
30595 PyObject * obj0 = 0 ;
30596 faiss::PolysemousTraining::Optimization_type_t result;
30597
30598 if (!PyArg_ParseTuple(args,(char *)"O:PolysemousTraining_optimization_type_get",&obj0)) SWIG_fail;
30599 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30600 if (!SWIG_IsOK(res1)) {
30601 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimization_type_get" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30602 }
30603 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30604 result = (faiss::PolysemousTraining::Optimization_type_t) ((arg1)->optimization_type);
30605 resultobj = SWIG_From_int(static_cast< int >(result));
30606 return resultobj;
30607 fail:
30608 return NULL;
30609 }
30610
30611
30612 SWIGINTERN PyObject *_wrap_PolysemousTraining_ntrain_permutation_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30613 PyObject *resultobj = 0;
30614 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30615 int arg2 ;
30616 void *argp1 = 0 ;
30617 int res1 = 0 ;
30618 int val2 ;
30619 int ecode2 = 0 ;
30620 PyObject * obj0 = 0 ;
30621 PyObject * obj1 = 0 ;
30622
30623 if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_ntrain_permutation_set",&obj0,&obj1)) SWIG_fail;
30624 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30625 if (!SWIG_IsOK(res1)) {
30626 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_ntrain_permutation_set" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30627 }
30628 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30629 ecode2 = SWIG_AsVal_int(obj1, &val2);
30630 if (!SWIG_IsOK(ecode2)) {
30631 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PolysemousTraining_ntrain_permutation_set" "', argument " "2"" of type '" "int""'");
30632 }
30633 arg2 = static_cast< int >(val2);
30634 if (arg1) (arg1)->ntrain_permutation = arg2;
30635 resultobj = SWIG_Py_Void();
30636 return resultobj;
30637 fail:
30638 return NULL;
30639 }
30640
30641
30642 SWIGINTERN PyObject *_wrap_PolysemousTraining_ntrain_permutation_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30643 PyObject *resultobj = 0;
30644 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30645 void *argp1 = 0 ;
30646 int res1 = 0 ;
30647 PyObject * obj0 = 0 ;
30648 int result;
30649
30650 if (!PyArg_ParseTuple(args,(char *)"O:PolysemousTraining_ntrain_permutation_get",&obj0)) SWIG_fail;
30651 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30652 if (!SWIG_IsOK(res1)) {
30653 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_ntrain_permutation_get" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30654 }
30655 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30656 result = (int) ((arg1)->ntrain_permutation);
30657 resultobj = SWIG_From_int(static_cast< int >(result));
30658 return resultobj;
30659 fail:
30660 return NULL;
30661 }
30662
30663
30664 SWIGINTERN PyObject *_wrap_PolysemousTraining_dis_weight_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30665 PyObject *resultobj = 0;
30666 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30667 double arg2 ;
30668 void *argp1 = 0 ;
30669 int res1 = 0 ;
30670 double val2 ;
30671 int ecode2 = 0 ;
30672 PyObject * obj0 = 0 ;
30673 PyObject * obj1 = 0 ;
30674
30675 if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_dis_weight_factor_set",&obj0,&obj1)) SWIG_fail;
30676 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30677 if (!SWIG_IsOK(res1)) {
30678 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_dis_weight_factor_set" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30679 }
30680 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30681 ecode2 = SWIG_AsVal_double(obj1, &val2);
30682 if (!SWIG_IsOK(ecode2)) {
30683 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "PolysemousTraining_dis_weight_factor_set" "', argument " "2"" of type '" "double""'");
30684 }
30685 arg2 = static_cast< double >(val2);
30686 if (arg1) (arg1)->dis_weight_factor = arg2;
30687 resultobj = SWIG_Py_Void();
30688 return resultobj;
30689 fail:
30690 return NULL;
30691 }
30692
30693
30694 SWIGINTERN PyObject *_wrap_PolysemousTraining_dis_weight_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30695 PyObject *resultobj = 0;
30696 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30697 void *argp1 = 0 ;
30698 int res1 = 0 ;
30699 PyObject * obj0 = 0 ;
30700 double result;
30701
30702 if (!PyArg_ParseTuple(args,(char *)"O:PolysemousTraining_dis_weight_factor_get",&obj0)) SWIG_fail;
30703 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30704 if (!SWIG_IsOK(res1)) {
30705 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_dis_weight_factor_get" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30706 }
30707 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30708 result = (double) ((arg1)->dis_weight_factor);
30709 resultobj = SWIG_From_double(static_cast< double >(result));
30710 return resultobj;
30711 fail:
30712 return NULL;
30713 }
30714
30715
30716 SWIGINTERN PyObject *_wrap_PolysemousTraining_log_pattern_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30717 PyObject *resultobj = 0;
30718 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30719 std::string *arg2 = 0 ;
30720 void *argp1 = 0 ;
30721 int res1 = 0 ;
30722 int res2 = SWIG_OLDOBJ ;
30723 PyObject * obj0 = 0 ;
30724 PyObject * obj1 = 0 ;
30725
30726 if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_log_pattern_set",&obj0,&obj1)) SWIG_fail;
30727 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30728 if (!SWIG_IsOK(res1)) {
30729 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_log_pattern_set" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30730 }
30731 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30732 {
30733 std::string *ptr = (std::string *)0;
30734 res2 = SWIG_AsPtr_std_string(obj1, &ptr);
30735 if (!SWIG_IsOK(res2)) {
30736 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolysemousTraining_log_pattern_set" "', argument " "2"" of type '" "std::string const &""'");
30737 }
30738 if (!ptr) {
30739 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolysemousTraining_log_pattern_set" "', argument " "2"" of type '" "std::string const &""'");
30740 }
30741 arg2 = ptr;
30742 }
30743 if (arg1) (arg1)->log_pattern = *arg2;
30744 resultobj = SWIG_Py_Void();
30745 if (SWIG_IsNewObj(res2)) delete arg2;
30746 return resultobj;
30747 fail:
30748 if (SWIG_IsNewObj(res2)) delete arg2;
30749 return NULL;
30750 }
30751
30752
30753 SWIGINTERN PyObject *_wrap_PolysemousTraining_log_pattern_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30754 PyObject *resultobj = 0;
30755 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30756 void *argp1 = 0 ;
30757 int res1 = 0 ;
30758 PyObject * obj0 = 0 ;
30759 std::string *result = 0 ;
30760
30761 if (!PyArg_ParseTuple(args,(char *)"O:PolysemousTraining_log_pattern_get",&obj0)) SWIG_fail;
30762 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30763 if (!SWIG_IsOK(res1)) {
30764 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_log_pattern_get" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30765 }
30766 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30767 result = (std::string *) & ((arg1)->log_pattern);
30768 resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
30769 return resultobj;
30770 fail:
30771 return NULL;
30772 }
30773
30774
30775 SWIGINTERN PyObject *_wrap_new_PolysemousTraining(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30776 PyObject *resultobj = 0;
30777 faiss::PolysemousTraining *result = 0 ;
30778
30779 if (!PyArg_ParseTuple(args,(char *)":new_PolysemousTraining")) SWIG_fail;
30780 {
30781 Py_BEGIN_ALLOW_THREADS
30782 try {
30783 result = (faiss::PolysemousTraining *)new faiss::PolysemousTraining();
30784 } catch(faiss::FaissException & e) {
30785 PyEval_RestoreThread(_save);
30786 PyErr_SetString(PyExc_RuntimeError, e.what());
30787 SWIG_fail;
30788 }
30789 Py_END_ALLOW_THREADS
30790 }
30791 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PolysemousTraining, SWIG_POINTER_NEW | 0 );
30792 return resultobj;
30793 fail:
30794 return NULL;
30795 }
30796
30797
30798 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimize_pq_for_hamming(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30799 PyObject *resultobj = 0;
30800 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30801 faiss::ProductQuantizer *arg2 = 0 ;
30802 size_t arg3 ;
30803 float *arg4 = (float *) 0 ;
30804 void *argp1 = 0 ;
30805 int res1 = 0 ;
30806 void *argp2 = 0 ;
30807 int res2 = 0 ;
30808 size_t val3 ;
30809 int ecode3 = 0 ;
30810 void *argp4 = 0 ;
30811 int res4 = 0 ;
30812 PyObject * obj0 = 0 ;
30813 PyObject * obj1 = 0 ;
30814 PyObject * obj2 = 0 ;
30815 PyObject * obj3 = 0 ;
30816
30817 if (!PyArg_ParseTuple(args,(char *)"OOOO:PolysemousTraining_optimize_pq_for_hamming",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
30818 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30819 if (!SWIG_IsOK(res1)) {
30820 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "1"" of type '" "faiss::PolysemousTraining const *""'");
30821 }
30822 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30823 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__ProductQuantizer, 0 );
30824 if (!SWIG_IsOK(res2)) {
30825 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
30826 }
30827 if (!argp2) {
30828 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
30829 }
30830 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
30831 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
30832 if (!SWIG_IsOK(ecode3)) {
30833 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "3"" of type '" "size_t""'");
30834 }
30835 arg3 = static_cast< size_t >(val3);
30836 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
30837 if (!SWIG_IsOK(res4)) {
30838 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "PolysemousTraining_optimize_pq_for_hamming" "', argument " "4"" of type '" "float const *""'");
30839 }
30840 arg4 = reinterpret_cast< float * >(argp4);
30841 {
30842 Py_BEGIN_ALLOW_THREADS
30843 try {
30844 ((faiss::PolysemousTraining const *)arg1)->optimize_pq_for_hamming(*arg2,arg3,(float const *)arg4);
30845 } catch(faiss::FaissException & e) {
30846 PyEval_RestoreThread(_save);
30847 PyErr_SetString(PyExc_RuntimeError, e.what());
30848 SWIG_fail;
30849 }
30850 Py_END_ALLOW_THREADS
30851 }
30852 resultobj = SWIG_Py_Void();
30853 return resultobj;
30854 fail:
30855 return NULL;
30856 }
30857
30858
30859 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimize_ranking(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30860 PyObject *resultobj = 0;
30861 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30862 faiss::ProductQuantizer *arg2 = 0 ;
30863 size_t arg3 ;
30864 float *arg4 = (float *) 0 ;
30865 void *argp1 = 0 ;
30866 int res1 = 0 ;
30867 void *argp2 = 0 ;
30868 int res2 = 0 ;
30869 size_t val3 ;
30870 int ecode3 = 0 ;
30871 void *argp4 = 0 ;
30872 int res4 = 0 ;
30873 PyObject * obj0 = 0 ;
30874 PyObject * obj1 = 0 ;
30875 PyObject * obj2 = 0 ;
30876 PyObject * obj3 = 0 ;
30877
30878 if (!PyArg_ParseTuple(args,(char *)"OOOO:PolysemousTraining_optimize_ranking",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
30879 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30880 if (!SWIG_IsOK(res1)) {
30881 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimize_ranking" "', argument " "1"" of type '" "faiss::PolysemousTraining const *""'");
30882 }
30883 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30884 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__ProductQuantizer, 0 );
30885 if (!SWIG_IsOK(res2)) {
30886 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolysemousTraining_optimize_ranking" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
30887 }
30888 if (!argp2) {
30889 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolysemousTraining_optimize_ranking" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
30890 }
30891 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
30892 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
30893 if (!SWIG_IsOK(ecode3)) {
30894 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "PolysemousTraining_optimize_ranking" "', argument " "3"" of type '" "size_t""'");
30895 }
30896 arg3 = static_cast< size_t >(val3);
30897 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
30898 if (!SWIG_IsOK(res4)) {
30899 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "PolysemousTraining_optimize_ranking" "', argument " "4"" of type '" "float const *""'");
30900 }
30901 arg4 = reinterpret_cast< float * >(argp4);
30902 {
30903 Py_BEGIN_ALLOW_THREADS
30904 try {
30905 ((faiss::PolysemousTraining const *)arg1)->optimize_ranking(*arg2,arg3,(float const *)arg4);
30906 } catch(faiss::FaissException & e) {
30907 PyEval_RestoreThread(_save);
30908 PyErr_SetString(PyExc_RuntimeError, e.what());
30909 SWIG_fail;
30910 }
30911 Py_END_ALLOW_THREADS
30912 }
30913 resultobj = SWIG_Py_Void();
30914 return resultobj;
30915 fail:
30916 return NULL;
30917 }
30918
30919
30920 SWIGINTERN PyObject *_wrap_PolysemousTraining_optimize_reproduce_distances(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30921 PyObject *resultobj = 0;
30922 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30923 faiss::ProductQuantizer *arg2 = 0 ;
30924 void *argp1 = 0 ;
30925 int res1 = 0 ;
30926 void *argp2 = 0 ;
30927 int res2 = 0 ;
30928 PyObject * obj0 = 0 ;
30929 PyObject * obj1 = 0 ;
30930
30931 if (!PyArg_ParseTuple(args,(char *)"OO:PolysemousTraining_optimize_reproduce_distances",&obj0,&obj1)) SWIG_fail;
30932 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
30933 if (!SWIG_IsOK(res1)) {
30934 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "PolysemousTraining_optimize_reproduce_distances" "', argument " "1"" of type '" "faiss::PolysemousTraining const *""'");
30935 }
30936 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30937 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__ProductQuantizer, 0 );
30938 if (!SWIG_IsOK(res2)) {
30939 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "PolysemousTraining_optimize_reproduce_distances" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
30940 }
30941 if (!argp2) {
30942 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "PolysemousTraining_optimize_reproduce_distances" "', argument " "2"" of type '" "faiss::ProductQuantizer &""'");
30943 }
30944 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
30945 {
30946 Py_BEGIN_ALLOW_THREADS
30947 try {
30948 ((faiss::PolysemousTraining const *)arg1)->optimize_reproduce_distances(*arg2);
30949 } catch(faiss::FaissException & e) {
30950 PyEval_RestoreThread(_save);
30951 PyErr_SetString(PyExc_RuntimeError, e.what());
30952 SWIG_fail;
30953 }
30954 Py_END_ALLOW_THREADS
30955 }
30956 resultobj = SWIG_Py_Void();
30957 return resultobj;
30958 fail:
30959 return NULL;
30960 }
30961
30962
30963 SWIGINTERN PyObject *_wrap_delete_PolysemousTraining(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30964 PyObject *resultobj = 0;
30965 faiss::PolysemousTraining *arg1 = (faiss::PolysemousTraining *) 0 ;
30966 void *argp1 = 0 ;
30967 int res1 = 0 ;
30968 PyObject * obj0 = 0 ;
30969
30970 if (!PyArg_ParseTuple(args,(char *)"O:delete_PolysemousTraining",&obj0)) SWIG_fail;
30971 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__PolysemousTraining, SWIG_POINTER_DISOWN | 0 );
30972 if (!SWIG_IsOK(res1)) {
30973 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_PolysemousTraining" "', argument " "1"" of type '" "faiss::PolysemousTraining *""'");
30974 }
30975 arg1 = reinterpret_cast< faiss::PolysemousTraining * >(argp1);
30976 delete arg1;
30977 resultobj = SWIG_Py_Void();
30978 return resultobj;
30979 fail:
30980 return NULL;
30981 }
30982
30983
30984 SWIGINTERN PyObject *PolysemousTraining_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30985 PyObject *obj;
30986 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
30987 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__PolysemousTraining, SWIG_NewClientData(obj));
30988 return SWIG_Py_Void();
30989 }
30990
30991 SWIGINTERN PyObject *_wrap_IndexPQ_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
30992 PyObject *resultobj = 0;
30993 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
30994 faiss::ProductQuantizer *arg2 = (faiss::ProductQuantizer *) 0 ;
30995 void *argp1 = 0 ;
30996 int res1 = 0 ;
30997 void *argp2 = 0 ;
30998 int res2 = 0 ;
30999 PyObject * obj0 = 0 ;
31000 PyObject * obj1 = 0 ;
31001
31002 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_pq_set",&obj0,&obj1)) SWIG_fail;
31003 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31004 if (!SWIG_IsOK(res1)) {
31005 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_pq_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31006 }
31007 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31008 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
31009 if (!SWIG_IsOK(res2)) {
31010 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPQ_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
31011 }
31012 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
31013 if (arg1) (arg1)->pq = *arg2;
31014 resultobj = SWIG_Py_Void();
31015 return resultobj;
31016 fail:
31017 return NULL;
31018 }
31019
31020
31021 SWIGINTERN PyObject *_wrap_IndexPQ_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31022 PyObject *resultobj = 0;
31023 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31024 void *argp1 = 0 ;
31025 int res1 = 0 ;
31026 PyObject * obj0 = 0 ;
31027 faiss::ProductQuantizer *result = 0 ;
31028
31029 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_pq_get",&obj0)) SWIG_fail;
31030 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31031 if (!SWIG_IsOK(res1)) {
31032 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_pq_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31033 }
31034 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31035 result = (faiss::ProductQuantizer *)& ((arg1)->pq);
31036 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
31037 return resultobj;
31038 fail:
31039 return NULL;
31040 }
31041
31042
31043 SWIGINTERN PyObject *_wrap_IndexPQ_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31044 PyObject *resultobj = 0;
31045 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31046 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
31047 void *argp1 = 0 ;
31048 int res1 = 0 ;
31049 void *argp2 = 0 ;
31050 int res2 = 0 ;
31051 PyObject * obj0 = 0 ;
31052 PyObject * obj1 = 0 ;
31053
31054 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_codes_set",&obj0,&obj1)) SWIG_fail;
31055 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31056 if (!SWIG_IsOK(res1)) {
31057 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_codes_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31058 }
31059 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31060 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
31061 if (!SWIG_IsOK(res2)) {
31062 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPQ_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
31063 }
31064 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
31065 if (arg1) (arg1)->codes = *arg2;
31066 resultobj = SWIG_Py_Void();
31067 return resultobj;
31068 fail:
31069 return NULL;
31070 }
31071
31072
31073 SWIGINTERN PyObject *_wrap_IndexPQ_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31074 PyObject *resultobj = 0;
31075 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31076 void *argp1 = 0 ;
31077 int res1 = 0 ;
31078 PyObject * obj0 = 0 ;
31079 std::vector< uint8_t > *result = 0 ;
31080
31081 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_codes_get",&obj0)) SWIG_fail;
31082 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31083 if (!SWIG_IsOK(res1)) {
31084 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_codes_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31085 }
31086 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31087 result = (std::vector< uint8_t > *)& ((arg1)->codes);
31088 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
31089 return resultobj;
31090 fail:
31091 return NULL;
31092 }
31093
31094
31095 SWIGINTERN PyObject *_wrap_new_IndexPQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31096 PyObject *resultobj = 0;
31097 int arg1 ;
31098 size_t arg2 ;
31099 size_t arg3 ;
31100 faiss::MetricType arg4 ;
31101 int val1 ;
31102 int ecode1 = 0 ;
31103 size_t val2 ;
31104 int ecode2 = 0 ;
31105 size_t val3 ;
31106 int ecode3 = 0 ;
31107 int val4 ;
31108 int ecode4 = 0 ;
31109 PyObject * obj0 = 0 ;
31110 PyObject * obj1 = 0 ;
31111 PyObject * obj2 = 0 ;
31112 PyObject * obj3 = 0 ;
31113 faiss::IndexPQ *result = 0 ;
31114
31115 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexPQ",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
31116 ecode1 = SWIG_AsVal_int(obj0, &val1);
31117 if (!SWIG_IsOK(ecode1)) {
31118 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexPQ" "', argument " "1"" of type '" "int""'");
31119 }
31120 arg1 = static_cast< int >(val1);
31121 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
31122 if (!SWIG_IsOK(ecode2)) {
31123 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexPQ" "', argument " "2"" of type '" "size_t""'");
31124 }
31125 arg2 = static_cast< size_t >(val2);
31126 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
31127 if (!SWIG_IsOK(ecode3)) {
31128 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexPQ" "', argument " "3"" of type '" "size_t""'");
31129 }
31130 arg3 = static_cast< size_t >(val3);
31131 ecode4 = SWIG_AsVal_int(obj3, &val4);
31132 if (!SWIG_IsOK(ecode4)) {
31133 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexPQ" "', argument " "4"" of type '" "faiss::MetricType""'");
31134 }
31135 arg4 = static_cast< faiss::MetricType >(val4);
31136 {
31137 Py_BEGIN_ALLOW_THREADS
31138 try {
31139 result = (faiss::IndexPQ *)new faiss::IndexPQ(arg1,arg2,arg3,arg4);
31140 } catch(faiss::FaissException & e) {
31141 PyEval_RestoreThread(_save);
31142 PyErr_SetString(PyExc_RuntimeError, e.what());
31143 SWIG_fail;
31144 }
31145 Py_END_ALLOW_THREADS
31146 }
31147 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPQ, SWIG_POINTER_NEW | 0 );
31148 return resultobj;
31149 fail:
31150 return NULL;
31151 }
31152
31153
31154 SWIGINTERN PyObject *_wrap_new_IndexPQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31155 PyObject *resultobj = 0;
31156 int arg1 ;
31157 size_t arg2 ;
31158 size_t arg3 ;
31159 int val1 ;
31160 int ecode1 = 0 ;
31161 size_t val2 ;
31162 int ecode2 = 0 ;
31163 size_t val3 ;
31164 int ecode3 = 0 ;
31165 PyObject * obj0 = 0 ;
31166 PyObject * obj1 = 0 ;
31167 PyObject * obj2 = 0 ;
31168 faiss::IndexPQ *result = 0 ;
31169
31170 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexPQ",&obj0,&obj1,&obj2)) SWIG_fail;
31171 ecode1 = SWIG_AsVal_int(obj0, &val1);
31172 if (!SWIG_IsOK(ecode1)) {
31173 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexPQ" "', argument " "1"" of type '" "int""'");
31174 }
31175 arg1 = static_cast< int >(val1);
31176 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
31177 if (!SWIG_IsOK(ecode2)) {
31178 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexPQ" "', argument " "2"" of type '" "size_t""'");
31179 }
31180 arg2 = static_cast< size_t >(val2);
31181 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
31182 if (!SWIG_IsOK(ecode3)) {
31183 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexPQ" "', argument " "3"" of type '" "size_t""'");
31184 }
31185 arg3 = static_cast< size_t >(val3);
31186 {
31187 Py_BEGIN_ALLOW_THREADS
31188 try {
31189 result = (faiss::IndexPQ *)new faiss::IndexPQ(arg1,arg2,arg3);
31190 } catch(faiss::FaissException & e) {
31191 PyEval_RestoreThread(_save);
31192 PyErr_SetString(PyExc_RuntimeError, e.what());
31193 SWIG_fail;
31194 }
31195 Py_END_ALLOW_THREADS
31196 }
31197 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPQ, SWIG_POINTER_NEW | 0 );
31198 return resultobj;
31199 fail:
31200 return NULL;
31201 }
31202
31203
31204 SWIGINTERN PyObject *_wrap_new_IndexPQ__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31205 PyObject *resultobj = 0;
31206 faiss::IndexPQ *result = 0 ;
31207
31208 if (!PyArg_ParseTuple(args,(char *)":new_IndexPQ")) SWIG_fail;
31209 {
31210 Py_BEGIN_ALLOW_THREADS
31211 try {
31212 result = (faiss::IndexPQ *)new faiss::IndexPQ();
31213 } catch(faiss::FaissException & e) {
31214 PyEval_RestoreThread(_save);
31215 PyErr_SetString(PyExc_RuntimeError, e.what());
31216 SWIG_fail;
31217 }
31218 Py_END_ALLOW_THREADS
31219 }
31220 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPQ, SWIG_POINTER_NEW | 0 );
31221 return resultobj;
31222 fail:
31223 return NULL;
31224 }
31225
31226
31227 SWIGINTERN PyObject *_wrap_new_IndexPQ(PyObject *self, PyObject *args) {
31228 Py_ssize_t argc;
31229 PyObject *argv[5] = {
31230 0
31231 };
31232 Py_ssize_t ii;
31233
31234 if (!PyTuple_Check(args)) SWIG_fail;
31235 argc = args ? PyObject_Length(args) : 0;
31236 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
31237 argv[ii] = PyTuple_GET_ITEM(args,ii);
31238 }
31239 if (argc == 0) {
31240 return _wrap_new_IndexPQ__SWIG_2(self, args);
31241 }
31242 if (argc == 3) {
31243 int _v;
31244 {
31245 int res = SWIG_AsVal_int(argv[0], NULL);
31246 _v = SWIG_CheckState(res);
31247 }
31248 if (_v) {
31249 {
31250 int res = SWIG_AsVal_size_t(argv[1], NULL);
31251 _v = SWIG_CheckState(res);
31252 }
31253 if (_v) {
31254 {
31255 int res = SWIG_AsVal_size_t(argv[2], NULL);
31256 _v = SWIG_CheckState(res);
31257 }
31258 if (_v) {
31259 return _wrap_new_IndexPQ__SWIG_1(self, args);
31260 }
31261 }
31262 }
31263 }
31264 if (argc == 4) {
31265 int _v;
31266 {
31267 int res = SWIG_AsVal_int(argv[0], NULL);
31268 _v = SWIG_CheckState(res);
31269 }
31270 if (_v) {
31271 {
31272 int res = SWIG_AsVal_size_t(argv[1], NULL);
31273 _v = SWIG_CheckState(res);
31274 }
31275 if (_v) {
31276 {
31277 int res = SWIG_AsVal_size_t(argv[2], NULL);
31278 _v = SWIG_CheckState(res);
31279 }
31280 if (_v) {
31281 {
31282 int res = SWIG_AsVal_int(argv[3], NULL);
31283 _v = SWIG_CheckState(res);
31284 }
31285 if (_v) {
31286 return _wrap_new_IndexPQ__SWIG_0(self, args);
31287 }
31288 }
31289 }
31290 }
31291 }
31292
31293 fail:
31294 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexPQ'.\n"
31295 " Possible C/C++ prototypes are:\n"
31296 " faiss::IndexPQ::IndexPQ(int,size_t,size_t,faiss::MetricType)\n"
31297 " faiss::IndexPQ::IndexPQ(int,size_t,size_t)\n"
31298 " faiss::IndexPQ::IndexPQ()\n");
31299 return 0;
31300 }
31301
31302
31303 SWIGINTERN PyObject *_wrap_IndexPQ_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31304 PyObject *resultobj = 0;
31305 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31306 faiss::Index::idx_t arg2 ;
31307 float *arg3 = (float *) 0 ;
31308 void *argp1 = 0 ;
31309 int res1 = 0 ;
31310 long val2 ;
31311 int ecode2 = 0 ;
31312 void *argp3 = 0 ;
31313 int res3 = 0 ;
31314 PyObject * obj0 = 0 ;
31315 PyObject * obj1 = 0 ;
31316 PyObject * obj2 = 0 ;
31317
31318 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPQ_train",&obj0,&obj1,&obj2)) SWIG_fail;
31319 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31320 if (!SWIG_IsOK(res1)) {
31321 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_train" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31322 }
31323 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31324 ecode2 = SWIG_AsVal_long(obj1, &val2);
31325 if (!SWIG_IsOK(ecode2)) {
31326 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
31327 }
31328 arg2 = static_cast< faiss::Index::idx_t >(val2);
31329 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
31330 if (!SWIG_IsOK(res3)) {
31331 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_train" "', argument " "3"" of type '" "float const *""'");
31332 }
31333 arg3 = reinterpret_cast< float * >(argp3);
31334 {
31335 Py_BEGIN_ALLOW_THREADS
31336 try {
31337 (arg1)->train(arg2,(float const *)arg3);
31338 } catch(faiss::FaissException & e) {
31339 PyEval_RestoreThread(_save);
31340 PyErr_SetString(PyExc_RuntimeError, e.what());
31341 SWIG_fail;
31342 }
31343 Py_END_ALLOW_THREADS
31344 }
31345 resultobj = SWIG_Py_Void();
31346 return resultobj;
31347 fail:
31348 return NULL;
31349 }
31350
31351
31352 SWIGINTERN PyObject *_wrap_IndexPQ_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31353 PyObject *resultobj = 0;
31354 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31355 faiss::Index::idx_t arg2 ;
31356 float *arg3 = (float *) 0 ;
31357 void *argp1 = 0 ;
31358 int res1 = 0 ;
31359 long val2 ;
31360 int ecode2 = 0 ;
31361 void *argp3 = 0 ;
31362 int res3 = 0 ;
31363 PyObject * obj0 = 0 ;
31364 PyObject * obj1 = 0 ;
31365 PyObject * obj2 = 0 ;
31366
31367 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPQ_add",&obj0,&obj1,&obj2)) SWIG_fail;
31368 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31369 if (!SWIG_IsOK(res1)) {
31370 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_add" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31371 }
31372 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31373 ecode2 = SWIG_AsVal_long(obj1, &val2);
31374 if (!SWIG_IsOK(ecode2)) {
31375 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
31376 }
31377 arg2 = static_cast< faiss::Index::idx_t >(val2);
31378 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
31379 if (!SWIG_IsOK(res3)) {
31380 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_add" "', argument " "3"" of type '" "float const *""'");
31381 }
31382 arg3 = reinterpret_cast< float * >(argp3);
31383 {
31384 Py_BEGIN_ALLOW_THREADS
31385 try {
31386 (arg1)->add(arg2,(float const *)arg3);
31387 } catch(faiss::FaissException & e) {
31388 PyEval_RestoreThread(_save);
31389 PyErr_SetString(PyExc_RuntimeError, e.what());
31390 SWIG_fail;
31391 }
31392 Py_END_ALLOW_THREADS
31393 }
31394 resultobj = SWIG_Py_Void();
31395 return resultobj;
31396 fail:
31397 return NULL;
31398 }
31399
31400
31401 SWIGINTERN PyObject *_wrap_IndexPQ_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31402 PyObject *resultobj = 0;
31403 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31404 faiss::Index::idx_t arg2 ;
31405 float *arg3 = (float *) 0 ;
31406 faiss::Index::idx_t arg4 ;
31407 float *arg5 = (float *) 0 ;
31408 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
31409 void *argp1 = 0 ;
31410 int res1 = 0 ;
31411 long val2 ;
31412 int ecode2 = 0 ;
31413 void *argp3 = 0 ;
31414 int res3 = 0 ;
31415 long val4 ;
31416 int ecode4 = 0 ;
31417 void *argp5 = 0 ;
31418 int res5 = 0 ;
31419 void *argp6 = 0 ;
31420 int res6 = 0 ;
31421 PyObject * obj0 = 0 ;
31422 PyObject * obj1 = 0 ;
31423 PyObject * obj2 = 0 ;
31424 PyObject * obj3 = 0 ;
31425 PyObject * obj4 = 0 ;
31426 PyObject * obj5 = 0 ;
31427
31428 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexPQ_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
31429 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31430 if (!SWIG_IsOK(res1)) {
31431 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_search" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
31432 }
31433 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31434 ecode2 = SWIG_AsVal_long(obj1, &val2);
31435 if (!SWIG_IsOK(ecode2)) {
31436 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
31437 }
31438 arg2 = static_cast< faiss::Index::idx_t >(val2);
31439 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
31440 if (!SWIG_IsOK(res3)) {
31441 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_search" "', argument " "3"" of type '" "float const *""'");
31442 }
31443 arg3 = reinterpret_cast< float * >(argp3);
31444 ecode4 = SWIG_AsVal_long(obj3, &val4);
31445 if (!SWIG_IsOK(ecode4)) {
31446 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPQ_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
31447 }
31448 arg4 = static_cast< faiss::Index::idx_t >(val4);
31449 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
31450 if (!SWIG_IsOK(res5)) {
31451 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPQ_search" "', argument " "5"" of type '" "float *""'");
31452 }
31453 arg5 = reinterpret_cast< float * >(argp5);
31454 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
31455 if (!SWIG_IsOK(res6)) {
31456 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPQ_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
31457 }
31458 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
31459 {
31460 Py_BEGIN_ALLOW_THREADS
31461 try {
31462 ((faiss::IndexPQ const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
31463 } catch(faiss::FaissException & e) {
31464 PyEval_RestoreThread(_save);
31465 PyErr_SetString(PyExc_RuntimeError, e.what());
31466 SWIG_fail;
31467 }
31468 Py_END_ALLOW_THREADS
31469 }
31470 resultobj = SWIG_Py_Void();
31471 return resultobj;
31472 fail:
31473 return NULL;
31474 }
31475
31476
31477 SWIGINTERN PyObject *_wrap_IndexPQ_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31478 PyObject *resultobj = 0;
31479 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31480 void *argp1 = 0 ;
31481 int res1 = 0 ;
31482 PyObject * obj0 = 0 ;
31483
31484 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_reset",&obj0)) SWIG_fail;
31485 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31486 if (!SWIG_IsOK(res1)) {
31487 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_reset" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31488 }
31489 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31490 {
31491 Py_BEGIN_ALLOW_THREADS
31492 try {
31493 (arg1)->reset();
31494 } catch(faiss::FaissException & e) {
31495 PyEval_RestoreThread(_save);
31496 PyErr_SetString(PyExc_RuntimeError, e.what());
31497 SWIG_fail;
31498 }
31499 Py_END_ALLOW_THREADS
31500 }
31501 resultobj = SWIG_Py_Void();
31502 return resultobj;
31503 fail:
31504 return NULL;
31505 }
31506
31507
31508 SWIGINTERN PyObject *_wrap_IndexPQ_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31509 PyObject *resultobj = 0;
31510 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31511 faiss::Index::idx_t arg2 ;
31512 faiss::Index::idx_t arg3 ;
31513 float *arg4 = (float *) 0 ;
31514 void *argp1 = 0 ;
31515 int res1 = 0 ;
31516 long val2 ;
31517 int ecode2 = 0 ;
31518 long val3 ;
31519 int ecode3 = 0 ;
31520 void *argp4 = 0 ;
31521 int res4 = 0 ;
31522 PyObject * obj0 = 0 ;
31523 PyObject * obj1 = 0 ;
31524 PyObject * obj2 = 0 ;
31525 PyObject * obj3 = 0 ;
31526
31527 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPQ_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
31528 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31529 if (!SWIG_IsOK(res1)) {
31530 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
31531 }
31532 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31533 ecode2 = SWIG_AsVal_long(obj1, &val2);
31534 if (!SWIG_IsOK(ecode2)) {
31535 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
31536 }
31537 arg2 = static_cast< faiss::Index::idx_t >(val2);
31538 ecode3 = SWIG_AsVal_long(obj2, &val3);
31539 if (!SWIG_IsOK(ecode3)) {
31540 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexPQ_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
31541 }
31542 arg3 = static_cast< faiss::Index::idx_t >(val3);
31543 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
31544 if (!SWIG_IsOK(res4)) {
31545 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPQ_reconstruct_n" "', argument " "4"" of type '" "float *""'");
31546 }
31547 arg4 = reinterpret_cast< float * >(argp4);
31548 {
31549 Py_BEGIN_ALLOW_THREADS
31550 try {
31551 ((faiss::IndexPQ const *)arg1)->reconstruct_n(arg2,arg3,arg4);
31552 } catch(faiss::FaissException & e) {
31553 PyEval_RestoreThread(_save);
31554 PyErr_SetString(PyExc_RuntimeError, e.what());
31555 SWIG_fail;
31556 }
31557 Py_END_ALLOW_THREADS
31558 }
31559 resultobj = SWIG_Py_Void();
31560 return resultobj;
31561 fail:
31562 return NULL;
31563 }
31564
31565
31566 SWIGINTERN PyObject *_wrap_IndexPQ_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31567 PyObject *resultobj = 0;
31568 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31569 faiss::Index::idx_t arg2 ;
31570 float *arg3 = (float *) 0 ;
31571 void *argp1 = 0 ;
31572 int res1 = 0 ;
31573 long val2 ;
31574 int ecode2 = 0 ;
31575 void *argp3 = 0 ;
31576 int res3 = 0 ;
31577 PyObject * obj0 = 0 ;
31578 PyObject * obj1 = 0 ;
31579 PyObject * obj2 = 0 ;
31580
31581 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexPQ_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
31582 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31583 if (!SWIG_IsOK(res1)) {
31584 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_reconstruct" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
31585 }
31586 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31587 ecode2 = SWIG_AsVal_long(obj1, &val2);
31588 if (!SWIG_IsOK(ecode2)) {
31589 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
31590 }
31591 arg2 = static_cast< faiss::Index::idx_t >(val2);
31592 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
31593 if (!SWIG_IsOK(res3)) {
31594 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_reconstruct" "', argument " "3"" of type '" "float *""'");
31595 }
31596 arg3 = reinterpret_cast< float * >(argp3);
31597 {
31598 Py_BEGIN_ALLOW_THREADS
31599 try {
31600 ((faiss::IndexPQ const *)arg1)->reconstruct(arg2,arg3);
31601 } catch(faiss::FaissException & e) {
31602 PyEval_RestoreThread(_save);
31603 PyErr_SetString(PyExc_RuntimeError, e.what());
31604 SWIG_fail;
31605 }
31606 Py_END_ALLOW_THREADS
31607 }
31608 resultobj = SWIG_Py_Void();
31609 return resultobj;
31610 fail:
31611 return NULL;
31612 }
31613
31614
31615 SWIGINTERN PyObject *_wrap_IndexPQ_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31616 PyObject *resultobj = 0;
31617 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31618 faiss::IDSelector *arg2 = 0 ;
31619 void *argp1 = 0 ;
31620 int res1 = 0 ;
31621 void *argp2 = 0 ;
31622 int res2 = 0 ;
31623 PyObject * obj0 = 0 ;
31624 PyObject * obj1 = 0 ;
31625 long result;
31626
31627 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_remove_ids",&obj0,&obj1)) SWIG_fail;
31628 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31629 if (!SWIG_IsOK(res1)) {
31630 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_remove_ids" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31631 }
31632 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31633 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
31634 if (!SWIG_IsOK(res2)) {
31635 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPQ_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
31636 }
31637 if (!argp2) {
31638 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexPQ_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
31639 }
31640 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
31641 {
31642 Py_BEGIN_ALLOW_THREADS
31643 try {
31644 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
31645 } catch(faiss::FaissException & e) {
31646 PyEval_RestoreThread(_save);
31647 PyErr_SetString(PyExc_RuntimeError, e.what());
31648 SWIG_fail;
31649 }
31650 Py_END_ALLOW_THREADS
31651 }
31652 resultobj = SWIG_From_long(static_cast< long >(result));
31653 return resultobj;
31654 fail:
31655 return NULL;
31656 }
31657
31658
31659 SWIGINTERN PyObject *_wrap_IndexPQ_do_polysemous_training_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31660 PyObject *resultobj = 0;
31661 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31662 bool arg2 ;
31663 void *argp1 = 0 ;
31664 int res1 = 0 ;
31665 bool val2 ;
31666 int ecode2 = 0 ;
31667 PyObject * obj0 = 0 ;
31668 PyObject * obj1 = 0 ;
31669
31670 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_do_polysemous_training_set",&obj0,&obj1)) SWIG_fail;
31671 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31672 if (!SWIG_IsOK(res1)) {
31673 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_do_polysemous_training_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31674 }
31675 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31676 ecode2 = SWIG_AsVal_bool(obj1, &val2);
31677 if (!SWIG_IsOK(ecode2)) {
31678 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_do_polysemous_training_set" "', argument " "2"" of type '" "bool""'");
31679 }
31680 arg2 = static_cast< bool >(val2);
31681 if (arg1) (arg1)->do_polysemous_training = arg2;
31682 resultobj = SWIG_Py_Void();
31683 return resultobj;
31684 fail:
31685 return NULL;
31686 }
31687
31688
31689 SWIGINTERN PyObject *_wrap_IndexPQ_do_polysemous_training_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31690 PyObject *resultobj = 0;
31691 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31692 void *argp1 = 0 ;
31693 int res1 = 0 ;
31694 PyObject * obj0 = 0 ;
31695 bool result;
31696
31697 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_do_polysemous_training_get",&obj0)) SWIG_fail;
31698 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31699 if (!SWIG_IsOK(res1)) {
31700 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_do_polysemous_training_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31701 }
31702 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31703 result = (bool) ((arg1)->do_polysemous_training);
31704 resultobj = SWIG_From_bool(static_cast< bool >(result));
31705 return resultobj;
31706 fail:
31707 return NULL;
31708 }
31709
31710
31711 SWIGINTERN PyObject *_wrap_IndexPQ_polysemous_training_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31712 PyObject *resultobj = 0;
31713 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31714 faiss::PolysemousTraining *arg2 = (faiss::PolysemousTraining *) 0 ;
31715 void *argp1 = 0 ;
31716 int res1 = 0 ;
31717 void *argp2 = 0 ;
31718 int res2 = 0 ;
31719 PyObject * obj0 = 0 ;
31720 PyObject * obj1 = 0 ;
31721
31722 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_polysemous_training_set",&obj0,&obj1)) SWIG_fail;
31723 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31724 if (!SWIG_IsOK(res1)) {
31725 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_polysemous_training_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31726 }
31727 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31728 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
31729 if (!SWIG_IsOK(res2)) {
31730 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexPQ_polysemous_training_set" "', argument " "2"" of type '" "faiss::PolysemousTraining *""'");
31731 }
31732 arg2 = reinterpret_cast< faiss::PolysemousTraining * >(argp2);
31733 if (arg1) (arg1)->polysemous_training = *arg2;
31734 resultobj = SWIG_Py_Void();
31735 return resultobj;
31736 fail:
31737 return NULL;
31738 }
31739
31740
31741 SWIGINTERN PyObject *_wrap_IndexPQ_polysemous_training_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31742 PyObject *resultobj = 0;
31743 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31744 void *argp1 = 0 ;
31745 int res1 = 0 ;
31746 PyObject * obj0 = 0 ;
31747 faiss::PolysemousTraining *result = 0 ;
31748
31749 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_polysemous_training_get",&obj0)) SWIG_fail;
31750 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31751 if (!SWIG_IsOK(res1)) {
31752 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_polysemous_training_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31753 }
31754 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31755 result = (faiss::PolysemousTraining *)& ((arg1)->polysemous_training);
31756 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
31757 return resultobj;
31758 fail:
31759 return NULL;
31760 }
31761
31762
31763 SWIGINTERN PyObject *_wrap_IndexPQ_search_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31764 PyObject *resultobj = 0;
31765 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31766 faiss::IndexPQ::Search_type_t arg2 ;
31767 void *argp1 = 0 ;
31768 int res1 = 0 ;
31769 int val2 ;
31770 int ecode2 = 0 ;
31771 PyObject * obj0 = 0 ;
31772 PyObject * obj1 = 0 ;
31773
31774 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_search_type_set",&obj0,&obj1)) SWIG_fail;
31775 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31776 if (!SWIG_IsOK(res1)) {
31777 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_search_type_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31778 }
31779 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31780 ecode2 = SWIG_AsVal_int(obj1, &val2);
31781 if (!SWIG_IsOK(ecode2)) {
31782 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_search_type_set" "', argument " "2"" of type '" "faiss::IndexPQ::Search_type_t""'");
31783 }
31784 arg2 = static_cast< faiss::IndexPQ::Search_type_t >(val2);
31785 if (arg1) (arg1)->search_type = arg2;
31786 resultobj = SWIG_Py_Void();
31787 return resultobj;
31788 fail:
31789 return NULL;
31790 }
31791
31792
31793 SWIGINTERN PyObject *_wrap_IndexPQ_search_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31794 PyObject *resultobj = 0;
31795 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31796 void *argp1 = 0 ;
31797 int res1 = 0 ;
31798 PyObject * obj0 = 0 ;
31799 faiss::IndexPQ::Search_type_t result;
31800
31801 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_search_type_get",&obj0)) SWIG_fail;
31802 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31803 if (!SWIG_IsOK(res1)) {
31804 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_search_type_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31805 }
31806 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31807 result = (faiss::IndexPQ::Search_type_t) ((arg1)->search_type);
31808 resultobj = SWIG_From_int(static_cast< int >(result));
31809 return resultobj;
31810 fail:
31811 return NULL;
31812 }
31813
31814
31815 SWIGINTERN PyObject *_wrap_IndexPQ_encode_signs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31816 PyObject *resultobj = 0;
31817 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31818 bool arg2 ;
31819 void *argp1 = 0 ;
31820 int res1 = 0 ;
31821 bool val2 ;
31822 int ecode2 = 0 ;
31823 PyObject * obj0 = 0 ;
31824 PyObject * obj1 = 0 ;
31825
31826 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_encode_signs_set",&obj0,&obj1)) SWIG_fail;
31827 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31828 if (!SWIG_IsOK(res1)) {
31829 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_encode_signs_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31830 }
31831 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31832 ecode2 = SWIG_AsVal_bool(obj1, &val2);
31833 if (!SWIG_IsOK(ecode2)) {
31834 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_encode_signs_set" "', argument " "2"" of type '" "bool""'");
31835 }
31836 arg2 = static_cast< bool >(val2);
31837 if (arg1) (arg1)->encode_signs = arg2;
31838 resultobj = SWIG_Py_Void();
31839 return resultobj;
31840 fail:
31841 return NULL;
31842 }
31843
31844
31845 SWIGINTERN PyObject *_wrap_IndexPQ_encode_signs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31846 PyObject *resultobj = 0;
31847 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31848 void *argp1 = 0 ;
31849 int res1 = 0 ;
31850 PyObject * obj0 = 0 ;
31851 bool result;
31852
31853 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_encode_signs_get",&obj0)) SWIG_fail;
31854 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31855 if (!SWIG_IsOK(res1)) {
31856 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_encode_signs_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31857 }
31858 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31859 result = (bool) ((arg1)->encode_signs);
31860 resultobj = SWIG_From_bool(static_cast< bool >(result));
31861 return resultobj;
31862 fail:
31863 return NULL;
31864 }
31865
31866
31867 SWIGINTERN PyObject *_wrap_IndexPQ_polysemous_ht_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31868 PyObject *resultobj = 0;
31869 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31870 int arg2 ;
31871 void *argp1 = 0 ;
31872 int res1 = 0 ;
31873 int val2 ;
31874 int ecode2 = 0 ;
31875 PyObject * obj0 = 0 ;
31876 PyObject * obj1 = 0 ;
31877
31878 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQ_polysemous_ht_set",&obj0,&obj1)) SWIG_fail;
31879 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31880 if (!SWIG_IsOK(res1)) {
31881 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_polysemous_ht_set" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31882 }
31883 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31884 ecode2 = SWIG_AsVal_int(obj1, &val2);
31885 if (!SWIG_IsOK(ecode2)) {
31886 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_polysemous_ht_set" "', argument " "2"" of type '" "int""'");
31887 }
31888 arg2 = static_cast< int >(val2);
31889 if (arg1) (arg1)->polysemous_ht = arg2;
31890 resultobj = SWIG_Py_Void();
31891 return resultobj;
31892 fail:
31893 return NULL;
31894 }
31895
31896
31897 SWIGINTERN PyObject *_wrap_IndexPQ_polysemous_ht_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31898 PyObject *resultobj = 0;
31899 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31900 void *argp1 = 0 ;
31901 int res1 = 0 ;
31902 PyObject * obj0 = 0 ;
31903 int result;
31904
31905 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQ_polysemous_ht_get",&obj0)) SWIG_fail;
31906 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31907 if (!SWIG_IsOK(res1)) {
31908 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_polysemous_ht_get" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
31909 }
31910 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31911 result = (int) ((arg1)->polysemous_ht);
31912 resultobj = SWIG_From_int(static_cast< int >(result));
31913 return resultobj;
31914 fail:
31915 return NULL;
31916 }
31917
31918
31919 SWIGINTERN PyObject *_wrap_IndexPQ_search_core_polysemous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31920 PyObject *resultobj = 0;
31921 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31922 faiss::Index::idx_t arg2 ;
31923 float *arg3 = (float *) 0 ;
31924 faiss::Index::idx_t arg4 ;
31925 float *arg5 = (float *) 0 ;
31926 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
31927 void *argp1 = 0 ;
31928 int res1 = 0 ;
31929 long val2 ;
31930 int ecode2 = 0 ;
31931 void *argp3 = 0 ;
31932 int res3 = 0 ;
31933 long val4 ;
31934 int ecode4 = 0 ;
31935 void *argp5 = 0 ;
31936 int res5 = 0 ;
31937 void *argp6 = 0 ;
31938 int res6 = 0 ;
31939 PyObject * obj0 = 0 ;
31940 PyObject * obj1 = 0 ;
31941 PyObject * obj2 = 0 ;
31942 PyObject * obj3 = 0 ;
31943 PyObject * obj4 = 0 ;
31944 PyObject * obj5 = 0 ;
31945
31946 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexPQ_search_core_polysemous",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
31947 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
31948 if (!SWIG_IsOK(res1)) {
31949 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_search_core_polysemous" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
31950 }
31951 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
31952 ecode2 = SWIG_AsVal_long(obj1, &val2);
31953 if (!SWIG_IsOK(ecode2)) {
31954 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_search_core_polysemous" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
31955 }
31956 arg2 = static_cast< faiss::Index::idx_t >(val2);
31957 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
31958 if (!SWIG_IsOK(res3)) {
31959 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_search_core_polysemous" "', argument " "3"" of type '" "float const *""'");
31960 }
31961 arg3 = reinterpret_cast< float * >(argp3);
31962 ecode4 = SWIG_AsVal_long(obj3, &val4);
31963 if (!SWIG_IsOK(ecode4)) {
31964 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPQ_search_core_polysemous" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
31965 }
31966 arg4 = static_cast< faiss::Index::idx_t >(val4);
31967 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
31968 if (!SWIG_IsOK(res5)) {
31969 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPQ_search_core_polysemous" "', argument " "5"" of type '" "float *""'");
31970 }
31971 arg5 = reinterpret_cast< float * >(argp5);
31972 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
31973 if (!SWIG_IsOK(res6)) {
31974 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPQ_search_core_polysemous" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
31975 }
31976 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
31977 {
31978 Py_BEGIN_ALLOW_THREADS
31979 try {
31980 ((faiss::IndexPQ const *)arg1)->search_core_polysemous(arg2,(float const *)arg3,arg4,arg5,arg6);
31981 } catch(faiss::FaissException & e) {
31982 PyEval_RestoreThread(_save);
31983 PyErr_SetString(PyExc_RuntimeError, e.what());
31984 SWIG_fail;
31985 }
31986 Py_END_ALLOW_THREADS
31987 }
31988 resultobj = SWIG_Py_Void();
31989 return resultobj;
31990 fail:
31991 return NULL;
31992 }
31993
31994
31995 SWIGINTERN PyObject *_wrap_IndexPQ_hamming_distance_histogram(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
31996 PyObject *resultobj = 0;
31997 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
31998 faiss::Index::idx_t arg2 ;
31999 float *arg3 = (float *) 0 ;
32000 faiss::Index::idx_t arg4 ;
32001 float *arg5 = (float *) 0 ;
32002 long *arg6 = (long *) 0 ;
32003 void *argp1 = 0 ;
32004 int res1 = 0 ;
32005 long val2 ;
32006 int ecode2 = 0 ;
32007 void *argp3 = 0 ;
32008 int res3 = 0 ;
32009 long val4 ;
32010 int ecode4 = 0 ;
32011 void *argp5 = 0 ;
32012 int res5 = 0 ;
32013 void *argp6 = 0 ;
32014 int res6 = 0 ;
32015 PyObject * obj0 = 0 ;
32016 PyObject * obj1 = 0 ;
32017 PyObject * obj2 = 0 ;
32018 PyObject * obj3 = 0 ;
32019 PyObject * obj4 = 0 ;
32020 PyObject * obj5 = 0 ;
32021
32022 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexPQ_hamming_distance_histogram",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
32023 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32024 if (!SWIG_IsOK(res1)) {
32025 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32026 }
32027 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32028 ecode2 = SWIG_AsVal_long(obj1, &val2);
32029 if (!SWIG_IsOK(ecode2)) {
32030 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32031 }
32032 arg2 = static_cast< faiss::Index::idx_t >(val2);
32033 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32034 if (!SWIG_IsOK(res3)) {
32035 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "3"" of type '" "float const *""'");
32036 }
32037 arg3 = reinterpret_cast< float * >(argp3);
32038 ecode4 = SWIG_AsVal_long(obj3, &val4);
32039 if (!SWIG_IsOK(ecode4)) {
32040 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
32041 }
32042 arg4 = static_cast< faiss::Index::idx_t >(val4);
32043 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
32044 if (!SWIG_IsOK(res5)) {
32045 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "5"" of type '" "float const *""'");
32046 }
32047 arg5 = reinterpret_cast< float * >(argp5);
32048 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
32049 if (!SWIG_IsOK(res6)) {
32050 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexPQ_hamming_distance_histogram" "', argument " "6"" of type '" "long *""'");
32051 }
32052 arg6 = reinterpret_cast< long * >(argp6);
32053 {
32054 Py_BEGIN_ALLOW_THREADS
32055 try {
32056 (arg1)->hamming_distance_histogram(arg2,(float const *)arg3,arg4,(float const *)arg5,arg6);
32057 } catch(faiss::FaissException & e) {
32058 PyEval_RestoreThread(_save);
32059 PyErr_SetString(PyExc_RuntimeError, e.what());
32060 SWIG_fail;
32061 }
32062 Py_END_ALLOW_THREADS
32063 }
32064 resultobj = SWIG_Py_Void();
32065 return resultobj;
32066 fail:
32067 return NULL;
32068 }
32069
32070
32071 SWIGINTERN PyObject *_wrap_IndexPQ_hamming_distance_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32072 PyObject *resultobj = 0;
32073 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32074 faiss::Index::idx_t arg2 ;
32075 float *arg3 = (float *) 0 ;
32076 int32_t *arg4 = (int32_t *) 0 ;
32077 void *argp1 = 0 ;
32078 int res1 = 0 ;
32079 long val2 ;
32080 int ecode2 = 0 ;
32081 void *argp3 = 0 ;
32082 int res3 = 0 ;
32083 void *argp4 = 0 ;
32084 int res4 = 0 ;
32085 PyObject * obj0 = 0 ;
32086 PyObject * obj1 = 0 ;
32087 PyObject * obj2 = 0 ;
32088 PyObject * obj3 = 0 ;
32089
32090 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexPQ_hamming_distance_table",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
32091 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, 0 | 0 );
32092 if (!SWIG_IsOK(res1)) {
32093 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQ_hamming_distance_table" "', argument " "1"" of type '" "faiss::IndexPQ const *""'");
32094 }
32095 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32096 ecode2 = SWIG_AsVal_long(obj1, &val2);
32097 if (!SWIG_IsOK(ecode2)) {
32098 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQ_hamming_distance_table" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32099 }
32100 arg2 = static_cast< faiss::Index::idx_t >(val2);
32101 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32102 if (!SWIG_IsOK(res3)) {
32103 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexPQ_hamming_distance_table" "', argument " "3"" of type '" "float const *""'");
32104 }
32105 arg3 = reinterpret_cast< float * >(argp3);
32106 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
32107 if (!SWIG_IsOK(res4)) {
32108 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexPQ_hamming_distance_table" "', argument " "4"" of type '" "int32_t *""'");
32109 }
32110 arg4 = reinterpret_cast< int32_t * >(argp4);
32111 {
32112 Py_BEGIN_ALLOW_THREADS
32113 try {
32114 ((faiss::IndexPQ const *)arg1)->hamming_distance_table(arg2,(float const *)arg3,arg4);
32115 } catch(faiss::FaissException & e) {
32116 PyEval_RestoreThread(_save);
32117 PyErr_SetString(PyExc_RuntimeError, e.what());
32118 SWIG_fail;
32119 }
32120 Py_END_ALLOW_THREADS
32121 }
32122 resultobj = SWIG_Py_Void();
32123 return resultobj;
32124 fail:
32125 return NULL;
32126 }
32127
32128
32129 SWIGINTERN PyObject *_wrap_delete_IndexPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32130 PyObject *resultobj = 0;
32131 faiss::IndexPQ *arg1 = (faiss::IndexPQ *) 0 ;
32132 void *argp1 = 0 ;
32133 int res1 = 0 ;
32134 PyObject * obj0 = 0 ;
32135
32136 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexPQ",&obj0)) SWIG_fail;
32137 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQ, SWIG_POINTER_DISOWN | 0 );
32138 if (!SWIG_IsOK(res1)) {
32139 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexPQ" "', argument " "1"" of type '" "faiss::IndexPQ *""'");
32140 }
32141 arg1 = reinterpret_cast< faiss::IndexPQ * >(argp1);
32142 delete arg1;
32143 resultobj = SWIG_Py_Void();
32144 return resultobj;
32145 fail:
32146 return NULL;
32147 }
32148
32149
32150 SWIGINTERN PyObject *IndexPQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32151 PyObject *obj;
32152 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
32153 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexPQ, SWIG_NewClientData(obj));
32154 return SWIG_Py_Void();
32155 }
32156
32157 SWIGINTERN PyObject *_wrap_IndexPQStats_nq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32158 PyObject *resultobj = 0;
32159 faiss::IndexPQStats *arg1 = (faiss::IndexPQStats *) 0 ;
32160 size_t arg2 ;
32161 void *argp1 = 0 ;
32162 int res1 = 0 ;
32163 size_t val2 ;
32164 int ecode2 = 0 ;
32165 PyObject * obj0 = 0 ;
32166 PyObject * obj1 = 0 ;
32167
32168 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQStats_nq_set",&obj0,&obj1)) SWIG_fail;
32169 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
32170 if (!SWIG_IsOK(res1)) {
32171 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_nq_set" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
32172 }
32173 arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
32174 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
32175 if (!SWIG_IsOK(ecode2)) {
32176 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQStats_nq_set" "', argument " "2"" of type '" "size_t""'");
32177 }
32178 arg2 = static_cast< size_t >(val2);
32179 if (arg1) (arg1)->nq = arg2;
32180 resultobj = SWIG_Py_Void();
32181 return resultobj;
32182 fail:
32183 return NULL;
32184 }
32185
32186
32187 SWIGINTERN PyObject *_wrap_IndexPQStats_nq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32188 PyObject *resultobj = 0;
32189 faiss::IndexPQStats *arg1 = (faiss::IndexPQStats *) 0 ;
32190 void *argp1 = 0 ;
32191 int res1 = 0 ;
32192 PyObject * obj0 = 0 ;
32193 size_t result;
32194
32195 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQStats_nq_get",&obj0)) SWIG_fail;
32196 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
32197 if (!SWIG_IsOK(res1)) {
32198 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_nq_get" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
32199 }
32200 arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
32201 result = (size_t) ((arg1)->nq);
32202 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
32203 return resultobj;
32204 fail:
32205 return NULL;
32206 }
32207
32208
32209 SWIGINTERN PyObject *_wrap_IndexPQStats_ncode_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32210 PyObject *resultobj = 0;
32211 faiss::IndexPQStats *arg1 = (faiss::IndexPQStats *) 0 ;
32212 size_t arg2 ;
32213 void *argp1 = 0 ;
32214 int res1 = 0 ;
32215 size_t val2 ;
32216 int ecode2 = 0 ;
32217 PyObject * obj0 = 0 ;
32218 PyObject * obj1 = 0 ;
32219
32220 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQStats_ncode_set",&obj0,&obj1)) SWIG_fail;
32221 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
32222 if (!SWIG_IsOK(res1)) {
32223 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_ncode_set" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
32224 }
32225 arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
32226 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
32227 if (!SWIG_IsOK(ecode2)) {
32228 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQStats_ncode_set" "', argument " "2"" of type '" "size_t""'");
32229 }
32230 arg2 = static_cast< size_t >(val2);
32231 if (arg1) (arg1)->ncode = arg2;
32232 resultobj = SWIG_Py_Void();
32233 return resultobj;
32234 fail:
32235 return NULL;
32236 }
32237
32238
32239 SWIGINTERN PyObject *_wrap_IndexPQStats_ncode_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32240 PyObject *resultobj = 0;
32241 faiss::IndexPQStats *arg1 = (faiss::IndexPQStats *) 0 ;
32242 void *argp1 = 0 ;
32243 int res1 = 0 ;
32244 PyObject * obj0 = 0 ;
32245 size_t result;
32246
32247 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQStats_ncode_get",&obj0)) SWIG_fail;
32248 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
32249 if (!SWIG_IsOK(res1)) {
32250 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_ncode_get" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
32251 }
32252 arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
32253 result = (size_t) ((arg1)->ncode);
32254 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
32255 return resultobj;
32256 fail:
32257 return NULL;
32258 }
32259
32260
32261 SWIGINTERN PyObject *_wrap_IndexPQStats_n_hamming_pass_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32262 PyObject *resultobj = 0;
32263 faiss::IndexPQStats *arg1 = (faiss::IndexPQStats *) 0 ;
32264 size_t arg2 ;
32265 void *argp1 = 0 ;
32266 int res1 = 0 ;
32267 size_t val2 ;
32268 int ecode2 = 0 ;
32269 PyObject * obj0 = 0 ;
32270 PyObject * obj1 = 0 ;
32271
32272 if (!PyArg_ParseTuple(args,(char *)"OO:IndexPQStats_n_hamming_pass_set",&obj0,&obj1)) SWIG_fail;
32273 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
32274 if (!SWIG_IsOK(res1)) {
32275 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_n_hamming_pass_set" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
32276 }
32277 arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
32278 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
32279 if (!SWIG_IsOK(ecode2)) {
32280 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexPQStats_n_hamming_pass_set" "', argument " "2"" of type '" "size_t""'");
32281 }
32282 arg2 = static_cast< size_t >(val2);
32283 if (arg1) (arg1)->n_hamming_pass = arg2;
32284 resultobj = SWIG_Py_Void();
32285 return resultobj;
32286 fail:
32287 return NULL;
32288 }
32289
32290
32291 SWIGINTERN PyObject *_wrap_IndexPQStats_n_hamming_pass_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32292 PyObject *resultobj = 0;
32293 faiss::IndexPQStats *arg1 = (faiss::IndexPQStats *) 0 ;
32294 void *argp1 = 0 ;
32295 int res1 = 0 ;
32296 PyObject * obj0 = 0 ;
32297 size_t result;
32298
32299 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQStats_n_hamming_pass_get",&obj0)) SWIG_fail;
32300 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
32301 if (!SWIG_IsOK(res1)) {
32302 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_n_hamming_pass_get" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
32303 }
32304 arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
32305 result = (size_t) ((arg1)->n_hamming_pass);
32306 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
32307 return resultobj;
32308 fail:
32309 return NULL;
32310 }
32311
32312
32313 SWIGINTERN PyObject *_wrap_new_IndexPQStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32314 PyObject *resultobj = 0;
32315 faiss::IndexPQStats *result = 0 ;
32316
32317 if (!PyArg_ParseTuple(args,(char *)":new_IndexPQStats")) SWIG_fail;
32318 {
32319 Py_BEGIN_ALLOW_THREADS
32320 try {
32321 result = (faiss::IndexPQStats *)new faiss::IndexPQStats();
32322 } catch(faiss::FaissException & e) {
32323 PyEval_RestoreThread(_save);
32324 PyErr_SetString(PyExc_RuntimeError, e.what());
32325 SWIG_fail;
32326 }
32327 Py_END_ALLOW_THREADS
32328 }
32329 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexPQStats, SWIG_POINTER_NEW | 0 );
32330 return resultobj;
32331 fail:
32332 return NULL;
32333 }
32334
32335
32336 SWIGINTERN PyObject *_wrap_IndexPQStats_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32337 PyObject *resultobj = 0;
32338 faiss::IndexPQStats *arg1 = (faiss::IndexPQStats *) 0 ;
32339 void *argp1 = 0 ;
32340 int res1 = 0 ;
32341 PyObject * obj0 = 0 ;
32342
32343 if (!PyArg_ParseTuple(args,(char *)"O:IndexPQStats_reset",&obj0)) SWIG_fail;
32344 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, 0 | 0 );
32345 if (!SWIG_IsOK(res1)) {
32346 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexPQStats_reset" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
32347 }
32348 arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
32349 {
32350 Py_BEGIN_ALLOW_THREADS
32351 try {
32352 (arg1)->reset();
32353 } catch(faiss::FaissException & e) {
32354 PyEval_RestoreThread(_save);
32355 PyErr_SetString(PyExc_RuntimeError, e.what());
32356 SWIG_fail;
32357 }
32358 Py_END_ALLOW_THREADS
32359 }
32360 resultobj = SWIG_Py_Void();
32361 return resultobj;
32362 fail:
32363 return NULL;
32364 }
32365
32366
32367 SWIGINTERN PyObject *_wrap_delete_IndexPQStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32368 PyObject *resultobj = 0;
32369 faiss::IndexPQStats *arg1 = (faiss::IndexPQStats *) 0 ;
32370 void *argp1 = 0 ;
32371 int res1 = 0 ;
32372 PyObject * obj0 = 0 ;
32373
32374 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexPQStats",&obj0)) SWIG_fail;
32375 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexPQStats, SWIG_POINTER_DISOWN | 0 );
32376 if (!SWIG_IsOK(res1)) {
32377 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexPQStats" "', argument " "1"" of type '" "faiss::IndexPQStats *""'");
32378 }
32379 arg1 = reinterpret_cast< faiss::IndexPQStats * >(argp1);
32380 delete arg1;
32381 resultobj = SWIG_Py_Void();
32382 return resultobj;
32383 fail:
32384 return NULL;
32385 }
32386
32387
32388 SWIGINTERN PyObject *IndexPQStats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32389 PyObject *obj;
32390 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
32391 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexPQStats, SWIG_NewClientData(obj));
32392 return SWIG_Py_Void();
32393 }
32394
32395 SWIGINTERN int Swig_var_indexPQ_stats_set(PyObject *_val) {
32396 {
32397 void *argp = 0;
32398 int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_faiss__IndexPQStats, 0 | 0);
32399 if (!SWIG_IsOK(res)) {
32400 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::indexPQ_stats""' of type '""faiss::IndexPQStats""'");
32401 }
32402 if (!argp) {
32403 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""faiss::indexPQ_stats""' of type '""faiss::IndexPQStats""'");
32404 } else {
32405 faiss::IndexPQStats * temp;
32406 temp = reinterpret_cast< faiss::IndexPQStats * >(argp);
32407 faiss::indexPQ_stats = *temp;
32408 if (SWIG_IsNewObj(res)) delete temp;
32409 }
32410 }
32411 return 0;
32412 fail:
32413 return 1;
32414 }
32415
32416
32417 SWIGINTERN PyObject *Swig_var_indexPQ_stats_get(void) {
32418 PyObject *pyobj = 0;
32419
32420 pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&faiss::indexPQ_stats), SWIGTYPE_p_faiss__IndexPQStats, 0 );
32421 return pyobj;
32422 }
32423
32424
32425 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32426 PyObject *resultobj = 0;
32427 faiss::MultiIndexQuantizer *arg1 = (faiss::MultiIndexQuantizer *) 0 ;
32428 faiss::ProductQuantizer *arg2 = (faiss::ProductQuantizer *) 0 ;
32429 void *argp1 = 0 ;
32430 int res1 = 0 ;
32431 void *argp2 = 0 ;
32432 int res2 = 0 ;
32433 PyObject * obj0 = 0 ;
32434 PyObject * obj1 = 0 ;
32435
32436 if (!PyArg_ParseTuple(args,(char *)"OO:MultiIndexQuantizer_pq_set",&obj0,&obj1)) SWIG_fail;
32437 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
32438 if (!SWIG_IsOK(res1)) {
32439 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_pq_set" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
32440 }
32441 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
32442 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
32443 if (!SWIG_IsOK(res2)) {
32444 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiIndexQuantizer_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
32445 }
32446 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
32447 if (arg1) (arg1)->pq = *arg2;
32448 resultobj = SWIG_Py_Void();
32449 return resultobj;
32450 fail:
32451 return NULL;
32452 }
32453
32454
32455 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32456 PyObject *resultobj = 0;
32457 faiss::MultiIndexQuantizer *arg1 = (faiss::MultiIndexQuantizer *) 0 ;
32458 void *argp1 = 0 ;
32459 int res1 = 0 ;
32460 PyObject * obj0 = 0 ;
32461 faiss::ProductQuantizer *result = 0 ;
32462
32463 if (!PyArg_ParseTuple(args,(char *)"O:MultiIndexQuantizer_pq_get",&obj0)) SWIG_fail;
32464 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
32465 if (!SWIG_IsOK(res1)) {
32466 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_pq_get" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
32467 }
32468 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
32469 result = (faiss::ProductQuantizer *)& ((arg1)->pq);
32470 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
32471 return resultobj;
32472 fail:
32473 return NULL;
32474 }
32475
32476
32477 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32478 PyObject *resultobj = 0;
32479 int arg1 ;
32480 size_t arg2 ;
32481 size_t arg3 ;
32482 int val1 ;
32483 int ecode1 = 0 ;
32484 size_t val2 ;
32485 int ecode2 = 0 ;
32486 size_t val3 ;
32487 int ecode3 = 0 ;
32488 PyObject * obj0 = 0 ;
32489 PyObject * obj1 = 0 ;
32490 PyObject * obj2 = 0 ;
32491 faiss::MultiIndexQuantizer *result = 0 ;
32492
32493 if (!PyArg_ParseTuple(args,(char *)"OOO:new_MultiIndexQuantizer",&obj0,&obj1,&obj2)) SWIG_fail;
32494 ecode1 = SWIG_AsVal_int(obj0, &val1);
32495 if (!SWIG_IsOK(ecode1)) {
32496 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MultiIndexQuantizer" "', argument " "1"" of type '" "int""'");
32497 }
32498 arg1 = static_cast< int >(val1);
32499 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
32500 if (!SWIG_IsOK(ecode2)) {
32501 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiIndexQuantizer" "', argument " "2"" of type '" "size_t""'");
32502 }
32503 arg2 = static_cast< size_t >(val2);
32504 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
32505 if (!SWIG_IsOK(ecode3)) {
32506 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MultiIndexQuantizer" "', argument " "3"" of type '" "size_t""'");
32507 }
32508 arg3 = static_cast< size_t >(val3);
32509 {
32510 Py_BEGIN_ALLOW_THREADS
32511 try {
32512 result = (faiss::MultiIndexQuantizer *)new faiss::MultiIndexQuantizer(arg1,arg2,arg3);
32513 } catch(faiss::FaissException & e) {
32514 PyEval_RestoreThread(_save);
32515 PyErr_SetString(PyExc_RuntimeError, e.what());
32516 SWIG_fail;
32517 }
32518 Py_END_ALLOW_THREADS
32519 }
32520 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__MultiIndexQuantizer, SWIG_POINTER_NEW | 0 );
32521 return resultobj;
32522 fail:
32523 return NULL;
32524 }
32525
32526
32527 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32528 PyObject *resultobj = 0;
32529 faiss::MultiIndexQuantizer *arg1 = (faiss::MultiIndexQuantizer *) 0 ;
32530 faiss::Index::idx_t arg2 ;
32531 float *arg3 = (float *) 0 ;
32532 void *argp1 = 0 ;
32533 int res1 = 0 ;
32534 long val2 ;
32535 int ecode2 = 0 ;
32536 void *argp3 = 0 ;
32537 int res3 = 0 ;
32538 PyObject * obj0 = 0 ;
32539 PyObject * obj1 = 0 ;
32540 PyObject * obj2 = 0 ;
32541
32542 if (!PyArg_ParseTuple(args,(char *)"OOO:MultiIndexQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
32543 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
32544 if (!SWIG_IsOK(res1)) {
32545 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_train" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
32546 }
32547 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
32548 ecode2 = SWIG_AsVal_long(obj1, &val2);
32549 if (!SWIG_IsOK(ecode2)) {
32550 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32551 }
32552 arg2 = static_cast< faiss::Index::idx_t >(val2);
32553 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32554 if (!SWIG_IsOK(res3)) {
32555 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer_train" "', argument " "3"" of type '" "float const *""'");
32556 }
32557 arg3 = reinterpret_cast< float * >(argp3);
32558 {
32559 Py_BEGIN_ALLOW_THREADS
32560 try {
32561 (arg1)->train(arg2,(float const *)arg3);
32562 } catch(faiss::FaissException & e) {
32563 PyEval_RestoreThread(_save);
32564 PyErr_SetString(PyExc_RuntimeError, e.what());
32565 SWIG_fail;
32566 }
32567 Py_END_ALLOW_THREADS
32568 }
32569 resultobj = SWIG_Py_Void();
32570 return resultobj;
32571 fail:
32572 return NULL;
32573 }
32574
32575
32576 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32577 PyObject *resultobj = 0;
32578 faiss::MultiIndexQuantizer *arg1 = (faiss::MultiIndexQuantizer *) 0 ;
32579 faiss::Index::idx_t arg2 ;
32580 float *arg3 = (float *) 0 ;
32581 faiss::Index::idx_t arg4 ;
32582 float *arg5 = (float *) 0 ;
32583 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
32584 void *argp1 = 0 ;
32585 int res1 = 0 ;
32586 long val2 ;
32587 int ecode2 = 0 ;
32588 void *argp3 = 0 ;
32589 int res3 = 0 ;
32590 long val4 ;
32591 int ecode4 = 0 ;
32592 void *argp5 = 0 ;
32593 int res5 = 0 ;
32594 void *argp6 = 0 ;
32595 int res6 = 0 ;
32596 PyObject * obj0 = 0 ;
32597 PyObject * obj1 = 0 ;
32598 PyObject * obj2 = 0 ;
32599 PyObject * obj3 = 0 ;
32600 PyObject * obj4 = 0 ;
32601 PyObject * obj5 = 0 ;
32602
32603 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:MultiIndexQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
32604 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
32605 if (!SWIG_IsOK(res1)) {
32606 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_search" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer const *""'");
32607 }
32608 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
32609 ecode2 = SWIG_AsVal_long(obj1, &val2);
32610 if (!SWIG_IsOK(ecode2)) {
32611 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32612 }
32613 arg2 = static_cast< faiss::Index::idx_t >(val2);
32614 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32615 if (!SWIG_IsOK(res3)) {
32616 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer_search" "', argument " "3"" of type '" "float const *""'");
32617 }
32618 arg3 = reinterpret_cast< float * >(argp3);
32619 ecode4 = SWIG_AsVal_long(obj3, &val4);
32620 if (!SWIG_IsOK(ecode4)) {
32621 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiIndexQuantizer_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
32622 }
32623 arg4 = static_cast< faiss::Index::idx_t >(val4);
32624 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
32625 if (!SWIG_IsOK(res5)) {
32626 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MultiIndexQuantizer_search" "', argument " "5"" of type '" "float *""'");
32627 }
32628 arg5 = reinterpret_cast< float * >(argp5);
32629 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
32630 if (!SWIG_IsOK(res6)) {
32631 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "MultiIndexQuantizer_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
32632 }
32633 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
32634 {
32635 Py_BEGIN_ALLOW_THREADS
32636 try {
32637 ((faiss::MultiIndexQuantizer const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
32638 } catch(faiss::FaissException & e) {
32639 PyEval_RestoreThread(_save);
32640 PyErr_SetString(PyExc_RuntimeError, e.what());
32641 SWIG_fail;
32642 }
32643 Py_END_ALLOW_THREADS
32644 }
32645 resultobj = SWIG_Py_Void();
32646 return resultobj;
32647 fail:
32648 return NULL;
32649 }
32650
32651
32652 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32653 PyObject *resultobj = 0;
32654 faiss::MultiIndexQuantizer *arg1 = (faiss::MultiIndexQuantizer *) 0 ;
32655 faiss::Index::idx_t arg2 ;
32656 float *arg3 = (float *) 0 ;
32657 void *argp1 = 0 ;
32658 int res1 = 0 ;
32659 long val2 ;
32660 int ecode2 = 0 ;
32661 void *argp3 = 0 ;
32662 int res3 = 0 ;
32663 PyObject * obj0 = 0 ;
32664 PyObject * obj1 = 0 ;
32665 PyObject * obj2 = 0 ;
32666
32667 if (!PyArg_ParseTuple(args,(char *)"OOO:MultiIndexQuantizer_add",&obj0,&obj1,&obj2)) SWIG_fail;
32668 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
32669 if (!SWIG_IsOK(res1)) {
32670 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_add" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
32671 }
32672 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
32673 ecode2 = SWIG_AsVal_long(obj1, &val2);
32674 if (!SWIG_IsOK(ecode2)) {
32675 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32676 }
32677 arg2 = static_cast< faiss::Index::idx_t >(val2);
32678 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32679 if (!SWIG_IsOK(res3)) {
32680 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer_add" "', argument " "3"" of type '" "float const *""'");
32681 }
32682 arg3 = reinterpret_cast< float * >(argp3);
32683 {
32684 Py_BEGIN_ALLOW_THREADS
32685 try {
32686 (arg1)->add(arg2,(float const *)arg3);
32687 } catch(faiss::FaissException & e) {
32688 PyEval_RestoreThread(_save);
32689 PyErr_SetString(PyExc_RuntimeError, e.what());
32690 SWIG_fail;
32691 }
32692 Py_END_ALLOW_THREADS
32693 }
32694 resultobj = SWIG_Py_Void();
32695 return resultobj;
32696 fail:
32697 return NULL;
32698 }
32699
32700
32701 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32702 PyObject *resultobj = 0;
32703 faiss::MultiIndexQuantizer *arg1 = (faiss::MultiIndexQuantizer *) 0 ;
32704 void *argp1 = 0 ;
32705 int res1 = 0 ;
32706 PyObject * obj0 = 0 ;
32707
32708 if (!PyArg_ParseTuple(args,(char *)"O:MultiIndexQuantizer_reset",&obj0)) SWIG_fail;
32709 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
32710 if (!SWIG_IsOK(res1)) {
32711 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_reset" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
32712 }
32713 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
32714 {
32715 Py_BEGIN_ALLOW_THREADS
32716 try {
32717 (arg1)->reset();
32718 } catch(faiss::FaissException & e) {
32719 PyEval_RestoreThread(_save);
32720 PyErr_SetString(PyExc_RuntimeError, e.what());
32721 SWIG_fail;
32722 }
32723 Py_END_ALLOW_THREADS
32724 }
32725 resultobj = SWIG_Py_Void();
32726 return resultobj;
32727 fail:
32728 return NULL;
32729 }
32730
32731
32732 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32733 PyObject *resultobj = 0;
32734 faiss::MultiIndexQuantizer *result = 0 ;
32735
32736 if (!PyArg_ParseTuple(args,(char *)":new_MultiIndexQuantizer")) SWIG_fail;
32737 {
32738 Py_BEGIN_ALLOW_THREADS
32739 try {
32740 result = (faiss::MultiIndexQuantizer *)new faiss::MultiIndexQuantizer();
32741 } catch(faiss::FaissException & e) {
32742 PyEval_RestoreThread(_save);
32743 PyErr_SetString(PyExc_RuntimeError, e.what());
32744 SWIG_fail;
32745 }
32746 Py_END_ALLOW_THREADS
32747 }
32748 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__MultiIndexQuantizer, SWIG_POINTER_NEW | 0 );
32749 return resultobj;
32750 fail:
32751 return NULL;
32752 }
32753
32754
32755 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer(PyObject *self, PyObject *args) {
32756 Py_ssize_t argc;
32757 PyObject *argv[4] = {
32758 0
32759 };
32760 Py_ssize_t ii;
32761
32762 if (!PyTuple_Check(args)) SWIG_fail;
32763 argc = args ? PyObject_Length(args) : 0;
32764 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
32765 argv[ii] = PyTuple_GET_ITEM(args,ii);
32766 }
32767 if (argc == 0) {
32768 return _wrap_new_MultiIndexQuantizer__SWIG_1(self, args);
32769 }
32770 if (argc == 3) {
32771 int _v;
32772 {
32773 int res = SWIG_AsVal_int(argv[0], NULL);
32774 _v = SWIG_CheckState(res);
32775 }
32776 if (_v) {
32777 {
32778 int res = SWIG_AsVal_size_t(argv[1], NULL);
32779 _v = SWIG_CheckState(res);
32780 }
32781 if (_v) {
32782 {
32783 int res = SWIG_AsVal_size_t(argv[2], NULL);
32784 _v = SWIG_CheckState(res);
32785 }
32786 if (_v) {
32787 return _wrap_new_MultiIndexQuantizer__SWIG_0(self, args);
32788 }
32789 }
32790 }
32791 }
32792
32793 fail:
32794 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MultiIndexQuantizer'.\n"
32795 " Possible C/C++ prototypes are:\n"
32796 " faiss::MultiIndexQuantizer::MultiIndexQuantizer(int,size_t,size_t)\n"
32797 " faiss::MultiIndexQuantizer::MultiIndexQuantizer()\n");
32798 return 0;
32799 }
32800
32801
32802 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32803 PyObject *resultobj = 0;
32804 faiss::MultiIndexQuantizer *arg1 = (faiss::MultiIndexQuantizer *) 0 ;
32805 faiss::Index::idx_t arg2 ;
32806 float *arg3 = (float *) 0 ;
32807 void *argp1 = 0 ;
32808 int res1 = 0 ;
32809 long val2 ;
32810 int ecode2 = 0 ;
32811 void *argp3 = 0 ;
32812 int res3 = 0 ;
32813 PyObject * obj0 = 0 ;
32814 PyObject * obj1 = 0 ;
32815 PyObject * obj2 = 0 ;
32816
32817 if (!PyArg_ParseTuple(args,(char *)"OOO:MultiIndexQuantizer_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
32818 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, 0 | 0 );
32819 if (!SWIG_IsOK(res1)) {
32820 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer_reconstruct" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer const *""'");
32821 }
32822 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
32823 ecode2 = SWIG_AsVal_long(obj1, &val2);
32824 if (!SWIG_IsOK(ecode2)) {
32825 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
32826 }
32827 arg2 = static_cast< faiss::Index::idx_t >(val2);
32828 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
32829 if (!SWIG_IsOK(res3)) {
32830 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer_reconstruct" "', argument " "3"" of type '" "float *""'");
32831 }
32832 arg3 = reinterpret_cast< float * >(argp3);
32833 {
32834 Py_BEGIN_ALLOW_THREADS
32835 try {
32836 ((faiss::MultiIndexQuantizer const *)arg1)->reconstruct(arg2,arg3);
32837 } catch(faiss::FaissException & e) {
32838 PyEval_RestoreThread(_save);
32839 PyErr_SetString(PyExc_RuntimeError, e.what());
32840 SWIG_fail;
32841 }
32842 Py_END_ALLOW_THREADS
32843 }
32844 resultobj = SWIG_Py_Void();
32845 return resultobj;
32846 fail:
32847 return NULL;
32848 }
32849
32850
32851 SWIGINTERN PyObject *_wrap_delete_MultiIndexQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32852 PyObject *resultobj = 0;
32853 faiss::MultiIndexQuantizer *arg1 = (faiss::MultiIndexQuantizer *) 0 ;
32854 void *argp1 = 0 ;
32855 int res1 = 0 ;
32856 PyObject * obj0 = 0 ;
32857
32858 if (!PyArg_ParseTuple(args,(char *)"O:delete_MultiIndexQuantizer",&obj0)) SWIG_fail;
32859 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer, SWIG_POINTER_DISOWN | 0 );
32860 if (!SWIG_IsOK(res1)) {
32861 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiIndexQuantizer" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer *""'");
32862 }
32863 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer * >(argp1);
32864 delete arg1;
32865 resultobj = SWIG_Py_Void();
32866 return resultobj;
32867 fail:
32868 return NULL;
32869 }
32870
32871
32872 SWIGINTERN PyObject *MultiIndexQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32873 PyObject *obj;
32874 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
32875 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__MultiIndexQuantizer, SWIG_NewClientData(obj));
32876 return SWIG_Py_Void();
32877 }
32878
32879 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_assign_indexes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32880 PyObject *resultobj = 0;
32881 faiss::MultiIndexQuantizer2 *arg1 = (faiss::MultiIndexQuantizer2 *) 0 ;
32882 std::vector< faiss::Index * > *arg2 = (std::vector< faiss::Index * > *) 0 ;
32883 void *argp1 = 0 ;
32884 int res1 = 0 ;
32885 void *argp2 = 0 ;
32886 int res2 = 0 ;
32887 PyObject * obj0 = 0 ;
32888 PyObject * obj1 = 0 ;
32889
32890 if (!PyArg_ParseTuple(args,(char *)"OO:MultiIndexQuantizer2_assign_indexes_set",&obj0,&obj1)) SWIG_fail;
32891 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
32892 if (!SWIG_IsOK(res1)) {
32893 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_assign_indexes_set" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
32894 }
32895 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
32896 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
32897 if (!SWIG_IsOK(res2)) {
32898 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MultiIndexQuantizer2_assign_indexes_set" "', argument " "2"" of type '" "std::vector< faiss::Index * > *""'");
32899 }
32900 arg2 = reinterpret_cast< std::vector< faiss::Index * > * >(argp2);
32901 if (arg1) (arg1)->assign_indexes = *arg2;
32902 resultobj = SWIG_Py_Void();
32903 return resultobj;
32904 fail:
32905 return NULL;
32906 }
32907
32908
32909 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_assign_indexes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32910 PyObject *resultobj = 0;
32911 faiss::MultiIndexQuantizer2 *arg1 = (faiss::MultiIndexQuantizer2 *) 0 ;
32912 void *argp1 = 0 ;
32913 int res1 = 0 ;
32914 PyObject * obj0 = 0 ;
32915 std::vector< faiss::Index * > *result = 0 ;
32916
32917 if (!PyArg_ParseTuple(args,(char *)"O:MultiIndexQuantizer2_assign_indexes_get",&obj0)) SWIG_fail;
32918 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
32919 if (!SWIG_IsOK(res1)) {
32920 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_assign_indexes_get" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
32921 }
32922 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
32923 result = (std::vector< faiss::Index * > *)& ((arg1)->assign_indexes);
32924 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
32925 return resultobj;
32926 fail:
32927 return NULL;
32928 }
32929
32930
32931 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32932 PyObject *resultobj = 0;
32933 faiss::MultiIndexQuantizer2 *arg1 = (faiss::MultiIndexQuantizer2 *) 0 ;
32934 bool arg2 ;
32935 void *argp1 = 0 ;
32936 int res1 = 0 ;
32937 bool val2 ;
32938 int ecode2 = 0 ;
32939 PyObject * obj0 = 0 ;
32940 PyObject * obj1 = 0 ;
32941
32942 if (!PyArg_ParseTuple(args,(char *)"OO:MultiIndexQuantizer2_own_fields_set",&obj0,&obj1)) SWIG_fail;
32943 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
32944 if (!SWIG_IsOK(res1)) {
32945 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_own_fields_set" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
32946 }
32947 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
32948 ecode2 = SWIG_AsVal_bool(obj1, &val2);
32949 if (!SWIG_IsOK(ecode2)) {
32950 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer2_own_fields_set" "', argument " "2"" of type '" "bool""'");
32951 }
32952 arg2 = static_cast< bool >(val2);
32953 if (arg1) (arg1)->own_fields = arg2;
32954 resultobj = SWIG_Py_Void();
32955 return resultobj;
32956 fail:
32957 return NULL;
32958 }
32959
32960
32961 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32962 PyObject *resultobj = 0;
32963 faiss::MultiIndexQuantizer2 *arg1 = (faiss::MultiIndexQuantizer2 *) 0 ;
32964 void *argp1 = 0 ;
32965 int res1 = 0 ;
32966 PyObject * obj0 = 0 ;
32967 bool result;
32968
32969 if (!PyArg_ParseTuple(args,(char *)"O:MultiIndexQuantizer2_own_fields_get",&obj0)) SWIG_fail;
32970 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
32971 if (!SWIG_IsOK(res1)) {
32972 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_own_fields_get" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
32973 }
32974 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
32975 result = (bool) ((arg1)->own_fields);
32976 resultobj = SWIG_From_bool(static_cast< bool >(result));
32977 return resultobj;
32978 fail:
32979 return NULL;
32980 }
32981
32982
32983 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
32984 PyObject *resultobj = 0;
32985 int arg1 ;
32986 size_t arg2 ;
32987 size_t arg3 ;
32988 faiss::Index **arg4 = (faiss::Index **) 0 ;
32989 int val1 ;
32990 int ecode1 = 0 ;
32991 size_t val2 ;
32992 int ecode2 = 0 ;
32993 size_t val3 ;
32994 int ecode3 = 0 ;
32995 void *argp4 = 0 ;
32996 int res4 = 0 ;
32997 PyObject * obj0 = 0 ;
32998 PyObject * obj1 = 0 ;
32999 PyObject * obj2 = 0 ;
33000 PyObject * obj3 = 0 ;
33001 faiss::MultiIndexQuantizer2 *result = 0 ;
33002
33003 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_MultiIndexQuantizer2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
33004 ecode1 = SWIG_AsVal_int(obj0, &val1);
33005 if (!SWIG_IsOK(ecode1)) {
33006 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MultiIndexQuantizer2" "', argument " "1"" of type '" "int""'");
33007 }
33008 arg1 = static_cast< int >(val1);
33009 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33010 if (!SWIG_IsOK(ecode2)) {
33011 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiIndexQuantizer2" "', argument " "2"" of type '" "size_t""'");
33012 }
33013 arg2 = static_cast< size_t >(val2);
33014 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
33015 if (!SWIG_IsOK(ecode3)) {
33016 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_MultiIndexQuantizer2" "', argument " "3"" of type '" "size_t""'");
33017 }
33018 arg3 = static_cast< size_t >(val3);
33019 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_p_faiss__Index, 0 | 0 );
33020 if (!SWIG_IsOK(res4)) {
33021 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MultiIndexQuantizer2" "', argument " "4"" of type '" "faiss::Index **""'");
33022 }
33023 arg4 = reinterpret_cast< faiss::Index ** >(argp4);
33024 {
33025 Py_BEGIN_ALLOW_THREADS
33026 try {
33027 result = (faiss::MultiIndexQuantizer2 *)new faiss::MultiIndexQuantizer2(arg1,arg2,arg3,arg4);
33028 } catch(faiss::FaissException & e) {
33029 PyEval_RestoreThread(_save);
33030 PyErr_SetString(PyExc_RuntimeError, e.what());
33031 SWIG_fail;
33032 }
33033 Py_END_ALLOW_THREADS
33034 }
33035 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__MultiIndexQuantizer2, SWIG_POINTER_NEW | 0 );
33036 return resultobj;
33037 fail:
33038 return NULL;
33039 }
33040
33041
33042 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33043 PyObject *resultobj = 0;
33044 int arg1 ;
33045 size_t arg2 ;
33046 faiss::Index *arg3 = (faiss::Index *) 0 ;
33047 faiss::Index *arg4 = (faiss::Index *) 0 ;
33048 int val1 ;
33049 int ecode1 = 0 ;
33050 size_t val2 ;
33051 int ecode2 = 0 ;
33052 void *argp3 = 0 ;
33053 int res3 = 0 ;
33054 void *argp4 = 0 ;
33055 int res4 = 0 ;
33056 PyObject * obj0 = 0 ;
33057 PyObject * obj1 = 0 ;
33058 PyObject * obj2 = 0 ;
33059 PyObject * obj3 = 0 ;
33060 faiss::MultiIndexQuantizer2 *result = 0 ;
33061
33062 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_MultiIndexQuantizer2",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
33063 ecode1 = SWIG_AsVal_int(obj0, &val1);
33064 if (!SWIG_IsOK(ecode1)) {
33065 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_MultiIndexQuantizer2" "', argument " "1"" of type '" "int""'");
33066 }
33067 arg1 = static_cast< int >(val1);
33068 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33069 if (!SWIG_IsOK(ecode2)) {
33070 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_MultiIndexQuantizer2" "', argument " "2"" of type '" "size_t""'");
33071 }
33072 arg2 = static_cast< size_t >(val2);
33073 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_faiss__Index, 0 | 0 );
33074 if (!SWIG_IsOK(res3)) {
33075 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_MultiIndexQuantizer2" "', argument " "3"" of type '" "faiss::Index *""'");
33076 }
33077 arg3 = reinterpret_cast< faiss::Index * >(argp3);
33078 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_faiss__Index, 0 | 0 );
33079 if (!SWIG_IsOK(res4)) {
33080 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "new_MultiIndexQuantizer2" "', argument " "4"" of type '" "faiss::Index *""'");
33081 }
33082 arg4 = reinterpret_cast< faiss::Index * >(argp4);
33083 {
33084 Py_BEGIN_ALLOW_THREADS
33085 try {
33086 result = (faiss::MultiIndexQuantizer2 *)new faiss::MultiIndexQuantizer2(arg1,arg2,arg3,arg4);
33087 } catch(faiss::FaissException & e) {
33088 PyEval_RestoreThread(_save);
33089 PyErr_SetString(PyExc_RuntimeError, e.what());
33090 SWIG_fail;
33091 }
33092 Py_END_ALLOW_THREADS
33093 }
33094 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__MultiIndexQuantizer2, SWIG_POINTER_NEW | 0 );
33095 return resultobj;
33096 fail:
33097 return NULL;
33098 }
33099
33100
33101 SWIGINTERN PyObject *_wrap_new_MultiIndexQuantizer2(PyObject *self, PyObject *args) {
33102 Py_ssize_t argc;
33103 PyObject *argv[5] = {
33104 0
33105 };
33106 Py_ssize_t ii;
33107
33108 if (!PyTuple_Check(args)) SWIG_fail;
33109 argc = args ? PyObject_Length(args) : 0;
33110 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
33111 argv[ii] = PyTuple_GET_ITEM(args,ii);
33112 }
33113 if (argc == 4) {
33114 int _v;
33115 {
33116 int res = SWIG_AsVal_int(argv[0], NULL);
33117 _v = SWIG_CheckState(res);
33118 }
33119 if (_v) {
33120 {
33121 int res = SWIG_AsVal_size_t(argv[1], NULL);
33122 _v = SWIG_CheckState(res);
33123 }
33124 if (_v) {
33125 void *vptr = 0;
33126 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_faiss__Index, 0);
33127 _v = SWIG_CheckState(res);
33128 if (_v) {
33129 void *vptr = 0;
33130 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_faiss__Index, 0);
33131 _v = SWIG_CheckState(res);
33132 if (_v) {
33133 return _wrap_new_MultiIndexQuantizer2__SWIG_1(self, args);
33134 }
33135 }
33136 }
33137 }
33138 }
33139 if (argc == 4) {
33140 int _v;
33141 {
33142 int res = SWIG_AsVal_int(argv[0], NULL);
33143 _v = SWIG_CheckState(res);
33144 }
33145 if (_v) {
33146 {
33147 int res = SWIG_AsVal_size_t(argv[1], NULL);
33148 _v = SWIG_CheckState(res);
33149 }
33150 if (_v) {
33151 {
33152 int res = SWIG_AsVal_size_t(argv[2], NULL);
33153 _v = SWIG_CheckState(res);
33154 }
33155 if (_v) {
33156 void *vptr = 0;
33157 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_p_faiss__Index, 0);
33158 _v = SWIG_CheckState(res);
33159 if (_v) {
33160 return _wrap_new_MultiIndexQuantizer2__SWIG_0(self, args);
33161 }
33162 }
33163 }
33164 }
33165 }
33166
33167 fail:
33168 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_MultiIndexQuantizer2'.\n"
33169 " Possible C/C++ prototypes are:\n"
33170 " faiss::MultiIndexQuantizer2::MultiIndexQuantizer2(int,size_t,size_t,faiss::Index **)\n"
33171 " faiss::MultiIndexQuantizer2::MultiIndexQuantizer2(int,size_t,faiss::Index *,faiss::Index *)\n");
33172 return 0;
33173 }
33174
33175
33176 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33177 PyObject *resultobj = 0;
33178 faiss::MultiIndexQuantizer2 *arg1 = (faiss::MultiIndexQuantizer2 *) 0 ;
33179 faiss::Index::idx_t arg2 ;
33180 float *arg3 = (float *) 0 ;
33181 void *argp1 = 0 ;
33182 int res1 = 0 ;
33183 long val2 ;
33184 int ecode2 = 0 ;
33185 void *argp3 = 0 ;
33186 int res3 = 0 ;
33187 PyObject * obj0 = 0 ;
33188 PyObject * obj1 = 0 ;
33189 PyObject * obj2 = 0 ;
33190
33191 if (!PyArg_ParseTuple(args,(char *)"OOO:MultiIndexQuantizer2_train",&obj0,&obj1,&obj2)) SWIG_fail;
33192 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
33193 if (!SWIG_IsOK(res1)) {
33194 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_train" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
33195 }
33196 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
33197 ecode2 = SWIG_AsVal_long(obj1, &val2);
33198 if (!SWIG_IsOK(ecode2)) {
33199 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer2_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
33200 }
33201 arg2 = static_cast< faiss::Index::idx_t >(val2);
33202 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
33203 if (!SWIG_IsOK(res3)) {
33204 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer2_train" "', argument " "3"" of type '" "float const *""'");
33205 }
33206 arg3 = reinterpret_cast< float * >(argp3);
33207 {
33208 Py_BEGIN_ALLOW_THREADS
33209 try {
33210 (arg1)->train(arg2,(float const *)arg3);
33211 } catch(faiss::FaissException & e) {
33212 PyEval_RestoreThread(_save);
33213 PyErr_SetString(PyExc_RuntimeError, e.what());
33214 SWIG_fail;
33215 }
33216 Py_END_ALLOW_THREADS
33217 }
33218 resultobj = SWIG_Py_Void();
33219 return resultobj;
33220 fail:
33221 return NULL;
33222 }
33223
33224
33225 SWIGINTERN PyObject *_wrap_MultiIndexQuantizer2_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33226 PyObject *resultobj = 0;
33227 faiss::MultiIndexQuantizer2 *arg1 = (faiss::MultiIndexQuantizer2 *) 0 ;
33228 faiss::Index::idx_t arg2 ;
33229 float *arg3 = (float *) 0 ;
33230 faiss::Index::idx_t arg4 ;
33231 float *arg5 = (float *) 0 ;
33232 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
33233 void *argp1 = 0 ;
33234 int res1 = 0 ;
33235 long val2 ;
33236 int ecode2 = 0 ;
33237 void *argp3 = 0 ;
33238 int res3 = 0 ;
33239 long val4 ;
33240 int ecode4 = 0 ;
33241 void *argp5 = 0 ;
33242 int res5 = 0 ;
33243 void *argp6 = 0 ;
33244 int res6 = 0 ;
33245 PyObject * obj0 = 0 ;
33246 PyObject * obj1 = 0 ;
33247 PyObject * obj2 = 0 ;
33248 PyObject * obj3 = 0 ;
33249 PyObject * obj4 = 0 ;
33250 PyObject * obj5 = 0 ;
33251
33252 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:MultiIndexQuantizer2_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
33253 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, 0 | 0 );
33254 if (!SWIG_IsOK(res1)) {
33255 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MultiIndexQuantizer2_search" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 const *""'");
33256 }
33257 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
33258 ecode2 = SWIG_AsVal_long(obj1, &val2);
33259 if (!SWIG_IsOK(ecode2)) {
33260 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MultiIndexQuantizer2_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
33261 }
33262 arg2 = static_cast< faiss::Index::idx_t >(val2);
33263 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
33264 if (!SWIG_IsOK(res3)) {
33265 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MultiIndexQuantizer2_search" "', argument " "3"" of type '" "float const *""'");
33266 }
33267 arg3 = reinterpret_cast< float * >(argp3);
33268 ecode4 = SWIG_AsVal_long(obj3, &val4);
33269 if (!SWIG_IsOK(ecode4)) {
33270 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "MultiIndexQuantizer2_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
33271 }
33272 arg4 = static_cast< faiss::Index::idx_t >(val4);
33273 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
33274 if (!SWIG_IsOK(res5)) {
33275 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "MultiIndexQuantizer2_search" "', argument " "5"" of type '" "float *""'");
33276 }
33277 arg5 = reinterpret_cast< float * >(argp5);
33278 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
33279 if (!SWIG_IsOK(res6)) {
33280 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "MultiIndexQuantizer2_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
33281 }
33282 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
33283 {
33284 Py_BEGIN_ALLOW_THREADS
33285 try {
33286 ((faiss::MultiIndexQuantizer2 const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
33287 } catch(faiss::FaissException & e) {
33288 PyEval_RestoreThread(_save);
33289 PyErr_SetString(PyExc_RuntimeError, e.what());
33290 SWIG_fail;
33291 }
33292 Py_END_ALLOW_THREADS
33293 }
33294 resultobj = SWIG_Py_Void();
33295 return resultobj;
33296 fail:
33297 return NULL;
33298 }
33299
33300
33301 SWIGINTERN PyObject *_wrap_delete_MultiIndexQuantizer2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33302 PyObject *resultobj = 0;
33303 faiss::MultiIndexQuantizer2 *arg1 = (faiss::MultiIndexQuantizer2 *) 0 ;
33304 void *argp1 = 0 ;
33305 int res1 = 0 ;
33306 PyObject * obj0 = 0 ;
33307
33308 if (!PyArg_ParseTuple(args,(char *)"O:delete_MultiIndexQuantizer2",&obj0)) SWIG_fail;
33309 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__MultiIndexQuantizer2, SWIG_POINTER_DISOWN | 0 );
33310 if (!SWIG_IsOK(res1)) {
33311 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MultiIndexQuantizer2" "', argument " "1"" of type '" "faiss::MultiIndexQuantizer2 *""'");
33312 }
33313 arg1 = reinterpret_cast< faiss::MultiIndexQuantizer2 * >(argp1);
33314 delete arg1;
33315 resultobj = SWIG_Py_Void();
33316 return resultobj;
33317 fail:
33318 return NULL;
33319 }
33320
33321
33322 SWIGINTERN PyObject *MultiIndexQuantizer2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33323 PyObject *obj;
33324 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
33325 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__MultiIndexQuantizer2, SWIG_NewClientData(obj));
33326 return SWIG_Py_Void();
33327 }
33328
33329 SWIGINTERN PyObject *_wrap_InvertedLists_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33330 PyObject *resultobj = 0;
33331 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33332 size_t arg2 ;
33333 void *argp1 = 0 ;
33334 int res1 = 0 ;
33335 size_t val2 ;
33336 int ecode2 = 0 ;
33337 PyObject * obj0 = 0 ;
33338 PyObject * obj1 = 0 ;
33339
33340 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_nlist_set",&obj0,&obj1)) SWIG_fail;
33341 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33342 if (!SWIG_IsOK(res1)) {
33343 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_nlist_set" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
33344 }
33345 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33346 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33347 if (!SWIG_IsOK(ecode2)) {
33348 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_nlist_set" "', argument " "2"" of type '" "size_t""'");
33349 }
33350 arg2 = static_cast< size_t >(val2);
33351 if (arg1) (arg1)->nlist = arg2;
33352 resultobj = SWIG_Py_Void();
33353 return resultobj;
33354 fail:
33355 return NULL;
33356 }
33357
33358
33359 SWIGINTERN PyObject *_wrap_InvertedLists_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33360 PyObject *resultobj = 0;
33361 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33362 void *argp1 = 0 ;
33363 int res1 = 0 ;
33364 PyObject * obj0 = 0 ;
33365 size_t result;
33366
33367 if (!PyArg_ParseTuple(args,(char *)"O:InvertedLists_nlist_get",&obj0)) SWIG_fail;
33368 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33369 if (!SWIG_IsOK(res1)) {
33370 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_nlist_get" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
33371 }
33372 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33373 result = (size_t) ((arg1)->nlist);
33374 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
33375 return resultobj;
33376 fail:
33377 return NULL;
33378 }
33379
33380
33381 SWIGINTERN PyObject *_wrap_InvertedLists_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33382 PyObject *resultobj = 0;
33383 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33384 size_t arg2 ;
33385 void *argp1 = 0 ;
33386 int res1 = 0 ;
33387 size_t val2 ;
33388 int ecode2 = 0 ;
33389 PyObject * obj0 = 0 ;
33390 PyObject * obj1 = 0 ;
33391
33392 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_code_size_set",&obj0,&obj1)) SWIG_fail;
33393 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33394 if (!SWIG_IsOK(res1)) {
33395 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_code_size_set" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
33396 }
33397 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33398 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33399 if (!SWIG_IsOK(ecode2)) {
33400 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_code_size_set" "', argument " "2"" of type '" "size_t""'");
33401 }
33402 arg2 = static_cast< size_t >(val2);
33403 if (arg1) (arg1)->code_size = arg2;
33404 resultobj = SWIG_Py_Void();
33405 return resultobj;
33406 fail:
33407 return NULL;
33408 }
33409
33410
33411 SWIGINTERN PyObject *_wrap_InvertedLists_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33412 PyObject *resultobj = 0;
33413 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33414 void *argp1 = 0 ;
33415 int res1 = 0 ;
33416 PyObject * obj0 = 0 ;
33417 size_t result;
33418
33419 if (!PyArg_ParseTuple(args,(char *)"O:InvertedLists_code_size_get",&obj0)) SWIG_fail;
33420 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33421 if (!SWIG_IsOK(res1)) {
33422 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_code_size_get" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
33423 }
33424 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33425 result = (size_t) ((arg1)->code_size);
33426 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
33427 return resultobj;
33428 fail:
33429 return NULL;
33430 }
33431
33432
33433 SWIGINTERN PyObject *_wrap_InvertedLists_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33434 PyObject *resultobj = 0;
33435 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33436 size_t arg2 ;
33437 void *argp1 = 0 ;
33438 int res1 = 0 ;
33439 size_t val2 ;
33440 int ecode2 = 0 ;
33441 PyObject * obj0 = 0 ;
33442 PyObject * obj1 = 0 ;
33443 size_t result;
33444
33445 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_list_size",&obj0,&obj1)) SWIG_fail;
33446 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33447 if (!SWIG_IsOK(res1)) {
33448 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_list_size" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
33449 }
33450 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33451 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33452 if (!SWIG_IsOK(ecode2)) {
33453 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_list_size" "', argument " "2"" of type '" "size_t""'");
33454 }
33455 arg2 = static_cast< size_t >(val2);
33456 {
33457 Py_BEGIN_ALLOW_THREADS
33458 try {
33459 result = (size_t)((faiss::InvertedLists const *)arg1)->list_size(arg2);
33460 } catch(faiss::FaissException & e) {
33461 PyEval_RestoreThread(_save);
33462 PyErr_SetString(PyExc_RuntimeError, e.what());
33463 SWIG_fail;
33464 }
33465 Py_END_ALLOW_THREADS
33466 }
33467 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
33468 return resultobj;
33469 fail:
33470 return NULL;
33471 }
33472
33473
33474 SWIGINTERN PyObject *_wrap_InvertedLists_get_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33475 PyObject *resultobj = 0;
33476 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33477 size_t arg2 ;
33478 void *argp1 = 0 ;
33479 int res1 = 0 ;
33480 size_t val2 ;
33481 int ecode2 = 0 ;
33482 PyObject * obj0 = 0 ;
33483 PyObject * obj1 = 0 ;
33484 uint8_t *result = 0 ;
33485
33486 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_get_codes",&obj0,&obj1)) SWIG_fail;
33487 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33488 if (!SWIG_IsOK(res1)) {
33489 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_get_codes" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
33490 }
33491 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33492 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33493 if (!SWIG_IsOK(ecode2)) {
33494 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_get_codes" "', argument " "2"" of type '" "size_t""'");
33495 }
33496 arg2 = static_cast< size_t >(val2);
33497 {
33498 Py_BEGIN_ALLOW_THREADS
33499 try {
33500 result = (uint8_t *)((faiss::InvertedLists const *)arg1)->get_codes(arg2);
33501 } catch(faiss::FaissException & e) {
33502 PyEval_RestoreThread(_save);
33503 PyErr_SetString(PyExc_RuntimeError, e.what());
33504 SWIG_fail;
33505 }
33506 Py_END_ALLOW_THREADS
33507 }
33508 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
33509 return resultobj;
33510 fail:
33511 return NULL;
33512 }
33513
33514
33515 SWIGINTERN PyObject *_wrap_InvertedLists_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33516 PyObject *resultobj = 0;
33517 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33518 size_t arg2 ;
33519 void *argp1 = 0 ;
33520 int res1 = 0 ;
33521 size_t val2 ;
33522 int ecode2 = 0 ;
33523 PyObject * obj0 = 0 ;
33524 PyObject * obj1 = 0 ;
33525 faiss::InvertedLists::idx_t *result = 0 ;
33526
33527 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_get_ids",&obj0,&obj1)) SWIG_fail;
33528 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33529 if (!SWIG_IsOK(res1)) {
33530 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_get_ids" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
33531 }
33532 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33533 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33534 if (!SWIG_IsOK(ecode2)) {
33535 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_get_ids" "', argument " "2"" of type '" "size_t""'");
33536 }
33537 arg2 = static_cast< size_t >(val2);
33538 {
33539 Py_BEGIN_ALLOW_THREADS
33540 try {
33541 result = (faiss::InvertedLists::idx_t *)((faiss::InvertedLists const *)arg1)->get_ids(arg2);
33542 } catch(faiss::FaissException & e) {
33543 PyEval_RestoreThread(_save);
33544 PyErr_SetString(PyExc_RuntimeError, e.what());
33545 SWIG_fail;
33546 }
33547 Py_END_ALLOW_THREADS
33548 }
33549 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
33550 return resultobj;
33551 fail:
33552 return NULL;
33553 }
33554
33555
33556 SWIGINTERN PyObject *_wrap_InvertedLists_release_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33557 PyObject *resultobj = 0;
33558 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33559 uint8_t *arg2 = (uint8_t *) 0 ;
33560 void *argp1 = 0 ;
33561 int res1 = 0 ;
33562 void *argp2 = 0 ;
33563 int res2 = 0 ;
33564 PyObject * obj0 = 0 ;
33565 PyObject * obj1 = 0 ;
33566
33567 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_release_codes",&obj0,&obj1)) SWIG_fail;
33568 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33569 if (!SWIG_IsOK(res1)) {
33570 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_release_codes" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
33571 }
33572 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33573 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
33574 if (!SWIG_IsOK(res2)) {
33575 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedLists_release_codes" "', argument " "2"" of type '" "uint8_t const *""'");
33576 }
33577 arg2 = reinterpret_cast< uint8_t * >(argp2);
33578 {
33579 Py_BEGIN_ALLOW_THREADS
33580 try {
33581 ((faiss::InvertedLists const *)arg1)->release_codes((uint8_t const *)arg2);
33582 } catch(faiss::FaissException & e) {
33583 PyEval_RestoreThread(_save);
33584 PyErr_SetString(PyExc_RuntimeError, e.what());
33585 SWIG_fail;
33586 }
33587 Py_END_ALLOW_THREADS
33588 }
33589 resultobj = SWIG_Py_Void();
33590 return resultobj;
33591 fail:
33592 return NULL;
33593 }
33594
33595
33596 SWIGINTERN PyObject *_wrap_InvertedLists_release_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33597 PyObject *resultobj = 0;
33598 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33599 faiss::InvertedLists::idx_t *arg2 = (faiss::InvertedLists::idx_t *) 0 ;
33600 void *argp1 = 0 ;
33601 int res1 = 0 ;
33602 void *argp2 = 0 ;
33603 int res2 = 0 ;
33604 PyObject * obj0 = 0 ;
33605 PyObject * obj1 = 0 ;
33606
33607 if (!PyArg_ParseTuple(args,(char *)"OO:InvertedLists_release_ids",&obj0,&obj1)) SWIG_fail;
33608 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33609 if (!SWIG_IsOK(res1)) {
33610 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_release_ids" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
33611 }
33612 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33613 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
33614 if (!SWIG_IsOK(res2)) {
33615 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedLists_release_ids" "', argument " "2"" of type '" "faiss::InvertedLists::idx_t const *""'");
33616 }
33617 arg2 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp2);
33618 {
33619 Py_BEGIN_ALLOW_THREADS
33620 try {
33621 ((faiss::InvertedLists const *)arg1)->release_ids((faiss::InvertedLists::idx_t const *)arg2);
33622 } catch(faiss::FaissException & e) {
33623 PyEval_RestoreThread(_save);
33624 PyErr_SetString(PyExc_RuntimeError, e.what());
33625 SWIG_fail;
33626 }
33627 Py_END_ALLOW_THREADS
33628 }
33629 resultobj = SWIG_Py_Void();
33630 return resultobj;
33631 fail:
33632 return NULL;
33633 }
33634
33635
33636 SWIGINTERN PyObject *_wrap_InvertedLists_get_single_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33637 PyObject *resultobj = 0;
33638 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33639 size_t arg2 ;
33640 size_t arg3 ;
33641 void *argp1 = 0 ;
33642 int res1 = 0 ;
33643 size_t val2 ;
33644 int ecode2 = 0 ;
33645 size_t val3 ;
33646 int ecode3 = 0 ;
33647 PyObject * obj0 = 0 ;
33648 PyObject * obj1 = 0 ;
33649 PyObject * obj2 = 0 ;
33650 faiss::InvertedLists::idx_t result;
33651
33652 if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_get_single_id",&obj0,&obj1,&obj2)) SWIG_fail;
33653 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33654 if (!SWIG_IsOK(res1)) {
33655 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_get_single_id" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
33656 }
33657 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33658 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33659 if (!SWIG_IsOK(ecode2)) {
33660 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_get_single_id" "', argument " "2"" of type '" "size_t""'");
33661 }
33662 arg2 = static_cast< size_t >(val2);
33663 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
33664 if (!SWIG_IsOK(ecode3)) {
33665 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_get_single_id" "', argument " "3"" of type '" "size_t""'");
33666 }
33667 arg3 = static_cast< size_t >(val3);
33668 {
33669 Py_BEGIN_ALLOW_THREADS
33670 try {
33671 result = (faiss::InvertedLists::idx_t)((faiss::InvertedLists const *)arg1)->get_single_id(arg2,arg3);
33672 } catch(faiss::FaissException & e) {
33673 PyEval_RestoreThread(_save);
33674 PyErr_SetString(PyExc_RuntimeError, e.what());
33675 SWIG_fail;
33676 }
33677 Py_END_ALLOW_THREADS
33678 }
33679 resultobj = SWIG_From_long(static_cast< long >(result));
33680 return resultobj;
33681 fail:
33682 return NULL;
33683 }
33684
33685
33686 SWIGINTERN PyObject *_wrap_InvertedLists_get_single_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33687 PyObject *resultobj = 0;
33688 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33689 size_t arg2 ;
33690 size_t arg3 ;
33691 void *argp1 = 0 ;
33692 int res1 = 0 ;
33693 size_t val2 ;
33694 int ecode2 = 0 ;
33695 size_t val3 ;
33696 int ecode3 = 0 ;
33697 PyObject * obj0 = 0 ;
33698 PyObject * obj1 = 0 ;
33699 PyObject * obj2 = 0 ;
33700 uint8_t *result = 0 ;
33701
33702 if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_get_single_code",&obj0,&obj1,&obj2)) SWIG_fail;
33703 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33704 if (!SWIG_IsOK(res1)) {
33705 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_get_single_code" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
33706 }
33707 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33708 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33709 if (!SWIG_IsOK(ecode2)) {
33710 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_get_single_code" "', argument " "2"" of type '" "size_t""'");
33711 }
33712 arg2 = static_cast< size_t >(val2);
33713 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
33714 if (!SWIG_IsOK(ecode3)) {
33715 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_get_single_code" "', argument " "3"" of type '" "size_t""'");
33716 }
33717 arg3 = static_cast< size_t >(val3);
33718 {
33719 Py_BEGIN_ALLOW_THREADS
33720 try {
33721 result = (uint8_t *)((faiss::InvertedLists const *)arg1)->get_single_code(arg2,arg3);
33722 } catch(faiss::FaissException & e) {
33723 PyEval_RestoreThread(_save);
33724 PyErr_SetString(PyExc_RuntimeError, e.what());
33725 SWIG_fail;
33726 }
33727 Py_END_ALLOW_THREADS
33728 }
33729 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
33730 return resultobj;
33731 fail:
33732 return NULL;
33733 }
33734
33735
33736 SWIGINTERN PyObject *_wrap_InvertedLists_prefetch_lists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33737 PyObject *resultobj = 0;
33738 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33739 long *arg2 = (long *) 0 ;
33740 int arg3 ;
33741 void *argp1 = 0 ;
33742 int res1 = 0 ;
33743 void *argp2 = 0 ;
33744 int res2 = 0 ;
33745 int val3 ;
33746 int ecode3 = 0 ;
33747 PyObject * obj0 = 0 ;
33748 PyObject * obj1 = 0 ;
33749 PyObject * obj2 = 0 ;
33750
33751 if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_prefetch_lists",&obj0,&obj1,&obj2)) SWIG_fail;
33752 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33753 if (!SWIG_IsOK(res1)) {
33754 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_prefetch_lists" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
33755 }
33756 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33757 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
33758 if (!SWIG_IsOK(res2)) {
33759 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedLists_prefetch_lists" "', argument " "2"" of type '" "long const *""'");
33760 }
33761 arg2 = reinterpret_cast< long * >(argp2);
33762 ecode3 = SWIG_AsVal_int(obj2, &val3);
33763 if (!SWIG_IsOK(ecode3)) {
33764 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_prefetch_lists" "', argument " "3"" of type '" "int""'");
33765 }
33766 arg3 = static_cast< int >(val3);
33767 {
33768 Py_BEGIN_ALLOW_THREADS
33769 try {
33770 ((faiss::InvertedLists const *)arg1)->prefetch_lists((long const *)arg2,arg3);
33771 } catch(faiss::FaissException & e) {
33772 PyEval_RestoreThread(_save);
33773 PyErr_SetString(PyExc_RuntimeError, e.what());
33774 SWIG_fail;
33775 }
33776 Py_END_ALLOW_THREADS
33777 }
33778 resultobj = SWIG_Py_Void();
33779 return resultobj;
33780 fail:
33781 return NULL;
33782 }
33783
33784
33785 SWIGINTERN PyObject *_wrap_InvertedLists_add_entry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33786 PyObject *resultobj = 0;
33787 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33788 size_t arg2 ;
33789 faiss::InvertedLists::idx_t arg3 ;
33790 uint8_t *arg4 = (uint8_t *) 0 ;
33791 void *argp1 = 0 ;
33792 int res1 = 0 ;
33793 size_t val2 ;
33794 int ecode2 = 0 ;
33795 long val3 ;
33796 int ecode3 = 0 ;
33797 void *argp4 = 0 ;
33798 int res4 = 0 ;
33799 PyObject * obj0 = 0 ;
33800 PyObject * obj1 = 0 ;
33801 PyObject * obj2 = 0 ;
33802 PyObject * obj3 = 0 ;
33803 size_t result;
33804
33805 if (!PyArg_ParseTuple(args,(char *)"OOOO:InvertedLists_add_entry",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
33806 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33807 if (!SWIG_IsOK(res1)) {
33808 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_add_entry" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
33809 }
33810 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33811 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33812 if (!SWIG_IsOK(ecode2)) {
33813 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_add_entry" "', argument " "2"" of type '" "size_t""'");
33814 }
33815 arg2 = static_cast< size_t >(val2);
33816 ecode3 = SWIG_AsVal_long(obj2, &val3);
33817 if (!SWIG_IsOK(ecode3)) {
33818 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_add_entry" "', argument " "3"" of type '" "faiss::InvertedLists::idx_t""'");
33819 }
33820 arg3 = static_cast< faiss::InvertedLists::idx_t >(val3);
33821 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
33822 if (!SWIG_IsOK(res4)) {
33823 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "InvertedLists_add_entry" "', argument " "4"" of type '" "uint8_t const *""'");
33824 }
33825 arg4 = reinterpret_cast< uint8_t * >(argp4);
33826 {
33827 Py_BEGIN_ALLOW_THREADS
33828 try {
33829 result = (size_t)(arg1)->add_entry(arg2,arg3,(uint8_t const *)arg4);
33830 } catch(faiss::FaissException & e) {
33831 PyEval_RestoreThread(_save);
33832 PyErr_SetString(PyExc_RuntimeError, e.what());
33833 SWIG_fail;
33834 }
33835 Py_END_ALLOW_THREADS
33836 }
33837 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
33838 return resultobj;
33839 fail:
33840 return NULL;
33841 }
33842
33843
33844 SWIGINTERN PyObject *_wrap_InvertedLists_add_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33845 PyObject *resultobj = 0;
33846 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33847 size_t arg2 ;
33848 size_t arg3 ;
33849 faiss::InvertedLists::idx_t *arg4 = (faiss::InvertedLists::idx_t *) 0 ;
33850 uint8_t *arg5 = (uint8_t *) 0 ;
33851 void *argp1 = 0 ;
33852 int res1 = 0 ;
33853 size_t val2 ;
33854 int ecode2 = 0 ;
33855 size_t val3 ;
33856 int ecode3 = 0 ;
33857 void *argp4 = 0 ;
33858 int res4 = 0 ;
33859 void *argp5 = 0 ;
33860 int res5 = 0 ;
33861 PyObject * obj0 = 0 ;
33862 PyObject * obj1 = 0 ;
33863 PyObject * obj2 = 0 ;
33864 PyObject * obj3 = 0 ;
33865 PyObject * obj4 = 0 ;
33866 size_t result;
33867
33868 if (!PyArg_ParseTuple(args,(char *)"OOOOO:InvertedLists_add_entries",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
33869 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33870 if (!SWIG_IsOK(res1)) {
33871 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_add_entries" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
33872 }
33873 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33874 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33875 if (!SWIG_IsOK(ecode2)) {
33876 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_add_entries" "', argument " "2"" of type '" "size_t""'");
33877 }
33878 arg2 = static_cast< size_t >(val2);
33879 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
33880 if (!SWIG_IsOK(ecode3)) {
33881 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_add_entries" "', argument " "3"" of type '" "size_t""'");
33882 }
33883 arg3 = static_cast< size_t >(val3);
33884 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
33885 if (!SWIG_IsOK(res4)) {
33886 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "InvertedLists_add_entries" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t const *""'");
33887 }
33888 arg4 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp4);
33889 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
33890 if (!SWIG_IsOK(res5)) {
33891 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InvertedLists_add_entries" "', argument " "5"" of type '" "uint8_t const *""'");
33892 }
33893 arg5 = reinterpret_cast< uint8_t * >(argp5);
33894 {
33895 Py_BEGIN_ALLOW_THREADS
33896 try {
33897 result = (size_t)(arg1)->add_entries(arg2,arg3,(faiss::InvertedLists::idx_t const *)arg4,(uint8_t const *)arg5);
33898 } catch(faiss::FaissException & e) {
33899 PyEval_RestoreThread(_save);
33900 PyErr_SetString(PyExc_RuntimeError, e.what());
33901 SWIG_fail;
33902 }
33903 Py_END_ALLOW_THREADS
33904 }
33905 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
33906 return resultobj;
33907 fail:
33908 return NULL;
33909 }
33910
33911
33912 SWIGINTERN PyObject *_wrap_InvertedLists_update_entry(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33913 PyObject *resultobj = 0;
33914 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33915 size_t arg2 ;
33916 size_t arg3 ;
33917 faiss::InvertedLists::idx_t arg4 ;
33918 uint8_t *arg5 = (uint8_t *) 0 ;
33919 void *argp1 = 0 ;
33920 int res1 = 0 ;
33921 size_t val2 ;
33922 int ecode2 = 0 ;
33923 size_t val3 ;
33924 int ecode3 = 0 ;
33925 long val4 ;
33926 int ecode4 = 0 ;
33927 void *argp5 = 0 ;
33928 int res5 = 0 ;
33929 PyObject * obj0 = 0 ;
33930 PyObject * obj1 = 0 ;
33931 PyObject * obj2 = 0 ;
33932 PyObject * obj3 = 0 ;
33933 PyObject * obj4 = 0 ;
33934
33935 if (!PyArg_ParseTuple(args,(char *)"OOOOO:InvertedLists_update_entry",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
33936 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
33937 if (!SWIG_IsOK(res1)) {
33938 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_update_entry" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
33939 }
33940 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
33941 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
33942 if (!SWIG_IsOK(ecode2)) {
33943 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_update_entry" "', argument " "2"" of type '" "size_t""'");
33944 }
33945 arg2 = static_cast< size_t >(val2);
33946 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
33947 if (!SWIG_IsOK(ecode3)) {
33948 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_update_entry" "', argument " "3"" of type '" "size_t""'");
33949 }
33950 arg3 = static_cast< size_t >(val3);
33951 ecode4 = SWIG_AsVal_long(obj3, &val4);
33952 if (!SWIG_IsOK(ecode4)) {
33953 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InvertedLists_update_entry" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t""'");
33954 }
33955 arg4 = static_cast< faiss::InvertedLists::idx_t >(val4);
33956 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
33957 if (!SWIG_IsOK(res5)) {
33958 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InvertedLists_update_entry" "', argument " "5"" of type '" "uint8_t const *""'");
33959 }
33960 arg5 = reinterpret_cast< uint8_t * >(argp5);
33961 {
33962 Py_BEGIN_ALLOW_THREADS
33963 try {
33964 (arg1)->update_entry(arg2,arg3,arg4,(uint8_t const *)arg5);
33965 } catch(faiss::FaissException & e) {
33966 PyEval_RestoreThread(_save);
33967 PyErr_SetString(PyExc_RuntimeError, e.what());
33968 SWIG_fail;
33969 }
33970 Py_END_ALLOW_THREADS
33971 }
33972 resultobj = SWIG_Py_Void();
33973 return resultobj;
33974 fail:
33975 return NULL;
33976 }
33977
33978
33979 SWIGINTERN PyObject *_wrap_InvertedLists_update_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
33980 PyObject *resultobj = 0;
33981 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
33982 size_t arg2 ;
33983 size_t arg3 ;
33984 size_t arg4 ;
33985 faiss::InvertedLists::idx_t *arg5 = (faiss::InvertedLists::idx_t *) 0 ;
33986 uint8_t *arg6 = (uint8_t *) 0 ;
33987 void *argp1 = 0 ;
33988 int res1 = 0 ;
33989 size_t val2 ;
33990 int ecode2 = 0 ;
33991 size_t val3 ;
33992 int ecode3 = 0 ;
33993 size_t val4 ;
33994 int ecode4 = 0 ;
33995 void *argp5 = 0 ;
33996 int res5 = 0 ;
33997 void *argp6 = 0 ;
33998 int res6 = 0 ;
33999 PyObject * obj0 = 0 ;
34000 PyObject * obj1 = 0 ;
34001 PyObject * obj2 = 0 ;
34002 PyObject * obj3 = 0 ;
34003 PyObject * obj4 = 0 ;
34004 PyObject * obj5 = 0 ;
34005
34006 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:InvertedLists_update_entries",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
34007 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34008 if (!SWIG_IsOK(res1)) {
34009 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_update_entries" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34010 }
34011 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34012 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34013 if (!SWIG_IsOK(ecode2)) {
34014 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_update_entries" "', argument " "2"" of type '" "size_t""'");
34015 }
34016 arg2 = static_cast< size_t >(val2);
34017 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
34018 if (!SWIG_IsOK(ecode3)) {
34019 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_update_entries" "', argument " "3"" of type '" "size_t""'");
34020 }
34021 arg3 = static_cast< size_t >(val3);
34022 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
34023 if (!SWIG_IsOK(ecode4)) {
34024 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "InvertedLists_update_entries" "', argument " "4"" of type '" "size_t""'");
34025 }
34026 arg4 = static_cast< size_t >(val4);
34027 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
34028 if (!SWIG_IsOK(res5)) {
34029 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "InvertedLists_update_entries" "', argument " "5"" of type '" "faiss::InvertedLists::idx_t const *""'");
34030 }
34031 arg5 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp5);
34032 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_unsigned_char, 0 | 0 );
34033 if (!SWIG_IsOK(res6)) {
34034 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "InvertedLists_update_entries" "', argument " "6"" of type '" "uint8_t const *""'");
34035 }
34036 arg6 = reinterpret_cast< uint8_t * >(argp6);
34037 {
34038 Py_BEGIN_ALLOW_THREADS
34039 try {
34040 (arg1)->update_entries(arg2,arg3,arg4,(faiss::InvertedLists::idx_t const *)arg5,(uint8_t const *)arg6);
34041 } catch(faiss::FaissException & e) {
34042 PyEval_RestoreThread(_save);
34043 PyErr_SetString(PyExc_RuntimeError, e.what());
34044 SWIG_fail;
34045 }
34046 Py_END_ALLOW_THREADS
34047 }
34048 resultobj = SWIG_Py_Void();
34049 return resultobj;
34050 fail:
34051 return NULL;
34052 }
34053
34054
34055 SWIGINTERN PyObject *_wrap_InvertedLists_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34056 PyObject *resultobj = 0;
34057 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
34058 size_t arg2 ;
34059 size_t arg3 ;
34060 void *argp1 = 0 ;
34061 int res1 = 0 ;
34062 size_t val2 ;
34063 int ecode2 = 0 ;
34064 size_t val3 ;
34065 int ecode3 = 0 ;
34066 PyObject * obj0 = 0 ;
34067 PyObject * obj1 = 0 ;
34068 PyObject * obj2 = 0 ;
34069
34070 if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_resize",&obj0,&obj1,&obj2)) SWIG_fail;
34071 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34072 if (!SWIG_IsOK(res1)) {
34073 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_resize" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34074 }
34075 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34076 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34077 if (!SWIG_IsOK(ecode2)) {
34078 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "InvertedLists_resize" "', argument " "2"" of type '" "size_t""'");
34079 }
34080 arg2 = static_cast< size_t >(val2);
34081 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
34082 if (!SWIG_IsOK(ecode3)) {
34083 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_resize" "', argument " "3"" of type '" "size_t""'");
34084 }
34085 arg3 = static_cast< size_t >(val3);
34086 {
34087 Py_BEGIN_ALLOW_THREADS
34088 try {
34089 (arg1)->resize(arg2,arg3);
34090 } catch(faiss::FaissException & e) {
34091 PyEval_RestoreThread(_save);
34092 PyErr_SetString(PyExc_RuntimeError, e.what());
34093 SWIG_fail;
34094 }
34095 Py_END_ALLOW_THREADS
34096 }
34097 resultobj = SWIG_Py_Void();
34098 return resultobj;
34099 fail:
34100 return NULL;
34101 }
34102
34103
34104 SWIGINTERN PyObject *_wrap_InvertedLists_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34105 PyObject *resultobj = 0;
34106 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
34107 void *argp1 = 0 ;
34108 int res1 = 0 ;
34109 PyObject * obj0 = 0 ;
34110
34111 if (!PyArg_ParseTuple(args,(char *)"O:InvertedLists_reset",&obj0)) SWIG_fail;
34112 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34113 if (!SWIG_IsOK(res1)) {
34114 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_reset" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34115 }
34116 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34117 {
34118 Py_BEGIN_ALLOW_THREADS
34119 try {
34120 (arg1)->reset();
34121 } catch(faiss::FaissException & e) {
34122 PyEval_RestoreThread(_save);
34123 PyErr_SetString(PyExc_RuntimeError, e.what());
34124 SWIG_fail;
34125 }
34126 Py_END_ALLOW_THREADS
34127 }
34128 resultobj = SWIG_Py_Void();
34129 return resultobj;
34130 fail:
34131 return NULL;
34132 }
34133
34134
34135 SWIGINTERN PyObject *_wrap_InvertedLists_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34136 PyObject *resultobj = 0;
34137 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
34138 faiss::InvertedLists *arg2 = (faiss::InvertedLists *) 0 ;
34139 size_t arg3 ;
34140 void *argp1 = 0 ;
34141 int res1 = 0 ;
34142 void *argp2 = 0 ;
34143 int res2 = 0 ;
34144 size_t val3 ;
34145 int ecode3 = 0 ;
34146 PyObject * obj0 = 0 ;
34147 PyObject * obj1 = 0 ;
34148 PyObject * obj2 = 0 ;
34149
34150 if (!PyArg_ParseTuple(args,(char *)"OOO:InvertedLists_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
34151 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34152 if (!SWIG_IsOK(res1)) {
34153 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "InvertedLists_merge_from" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34154 }
34155 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34156 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
34157 if (!SWIG_IsOK(res2)) {
34158 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "InvertedLists_merge_from" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
34159 }
34160 arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
34161 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
34162 if (!SWIG_IsOK(ecode3)) {
34163 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "InvertedLists_merge_from" "', argument " "3"" of type '" "size_t""'");
34164 }
34165 arg3 = static_cast< size_t >(val3);
34166 {
34167 Py_BEGIN_ALLOW_THREADS
34168 try {
34169 (arg1)->merge_from(arg2,arg3);
34170 } catch(faiss::FaissException & e) {
34171 PyEval_RestoreThread(_save);
34172 PyErr_SetString(PyExc_RuntimeError, e.what());
34173 SWIG_fail;
34174 }
34175 Py_END_ALLOW_THREADS
34176 }
34177 resultobj = SWIG_Py_Void();
34178 return resultobj;
34179 fail:
34180 return NULL;
34181 }
34182
34183
34184 SWIGINTERN PyObject *_wrap_delete_InvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34185 PyObject *resultobj = 0;
34186 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
34187 void *argp1 = 0 ;
34188 int res1 = 0 ;
34189 PyObject * obj0 = 0 ;
34190
34191 if (!PyArg_ParseTuple(args,(char *)"O:delete_InvertedLists",&obj0)) SWIG_fail;
34192 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, SWIG_POINTER_DISOWN | 0 );
34193 if (!SWIG_IsOK(res1)) {
34194 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_InvertedLists" "', argument " "1"" of type '" "faiss::InvertedLists *""'");
34195 }
34196 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
34197 {
34198 Py_BEGIN_ALLOW_THREADS
34199 try {
34200 delete arg1;
34201 } catch(faiss::FaissException & e) {
34202 PyEval_RestoreThread(_save);
34203 PyErr_SetString(PyExc_RuntimeError, e.what());
34204 SWIG_fail;
34205 }
34206 Py_END_ALLOW_THREADS
34207 }
34208 resultobj = SWIG_Py_Void();
34209 return resultobj;
34210 fail:
34211 return NULL;
34212 }
34213
34214
34215 SWIGINTERN PyObject *InvertedLists_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34216 PyObject *obj;
34217 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
34218 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__InvertedLists, SWIG_NewClientData(obj));
34219 return SWIG_Py_Void();
34220 }
34221
34222 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34223 PyObject *resultobj = 0;
34224 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34225 std::vector< std::vector< uint8_t > > *arg2 = (std::vector< std::vector< uint8_t > > *) 0 ;
34226 void *argp1 = 0 ;
34227 int res1 = 0 ;
34228 void *argp2 = 0 ;
34229 int res2 = 0 ;
34230 PyObject * obj0 = 0 ;
34231 PyObject * obj1 = 0 ;
34232
34233 if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_codes_set",&obj0,&obj1)) SWIG_fail;
34234 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34235 if (!SWIG_IsOK(res1)) {
34236 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_codes_set" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
34237 }
34238 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34239 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
34240 if (!SWIG_IsOK(res2)) {
34241 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArrayInvertedLists_codes_set" "', argument " "2"" of type '" "std::vector< std::vector< uint8_t > > *""'");
34242 }
34243 arg2 = reinterpret_cast< std::vector< std::vector< uint8_t > > * >(argp2);
34244 if (arg1) (arg1)->codes = *arg2;
34245 resultobj = SWIG_Py_Void();
34246 return resultobj;
34247 fail:
34248 return NULL;
34249 }
34250
34251
34252 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34253 PyObject *resultobj = 0;
34254 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34255 void *argp1 = 0 ;
34256 int res1 = 0 ;
34257 PyObject * obj0 = 0 ;
34258 std::vector< std::vector< uint8_t > > *result = 0 ;
34259
34260 if (!PyArg_ParseTuple(args,(char *)"O:ArrayInvertedLists_codes_get",&obj0)) SWIG_fail;
34261 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34262 if (!SWIG_IsOK(res1)) {
34263 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_codes_get" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
34264 }
34265 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34266 result = (std::vector< std::vector< uint8_t > > *)& ((arg1)->codes);
34267 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_uint8_t_t_t, 0 | 0 );
34268 return resultobj;
34269 fail:
34270 return NULL;
34271 }
34272
34273
34274 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34275 PyObject *resultobj = 0;
34276 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34277 std::vector< std::vector< faiss::InvertedLists::idx_t > > *arg2 = (std::vector< std::vector< faiss::InvertedLists::idx_t > > *) 0 ;
34278 void *argp1 = 0 ;
34279 int res1 = 0 ;
34280 void *argp2 = 0 ;
34281 int res2 = 0 ;
34282 PyObject * obj0 = 0 ;
34283 PyObject * obj1 = 0 ;
34284
34285 if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_ids_set",&obj0,&obj1)) SWIG_fail;
34286 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34287 if (!SWIG_IsOK(res1)) {
34288 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_ids_set" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
34289 }
34290 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34291 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
34292 if (!SWIG_IsOK(res2)) {
34293 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ArrayInvertedLists_ids_set" "', argument " "2"" of type '" "std::vector< std::vector< faiss::InvertedLists::idx_t > > *""'");
34294 }
34295 arg2 = reinterpret_cast< std::vector< std::vector< faiss::InvertedLists::idx_t > > * >(argp2);
34296 if (arg1) (arg1)->ids = *arg2;
34297 resultobj = SWIG_Py_Void();
34298 return resultobj;
34299 fail:
34300 return NULL;
34301 }
34302
34303
34304 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34305 PyObject *resultobj = 0;
34306 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34307 void *argp1 = 0 ;
34308 int res1 = 0 ;
34309 PyObject * obj0 = 0 ;
34310 std::vector< std::vector< faiss::InvertedLists::idx_t > > *result = 0 ;
34311
34312 if (!PyArg_ParseTuple(args,(char *)"O:ArrayInvertedLists_ids_get",&obj0)) SWIG_fail;
34313 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34314 if (!SWIG_IsOK(res1)) {
34315 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_ids_get" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
34316 }
34317 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34318 result = (std::vector< std::vector< faiss::InvertedLists::idx_t > > *)& ((arg1)->ids);
34319 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_long_t_t, 0 | 0 );
34320 return resultobj;
34321 fail:
34322 return NULL;
34323 }
34324
34325
34326 SWIGINTERN PyObject *_wrap_new_ArrayInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34327 PyObject *resultobj = 0;
34328 size_t arg1 ;
34329 size_t arg2 ;
34330 size_t val1 ;
34331 int ecode1 = 0 ;
34332 size_t val2 ;
34333 int ecode2 = 0 ;
34334 PyObject * obj0 = 0 ;
34335 PyObject * obj1 = 0 ;
34336 faiss::ArrayInvertedLists *result = 0 ;
34337
34338 if (!PyArg_ParseTuple(args,(char *)"OO:new_ArrayInvertedLists",&obj0,&obj1)) SWIG_fail;
34339 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
34340 if (!SWIG_IsOK(ecode1)) {
34341 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ArrayInvertedLists" "', argument " "1"" of type '" "size_t""'");
34342 }
34343 arg1 = static_cast< size_t >(val1);
34344 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34345 if (!SWIG_IsOK(ecode2)) {
34346 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ArrayInvertedLists" "', argument " "2"" of type '" "size_t""'");
34347 }
34348 arg2 = static_cast< size_t >(val2);
34349 {
34350 Py_BEGIN_ALLOW_THREADS
34351 try {
34352 result = (faiss::ArrayInvertedLists *)new faiss::ArrayInvertedLists(arg1,arg2);
34353 } catch(faiss::FaissException & e) {
34354 PyEval_RestoreThread(_save);
34355 PyErr_SetString(PyExc_RuntimeError, e.what());
34356 SWIG_fail;
34357 }
34358 Py_END_ALLOW_THREADS
34359 }
34360 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ArrayInvertedLists, SWIG_POINTER_NEW | 0 );
34361 return resultobj;
34362 fail:
34363 return NULL;
34364 }
34365
34366
34367 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34368 PyObject *resultobj = 0;
34369 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34370 size_t arg2 ;
34371 void *argp1 = 0 ;
34372 int res1 = 0 ;
34373 size_t val2 ;
34374 int ecode2 = 0 ;
34375 PyObject * obj0 = 0 ;
34376 PyObject * obj1 = 0 ;
34377 size_t result;
34378
34379 if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_list_size",&obj0,&obj1)) SWIG_fail;
34380 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34381 if (!SWIG_IsOK(res1)) {
34382 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_list_size" "', argument " "1"" of type '" "faiss::ArrayInvertedLists const *""'");
34383 }
34384 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34385 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34386 if (!SWIG_IsOK(ecode2)) {
34387 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_list_size" "', argument " "2"" of type '" "size_t""'");
34388 }
34389 arg2 = static_cast< size_t >(val2);
34390 {
34391 Py_BEGIN_ALLOW_THREADS
34392 try {
34393 result = (size_t)((faiss::ArrayInvertedLists const *)arg1)->list_size(arg2);
34394 } catch(faiss::FaissException & e) {
34395 PyEval_RestoreThread(_save);
34396 PyErr_SetString(PyExc_RuntimeError, e.what());
34397 SWIG_fail;
34398 }
34399 Py_END_ALLOW_THREADS
34400 }
34401 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
34402 return resultobj;
34403 fail:
34404 return NULL;
34405 }
34406
34407
34408 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_get_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34409 PyObject *resultobj = 0;
34410 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34411 size_t arg2 ;
34412 void *argp1 = 0 ;
34413 int res1 = 0 ;
34414 size_t val2 ;
34415 int ecode2 = 0 ;
34416 PyObject * obj0 = 0 ;
34417 PyObject * obj1 = 0 ;
34418 uint8_t *result = 0 ;
34419
34420 if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_get_codes",&obj0,&obj1)) SWIG_fail;
34421 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34422 if (!SWIG_IsOK(res1)) {
34423 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_get_codes" "', argument " "1"" of type '" "faiss::ArrayInvertedLists const *""'");
34424 }
34425 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34426 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34427 if (!SWIG_IsOK(ecode2)) {
34428 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_get_codes" "', argument " "2"" of type '" "size_t""'");
34429 }
34430 arg2 = static_cast< size_t >(val2);
34431 {
34432 Py_BEGIN_ALLOW_THREADS
34433 try {
34434 result = (uint8_t *)((faiss::ArrayInvertedLists const *)arg1)->get_codes(arg2);
34435 } catch(faiss::FaissException & e) {
34436 PyEval_RestoreThread(_save);
34437 PyErr_SetString(PyExc_RuntimeError, e.what());
34438 SWIG_fail;
34439 }
34440 Py_END_ALLOW_THREADS
34441 }
34442 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
34443 return resultobj;
34444 fail:
34445 return NULL;
34446 }
34447
34448
34449 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34450 PyObject *resultobj = 0;
34451 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34452 size_t arg2 ;
34453 void *argp1 = 0 ;
34454 int res1 = 0 ;
34455 size_t val2 ;
34456 int ecode2 = 0 ;
34457 PyObject * obj0 = 0 ;
34458 PyObject * obj1 = 0 ;
34459 faiss::InvertedLists::idx_t *result = 0 ;
34460
34461 if (!PyArg_ParseTuple(args,(char *)"OO:ArrayInvertedLists_get_ids",&obj0,&obj1)) SWIG_fail;
34462 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34463 if (!SWIG_IsOK(res1)) {
34464 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_get_ids" "', argument " "1"" of type '" "faiss::ArrayInvertedLists const *""'");
34465 }
34466 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34467 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34468 if (!SWIG_IsOK(ecode2)) {
34469 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_get_ids" "', argument " "2"" of type '" "size_t""'");
34470 }
34471 arg2 = static_cast< size_t >(val2);
34472 {
34473 Py_BEGIN_ALLOW_THREADS
34474 try {
34475 result = (faiss::InvertedLists::idx_t *)((faiss::ArrayInvertedLists const *)arg1)->get_ids(arg2);
34476 } catch(faiss::FaissException & e) {
34477 PyEval_RestoreThread(_save);
34478 PyErr_SetString(PyExc_RuntimeError, e.what());
34479 SWIG_fail;
34480 }
34481 Py_END_ALLOW_THREADS
34482 }
34483 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
34484 return resultobj;
34485 fail:
34486 return NULL;
34487 }
34488
34489
34490 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_add_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34491 PyObject *resultobj = 0;
34492 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34493 size_t arg2 ;
34494 size_t arg3 ;
34495 faiss::InvertedLists::idx_t *arg4 = (faiss::InvertedLists::idx_t *) 0 ;
34496 uint8_t *arg5 = (uint8_t *) 0 ;
34497 void *argp1 = 0 ;
34498 int res1 = 0 ;
34499 size_t val2 ;
34500 int ecode2 = 0 ;
34501 size_t val3 ;
34502 int ecode3 = 0 ;
34503 void *argp4 = 0 ;
34504 int res4 = 0 ;
34505 void *argp5 = 0 ;
34506 int res5 = 0 ;
34507 PyObject * obj0 = 0 ;
34508 PyObject * obj1 = 0 ;
34509 PyObject * obj2 = 0 ;
34510 PyObject * obj3 = 0 ;
34511 PyObject * obj4 = 0 ;
34512 size_t result;
34513
34514 if (!PyArg_ParseTuple(args,(char *)"OOOOO:ArrayInvertedLists_add_entries",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
34515 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34516 if (!SWIG_IsOK(res1)) {
34517 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_add_entries" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
34518 }
34519 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34520 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34521 if (!SWIG_IsOK(ecode2)) {
34522 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_add_entries" "', argument " "2"" of type '" "size_t""'");
34523 }
34524 arg2 = static_cast< size_t >(val2);
34525 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
34526 if (!SWIG_IsOK(ecode3)) {
34527 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ArrayInvertedLists_add_entries" "', argument " "3"" of type '" "size_t""'");
34528 }
34529 arg3 = static_cast< size_t >(val3);
34530 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
34531 if (!SWIG_IsOK(res4)) {
34532 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ArrayInvertedLists_add_entries" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t const *""'");
34533 }
34534 arg4 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp4);
34535 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
34536 if (!SWIG_IsOK(res5)) {
34537 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ArrayInvertedLists_add_entries" "', argument " "5"" of type '" "uint8_t const *""'");
34538 }
34539 arg5 = reinterpret_cast< uint8_t * >(argp5);
34540 {
34541 Py_BEGIN_ALLOW_THREADS
34542 try {
34543 result = (size_t)(arg1)->add_entries(arg2,arg3,(faiss::InvertedLists::idx_t const *)arg4,(uint8_t const *)arg5);
34544 } catch(faiss::FaissException & e) {
34545 PyEval_RestoreThread(_save);
34546 PyErr_SetString(PyExc_RuntimeError, e.what());
34547 SWIG_fail;
34548 }
34549 Py_END_ALLOW_THREADS
34550 }
34551 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
34552 return resultobj;
34553 fail:
34554 return NULL;
34555 }
34556
34557
34558 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_update_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34559 PyObject *resultobj = 0;
34560 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34561 size_t arg2 ;
34562 size_t arg3 ;
34563 size_t arg4 ;
34564 faiss::InvertedLists::idx_t *arg5 = (faiss::InvertedLists::idx_t *) 0 ;
34565 uint8_t *arg6 = (uint8_t *) 0 ;
34566 void *argp1 = 0 ;
34567 int res1 = 0 ;
34568 size_t val2 ;
34569 int ecode2 = 0 ;
34570 size_t val3 ;
34571 int ecode3 = 0 ;
34572 size_t val4 ;
34573 int ecode4 = 0 ;
34574 void *argp5 = 0 ;
34575 int res5 = 0 ;
34576 void *argp6 = 0 ;
34577 int res6 = 0 ;
34578 PyObject * obj0 = 0 ;
34579 PyObject * obj1 = 0 ;
34580 PyObject * obj2 = 0 ;
34581 PyObject * obj3 = 0 ;
34582 PyObject * obj4 = 0 ;
34583 PyObject * obj5 = 0 ;
34584
34585 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ArrayInvertedLists_update_entries",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
34586 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34587 if (!SWIG_IsOK(res1)) {
34588 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_update_entries" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
34589 }
34590 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34591 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34592 if (!SWIG_IsOK(ecode2)) {
34593 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_update_entries" "', argument " "2"" of type '" "size_t""'");
34594 }
34595 arg2 = static_cast< size_t >(val2);
34596 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
34597 if (!SWIG_IsOK(ecode3)) {
34598 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ArrayInvertedLists_update_entries" "', argument " "3"" of type '" "size_t""'");
34599 }
34600 arg3 = static_cast< size_t >(val3);
34601 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
34602 if (!SWIG_IsOK(ecode4)) {
34603 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ArrayInvertedLists_update_entries" "', argument " "4"" of type '" "size_t""'");
34604 }
34605 arg4 = static_cast< size_t >(val4);
34606 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
34607 if (!SWIG_IsOK(res5)) {
34608 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ArrayInvertedLists_update_entries" "', argument " "5"" of type '" "faiss::InvertedLists::idx_t const *""'");
34609 }
34610 arg5 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp5);
34611 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_unsigned_char, 0 | 0 );
34612 if (!SWIG_IsOK(res6)) {
34613 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ArrayInvertedLists_update_entries" "', argument " "6"" of type '" "uint8_t const *""'");
34614 }
34615 arg6 = reinterpret_cast< uint8_t * >(argp6);
34616 {
34617 Py_BEGIN_ALLOW_THREADS
34618 try {
34619 (arg1)->update_entries(arg2,arg3,arg4,(faiss::InvertedLists::idx_t const *)arg5,(uint8_t const *)arg6);
34620 } catch(faiss::FaissException & e) {
34621 PyEval_RestoreThread(_save);
34622 PyErr_SetString(PyExc_RuntimeError, e.what());
34623 SWIG_fail;
34624 }
34625 Py_END_ALLOW_THREADS
34626 }
34627 resultobj = SWIG_Py_Void();
34628 return resultobj;
34629 fail:
34630 return NULL;
34631 }
34632
34633
34634 SWIGINTERN PyObject *_wrap_ArrayInvertedLists_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34635 PyObject *resultobj = 0;
34636 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34637 size_t arg2 ;
34638 size_t arg3 ;
34639 void *argp1 = 0 ;
34640 int res1 = 0 ;
34641 size_t val2 ;
34642 int ecode2 = 0 ;
34643 size_t val3 ;
34644 int ecode3 = 0 ;
34645 PyObject * obj0 = 0 ;
34646 PyObject * obj1 = 0 ;
34647 PyObject * obj2 = 0 ;
34648
34649 if (!PyArg_ParseTuple(args,(char *)"OOO:ArrayInvertedLists_resize",&obj0,&obj1,&obj2)) SWIG_fail;
34650 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
34651 if (!SWIG_IsOK(res1)) {
34652 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ArrayInvertedLists_resize" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
34653 }
34654 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34655 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34656 if (!SWIG_IsOK(ecode2)) {
34657 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ArrayInvertedLists_resize" "', argument " "2"" of type '" "size_t""'");
34658 }
34659 arg2 = static_cast< size_t >(val2);
34660 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
34661 if (!SWIG_IsOK(ecode3)) {
34662 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ArrayInvertedLists_resize" "', argument " "3"" of type '" "size_t""'");
34663 }
34664 arg3 = static_cast< size_t >(val3);
34665 {
34666 Py_BEGIN_ALLOW_THREADS
34667 try {
34668 (arg1)->resize(arg2,arg3);
34669 } catch(faiss::FaissException & e) {
34670 PyEval_RestoreThread(_save);
34671 PyErr_SetString(PyExc_RuntimeError, e.what());
34672 SWIG_fail;
34673 }
34674 Py_END_ALLOW_THREADS
34675 }
34676 resultobj = SWIG_Py_Void();
34677 return resultobj;
34678 fail:
34679 return NULL;
34680 }
34681
34682
34683 SWIGINTERN PyObject *_wrap_delete_ArrayInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34684 PyObject *resultobj = 0;
34685 faiss::ArrayInvertedLists *arg1 = (faiss::ArrayInvertedLists *) 0 ;
34686 void *argp1 = 0 ;
34687 int res1 = 0 ;
34688 PyObject * obj0 = 0 ;
34689
34690 if (!PyArg_ParseTuple(args,(char *)"O:delete_ArrayInvertedLists",&obj0)) SWIG_fail;
34691 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ArrayInvertedLists, SWIG_POINTER_DISOWN | 0 );
34692 if (!SWIG_IsOK(res1)) {
34693 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ArrayInvertedLists" "', argument " "1"" of type '" "faiss::ArrayInvertedLists *""'");
34694 }
34695 arg1 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp1);
34696 {
34697 Py_BEGIN_ALLOW_THREADS
34698 try {
34699 delete arg1;
34700 } catch(faiss::FaissException & e) {
34701 PyEval_RestoreThread(_save);
34702 PyErr_SetString(PyExc_RuntimeError, e.what());
34703 SWIG_fail;
34704 }
34705 Py_END_ALLOW_THREADS
34706 }
34707 resultobj = SWIG_Py_Void();
34708 return resultobj;
34709 fail:
34710 return NULL;
34711 }
34712
34713
34714 SWIGINTERN PyObject *ArrayInvertedLists_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34715 PyObject *obj;
34716 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
34717 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ArrayInvertedLists, SWIG_NewClientData(obj));
34718 return SWIG_Py_Void();
34719 }
34720
34721 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_ils_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34722 PyObject *resultobj = 0;
34723 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
34724 std::vector< faiss::InvertedLists const * > *arg2 = (std::vector< faiss::InvertedLists const * > *) 0 ;
34725 void *argp1 = 0 ;
34726 int res1 = 0 ;
34727 void *argp2 = 0 ;
34728 int res2 = 0 ;
34729 PyObject * obj0 = 0 ;
34730 PyObject * obj1 = 0 ;
34731
34732 if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_ils_set",&obj0,&obj1)) SWIG_fail;
34733 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
34734 if (!SWIG_IsOK(res1)) {
34735 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_ils_set" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
34736 }
34737 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
34738 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t, 0 | 0 );
34739 if (!SWIG_IsOK(res2)) {
34740 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConcatenatedInvertedLists_ils_set" "', argument " "2"" of type '" "std::vector< faiss::InvertedLists const * > *""'");
34741 }
34742 arg2 = reinterpret_cast< std::vector< faiss::InvertedLists const * > * >(argp2);
34743 if (arg1) (arg1)->ils = *arg2;
34744 resultobj = SWIG_Py_Void();
34745 return resultobj;
34746 fail:
34747 return NULL;
34748 }
34749
34750
34751 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_ils_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34752 PyObject *resultobj = 0;
34753 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
34754 void *argp1 = 0 ;
34755 int res1 = 0 ;
34756 PyObject * obj0 = 0 ;
34757 std::vector< faiss::InvertedLists const * > *result = 0 ;
34758
34759 if (!PyArg_ParseTuple(args,(char *)"O:ConcatenatedInvertedLists_ils_get",&obj0)) SWIG_fail;
34760 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
34761 if (!SWIG_IsOK(res1)) {
34762 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_ils_get" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
34763 }
34764 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
34765 result = (std::vector< faiss::InvertedLists const * > *)& ((arg1)->ils);
34766 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__InvertedLists_const_p_t, 0 | 0 );
34767 return resultobj;
34768 fail:
34769 return NULL;
34770 }
34771
34772
34773 SWIGINTERN PyObject *_wrap_new_ConcatenatedInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34774 PyObject *resultobj = 0;
34775 int arg1 ;
34776 faiss::InvertedLists **arg2 = (faiss::InvertedLists **) 0 ;
34777 int val1 ;
34778 int ecode1 = 0 ;
34779 void *argp2 = 0 ;
34780 int res2 = 0 ;
34781 PyObject * obj0 = 0 ;
34782 PyObject * obj1 = 0 ;
34783 faiss::ConcatenatedInvertedLists *result = 0 ;
34784
34785 if (!PyArg_ParseTuple(args,(char *)"OO:new_ConcatenatedInvertedLists",&obj0,&obj1)) SWIG_fail;
34786 ecode1 = SWIG_AsVal_int(obj0, &val1);
34787 if (!SWIG_IsOK(ecode1)) {
34788 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ConcatenatedInvertedLists" "', argument " "1"" of type '" "int""'");
34789 }
34790 arg1 = static_cast< int >(val1);
34791 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_faiss__InvertedLists, 0 | 0 );
34792 if (!SWIG_IsOK(res2)) {
34793 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_ConcatenatedInvertedLists" "', argument " "2"" of type '" "faiss::InvertedLists const **""'");
34794 }
34795 arg2 = reinterpret_cast< faiss::InvertedLists ** >(argp2);
34796 {
34797 Py_BEGIN_ALLOW_THREADS
34798 try {
34799 result = (faiss::ConcatenatedInvertedLists *)new faiss::ConcatenatedInvertedLists(arg1,(faiss::InvertedLists const **)arg2);
34800 } catch(faiss::FaissException & e) {
34801 PyEval_RestoreThread(_save);
34802 PyErr_SetString(PyExc_RuntimeError, e.what());
34803 SWIG_fail;
34804 }
34805 Py_END_ALLOW_THREADS
34806 }
34807 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ConcatenatedInvertedLists, SWIG_POINTER_NEW | 0 );
34808 return resultobj;
34809 fail:
34810 return NULL;
34811 }
34812
34813
34814 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34815 PyObject *resultobj = 0;
34816 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
34817 size_t arg2 ;
34818 void *argp1 = 0 ;
34819 int res1 = 0 ;
34820 size_t val2 ;
34821 int ecode2 = 0 ;
34822 PyObject * obj0 = 0 ;
34823 PyObject * obj1 = 0 ;
34824 size_t result;
34825
34826 if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_list_size",&obj0,&obj1)) SWIG_fail;
34827 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
34828 if (!SWIG_IsOK(res1)) {
34829 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_list_size" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
34830 }
34831 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
34832 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34833 if (!SWIG_IsOK(ecode2)) {
34834 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_list_size" "', argument " "2"" of type '" "size_t""'");
34835 }
34836 arg2 = static_cast< size_t >(val2);
34837 {
34838 Py_BEGIN_ALLOW_THREADS
34839 try {
34840 result = (size_t)((faiss::ConcatenatedInvertedLists const *)arg1)->list_size(arg2);
34841 } catch(faiss::FaissException & e) {
34842 PyEval_RestoreThread(_save);
34843 PyErr_SetString(PyExc_RuntimeError, e.what());
34844 SWIG_fail;
34845 }
34846 Py_END_ALLOW_THREADS
34847 }
34848 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
34849 return resultobj;
34850 fail:
34851 return NULL;
34852 }
34853
34854
34855 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_get_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34856 PyObject *resultobj = 0;
34857 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
34858 size_t arg2 ;
34859 void *argp1 = 0 ;
34860 int res1 = 0 ;
34861 size_t val2 ;
34862 int ecode2 = 0 ;
34863 PyObject * obj0 = 0 ;
34864 PyObject * obj1 = 0 ;
34865 uint8_t *result = 0 ;
34866
34867 if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_get_codes",&obj0,&obj1)) SWIG_fail;
34868 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
34869 if (!SWIG_IsOK(res1)) {
34870 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_get_codes" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
34871 }
34872 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
34873 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34874 if (!SWIG_IsOK(ecode2)) {
34875 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_get_codes" "', argument " "2"" of type '" "size_t""'");
34876 }
34877 arg2 = static_cast< size_t >(val2);
34878 {
34879 Py_BEGIN_ALLOW_THREADS
34880 try {
34881 result = (uint8_t *)((faiss::ConcatenatedInvertedLists const *)arg1)->get_codes(arg2);
34882 } catch(faiss::FaissException & e) {
34883 PyEval_RestoreThread(_save);
34884 PyErr_SetString(PyExc_RuntimeError, e.what());
34885 SWIG_fail;
34886 }
34887 Py_END_ALLOW_THREADS
34888 }
34889 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
34890 return resultobj;
34891 fail:
34892 return NULL;
34893 }
34894
34895
34896 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34897 PyObject *resultobj = 0;
34898 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
34899 size_t arg2 ;
34900 void *argp1 = 0 ;
34901 int res1 = 0 ;
34902 size_t val2 ;
34903 int ecode2 = 0 ;
34904 PyObject * obj0 = 0 ;
34905 PyObject * obj1 = 0 ;
34906 faiss::InvertedLists::idx_t *result = 0 ;
34907
34908 if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_get_ids",&obj0,&obj1)) SWIG_fail;
34909 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
34910 if (!SWIG_IsOK(res1)) {
34911 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_get_ids" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
34912 }
34913 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
34914 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
34915 if (!SWIG_IsOK(ecode2)) {
34916 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_get_ids" "', argument " "2"" of type '" "size_t""'");
34917 }
34918 arg2 = static_cast< size_t >(val2);
34919 {
34920 Py_BEGIN_ALLOW_THREADS
34921 try {
34922 result = (faiss::InvertedLists::idx_t *)((faiss::ConcatenatedInvertedLists const *)arg1)->get_ids(arg2);
34923 } catch(faiss::FaissException & e) {
34924 PyEval_RestoreThread(_save);
34925 PyErr_SetString(PyExc_RuntimeError, e.what());
34926 SWIG_fail;
34927 }
34928 Py_END_ALLOW_THREADS
34929 }
34930 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
34931 return resultobj;
34932 fail:
34933 return NULL;
34934 }
34935
34936
34937 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_release_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34938 PyObject *resultobj = 0;
34939 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
34940 uint8_t *arg2 = (uint8_t *) 0 ;
34941 void *argp1 = 0 ;
34942 int res1 = 0 ;
34943 void *argp2 = 0 ;
34944 int res2 = 0 ;
34945 PyObject * obj0 = 0 ;
34946 PyObject * obj1 = 0 ;
34947
34948 if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_release_codes",&obj0,&obj1)) SWIG_fail;
34949 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
34950 if (!SWIG_IsOK(res1)) {
34951 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_release_codes" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
34952 }
34953 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
34954 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
34955 if (!SWIG_IsOK(res2)) {
34956 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConcatenatedInvertedLists_release_codes" "', argument " "2"" of type '" "uint8_t const *""'");
34957 }
34958 arg2 = reinterpret_cast< uint8_t * >(argp2);
34959 {
34960 Py_BEGIN_ALLOW_THREADS
34961 try {
34962 ((faiss::ConcatenatedInvertedLists const *)arg1)->release_codes((uint8_t const *)arg2);
34963 } catch(faiss::FaissException & e) {
34964 PyEval_RestoreThread(_save);
34965 PyErr_SetString(PyExc_RuntimeError, e.what());
34966 SWIG_fail;
34967 }
34968 Py_END_ALLOW_THREADS
34969 }
34970 resultobj = SWIG_Py_Void();
34971 return resultobj;
34972 fail:
34973 return NULL;
34974 }
34975
34976
34977 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_release_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
34978 PyObject *resultobj = 0;
34979 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
34980 faiss::InvertedLists::idx_t *arg2 = (faiss::InvertedLists::idx_t *) 0 ;
34981 void *argp1 = 0 ;
34982 int res1 = 0 ;
34983 void *argp2 = 0 ;
34984 int res2 = 0 ;
34985 PyObject * obj0 = 0 ;
34986 PyObject * obj1 = 0 ;
34987
34988 if (!PyArg_ParseTuple(args,(char *)"OO:ConcatenatedInvertedLists_release_ids",&obj0,&obj1)) SWIG_fail;
34989 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
34990 if (!SWIG_IsOK(res1)) {
34991 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_release_ids" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
34992 }
34993 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
34994 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
34995 if (!SWIG_IsOK(res2)) {
34996 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ConcatenatedInvertedLists_release_ids" "', argument " "2"" of type '" "faiss::InvertedLists::idx_t const *""'");
34997 }
34998 arg2 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp2);
34999 {
35000 Py_BEGIN_ALLOW_THREADS
35001 try {
35002 ((faiss::ConcatenatedInvertedLists const *)arg1)->release_ids((faiss::InvertedLists::idx_t const *)arg2);
35003 } catch(faiss::FaissException & e) {
35004 PyEval_RestoreThread(_save);
35005 PyErr_SetString(PyExc_RuntimeError, e.what());
35006 SWIG_fail;
35007 }
35008 Py_END_ALLOW_THREADS
35009 }
35010 resultobj = SWIG_Py_Void();
35011 return resultobj;
35012 fail:
35013 return NULL;
35014 }
35015
35016
35017 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_get_single_id(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35018 PyObject *resultobj = 0;
35019 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
35020 size_t arg2 ;
35021 size_t arg3 ;
35022 void *argp1 = 0 ;
35023 int res1 = 0 ;
35024 size_t val2 ;
35025 int ecode2 = 0 ;
35026 size_t val3 ;
35027 int ecode3 = 0 ;
35028 PyObject * obj0 = 0 ;
35029 PyObject * obj1 = 0 ;
35030 PyObject * obj2 = 0 ;
35031 faiss::InvertedLists::idx_t result;
35032
35033 if (!PyArg_ParseTuple(args,(char *)"OOO:ConcatenatedInvertedLists_get_single_id",&obj0,&obj1,&obj2)) SWIG_fail;
35034 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
35035 if (!SWIG_IsOK(res1)) {
35036 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_get_single_id" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
35037 }
35038 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
35039 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35040 if (!SWIG_IsOK(ecode2)) {
35041 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_get_single_id" "', argument " "2"" of type '" "size_t""'");
35042 }
35043 arg2 = static_cast< size_t >(val2);
35044 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35045 if (!SWIG_IsOK(ecode3)) {
35046 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_get_single_id" "', argument " "3"" of type '" "size_t""'");
35047 }
35048 arg3 = static_cast< size_t >(val3);
35049 {
35050 Py_BEGIN_ALLOW_THREADS
35051 try {
35052 result = (faiss::InvertedLists::idx_t)((faiss::ConcatenatedInvertedLists const *)arg1)->get_single_id(arg2,arg3);
35053 } catch(faiss::FaissException & e) {
35054 PyEval_RestoreThread(_save);
35055 PyErr_SetString(PyExc_RuntimeError, e.what());
35056 SWIG_fail;
35057 }
35058 Py_END_ALLOW_THREADS
35059 }
35060 resultobj = SWIG_From_long(static_cast< long >(result));
35061 return resultobj;
35062 fail:
35063 return NULL;
35064 }
35065
35066
35067 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_get_single_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35068 PyObject *resultobj = 0;
35069 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
35070 size_t arg2 ;
35071 size_t arg3 ;
35072 void *argp1 = 0 ;
35073 int res1 = 0 ;
35074 size_t val2 ;
35075 int ecode2 = 0 ;
35076 size_t val3 ;
35077 int ecode3 = 0 ;
35078 PyObject * obj0 = 0 ;
35079 PyObject * obj1 = 0 ;
35080 PyObject * obj2 = 0 ;
35081 uint8_t *result = 0 ;
35082
35083 if (!PyArg_ParseTuple(args,(char *)"OOO:ConcatenatedInvertedLists_get_single_code",&obj0,&obj1,&obj2)) SWIG_fail;
35084 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
35085 if (!SWIG_IsOK(res1)) {
35086 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_get_single_code" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists const *""'");
35087 }
35088 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
35089 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35090 if (!SWIG_IsOK(ecode2)) {
35091 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_get_single_code" "', argument " "2"" of type '" "size_t""'");
35092 }
35093 arg2 = static_cast< size_t >(val2);
35094 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35095 if (!SWIG_IsOK(ecode3)) {
35096 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_get_single_code" "', argument " "3"" of type '" "size_t""'");
35097 }
35098 arg3 = static_cast< size_t >(val3);
35099 {
35100 Py_BEGIN_ALLOW_THREADS
35101 try {
35102 result = (uint8_t *)((faiss::ConcatenatedInvertedLists const *)arg1)->get_single_code(arg2,arg3);
35103 } catch(faiss::FaissException & e) {
35104 PyEval_RestoreThread(_save);
35105 PyErr_SetString(PyExc_RuntimeError, e.what());
35106 SWIG_fail;
35107 }
35108 Py_END_ALLOW_THREADS
35109 }
35110 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
35111 return resultobj;
35112 fail:
35113 return NULL;
35114 }
35115
35116
35117 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_add_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35118 PyObject *resultobj = 0;
35119 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
35120 size_t arg2 ;
35121 size_t arg3 ;
35122 faiss::InvertedLists::idx_t *arg4 = (faiss::InvertedLists::idx_t *) 0 ;
35123 uint8_t *arg5 = (uint8_t *) 0 ;
35124 void *argp1 = 0 ;
35125 int res1 = 0 ;
35126 size_t val2 ;
35127 int ecode2 = 0 ;
35128 size_t val3 ;
35129 int ecode3 = 0 ;
35130 void *argp4 = 0 ;
35131 int res4 = 0 ;
35132 void *argp5 = 0 ;
35133 int res5 = 0 ;
35134 PyObject * obj0 = 0 ;
35135 PyObject * obj1 = 0 ;
35136 PyObject * obj2 = 0 ;
35137 PyObject * obj3 = 0 ;
35138 PyObject * obj4 = 0 ;
35139 size_t result;
35140
35141 if (!PyArg_ParseTuple(args,(char *)"OOOOO:ConcatenatedInvertedLists_add_entries",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
35142 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
35143 if (!SWIG_IsOK(res1)) {
35144 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
35145 }
35146 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
35147 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35148 if (!SWIG_IsOK(ecode2)) {
35149 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "2"" of type '" "size_t""'");
35150 }
35151 arg2 = static_cast< size_t >(val2);
35152 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35153 if (!SWIG_IsOK(ecode3)) {
35154 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "3"" of type '" "size_t""'");
35155 }
35156 arg3 = static_cast< size_t >(val3);
35157 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
35158 if (!SWIG_IsOK(res4)) {
35159 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t const *""'");
35160 }
35161 arg4 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp4);
35162 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
35163 if (!SWIG_IsOK(res5)) {
35164 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ConcatenatedInvertedLists_add_entries" "', argument " "5"" of type '" "uint8_t const *""'");
35165 }
35166 arg5 = reinterpret_cast< uint8_t * >(argp5);
35167 {
35168 Py_BEGIN_ALLOW_THREADS
35169 try {
35170 result = (size_t)(arg1)->add_entries(arg2,arg3,(faiss::InvertedLists::idx_t const *)arg4,(uint8_t const *)arg5);
35171 } catch(faiss::FaissException & e) {
35172 PyEval_RestoreThread(_save);
35173 PyErr_SetString(PyExc_RuntimeError, e.what());
35174 SWIG_fail;
35175 }
35176 Py_END_ALLOW_THREADS
35177 }
35178 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
35179 return resultobj;
35180 fail:
35181 return NULL;
35182 }
35183
35184
35185 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_update_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35186 PyObject *resultobj = 0;
35187 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
35188 size_t arg2 ;
35189 size_t arg3 ;
35190 size_t arg4 ;
35191 faiss::InvertedLists::idx_t *arg5 = (faiss::InvertedLists::idx_t *) 0 ;
35192 uint8_t *arg6 = (uint8_t *) 0 ;
35193 void *argp1 = 0 ;
35194 int res1 = 0 ;
35195 size_t val2 ;
35196 int ecode2 = 0 ;
35197 size_t val3 ;
35198 int ecode3 = 0 ;
35199 size_t val4 ;
35200 int ecode4 = 0 ;
35201 void *argp5 = 0 ;
35202 int res5 = 0 ;
35203 void *argp6 = 0 ;
35204 int res6 = 0 ;
35205 PyObject * obj0 = 0 ;
35206 PyObject * obj1 = 0 ;
35207 PyObject * obj2 = 0 ;
35208 PyObject * obj3 = 0 ;
35209 PyObject * obj4 = 0 ;
35210 PyObject * obj5 = 0 ;
35211
35212 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ConcatenatedInvertedLists_update_entries",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
35213 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
35214 if (!SWIG_IsOK(res1)) {
35215 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
35216 }
35217 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
35218 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35219 if (!SWIG_IsOK(ecode2)) {
35220 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "2"" of type '" "size_t""'");
35221 }
35222 arg2 = static_cast< size_t >(val2);
35223 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35224 if (!SWIG_IsOK(ecode3)) {
35225 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "3"" of type '" "size_t""'");
35226 }
35227 arg3 = static_cast< size_t >(val3);
35228 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
35229 if (!SWIG_IsOK(ecode4)) {
35230 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "4"" of type '" "size_t""'");
35231 }
35232 arg4 = static_cast< size_t >(val4);
35233 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
35234 if (!SWIG_IsOK(res5)) {
35235 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "5"" of type '" "faiss::InvertedLists::idx_t const *""'");
35236 }
35237 arg5 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp5);
35238 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_unsigned_char, 0 | 0 );
35239 if (!SWIG_IsOK(res6)) {
35240 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ConcatenatedInvertedLists_update_entries" "', argument " "6"" of type '" "uint8_t const *""'");
35241 }
35242 arg6 = reinterpret_cast< uint8_t * >(argp6);
35243 {
35244 Py_BEGIN_ALLOW_THREADS
35245 try {
35246 (arg1)->update_entries(arg2,arg3,arg4,(faiss::InvertedLists::idx_t const *)arg5,(uint8_t const *)arg6);
35247 } catch(faiss::FaissException & e) {
35248 PyEval_RestoreThread(_save);
35249 PyErr_SetString(PyExc_RuntimeError, e.what());
35250 SWIG_fail;
35251 }
35252 Py_END_ALLOW_THREADS
35253 }
35254 resultobj = SWIG_Py_Void();
35255 return resultobj;
35256 fail:
35257 return NULL;
35258 }
35259
35260
35261 SWIGINTERN PyObject *_wrap_ConcatenatedInvertedLists_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35262 PyObject *resultobj = 0;
35263 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
35264 size_t arg2 ;
35265 size_t arg3 ;
35266 void *argp1 = 0 ;
35267 int res1 = 0 ;
35268 size_t val2 ;
35269 int ecode2 = 0 ;
35270 size_t val3 ;
35271 int ecode3 = 0 ;
35272 PyObject * obj0 = 0 ;
35273 PyObject * obj1 = 0 ;
35274 PyObject * obj2 = 0 ;
35275
35276 if (!PyArg_ParseTuple(args,(char *)"OOO:ConcatenatedInvertedLists_resize",&obj0,&obj1,&obj2)) SWIG_fail;
35277 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, 0 | 0 );
35278 if (!SWIG_IsOK(res1)) {
35279 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ConcatenatedInvertedLists_resize" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
35280 }
35281 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
35282 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35283 if (!SWIG_IsOK(ecode2)) {
35284 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ConcatenatedInvertedLists_resize" "', argument " "2"" of type '" "size_t""'");
35285 }
35286 arg2 = static_cast< size_t >(val2);
35287 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
35288 if (!SWIG_IsOK(ecode3)) {
35289 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ConcatenatedInvertedLists_resize" "', argument " "3"" of type '" "size_t""'");
35290 }
35291 arg3 = static_cast< size_t >(val3);
35292 {
35293 Py_BEGIN_ALLOW_THREADS
35294 try {
35295 (arg1)->resize(arg2,arg3);
35296 } catch(faiss::FaissException & e) {
35297 PyEval_RestoreThread(_save);
35298 PyErr_SetString(PyExc_RuntimeError, e.what());
35299 SWIG_fail;
35300 }
35301 Py_END_ALLOW_THREADS
35302 }
35303 resultobj = SWIG_Py_Void();
35304 return resultobj;
35305 fail:
35306 return NULL;
35307 }
35308
35309
35310 SWIGINTERN PyObject *_wrap_delete_ConcatenatedInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35311 PyObject *resultobj = 0;
35312 faiss::ConcatenatedInvertedLists *arg1 = (faiss::ConcatenatedInvertedLists *) 0 ;
35313 void *argp1 = 0 ;
35314 int res1 = 0 ;
35315 PyObject * obj0 = 0 ;
35316
35317 if (!PyArg_ParseTuple(args,(char *)"O:delete_ConcatenatedInvertedLists",&obj0)) SWIG_fail;
35318 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ConcatenatedInvertedLists, SWIG_POINTER_DISOWN | 0 );
35319 if (!SWIG_IsOK(res1)) {
35320 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ConcatenatedInvertedLists" "', argument " "1"" of type '" "faiss::ConcatenatedInvertedLists *""'");
35321 }
35322 arg1 = reinterpret_cast< faiss::ConcatenatedInvertedLists * >(argp1);
35323 delete arg1;
35324 resultobj = SWIG_Py_Void();
35325 return resultobj;
35326 fail:
35327 return NULL;
35328 }
35329
35330
35331 SWIGINTERN PyObject *ConcatenatedInvertedLists_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35332 PyObject *obj;
35333 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
35334 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ConcatenatedInvertedLists, SWIG_NewClientData(obj));
35335 return SWIG_Py_Void();
35336 }
35337
35338 SWIGINTERN PyObject *_wrap_Level1Quantizer_quantizer_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35339 PyObject *resultobj = 0;
35340 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35341 faiss::Index *arg2 = (faiss::Index *) 0 ;
35342 void *argp1 = 0 ;
35343 int res1 = 0 ;
35344 void *argp2 = 0 ;
35345 int res2 = 0 ;
35346 PyObject * obj0 = 0 ;
35347 PyObject * obj1 = 0 ;
35348
35349 if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_quantizer_set",&obj0,&obj1)) SWIG_fail;
35350 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35351 if (!SWIG_IsOK(res1)) {
35352 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_quantizer_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35353 }
35354 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35355 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
35356 if (!SWIG_IsOK(res2)) {
35357 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Level1Quantizer_quantizer_set" "', argument " "2"" of type '" "faiss::Index *""'");
35358 }
35359 arg2 = reinterpret_cast< faiss::Index * >(argp2);
35360 if (arg1) (arg1)->quantizer = arg2;
35361 resultobj = SWIG_Py_Void();
35362 return resultobj;
35363 fail:
35364 return NULL;
35365 }
35366
35367
35368 SWIGINTERN PyObject *_wrap_Level1Quantizer_quantizer_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35369 PyObject *resultobj = 0;
35370 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35371 void *argp1 = 0 ;
35372 int res1 = 0 ;
35373 PyObject * obj0 = 0 ;
35374 faiss::Index *result = 0 ;
35375
35376 if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_quantizer_get",&obj0)) SWIG_fail;
35377 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35378 if (!SWIG_IsOK(res1)) {
35379 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_quantizer_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35380 }
35381 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35382 result = (faiss::Index *) ((arg1)->quantizer);
35383 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
35384 return resultobj;
35385 fail:
35386 return NULL;
35387 }
35388
35389
35390 SWIGINTERN PyObject *_wrap_Level1Quantizer_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35391 PyObject *resultobj = 0;
35392 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35393 size_t arg2 ;
35394 void *argp1 = 0 ;
35395 int res1 = 0 ;
35396 size_t val2 ;
35397 int ecode2 = 0 ;
35398 PyObject * obj0 = 0 ;
35399 PyObject * obj1 = 0 ;
35400
35401 if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_nlist_set",&obj0,&obj1)) SWIG_fail;
35402 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35403 if (!SWIG_IsOK(res1)) {
35404 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_nlist_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35405 }
35406 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35407 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35408 if (!SWIG_IsOK(ecode2)) {
35409 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Level1Quantizer_nlist_set" "', argument " "2"" of type '" "size_t""'");
35410 }
35411 arg2 = static_cast< size_t >(val2);
35412 if (arg1) (arg1)->nlist = arg2;
35413 resultobj = SWIG_Py_Void();
35414 return resultobj;
35415 fail:
35416 return NULL;
35417 }
35418
35419
35420 SWIGINTERN PyObject *_wrap_Level1Quantizer_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35421 PyObject *resultobj = 0;
35422 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35423 void *argp1 = 0 ;
35424 int res1 = 0 ;
35425 PyObject * obj0 = 0 ;
35426 size_t result;
35427
35428 if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_nlist_get",&obj0)) SWIG_fail;
35429 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35430 if (!SWIG_IsOK(res1)) {
35431 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_nlist_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35432 }
35433 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35434 result = (size_t) ((arg1)->nlist);
35435 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
35436 return resultobj;
35437 fail:
35438 return NULL;
35439 }
35440
35441
35442 SWIGINTERN PyObject *_wrap_Level1Quantizer_quantizer_trains_alone_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35443 PyObject *resultobj = 0;
35444 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35445 char arg2 ;
35446 void *argp1 = 0 ;
35447 int res1 = 0 ;
35448 char val2 ;
35449 int ecode2 = 0 ;
35450 PyObject * obj0 = 0 ;
35451 PyObject * obj1 = 0 ;
35452
35453 if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_quantizer_trains_alone_set",&obj0,&obj1)) SWIG_fail;
35454 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35455 if (!SWIG_IsOK(res1)) {
35456 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_quantizer_trains_alone_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35457 }
35458 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35459 ecode2 = SWIG_AsVal_char(obj1, &val2);
35460 if (!SWIG_IsOK(ecode2)) {
35461 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Level1Quantizer_quantizer_trains_alone_set" "', argument " "2"" of type '" "char""'");
35462 }
35463 arg2 = static_cast< char >(val2);
35464 if (arg1) (arg1)->quantizer_trains_alone = arg2;
35465 resultobj = SWIG_Py_Void();
35466 return resultobj;
35467 fail:
35468 return NULL;
35469 }
35470
35471
35472 SWIGINTERN PyObject *_wrap_Level1Quantizer_quantizer_trains_alone_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35473 PyObject *resultobj = 0;
35474 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35475 void *argp1 = 0 ;
35476 int res1 = 0 ;
35477 PyObject * obj0 = 0 ;
35478 char result;
35479
35480 if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_quantizer_trains_alone_get",&obj0)) SWIG_fail;
35481 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35482 if (!SWIG_IsOK(res1)) {
35483 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_quantizer_trains_alone_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35484 }
35485 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35486 result = (char) ((arg1)->quantizer_trains_alone);
35487 resultobj = SWIG_From_char(static_cast< char >(result));
35488 return resultobj;
35489 fail:
35490 return NULL;
35491 }
35492
35493
35494 SWIGINTERN PyObject *_wrap_Level1Quantizer_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35495 PyObject *resultobj = 0;
35496 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35497 bool arg2 ;
35498 void *argp1 = 0 ;
35499 int res1 = 0 ;
35500 bool val2 ;
35501 int ecode2 = 0 ;
35502 PyObject * obj0 = 0 ;
35503 PyObject * obj1 = 0 ;
35504
35505 if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_own_fields_set",&obj0,&obj1)) SWIG_fail;
35506 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35507 if (!SWIG_IsOK(res1)) {
35508 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_own_fields_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35509 }
35510 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35511 ecode2 = SWIG_AsVal_bool(obj1, &val2);
35512 if (!SWIG_IsOK(ecode2)) {
35513 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Level1Quantizer_own_fields_set" "', argument " "2"" of type '" "bool""'");
35514 }
35515 arg2 = static_cast< bool >(val2);
35516 if (arg1) (arg1)->own_fields = arg2;
35517 resultobj = SWIG_Py_Void();
35518 return resultobj;
35519 fail:
35520 return NULL;
35521 }
35522
35523
35524 SWIGINTERN PyObject *_wrap_Level1Quantizer_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35525 PyObject *resultobj = 0;
35526 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35527 void *argp1 = 0 ;
35528 int res1 = 0 ;
35529 PyObject * obj0 = 0 ;
35530 bool result;
35531
35532 if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_own_fields_get",&obj0)) SWIG_fail;
35533 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35534 if (!SWIG_IsOK(res1)) {
35535 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_own_fields_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35536 }
35537 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35538 result = (bool) ((arg1)->own_fields);
35539 resultobj = SWIG_From_bool(static_cast< bool >(result));
35540 return resultobj;
35541 fail:
35542 return NULL;
35543 }
35544
35545
35546 SWIGINTERN PyObject *_wrap_Level1Quantizer_cp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35547 PyObject *resultobj = 0;
35548 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35549 faiss::ClusteringParameters *arg2 = (faiss::ClusteringParameters *) 0 ;
35550 void *argp1 = 0 ;
35551 int res1 = 0 ;
35552 void *argp2 = 0 ;
35553 int res2 = 0 ;
35554 PyObject * obj0 = 0 ;
35555 PyObject * obj1 = 0 ;
35556
35557 if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_cp_set",&obj0,&obj1)) SWIG_fail;
35558 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35559 if (!SWIG_IsOK(res1)) {
35560 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_cp_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35561 }
35562 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35563 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
35564 if (!SWIG_IsOK(res2)) {
35565 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Level1Quantizer_cp_set" "', argument " "2"" of type '" "faiss::ClusteringParameters *""'");
35566 }
35567 arg2 = reinterpret_cast< faiss::ClusteringParameters * >(argp2);
35568 if (arg1) (arg1)->cp = *arg2;
35569 resultobj = SWIG_Py_Void();
35570 return resultobj;
35571 fail:
35572 return NULL;
35573 }
35574
35575
35576 SWIGINTERN PyObject *_wrap_Level1Quantizer_cp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35577 PyObject *resultobj = 0;
35578 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35579 void *argp1 = 0 ;
35580 int res1 = 0 ;
35581 PyObject * obj0 = 0 ;
35582 faiss::ClusteringParameters *result = 0 ;
35583
35584 if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_cp_get",&obj0)) SWIG_fail;
35585 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35586 if (!SWIG_IsOK(res1)) {
35587 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_cp_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35588 }
35589 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35590 result = (faiss::ClusteringParameters *)& ((arg1)->cp);
35591 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
35592 return resultobj;
35593 fail:
35594 return NULL;
35595 }
35596
35597
35598 SWIGINTERN PyObject *_wrap_Level1Quantizer_clustering_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35599 PyObject *resultobj = 0;
35600 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35601 faiss::Index *arg2 = (faiss::Index *) 0 ;
35602 void *argp1 = 0 ;
35603 int res1 = 0 ;
35604 void *argp2 = 0 ;
35605 int res2 = 0 ;
35606 PyObject * obj0 = 0 ;
35607 PyObject * obj1 = 0 ;
35608
35609 if (!PyArg_ParseTuple(args,(char *)"OO:Level1Quantizer_clustering_index_set",&obj0,&obj1)) SWIG_fail;
35610 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35611 if (!SWIG_IsOK(res1)) {
35612 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_clustering_index_set" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35613 }
35614 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35615 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
35616 if (!SWIG_IsOK(res2)) {
35617 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Level1Quantizer_clustering_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
35618 }
35619 arg2 = reinterpret_cast< faiss::Index * >(argp2);
35620 if (arg1) (arg1)->clustering_index = arg2;
35621 resultobj = SWIG_Py_Void();
35622 return resultobj;
35623 fail:
35624 return NULL;
35625 }
35626
35627
35628 SWIGINTERN PyObject *_wrap_Level1Quantizer_clustering_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35629 PyObject *resultobj = 0;
35630 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35631 void *argp1 = 0 ;
35632 int res1 = 0 ;
35633 PyObject * obj0 = 0 ;
35634 faiss::Index *result = 0 ;
35635
35636 if (!PyArg_ParseTuple(args,(char *)"O:Level1Quantizer_clustering_index_get",&obj0)) SWIG_fail;
35637 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35638 if (!SWIG_IsOK(res1)) {
35639 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_clustering_index_get" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35640 }
35641 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35642 result = (faiss::Index *) ((arg1)->clustering_index);
35643 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
35644 return resultobj;
35645 fail:
35646 return NULL;
35647 }
35648
35649
35650 SWIGINTERN PyObject *_wrap_Level1Quantizer_train_q1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35651 PyObject *resultobj = 0;
35652 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35653 size_t arg2 ;
35654 float *arg3 = (float *) 0 ;
35655 bool arg4 ;
35656 faiss::MetricType arg5 ;
35657 void *argp1 = 0 ;
35658 int res1 = 0 ;
35659 size_t val2 ;
35660 int ecode2 = 0 ;
35661 void *argp3 = 0 ;
35662 int res3 = 0 ;
35663 bool val4 ;
35664 int ecode4 = 0 ;
35665 int val5 ;
35666 int ecode5 = 0 ;
35667 PyObject * obj0 = 0 ;
35668 PyObject * obj1 = 0 ;
35669 PyObject * obj2 = 0 ;
35670 PyObject * obj3 = 0 ;
35671 PyObject * obj4 = 0 ;
35672
35673 if (!PyArg_ParseTuple(args,(char *)"OOOOO:Level1Quantizer_train_q1",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
35674 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
35675 if (!SWIG_IsOK(res1)) {
35676 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Level1Quantizer_train_q1" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35677 }
35678 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35679 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35680 if (!SWIG_IsOK(ecode2)) {
35681 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Level1Quantizer_train_q1" "', argument " "2"" of type '" "size_t""'");
35682 }
35683 arg2 = static_cast< size_t >(val2);
35684 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
35685 if (!SWIG_IsOK(res3)) {
35686 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Level1Quantizer_train_q1" "', argument " "3"" of type '" "float const *""'");
35687 }
35688 arg3 = reinterpret_cast< float * >(argp3);
35689 ecode4 = SWIG_AsVal_bool(obj3, &val4);
35690 if (!SWIG_IsOK(ecode4)) {
35691 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Level1Quantizer_train_q1" "', argument " "4"" of type '" "bool""'");
35692 }
35693 arg4 = static_cast< bool >(val4);
35694 ecode5 = SWIG_AsVal_int(obj4, &val5);
35695 if (!SWIG_IsOK(ecode5)) {
35696 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "Level1Quantizer_train_q1" "', argument " "5"" of type '" "faiss::MetricType""'");
35697 }
35698 arg5 = static_cast< faiss::MetricType >(val5);
35699 {
35700 Py_BEGIN_ALLOW_THREADS
35701 try {
35702 (arg1)->train_q1(arg2,(float const *)arg3,arg4,arg5);
35703 } catch(faiss::FaissException & e) {
35704 PyEval_RestoreThread(_save);
35705 PyErr_SetString(PyExc_RuntimeError, e.what());
35706 SWIG_fail;
35707 }
35708 Py_END_ALLOW_THREADS
35709 }
35710 resultobj = SWIG_Py_Void();
35711 return resultobj;
35712 fail:
35713 return NULL;
35714 }
35715
35716
35717 SWIGINTERN PyObject *_wrap_new_Level1Quantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35718 PyObject *resultobj = 0;
35719 faiss::Index *arg1 = (faiss::Index *) 0 ;
35720 size_t arg2 ;
35721 void *argp1 = 0 ;
35722 int res1 = 0 ;
35723 size_t val2 ;
35724 int ecode2 = 0 ;
35725 PyObject * obj0 = 0 ;
35726 PyObject * obj1 = 0 ;
35727 faiss::Level1Quantizer *result = 0 ;
35728
35729 if (!PyArg_ParseTuple(args,(char *)"OO:new_Level1Quantizer",&obj0,&obj1)) SWIG_fail;
35730 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
35731 if (!SWIG_IsOK(res1)) {
35732 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Level1Quantizer" "', argument " "1"" of type '" "faiss::Index *""'");
35733 }
35734 arg1 = reinterpret_cast< faiss::Index * >(argp1);
35735 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35736 if (!SWIG_IsOK(ecode2)) {
35737 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Level1Quantizer" "', argument " "2"" of type '" "size_t""'");
35738 }
35739 arg2 = static_cast< size_t >(val2);
35740 {
35741 Py_BEGIN_ALLOW_THREADS
35742 try {
35743 result = (faiss::Level1Quantizer *)new faiss::Level1Quantizer(arg1,arg2);
35744 } catch(faiss::FaissException & e) {
35745 PyEval_RestoreThread(_save);
35746 PyErr_SetString(PyExc_RuntimeError, e.what());
35747 SWIG_fail;
35748 }
35749 Py_END_ALLOW_THREADS
35750 }
35751 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Level1Quantizer, SWIG_POINTER_NEW | 0 );
35752 return resultobj;
35753 fail:
35754 return NULL;
35755 }
35756
35757
35758 SWIGINTERN PyObject *_wrap_new_Level1Quantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35759 PyObject *resultobj = 0;
35760 faiss::Level1Quantizer *result = 0 ;
35761
35762 if (!PyArg_ParseTuple(args,(char *)":new_Level1Quantizer")) SWIG_fail;
35763 {
35764 Py_BEGIN_ALLOW_THREADS
35765 try {
35766 result = (faiss::Level1Quantizer *)new faiss::Level1Quantizer();
35767 } catch(faiss::FaissException & e) {
35768 PyEval_RestoreThread(_save);
35769 PyErr_SetString(PyExc_RuntimeError, e.what());
35770 SWIG_fail;
35771 }
35772 Py_END_ALLOW_THREADS
35773 }
35774 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Level1Quantizer, SWIG_POINTER_NEW | 0 );
35775 return resultobj;
35776 fail:
35777 return NULL;
35778 }
35779
35780
35781 SWIGINTERN PyObject *_wrap_new_Level1Quantizer(PyObject *self, PyObject *args) {
35782 Py_ssize_t argc;
35783 PyObject *argv[3] = {
35784 0
35785 };
35786 Py_ssize_t ii;
35787
35788 if (!PyTuple_Check(args)) SWIG_fail;
35789 argc = args ? PyObject_Length(args) : 0;
35790 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
35791 argv[ii] = PyTuple_GET_ITEM(args,ii);
35792 }
35793 if (argc == 0) {
35794 return _wrap_new_Level1Quantizer__SWIG_1(self, args);
35795 }
35796 if (argc == 2) {
35797 int _v;
35798 void *vptr = 0;
35799 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
35800 _v = SWIG_CheckState(res);
35801 if (_v) {
35802 {
35803 int res = SWIG_AsVal_size_t(argv[1], NULL);
35804 _v = SWIG_CheckState(res);
35805 }
35806 if (_v) {
35807 return _wrap_new_Level1Quantizer__SWIG_0(self, args);
35808 }
35809 }
35810 }
35811
35812 fail:
35813 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Level1Quantizer'.\n"
35814 " Possible C/C++ prototypes are:\n"
35815 " faiss::Level1Quantizer::Level1Quantizer(faiss::Index *,size_t)\n"
35816 " faiss::Level1Quantizer::Level1Quantizer()\n");
35817 return 0;
35818 }
35819
35820
35821 SWIGINTERN PyObject *_wrap_delete_Level1Quantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35822 PyObject *resultobj = 0;
35823 faiss::Level1Quantizer *arg1 = (faiss::Level1Quantizer *) 0 ;
35824 void *argp1 = 0 ;
35825 int res1 = 0 ;
35826 PyObject * obj0 = 0 ;
35827
35828 if (!PyArg_ParseTuple(args,(char *)"O:delete_Level1Quantizer",&obj0)) SWIG_fail;
35829 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Level1Quantizer, SWIG_POINTER_DISOWN | 0 );
35830 if (!SWIG_IsOK(res1)) {
35831 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Level1Quantizer" "', argument " "1"" of type '" "faiss::Level1Quantizer *""'");
35832 }
35833 arg1 = reinterpret_cast< faiss::Level1Quantizer * >(argp1);
35834 {
35835 Py_BEGIN_ALLOW_THREADS
35836 try {
35837 delete arg1;
35838 } catch(faiss::FaissException & e) {
35839 PyEval_RestoreThread(_save);
35840 PyErr_SetString(PyExc_RuntimeError, e.what());
35841 SWIG_fail;
35842 }
35843 Py_END_ALLOW_THREADS
35844 }
35845 resultobj = SWIG_Py_Void();
35846 return resultobj;
35847 fail:
35848 return NULL;
35849 }
35850
35851
35852 SWIGINTERN PyObject *Level1Quantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35853 PyObject *obj;
35854 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
35855 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Level1Quantizer, SWIG_NewClientData(obj));
35856 return SWIG_Py_Void();
35857 }
35858
35859 SWIGINTERN PyObject *_wrap_IVFSearchParameters_nprobe_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35860 PyObject *resultobj = 0;
35861 faiss::IVFSearchParameters *arg1 = (faiss::IVFSearchParameters *) 0 ;
35862 size_t arg2 ;
35863 void *argp1 = 0 ;
35864 int res1 = 0 ;
35865 size_t val2 ;
35866 int ecode2 = 0 ;
35867 PyObject * obj0 = 0 ;
35868 PyObject * obj1 = 0 ;
35869
35870 if (!PyArg_ParseTuple(args,(char *)"OO:IVFSearchParameters_nprobe_set",&obj0,&obj1)) SWIG_fail;
35871 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
35872 if (!SWIG_IsOK(res1)) {
35873 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFSearchParameters_nprobe_set" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
35874 }
35875 arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
35876 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35877 if (!SWIG_IsOK(ecode2)) {
35878 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVFSearchParameters_nprobe_set" "', argument " "2"" of type '" "size_t""'");
35879 }
35880 arg2 = static_cast< size_t >(val2);
35881 if (arg1) (arg1)->nprobe = arg2;
35882 resultobj = SWIG_Py_Void();
35883 return resultobj;
35884 fail:
35885 return NULL;
35886 }
35887
35888
35889 SWIGINTERN PyObject *_wrap_IVFSearchParameters_nprobe_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35890 PyObject *resultobj = 0;
35891 faiss::IVFSearchParameters *arg1 = (faiss::IVFSearchParameters *) 0 ;
35892 void *argp1 = 0 ;
35893 int res1 = 0 ;
35894 PyObject * obj0 = 0 ;
35895 size_t result;
35896
35897 if (!PyArg_ParseTuple(args,(char *)"O:IVFSearchParameters_nprobe_get",&obj0)) SWIG_fail;
35898 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
35899 if (!SWIG_IsOK(res1)) {
35900 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFSearchParameters_nprobe_get" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
35901 }
35902 arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
35903 result = (size_t) ((arg1)->nprobe);
35904 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
35905 return resultobj;
35906 fail:
35907 return NULL;
35908 }
35909
35910
35911 SWIGINTERN PyObject *_wrap_IVFSearchParameters_max_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35912 PyObject *resultobj = 0;
35913 faiss::IVFSearchParameters *arg1 = (faiss::IVFSearchParameters *) 0 ;
35914 size_t arg2 ;
35915 void *argp1 = 0 ;
35916 int res1 = 0 ;
35917 size_t val2 ;
35918 int ecode2 = 0 ;
35919 PyObject * obj0 = 0 ;
35920 PyObject * obj1 = 0 ;
35921
35922 if (!PyArg_ParseTuple(args,(char *)"OO:IVFSearchParameters_max_codes_set",&obj0,&obj1)) SWIG_fail;
35923 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
35924 if (!SWIG_IsOK(res1)) {
35925 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFSearchParameters_max_codes_set" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
35926 }
35927 arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
35928 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
35929 if (!SWIG_IsOK(ecode2)) {
35930 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVFSearchParameters_max_codes_set" "', argument " "2"" of type '" "size_t""'");
35931 }
35932 arg2 = static_cast< size_t >(val2);
35933 if (arg1) (arg1)->max_codes = arg2;
35934 resultobj = SWIG_Py_Void();
35935 return resultobj;
35936 fail:
35937 return NULL;
35938 }
35939
35940
35941 SWIGINTERN PyObject *_wrap_IVFSearchParameters_max_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35942 PyObject *resultobj = 0;
35943 faiss::IVFSearchParameters *arg1 = (faiss::IVFSearchParameters *) 0 ;
35944 void *argp1 = 0 ;
35945 int res1 = 0 ;
35946 PyObject * obj0 = 0 ;
35947 size_t result;
35948
35949 if (!PyArg_ParseTuple(args,(char *)"O:IVFSearchParameters_max_codes_get",&obj0)) SWIG_fail;
35950 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
35951 if (!SWIG_IsOK(res1)) {
35952 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFSearchParameters_max_codes_get" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
35953 }
35954 arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
35955 result = (size_t) ((arg1)->max_codes);
35956 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
35957 return resultobj;
35958 fail:
35959 return NULL;
35960 }
35961
35962
35963 SWIGINTERN PyObject *_wrap_delete_IVFSearchParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35964 PyObject *resultobj = 0;
35965 faiss::IVFSearchParameters *arg1 = (faiss::IVFSearchParameters *) 0 ;
35966 void *argp1 = 0 ;
35967 int res1 = 0 ;
35968 PyObject * obj0 = 0 ;
35969
35970 if (!PyArg_ParseTuple(args,(char *)"O:delete_IVFSearchParameters",&obj0)) SWIG_fail;
35971 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFSearchParameters, SWIG_POINTER_DISOWN | 0 );
35972 if (!SWIG_IsOK(res1)) {
35973 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVFSearchParameters" "', argument " "1"" of type '" "faiss::IVFSearchParameters *""'");
35974 }
35975 arg1 = reinterpret_cast< faiss::IVFSearchParameters * >(argp1);
35976 {
35977 Py_BEGIN_ALLOW_THREADS
35978 try {
35979 delete arg1;
35980 } catch(faiss::FaissException & e) {
35981 PyEval_RestoreThread(_save);
35982 PyErr_SetString(PyExc_RuntimeError, e.what());
35983 SWIG_fail;
35984 }
35985 Py_END_ALLOW_THREADS
35986 }
35987 resultobj = SWIG_Py_Void();
35988 return resultobj;
35989 fail:
35990 return NULL;
35991 }
35992
35993
35994 SWIGINTERN PyObject *_wrap_new_IVFSearchParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
35995 PyObject *resultobj = 0;
35996 faiss::IVFSearchParameters *result = 0 ;
35997
35998 if (!PyArg_ParseTuple(args,(char *)":new_IVFSearchParameters")) SWIG_fail;
35999 result = (faiss::IVFSearchParameters *)new faiss::IVFSearchParameters();
36000 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IVFSearchParameters, SWIG_POINTER_NEW | 0 );
36001 return resultobj;
36002 fail:
36003 return NULL;
36004 }
36005
36006
36007 SWIGINTERN PyObject *IVFSearchParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36008 PyObject *obj;
36009 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
36010 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IVFSearchParameters, SWIG_NewClientData(obj));
36011 return SWIG_Py_Void();
36012 }
36013
36014 SWIGINTERN PyObject *_wrap_IndexIVF_invlists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36015 PyObject *resultobj = 0;
36016 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36017 faiss::InvertedLists *arg2 = (faiss::InvertedLists *) 0 ;
36018 void *argp1 = 0 ;
36019 int res1 = 0 ;
36020 void *argp2 = 0 ;
36021 int res2 = 0 ;
36022 PyObject * obj0 = 0 ;
36023 PyObject * obj1 = 0 ;
36024
36025 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_invlists_set",&obj0,&obj1)) SWIG_fail;
36026 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36027 if (!SWIG_IsOK(res1)) {
36028 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_invlists_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36029 }
36030 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36031 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, SWIG_POINTER_DISOWN | 0 );
36032 if (!SWIG_IsOK(res2)) {
36033 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_invlists_set" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
36034 }
36035 arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
36036 if (arg1) (arg1)->invlists = arg2;
36037 resultobj = SWIG_Py_Void();
36038 return resultobj;
36039 fail:
36040 return NULL;
36041 }
36042
36043
36044 SWIGINTERN PyObject *_wrap_IndexIVF_invlists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36045 PyObject *resultobj = 0;
36046 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36047 void *argp1 = 0 ;
36048 int res1 = 0 ;
36049 PyObject * obj0 = 0 ;
36050 faiss::InvertedLists *result = 0 ;
36051
36052 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_invlists_get",&obj0)) SWIG_fail;
36053 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36054 if (!SWIG_IsOK(res1)) {
36055 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_invlists_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36056 }
36057 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36058 result = (faiss::InvertedLists *) ((arg1)->invlists);
36059 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
36060 return resultobj;
36061 fail:
36062 return NULL;
36063 }
36064
36065
36066 SWIGINTERN PyObject *_wrap_IndexIVF_own_invlists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36067 PyObject *resultobj = 0;
36068 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36069 bool arg2 ;
36070 void *argp1 = 0 ;
36071 int res1 = 0 ;
36072 bool val2 ;
36073 int ecode2 = 0 ;
36074 PyObject * obj0 = 0 ;
36075 PyObject * obj1 = 0 ;
36076
36077 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_own_invlists_set",&obj0,&obj1)) SWIG_fail;
36078 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36079 if (!SWIG_IsOK(res1)) {
36080 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_own_invlists_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36081 }
36082 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36083 ecode2 = SWIG_AsVal_bool(obj1, &val2);
36084 if (!SWIG_IsOK(ecode2)) {
36085 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_own_invlists_set" "', argument " "2"" of type '" "bool""'");
36086 }
36087 arg2 = static_cast< bool >(val2);
36088 if (arg1) (arg1)->own_invlists = arg2;
36089 resultobj = SWIG_Py_Void();
36090 return resultobj;
36091 fail:
36092 return NULL;
36093 }
36094
36095
36096 SWIGINTERN PyObject *_wrap_IndexIVF_own_invlists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36097 PyObject *resultobj = 0;
36098 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36099 void *argp1 = 0 ;
36100 int res1 = 0 ;
36101 PyObject * obj0 = 0 ;
36102 bool result;
36103
36104 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_own_invlists_get",&obj0)) SWIG_fail;
36105 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36106 if (!SWIG_IsOK(res1)) {
36107 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_own_invlists_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36108 }
36109 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36110 result = (bool) ((arg1)->own_invlists);
36111 resultobj = SWIG_From_bool(static_cast< bool >(result));
36112 return resultobj;
36113 fail:
36114 return NULL;
36115 }
36116
36117
36118 SWIGINTERN PyObject *_wrap_IndexIVF_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36119 PyObject *resultobj = 0;
36120 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36121 size_t arg2 ;
36122 void *argp1 = 0 ;
36123 int res1 = 0 ;
36124 size_t val2 ;
36125 int ecode2 = 0 ;
36126 PyObject * obj0 = 0 ;
36127 PyObject * obj1 = 0 ;
36128
36129 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_code_size_set",&obj0,&obj1)) SWIG_fail;
36130 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36131 if (!SWIG_IsOK(res1)) {
36132 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_code_size_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36133 }
36134 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36135 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36136 if (!SWIG_IsOK(ecode2)) {
36137 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_code_size_set" "', argument " "2"" of type '" "size_t""'");
36138 }
36139 arg2 = static_cast< size_t >(val2);
36140 if (arg1) (arg1)->code_size = arg2;
36141 resultobj = SWIG_Py_Void();
36142 return resultobj;
36143 fail:
36144 return NULL;
36145 }
36146
36147
36148 SWIGINTERN PyObject *_wrap_IndexIVF_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36149 PyObject *resultobj = 0;
36150 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36151 void *argp1 = 0 ;
36152 int res1 = 0 ;
36153 PyObject * obj0 = 0 ;
36154 size_t result;
36155
36156 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_code_size_get",&obj0)) SWIG_fail;
36157 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36158 if (!SWIG_IsOK(res1)) {
36159 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_code_size_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36160 }
36161 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36162 result = (size_t) ((arg1)->code_size);
36163 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
36164 return resultobj;
36165 fail:
36166 return NULL;
36167 }
36168
36169
36170 SWIGINTERN PyObject *_wrap_IndexIVF_nprobe_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36171 PyObject *resultobj = 0;
36172 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36173 size_t arg2 ;
36174 void *argp1 = 0 ;
36175 int res1 = 0 ;
36176 size_t val2 ;
36177 int ecode2 = 0 ;
36178 PyObject * obj0 = 0 ;
36179 PyObject * obj1 = 0 ;
36180
36181 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_nprobe_set",&obj0,&obj1)) SWIG_fail;
36182 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36183 if (!SWIG_IsOK(res1)) {
36184 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_nprobe_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36185 }
36186 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36187 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36188 if (!SWIG_IsOK(ecode2)) {
36189 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_nprobe_set" "', argument " "2"" of type '" "size_t""'");
36190 }
36191 arg2 = static_cast< size_t >(val2);
36192 if (arg1) (arg1)->nprobe = arg2;
36193 resultobj = SWIG_Py_Void();
36194 return resultobj;
36195 fail:
36196 return NULL;
36197 }
36198
36199
36200 SWIGINTERN PyObject *_wrap_IndexIVF_nprobe_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36201 PyObject *resultobj = 0;
36202 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36203 void *argp1 = 0 ;
36204 int res1 = 0 ;
36205 PyObject * obj0 = 0 ;
36206 size_t result;
36207
36208 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_nprobe_get",&obj0)) SWIG_fail;
36209 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36210 if (!SWIG_IsOK(res1)) {
36211 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_nprobe_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36212 }
36213 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36214 result = (size_t) ((arg1)->nprobe);
36215 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
36216 return resultobj;
36217 fail:
36218 return NULL;
36219 }
36220
36221
36222 SWIGINTERN PyObject *_wrap_IndexIVF_max_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36223 PyObject *resultobj = 0;
36224 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36225 size_t arg2 ;
36226 void *argp1 = 0 ;
36227 int res1 = 0 ;
36228 size_t val2 ;
36229 int ecode2 = 0 ;
36230 PyObject * obj0 = 0 ;
36231 PyObject * obj1 = 0 ;
36232
36233 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_max_codes_set",&obj0,&obj1)) SWIG_fail;
36234 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36235 if (!SWIG_IsOK(res1)) {
36236 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_max_codes_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36237 }
36238 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36239 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
36240 if (!SWIG_IsOK(ecode2)) {
36241 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_max_codes_set" "', argument " "2"" of type '" "size_t""'");
36242 }
36243 arg2 = static_cast< size_t >(val2);
36244 if (arg1) (arg1)->max_codes = arg2;
36245 resultobj = SWIG_Py_Void();
36246 return resultobj;
36247 fail:
36248 return NULL;
36249 }
36250
36251
36252 SWIGINTERN PyObject *_wrap_IndexIVF_max_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36253 PyObject *resultobj = 0;
36254 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36255 void *argp1 = 0 ;
36256 int res1 = 0 ;
36257 PyObject * obj0 = 0 ;
36258 size_t result;
36259
36260 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_max_codes_get",&obj0)) SWIG_fail;
36261 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36262 if (!SWIG_IsOK(res1)) {
36263 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_max_codes_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36264 }
36265 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36266 result = (size_t) ((arg1)->max_codes);
36267 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
36268 return resultobj;
36269 fail:
36270 return NULL;
36271 }
36272
36273
36274 SWIGINTERN PyObject *_wrap_IndexIVF_maintain_direct_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36275 PyObject *resultobj = 0;
36276 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36277 bool arg2 ;
36278 void *argp1 = 0 ;
36279 int res1 = 0 ;
36280 bool val2 ;
36281 int ecode2 = 0 ;
36282 PyObject * obj0 = 0 ;
36283 PyObject * obj1 = 0 ;
36284
36285 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_maintain_direct_map_set",&obj0,&obj1)) SWIG_fail;
36286 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36287 if (!SWIG_IsOK(res1)) {
36288 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_maintain_direct_map_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36289 }
36290 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36291 ecode2 = SWIG_AsVal_bool(obj1, &val2);
36292 if (!SWIG_IsOK(ecode2)) {
36293 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_maintain_direct_map_set" "', argument " "2"" of type '" "bool""'");
36294 }
36295 arg2 = static_cast< bool >(val2);
36296 if (arg1) (arg1)->maintain_direct_map = arg2;
36297 resultobj = SWIG_Py_Void();
36298 return resultobj;
36299 fail:
36300 return NULL;
36301 }
36302
36303
36304 SWIGINTERN PyObject *_wrap_IndexIVF_maintain_direct_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36305 PyObject *resultobj = 0;
36306 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36307 void *argp1 = 0 ;
36308 int res1 = 0 ;
36309 PyObject * obj0 = 0 ;
36310 bool result;
36311
36312 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_maintain_direct_map_get",&obj0)) SWIG_fail;
36313 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36314 if (!SWIG_IsOK(res1)) {
36315 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_maintain_direct_map_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36316 }
36317 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36318 result = (bool) ((arg1)->maintain_direct_map);
36319 resultobj = SWIG_From_bool(static_cast< bool >(result));
36320 return resultobj;
36321 fail:
36322 return NULL;
36323 }
36324
36325
36326 SWIGINTERN PyObject *_wrap_IndexIVF_direct_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36327 PyObject *resultobj = 0;
36328 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36329 std::vector< long > *arg2 = (std::vector< long > *) 0 ;
36330 void *argp1 = 0 ;
36331 int res1 = 0 ;
36332 void *argp2 = 0 ;
36333 int res2 = 0 ;
36334 PyObject * obj0 = 0 ;
36335 PyObject * obj1 = 0 ;
36336
36337 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_direct_map_set",&obj0,&obj1)) SWIG_fail;
36338 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36339 if (!SWIG_IsOK(res1)) {
36340 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_direct_map_set" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36341 }
36342 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36343 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
36344 if (!SWIG_IsOK(res2)) {
36345 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_direct_map_set" "', argument " "2"" of type '" "std::vector< long > *""'");
36346 }
36347 arg2 = reinterpret_cast< std::vector< long > * >(argp2);
36348 if (arg1) (arg1)->direct_map = *arg2;
36349 resultobj = SWIG_Py_Void();
36350 return resultobj;
36351 fail:
36352 return NULL;
36353 }
36354
36355
36356 SWIGINTERN PyObject *_wrap_IndexIVF_direct_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36357 PyObject *resultobj = 0;
36358 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36359 void *argp1 = 0 ;
36360 int res1 = 0 ;
36361 PyObject * obj0 = 0 ;
36362 std::vector< long > *result = 0 ;
36363
36364 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_direct_map_get",&obj0)) SWIG_fail;
36365 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36366 if (!SWIG_IsOK(res1)) {
36367 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_direct_map_get" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36368 }
36369 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36370 result = (std::vector< long > *)& ((arg1)->direct_map);
36371 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
36372 return resultobj;
36373 fail:
36374 return NULL;
36375 }
36376
36377
36378 SWIGINTERN PyObject *_wrap_IndexIVF_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36379 PyObject *resultobj = 0;
36380 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36381 void *argp1 = 0 ;
36382 int res1 = 0 ;
36383 PyObject * obj0 = 0 ;
36384
36385 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_reset",&obj0)) SWIG_fail;
36386 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36387 if (!SWIG_IsOK(res1)) {
36388 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_reset" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36389 }
36390 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36391 {
36392 Py_BEGIN_ALLOW_THREADS
36393 try {
36394 (arg1)->reset();
36395 } catch(faiss::FaissException & e) {
36396 PyEval_RestoreThread(_save);
36397 PyErr_SetString(PyExc_RuntimeError, e.what());
36398 SWIG_fail;
36399 }
36400 Py_END_ALLOW_THREADS
36401 }
36402 resultobj = SWIG_Py_Void();
36403 return resultobj;
36404 fail:
36405 return NULL;
36406 }
36407
36408
36409 SWIGINTERN PyObject *_wrap_IndexIVF_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36410 PyObject *resultobj = 0;
36411 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36412 faiss::Index::idx_t arg2 ;
36413 float *arg3 = (float *) 0 ;
36414 void *argp1 = 0 ;
36415 int res1 = 0 ;
36416 long val2 ;
36417 int ecode2 = 0 ;
36418 void *argp3 = 0 ;
36419 int res3 = 0 ;
36420 PyObject * obj0 = 0 ;
36421 PyObject * obj1 = 0 ;
36422 PyObject * obj2 = 0 ;
36423
36424 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_train",&obj0,&obj1,&obj2)) SWIG_fail;
36425 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36426 if (!SWIG_IsOK(res1)) {
36427 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_train" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36428 }
36429 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36430 ecode2 = SWIG_AsVal_long(obj1, &val2);
36431 if (!SWIG_IsOK(ecode2)) {
36432 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
36433 }
36434 arg2 = static_cast< faiss::Index::idx_t >(val2);
36435 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
36436 if (!SWIG_IsOK(res3)) {
36437 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_train" "', argument " "3"" of type '" "float const *""'");
36438 }
36439 arg3 = reinterpret_cast< float * >(argp3);
36440 {
36441 Py_BEGIN_ALLOW_THREADS
36442 try {
36443 (arg1)->train(arg2,(float const *)arg3);
36444 } catch(faiss::FaissException & e) {
36445 PyEval_RestoreThread(_save);
36446 PyErr_SetString(PyExc_RuntimeError, e.what());
36447 SWIG_fail;
36448 }
36449 Py_END_ALLOW_THREADS
36450 }
36451 resultobj = SWIG_Py_Void();
36452 return resultobj;
36453 fail:
36454 return NULL;
36455 }
36456
36457
36458 SWIGINTERN PyObject *_wrap_IndexIVF_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36459 PyObject *resultobj = 0;
36460 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36461 faiss::Index::idx_t arg2 ;
36462 float *arg3 = (float *) 0 ;
36463 void *argp1 = 0 ;
36464 int res1 = 0 ;
36465 long val2 ;
36466 int ecode2 = 0 ;
36467 void *argp3 = 0 ;
36468 int res3 = 0 ;
36469 PyObject * obj0 = 0 ;
36470 PyObject * obj1 = 0 ;
36471 PyObject * obj2 = 0 ;
36472
36473 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_add",&obj0,&obj1,&obj2)) SWIG_fail;
36474 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36475 if (!SWIG_IsOK(res1)) {
36476 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_add" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36477 }
36478 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36479 ecode2 = SWIG_AsVal_long(obj1, &val2);
36480 if (!SWIG_IsOK(ecode2)) {
36481 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
36482 }
36483 arg2 = static_cast< faiss::Index::idx_t >(val2);
36484 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
36485 if (!SWIG_IsOK(res3)) {
36486 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_add" "', argument " "3"" of type '" "float const *""'");
36487 }
36488 arg3 = reinterpret_cast< float * >(argp3);
36489 {
36490 Py_BEGIN_ALLOW_THREADS
36491 try {
36492 (arg1)->add(arg2,(float const *)arg3);
36493 } catch(faiss::FaissException & e) {
36494 PyEval_RestoreThread(_save);
36495 PyErr_SetString(PyExc_RuntimeError, e.what());
36496 SWIG_fail;
36497 }
36498 Py_END_ALLOW_THREADS
36499 }
36500 resultobj = SWIG_Py_Void();
36501 return resultobj;
36502 fail:
36503 return NULL;
36504 }
36505
36506
36507 SWIGINTERN PyObject *_wrap_IndexIVF_encode_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36508 PyObject *resultobj = 0;
36509 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36510 faiss::Index::idx_t arg2 ;
36511 float *arg3 = (float *) 0 ;
36512 faiss::Index::idx_t *arg4 = (faiss::Index::idx_t *) 0 ;
36513 uint8_t *arg5 = (uint8_t *) 0 ;
36514 void *argp1 = 0 ;
36515 int res1 = 0 ;
36516 long val2 ;
36517 int ecode2 = 0 ;
36518 void *argp3 = 0 ;
36519 int res3 = 0 ;
36520 void *argp4 = 0 ;
36521 int res4 = 0 ;
36522 void *argp5 = 0 ;
36523 int res5 = 0 ;
36524 PyObject * obj0 = 0 ;
36525 PyObject * obj1 = 0 ;
36526 PyObject * obj2 = 0 ;
36527 PyObject * obj3 = 0 ;
36528 PyObject * obj4 = 0 ;
36529
36530 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVF_encode_vectors",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
36531 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36532 if (!SWIG_IsOK(res1)) {
36533 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_encode_vectors" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
36534 }
36535 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36536 ecode2 = SWIG_AsVal_long(obj1, &val2);
36537 if (!SWIG_IsOK(ecode2)) {
36538 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_encode_vectors" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
36539 }
36540 arg2 = static_cast< faiss::Index::idx_t >(val2);
36541 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
36542 if (!SWIG_IsOK(res3)) {
36543 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_encode_vectors" "', argument " "3"" of type '" "float const *""'");
36544 }
36545 arg3 = reinterpret_cast< float * >(argp3);
36546 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
36547 if (!SWIG_IsOK(res4)) {
36548 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVF_encode_vectors" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
36549 }
36550 arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
36551 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
36552 if (!SWIG_IsOK(res5)) {
36553 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_encode_vectors" "', argument " "5"" of type '" "uint8_t *""'");
36554 }
36555 arg5 = reinterpret_cast< uint8_t * >(argp5);
36556 {
36557 Py_BEGIN_ALLOW_THREADS
36558 try {
36559 ((faiss::IndexIVF const *)arg1)->encode_vectors(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4,arg5);
36560 } catch(faiss::FaissException & e) {
36561 PyEval_RestoreThread(_save);
36562 PyErr_SetString(PyExc_RuntimeError, e.what());
36563 SWIG_fail;
36564 }
36565 Py_END_ALLOW_THREADS
36566 }
36567 resultobj = SWIG_Py_Void();
36568 return resultobj;
36569 fail:
36570 return NULL;
36571 }
36572
36573
36574 SWIGINTERN PyObject *_wrap_IndexIVF_train_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36575 PyObject *resultobj = 0;
36576 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36577 faiss::Index::idx_t arg2 ;
36578 float *arg3 = (float *) 0 ;
36579 void *argp1 = 0 ;
36580 int res1 = 0 ;
36581 long val2 ;
36582 int ecode2 = 0 ;
36583 void *argp3 = 0 ;
36584 int res3 = 0 ;
36585 PyObject * obj0 = 0 ;
36586 PyObject * obj1 = 0 ;
36587 PyObject * obj2 = 0 ;
36588
36589 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_train_residual",&obj0,&obj1,&obj2)) SWIG_fail;
36590 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36591 if (!SWIG_IsOK(res1)) {
36592 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_train_residual" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
36593 }
36594 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36595 ecode2 = SWIG_AsVal_long(obj1, &val2);
36596 if (!SWIG_IsOK(ecode2)) {
36597 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_train_residual" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
36598 }
36599 arg2 = static_cast< faiss::Index::idx_t >(val2);
36600 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
36601 if (!SWIG_IsOK(res3)) {
36602 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_train_residual" "', argument " "3"" of type '" "float const *""'");
36603 }
36604 arg3 = reinterpret_cast< float * >(argp3);
36605 {
36606 Py_BEGIN_ALLOW_THREADS
36607 try {
36608 (arg1)->train_residual(arg2,(float const *)arg3);
36609 } catch(faiss::FaissException & e) {
36610 PyEval_RestoreThread(_save);
36611 PyErr_SetString(PyExc_RuntimeError, e.what());
36612 SWIG_fail;
36613 }
36614 Py_END_ALLOW_THREADS
36615 }
36616 resultobj = SWIG_Py_Void();
36617 return resultobj;
36618 fail:
36619 return NULL;
36620 }
36621
36622
36623 SWIGINTERN PyObject *_wrap_IndexIVF_search_preassigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36624 PyObject *resultobj = 0;
36625 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36626 faiss::Index::idx_t arg2 ;
36627 float *arg3 = (float *) 0 ;
36628 faiss::Index::idx_t arg4 ;
36629 faiss::Index::idx_t *arg5 = (faiss::Index::idx_t *) 0 ;
36630 float *arg6 = (float *) 0 ;
36631 float *arg7 = (float *) 0 ;
36632 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
36633 bool arg9 ;
36634 faiss::IVFSearchParameters *arg10 = (faiss::IVFSearchParameters *) 0 ;
36635 void *argp1 = 0 ;
36636 int res1 = 0 ;
36637 long val2 ;
36638 int ecode2 = 0 ;
36639 void *argp3 = 0 ;
36640 int res3 = 0 ;
36641 long val4 ;
36642 int ecode4 = 0 ;
36643 void *argp5 = 0 ;
36644 int res5 = 0 ;
36645 void *argp6 = 0 ;
36646 int res6 = 0 ;
36647 void *argp7 = 0 ;
36648 int res7 = 0 ;
36649 void *argp8 = 0 ;
36650 int res8 = 0 ;
36651 bool val9 ;
36652 int ecode9 = 0 ;
36653 void *argp10 = 0 ;
36654 int res10 = 0 ;
36655 PyObject * obj0 = 0 ;
36656 PyObject * obj1 = 0 ;
36657 PyObject * obj2 = 0 ;
36658 PyObject * obj3 = 0 ;
36659 PyObject * obj4 = 0 ;
36660 PyObject * obj5 = 0 ;
36661 PyObject * obj6 = 0 ;
36662 PyObject * obj7 = 0 ;
36663 PyObject * obj8 = 0 ;
36664 PyObject * obj9 = 0 ;
36665
36666 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexIVF_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
36667 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36668 if (!SWIG_IsOK(res1)) {
36669 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
36670 }
36671 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36672 ecode2 = SWIG_AsVal_long(obj1, &val2);
36673 if (!SWIG_IsOK(ecode2)) {
36674 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
36675 }
36676 arg2 = static_cast< faiss::Index::idx_t >(val2);
36677 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
36678 if (!SWIG_IsOK(res3)) {
36679 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_search_preassigned" "', argument " "3"" of type '" "float const *""'");
36680 }
36681 arg3 = reinterpret_cast< float * >(argp3);
36682 ecode4 = SWIG_AsVal_long(obj3, &val4);
36683 if (!SWIG_IsOK(ecode4)) {
36684 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
36685 }
36686 arg4 = static_cast< faiss::Index::idx_t >(val4);
36687 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
36688 if (!SWIG_IsOK(res5)) {
36689 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
36690 }
36691 arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
36692 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
36693 if (!SWIG_IsOK(res6)) {
36694 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVF_search_preassigned" "', argument " "6"" of type '" "float const *""'");
36695 }
36696 arg6 = reinterpret_cast< float * >(argp6);
36697 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
36698 if (!SWIG_IsOK(res7)) {
36699 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVF_search_preassigned" "', argument " "7"" of type '" "float *""'");
36700 }
36701 arg7 = reinterpret_cast< float * >(argp7);
36702 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
36703 if (!SWIG_IsOK(res8)) {
36704 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVF_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
36705 }
36706 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
36707 ecode9 = SWIG_AsVal_bool(obj8, &val9);
36708 if (!SWIG_IsOK(ecode9)) {
36709 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVF_search_preassigned" "', argument " "9"" of type '" "bool""'");
36710 }
36711 arg9 = static_cast< bool >(val9);
36712 res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
36713 if (!SWIG_IsOK(res10)) {
36714 SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "IndexIVF_search_preassigned" "', argument " "10"" of type '" "faiss::IVFSearchParameters const *""'");
36715 }
36716 arg10 = reinterpret_cast< faiss::IVFSearchParameters * >(argp10);
36717 {
36718 Py_BEGIN_ALLOW_THREADS
36719 try {
36720 ((faiss::IndexIVF const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9,(faiss::IVFSearchParameters const *)arg10);
36721 } catch(faiss::FaissException & e) {
36722 PyEval_RestoreThread(_save);
36723 PyErr_SetString(PyExc_RuntimeError, e.what());
36724 SWIG_fail;
36725 }
36726 Py_END_ALLOW_THREADS
36727 }
36728 resultobj = SWIG_Py_Void();
36729 return resultobj;
36730 fail:
36731 return NULL;
36732 }
36733
36734
36735 SWIGINTERN PyObject *_wrap_IndexIVF_search_preassigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36736 PyObject *resultobj = 0;
36737 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36738 faiss::Index::idx_t arg2 ;
36739 float *arg3 = (float *) 0 ;
36740 faiss::Index::idx_t arg4 ;
36741 faiss::Index::idx_t *arg5 = (faiss::Index::idx_t *) 0 ;
36742 float *arg6 = (float *) 0 ;
36743 float *arg7 = (float *) 0 ;
36744 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
36745 bool arg9 ;
36746 void *argp1 = 0 ;
36747 int res1 = 0 ;
36748 long val2 ;
36749 int ecode2 = 0 ;
36750 void *argp3 = 0 ;
36751 int res3 = 0 ;
36752 long val4 ;
36753 int ecode4 = 0 ;
36754 void *argp5 = 0 ;
36755 int res5 = 0 ;
36756 void *argp6 = 0 ;
36757 int res6 = 0 ;
36758 void *argp7 = 0 ;
36759 int res7 = 0 ;
36760 void *argp8 = 0 ;
36761 int res8 = 0 ;
36762 bool val9 ;
36763 int ecode9 = 0 ;
36764 PyObject * obj0 = 0 ;
36765 PyObject * obj1 = 0 ;
36766 PyObject * obj2 = 0 ;
36767 PyObject * obj3 = 0 ;
36768 PyObject * obj4 = 0 ;
36769 PyObject * obj5 = 0 ;
36770 PyObject * obj6 = 0 ;
36771 PyObject * obj7 = 0 ;
36772 PyObject * obj8 = 0 ;
36773
36774 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexIVF_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
36775 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36776 if (!SWIG_IsOK(res1)) {
36777 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
36778 }
36779 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
36780 ecode2 = SWIG_AsVal_long(obj1, &val2);
36781 if (!SWIG_IsOK(ecode2)) {
36782 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
36783 }
36784 arg2 = static_cast< faiss::Index::idx_t >(val2);
36785 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
36786 if (!SWIG_IsOK(res3)) {
36787 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_search_preassigned" "', argument " "3"" of type '" "float const *""'");
36788 }
36789 arg3 = reinterpret_cast< float * >(argp3);
36790 ecode4 = SWIG_AsVal_long(obj3, &val4);
36791 if (!SWIG_IsOK(ecode4)) {
36792 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
36793 }
36794 arg4 = static_cast< faiss::Index::idx_t >(val4);
36795 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
36796 if (!SWIG_IsOK(res5)) {
36797 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
36798 }
36799 arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
36800 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
36801 if (!SWIG_IsOK(res6)) {
36802 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVF_search_preassigned" "', argument " "6"" of type '" "float const *""'");
36803 }
36804 arg6 = reinterpret_cast< float * >(argp6);
36805 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
36806 if (!SWIG_IsOK(res7)) {
36807 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVF_search_preassigned" "', argument " "7"" of type '" "float *""'");
36808 }
36809 arg7 = reinterpret_cast< float * >(argp7);
36810 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
36811 if (!SWIG_IsOK(res8)) {
36812 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVF_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
36813 }
36814 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
36815 ecode9 = SWIG_AsVal_bool(obj8, &val9);
36816 if (!SWIG_IsOK(ecode9)) {
36817 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVF_search_preassigned" "', argument " "9"" of type '" "bool""'");
36818 }
36819 arg9 = static_cast< bool >(val9);
36820 {
36821 Py_BEGIN_ALLOW_THREADS
36822 try {
36823 ((faiss::IndexIVF const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9);
36824 } catch(faiss::FaissException & e) {
36825 PyEval_RestoreThread(_save);
36826 PyErr_SetString(PyExc_RuntimeError, e.what());
36827 SWIG_fail;
36828 }
36829 Py_END_ALLOW_THREADS
36830 }
36831 resultobj = SWIG_Py_Void();
36832 return resultobj;
36833 fail:
36834 return NULL;
36835 }
36836
36837
36838 SWIGINTERN PyObject *_wrap_IndexIVF_search_preassigned(PyObject *self, PyObject *args) {
36839 Py_ssize_t argc;
36840 PyObject *argv[11] = {
36841 0
36842 };
36843 Py_ssize_t ii;
36844
36845 if (!PyTuple_Check(args)) SWIG_fail;
36846 argc = args ? PyObject_Length(args) : 0;
36847 for (ii = 0; (ii < 10) && (ii < argc); ii++) {
36848 argv[ii] = PyTuple_GET_ITEM(args,ii);
36849 }
36850 if (argc == 9) {
36851 int _v;
36852 void *vptr = 0;
36853 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
36854 _v = SWIG_CheckState(res);
36855 if (_v) {
36856 {
36857 int res = SWIG_AsVal_long(argv[1], NULL);
36858 _v = SWIG_CheckState(res);
36859 }
36860 if (_v) {
36861 void *vptr = 0;
36862 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
36863 _v = SWIG_CheckState(res);
36864 if (_v) {
36865 {
36866 int res = SWIG_AsVal_long(argv[3], NULL);
36867 _v = SWIG_CheckState(res);
36868 }
36869 if (_v) {
36870 void *vptr = 0;
36871 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
36872 _v = SWIG_CheckState(res);
36873 if (_v) {
36874 void *vptr = 0;
36875 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
36876 _v = SWIG_CheckState(res);
36877 if (_v) {
36878 void *vptr = 0;
36879 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
36880 _v = SWIG_CheckState(res);
36881 if (_v) {
36882 void *vptr = 0;
36883 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
36884 _v = SWIG_CheckState(res);
36885 if (_v) {
36886 {
36887 int res = SWIG_AsVal_bool(argv[8], NULL);
36888 _v = SWIG_CheckState(res);
36889 }
36890 if (_v) {
36891 return _wrap_IndexIVF_search_preassigned__SWIG_1(self, args);
36892 }
36893 }
36894 }
36895 }
36896 }
36897 }
36898 }
36899 }
36900 }
36901 }
36902 if (argc == 10) {
36903 int _v;
36904 void *vptr = 0;
36905 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
36906 _v = SWIG_CheckState(res);
36907 if (_v) {
36908 {
36909 int res = SWIG_AsVal_long(argv[1], NULL);
36910 _v = SWIG_CheckState(res);
36911 }
36912 if (_v) {
36913 void *vptr = 0;
36914 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
36915 _v = SWIG_CheckState(res);
36916 if (_v) {
36917 {
36918 int res = SWIG_AsVal_long(argv[3], NULL);
36919 _v = SWIG_CheckState(res);
36920 }
36921 if (_v) {
36922 void *vptr = 0;
36923 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
36924 _v = SWIG_CheckState(res);
36925 if (_v) {
36926 void *vptr = 0;
36927 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
36928 _v = SWIG_CheckState(res);
36929 if (_v) {
36930 void *vptr = 0;
36931 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
36932 _v = SWIG_CheckState(res);
36933 if (_v) {
36934 void *vptr = 0;
36935 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
36936 _v = SWIG_CheckState(res);
36937 if (_v) {
36938 {
36939 int res = SWIG_AsVal_bool(argv[8], NULL);
36940 _v = SWIG_CheckState(res);
36941 }
36942 if (_v) {
36943 void *vptr = 0;
36944 int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_faiss__IVFSearchParameters, 0);
36945 _v = SWIG_CheckState(res);
36946 if (_v) {
36947 return _wrap_IndexIVF_search_preassigned__SWIG_0(self, args);
36948 }
36949 }
36950 }
36951 }
36952 }
36953 }
36954 }
36955 }
36956 }
36957 }
36958 }
36959
36960 fail:
36961 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVF_search_preassigned'.\n"
36962 " Possible C/C++ prototypes are:\n"
36963 " faiss::IndexIVF::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool,faiss::IVFSearchParameters const *) const\n"
36964 " faiss::IndexIVF::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool) const\n");
36965 return 0;
36966 }
36967
36968
36969 SWIGINTERN PyObject *_wrap_IndexIVF_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
36970 PyObject *resultobj = 0;
36971 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
36972 faiss::Index::idx_t arg2 ;
36973 float *arg3 = (float *) 0 ;
36974 faiss::Index::idx_t arg4 ;
36975 float *arg5 = (float *) 0 ;
36976 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
36977 void *argp1 = 0 ;
36978 int res1 = 0 ;
36979 long val2 ;
36980 int ecode2 = 0 ;
36981 void *argp3 = 0 ;
36982 int res3 = 0 ;
36983 long val4 ;
36984 int ecode4 = 0 ;
36985 void *argp5 = 0 ;
36986 int res5 = 0 ;
36987 void *argp6 = 0 ;
36988 int res6 = 0 ;
36989 PyObject * obj0 = 0 ;
36990 PyObject * obj1 = 0 ;
36991 PyObject * obj2 = 0 ;
36992 PyObject * obj3 = 0 ;
36993 PyObject * obj4 = 0 ;
36994 PyObject * obj5 = 0 ;
36995
36996 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexIVF_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
36997 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
36998 if (!SWIG_IsOK(res1)) {
36999 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_search" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37000 }
37001 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37002 ecode2 = SWIG_AsVal_long(obj1, &val2);
37003 if (!SWIG_IsOK(ecode2)) {
37004 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
37005 }
37006 arg2 = static_cast< faiss::Index::idx_t >(val2);
37007 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
37008 if (!SWIG_IsOK(res3)) {
37009 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_search" "', argument " "3"" of type '" "float const *""'");
37010 }
37011 arg3 = reinterpret_cast< float * >(argp3);
37012 ecode4 = SWIG_AsVal_long(obj3, &val4);
37013 if (!SWIG_IsOK(ecode4)) {
37014 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
37015 }
37016 arg4 = static_cast< faiss::Index::idx_t >(val4);
37017 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
37018 if (!SWIG_IsOK(res5)) {
37019 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_search" "', argument " "5"" of type '" "float *""'");
37020 }
37021 arg5 = reinterpret_cast< float * >(argp5);
37022 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
37023 if (!SWIG_IsOK(res6)) {
37024 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVF_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
37025 }
37026 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
37027 {
37028 Py_BEGIN_ALLOW_THREADS
37029 try {
37030 ((faiss::IndexIVF const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
37031 } catch(faiss::FaissException & e) {
37032 PyEval_RestoreThread(_save);
37033 PyErr_SetString(PyExc_RuntimeError, e.what());
37034 SWIG_fail;
37035 }
37036 Py_END_ALLOW_THREADS
37037 }
37038 resultobj = SWIG_Py_Void();
37039 return resultobj;
37040 fail:
37041 return NULL;
37042 }
37043
37044
37045 SWIGINTERN PyObject *_wrap_IndexIVF_get_InvertedListScanner__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37046 PyObject *resultobj = 0;
37047 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37048 bool arg2 ;
37049 void *argp1 = 0 ;
37050 int res1 = 0 ;
37051 bool val2 ;
37052 int ecode2 = 0 ;
37053 PyObject * obj0 = 0 ;
37054 PyObject * obj1 = 0 ;
37055 faiss::InvertedListScanner *result = 0 ;
37056
37057 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
37058 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37059 if (!SWIG_IsOK(res1)) {
37060 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37061 }
37062 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37063 ecode2 = SWIG_AsVal_bool(obj1, &val2);
37064 if (!SWIG_IsOK(ecode2)) {
37065 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
37066 }
37067 arg2 = static_cast< bool >(val2);
37068 {
37069 Py_BEGIN_ALLOW_THREADS
37070 try {
37071 result = (faiss::InvertedListScanner *)((faiss::IndexIVF const *)arg1)->get_InvertedListScanner(arg2);
37072 } catch(faiss::FaissException & e) {
37073 PyEval_RestoreThread(_save);
37074 PyErr_SetString(PyExc_RuntimeError, e.what());
37075 SWIG_fail;
37076 }
37077 Py_END_ALLOW_THREADS
37078 }
37079 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
37080 return resultobj;
37081 fail:
37082 return NULL;
37083 }
37084
37085
37086 SWIGINTERN PyObject *_wrap_IndexIVF_get_InvertedListScanner__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37087 PyObject *resultobj = 0;
37088 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37089 void *argp1 = 0 ;
37090 int res1 = 0 ;
37091 PyObject * obj0 = 0 ;
37092 faiss::InvertedListScanner *result = 0 ;
37093
37094 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_get_InvertedListScanner",&obj0)) SWIG_fail;
37095 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37096 if (!SWIG_IsOK(res1)) {
37097 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37098 }
37099 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37100 {
37101 Py_BEGIN_ALLOW_THREADS
37102 try {
37103 result = (faiss::InvertedListScanner *)((faiss::IndexIVF const *)arg1)->get_InvertedListScanner();
37104 } catch(faiss::FaissException & e) {
37105 PyEval_RestoreThread(_save);
37106 PyErr_SetString(PyExc_RuntimeError, e.what());
37107 SWIG_fail;
37108 }
37109 Py_END_ALLOW_THREADS
37110 }
37111 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
37112 return resultobj;
37113 fail:
37114 return NULL;
37115 }
37116
37117
37118 SWIGINTERN PyObject *_wrap_IndexIVF_get_InvertedListScanner(PyObject *self, PyObject *args) {
37119 Py_ssize_t argc;
37120 PyObject *argv[3] = {
37121 0
37122 };
37123 Py_ssize_t ii;
37124
37125 if (!PyTuple_Check(args)) SWIG_fail;
37126 argc = args ? PyObject_Length(args) : 0;
37127 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
37128 argv[ii] = PyTuple_GET_ITEM(args,ii);
37129 }
37130 if (argc == 1) {
37131 int _v;
37132 void *vptr = 0;
37133 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
37134 _v = SWIG_CheckState(res);
37135 if (_v) {
37136 return _wrap_IndexIVF_get_InvertedListScanner__SWIG_1(self, args);
37137 }
37138 }
37139 if (argc == 2) {
37140 int _v;
37141 void *vptr = 0;
37142 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
37143 _v = SWIG_CheckState(res);
37144 if (_v) {
37145 {
37146 int res = SWIG_AsVal_bool(argv[1], NULL);
37147 _v = SWIG_CheckState(res);
37148 }
37149 if (_v) {
37150 return _wrap_IndexIVF_get_InvertedListScanner__SWIG_0(self, args);
37151 }
37152 }
37153 }
37154
37155 fail:
37156 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVF_get_InvertedListScanner'.\n"
37157 " Possible C/C++ prototypes are:\n"
37158 " faiss::IndexIVF::get_InvertedListScanner(bool) const\n"
37159 " faiss::IndexIVF::get_InvertedListScanner() const\n");
37160 return 0;
37161 }
37162
37163
37164 SWIGINTERN PyObject *_wrap_IndexIVF_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37165 PyObject *resultobj = 0;
37166 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37167 faiss::Index::idx_t arg2 ;
37168 float *arg3 = (float *) 0 ;
37169 void *argp1 = 0 ;
37170 int res1 = 0 ;
37171 long val2 ;
37172 int ecode2 = 0 ;
37173 void *argp3 = 0 ;
37174 int res3 = 0 ;
37175 PyObject * obj0 = 0 ;
37176 PyObject * obj1 = 0 ;
37177 PyObject * obj2 = 0 ;
37178
37179 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
37180 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37181 if (!SWIG_IsOK(res1)) {
37182 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_reconstruct" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37183 }
37184 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37185 ecode2 = SWIG_AsVal_long(obj1, &val2);
37186 if (!SWIG_IsOK(ecode2)) {
37187 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
37188 }
37189 arg2 = static_cast< faiss::Index::idx_t >(val2);
37190 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
37191 if (!SWIG_IsOK(res3)) {
37192 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_reconstruct" "', argument " "3"" of type '" "float *""'");
37193 }
37194 arg3 = reinterpret_cast< float * >(argp3);
37195 {
37196 Py_BEGIN_ALLOW_THREADS
37197 try {
37198 ((faiss::IndexIVF const *)arg1)->reconstruct(arg2,arg3);
37199 } catch(faiss::FaissException & e) {
37200 PyEval_RestoreThread(_save);
37201 PyErr_SetString(PyExc_RuntimeError, e.what());
37202 SWIG_fail;
37203 }
37204 Py_END_ALLOW_THREADS
37205 }
37206 resultobj = SWIG_Py_Void();
37207 return resultobj;
37208 fail:
37209 return NULL;
37210 }
37211
37212
37213 SWIGINTERN PyObject *_wrap_IndexIVF_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37214 PyObject *resultobj = 0;
37215 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37216 faiss::Index::idx_t arg2 ;
37217 faiss::Index::idx_t arg3 ;
37218 float *arg4 = (float *) 0 ;
37219 void *argp1 = 0 ;
37220 int res1 = 0 ;
37221 long val2 ;
37222 int ecode2 = 0 ;
37223 long val3 ;
37224 int ecode3 = 0 ;
37225 void *argp4 = 0 ;
37226 int res4 = 0 ;
37227 PyObject * obj0 = 0 ;
37228 PyObject * obj1 = 0 ;
37229 PyObject * obj2 = 0 ;
37230 PyObject * obj3 = 0 ;
37231
37232 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVF_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
37233 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37234 if (!SWIG_IsOK(res1)) {
37235 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37236 }
37237 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37238 ecode2 = SWIG_AsVal_long(obj1, &val2);
37239 if (!SWIG_IsOK(ecode2)) {
37240 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
37241 }
37242 arg2 = static_cast< faiss::Index::idx_t >(val2);
37243 ecode3 = SWIG_AsVal_long(obj2, &val3);
37244 if (!SWIG_IsOK(ecode3)) {
37245 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
37246 }
37247 arg3 = static_cast< faiss::Index::idx_t >(val3);
37248 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
37249 if (!SWIG_IsOK(res4)) {
37250 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVF_reconstruct_n" "', argument " "4"" of type '" "float *""'");
37251 }
37252 arg4 = reinterpret_cast< float * >(argp4);
37253 {
37254 Py_BEGIN_ALLOW_THREADS
37255 try {
37256 ((faiss::IndexIVF const *)arg1)->reconstruct_n(arg2,arg3,arg4);
37257 } catch(faiss::FaissException & e) {
37258 PyEval_RestoreThread(_save);
37259 PyErr_SetString(PyExc_RuntimeError, e.what());
37260 SWIG_fail;
37261 }
37262 Py_END_ALLOW_THREADS
37263 }
37264 resultobj = SWIG_Py_Void();
37265 return resultobj;
37266 fail:
37267 return NULL;
37268 }
37269
37270
37271 SWIGINTERN PyObject *_wrap_IndexIVF_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37272 PyObject *resultobj = 0;
37273 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37274 faiss::Index::idx_t arg2 ;
37275 float *arg3 = (float *) 0 ;
37276 faiss::Index::idx_t arg4 ;
37277 float *arg5 = (float *) 0 ;
37278 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
37279 float *arg7 = (float *) 0 ;
37280 void *argp1 = 0 ;
37281 int res1 = 0 ;
37282 long val2 ;
37283 int ecode2 = 0 ;
37284 void *argp3 = 0 ;
37285 int res3 = 0 ;
37286 long val4 ;
37287 int ecode4 = 0 ;
37288 void *argp5 = 0 ;
37289 int res5 = 0 ;
37290 void *argp6 = 0 ;
37291 int res6 = 0 ;
37292 void *argp7 = 0 ;
37293 int res7 = 0 ;
37294 PyObject * obj0 = 0 ;
37295 PyObject * obj1 = 0 ;
37296 PyObject * obj2 = 0 ;
37297 PyObject * obj3 = 0 ;
37298 PyObject * obj4 = 0 ;
37299 PyObject * obj5 = 0 ;
37300 PyObject * obj6 = 0 ;
37301
37302 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:IndexIVF_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
37303 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37304 if (!SWIG_IsOK(res1)) {
37305 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37306 }
37307 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37308 ecode2 = SWIG_AsVal_long(obj1, &val2);
37309 if (!SWIG_IsOK(ecode2)) {
37310 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
37311 }
37312 arg2 = static_cast< faiss::Index::idx_t >(val2);
37313 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
37314 if (!SWIG_IsOK(res3)) {
37315 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "3"" of type '" "float const *""'");
37316 }
37317 arg3 = reinterpret_cast< float * >(argp3);
37318 ecode4 = SWIG_AsVal_long(obj3, &val4);
37319 if (!SWIG_IsOK(ecode4)) {
37320 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
37321 }
37322 arg4 = static_cast< faiss::Index::idx_t >(val4);
37323 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
37324 if (!SWIG_IsOK(res5)) {
37325 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "5"" of type '" "float *""'");
37326 }
37327 arg5 = reinterpret_cast< float * >(argp5);
37328 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
37329 if (!SWIG_IsOK(res6)) {
37330 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
37331 }
37332 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
37333 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
37334 if (!SWIG_IsOK(res7)) {
37335 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVF_search_and_reconstruct" "', argument " "7"" of type '" "float *""'");
37336 }
37337 arg7 = reinterpret_cast< float * >(argp7);
37338 {
37339 Py_BEGIN_ALLOW_THREADS
37340 try {
37341 ((faiss::IndexIVF const *)arg1)->search_and_reconstruct(arg2,(float const *)arg3,arg4,arg5,arg6,arg7);
37342 } catch(faiss::FaissException & e) {
37343 PyEval_RestoreThread(_save);
37344 PyErr_SetString(PyExc_RuntimeError, e.what());
37345 SWIG_fail;
37346 }
37347 Py_END_ALLOW_THREADS
37348 }
37349 resultobj = SWIG_Py_Void();
37350 return resultobj;
37351 fail:
37352 return NULL;
37353 }
37354
37355
37356 SWIGINTERN PyObject *_wrap_IndexIVF_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37357 PyObject *resultobj = 0;
37358 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37359 long arg2 ;
37360 long arg3 ;
37361 float *arg4 = (float *) 0 ;
37362 void *argp1 = 0 ;
37363 int res1 = 0 ;
37364 long val2 ;
37365 int ecode2 = 0 ;
37366 long val3 ;
37367 int ecode3 = 0 ;
37368 void *argp4 = 0 ;
37369 int res4 = 0 ;
37370 PyObject * obj0 = 0 ;
37371 PyObject * obj1 = 0 ;
37372 PyObject * obj2 = 0 ;
37373 PyObject * obj3 = 0 ;
37374
37375 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVF_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
37376 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37377 if (!SWIG_IsOK(res1)) {
37378 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37379 }
37380 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37381 ecode2 = SWIG_AsVal_long(obj1, &val2);
37382 if (!SWIG_IsOK(ecode2)) {
37383 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
37384 }
37385 arg2 = static_cast< long >(val2);
37386 ecode3 = SWIG_AsVal_long(obj2, &val3);
37387 if (!SWIG_IsOK(ecode3)) {
37388 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
37389 }
37390 arg3 = static_cast< long >(val3);
37391 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
37392 if (!SWIG_IsOK(res4)) {
37393 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVF_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
37394 }
37395 arg4 = reinterpret_cast< float * >(argp4);
37396 {
37397 Py_BEGIN_ALLOW_THREADS
37398 try {
37399 ((faiss::IndexIVF const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
37400 } catch(faiss::FaissException & e) {
37401 PyEval_RestoreThread(_save);
37402 PyErr_SetString(PyExc_RuntimeError, e.what());
37403 SWIG_fail;
37404 }
37405 Py_END_ALLOW_THREADS
37406 }
37407 resultobj = SWIG_Py_Void();
37408 return resultobj;
37409 fail:
37410 return NULL;
37411 }
37412
37413
37414 SWIGINTERN PyObject *_wrap_IndexIVF_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37415 PyObject *resultobj = 0;
37416 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37417 faiss::IDSelector *arg2 = 0 ;
37418 void *argp1 = 0 ;
37419 int res1 = 0 ;
37420 void *argp2 = 0 ;
37421 int res2 = 0 ;
37422 PyObject * obj0 = 0 ;
37423 PyObject * obj1 = 0 ;
37424 long result;
37425
37426 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_remove_ids",&obj0,&obj1)) SWIG_fail;
37427 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37428 if (!SWIG_IsOK(res1)) {
37429 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_remove_ids" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37430 }
37431 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37432 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
37433 if (!SWIG_IsOK(res2)) {
37434 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
37435 }
37436 if (!argp2) {
37437 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVF_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
37438 }
37439 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
37440 {
37441 Py_BEGIN_ALLOW_THREADS
37442 try {
37443 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
37444 } catch(faiss::FaissException & e) {
37445 PyEval_RestoreThread(_save);
37446 PyErr_SetString(PyExc_RuntimeError, e.what());
37447 SWIG_fail;
37448 }
37449 Py_END_ALLOW_THREADS
37450 }
37451 resultobj = SWIG_From_long(static_cast< long >(result));
37452 return resultobj;
37453 fail:
37454 return NULL;
37455 }
37456
37457
37458 SWIGINTERN PyObject *_wrap_IndexIVF_check_compatible_for_merge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37459 PyObject *resultobj = 0;
37460 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37461 faiss::IndexIVF *arg2 = 0 ;
37462 void *argp1 = 0 ;
37463 int res1 = 0 ;
37464 void *argp2 = 0 ;
37465 int res2 = 0 ;
37466 PyObject * obj0 = 0 ;
37467 PyObject * obj1 = 0 ;
37468
37469 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_check_compatible_for_merge",&obj0,&obj1)) SWIG_fail;
37470 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37471 if (!SWIG_IsOK(res1)) {
37472 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_check_compatible_for_merge" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37473 }
37474 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37475 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVF, 0 | 0);
37476 if (!SWIG_IsOK(res2)) {
37477 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_check_compatible_for_merge" "', argument " "2"" of type '" "faiss::IndexIVF const &""'");
37478 }
37479 if (!argp2) {
37480 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVF_check_compatible_for_merge" "', argument " "2"" of type '" "faiss::IndexIVF const &""'");
37481 }
37482 arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
37483 {
37484 Py_BEGIN_ALLOW_THREADS
37485 try {
37486 ((faiss::IndexIVF const *)arg1)->check_compatible_for_merge((faiss::IndexIVF const &)*arg2);
37487 } catch(faiss::FaissException & e) {
37488 PyEval_RestoreThread(_save);
37489 PyErr_SetString(PyExc_RuntimeError, e.what());
37490 SWIG_fail;
37491 }
37492 Py_END_ALLOW_THREADS
37493 }
37494 resultobj = SWIG_Py_Void();
37495 return resultobj;
37496 fail:
37497 return NULL;
37498 }
37499
37500
37501 SWIGINTERN PyObject *_wrap_IndexIVF_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37502 PyObject *resultobj = 0;
37503 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37504 faiss::IndexIVF *arg2 = 0 ;
37505 faiss::Index::idx_t arg3 ;
37506 void *argp1 = 0 ;
37507 int res1 = 0 ;
37508 void *argp2 = 0 ;
37509 int res2 = 0 ;
37510 long val3 ;
37511 int ecode3 = 0 ;
37512 PyObject * obj0 = 0 ;
37513 PyObject * obj1 = 0 ;
37514 PyObject * obj2 = 0 ;
37515
37516 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
37517 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37518 if (!SWIG_IsOK(res1)) {
37519 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_merge_from" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37520 }
37521 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37522 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVF, 0 );
37523 if (!SWIG_IsOK(res2)) {
37524 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_merge_from" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
37525 }
37526 if (!argp2) {
37527 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVF_merge_from" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
37528 }
37529 arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
37530 ecode3 = SWIG_AsVal_long(obj2, &val3);
37531 if (!SWIG_IsOK(ecode3)) {
37532 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_merge_from" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
37533 }
37534 arg3 = static_cast< faiss::Index::idx_t >(val3);
37535 {
37536 Py_BEGIN_ALLOW_THREADS
37537 try {
37538 (arg1)->merge_from(*arg2,arg3);
37539 } catch(faiss::FaissException & e) {
37540 PyEval_RestoreThread(_save);
37541 PyErr_SetString(PyExc_RuntimeError, e.what());
37542 SWIG_fail;
37543 }
37544 Py_END_ALLOW_THREADS
37545 }
37546 resultobj = SWIG_Py_Void();
37547 return resultobj;
37548 fail:
37549 return NULL;
37550 }
37551
37552
37553 SWIGINTERN PyObject *_wrap_IndexIVF_copy_subset_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37554 PyObject *resultobj = 0;
37555 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37556 faiss::IndexIVF *arg2 = 0 ;
37557 int arg3 ;
37558 long arg4 ;
37559 long arg5 ;
37560 void *argp1 = 0 ;
37561 int res1 = 0 ;
37562 void *argp2 = 0 ;
37563 int res2 = 0 ;
37564 int val3 ;
37565 int ecode3 = 0 ;
37566 long val4 ;
37567 int ecode4 = 0 ;
37568 long val5 ;
37569 int ecode5 = 0 ;
37570 PyObject * obj0 = 0 ;
37571 PyObject * obj1 = 0 ;
37572 PyObject * obj2 = 0 ;
37573 PyObject * obj3 = 0 ;
37574 PyObject * obj4 = 0 ;
37575
37576 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVF_copy_subset_to",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
37577 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37578 if (!SWIG_IsOK(res1)) {
37579 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_copy_subset_to" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37580 }
37581 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37582 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVF, 0 );
37583 if (!SWIG_IsOK(res2)) {
37584 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_copy_subset_to" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
37585 }
37586 if (!argp2) {
37587 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVF_copy_subset_to" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
37588 }
37589 arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
37590 ecode3 = SWIG_AsVal_int(obj2, &val3);
37591 if (!SWIG_IsOK(ecode3)) {
37592 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_copy_subset_to" "', argument " "3"" of type '" "int""'");
37593 }
37594 arg3 = static_cast< int >(val3);
37595 ecode4 = SWIG_AsVal_long(obj3, &val4);
37596 if (!SWIG_IsOK(ecode4)) {
37597 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVF_copy_subset_to" "', argument " "4"" of type '" "long""'");
37598 }
37599 arg4 = static_cast< long >(val4);
37600 ecode5 = SWIG_AsVal_long(obj4, &val5);
37601 if (!SWIG_IsOK(ecode5)) {
37602 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IndexIVF_copy_subset_to" "', argument " "5"" of type '" "long""'");
37603 }
37604 arg5 = static_cast< long >(val5);
37605 {
37606 Py_BEGIN_ALLOW_THREADS
37607 try {
37608 ((faiss::IndexIVF const *)arg1)->copy_subset_to(*arg2,arg3,arg4,arg5);
37609 } catch(faiss::FaissException & e) {
37610 PyEval_RestoreThread(_save);
37611 PyErr_SetString(PyExc_RuntimeError, e.what());
37612 SWIG_fail;
37613 }
37614 Py_END_ALLOW_THREADS
37615 }
37616 resultobj = SWIG_Py_Void();
37617 return resultobj;
37618 fail:
37619 return NULL;
37620 }
37621
37622
37623 SWIGINTERN PyObject *_wrap_delete_IndexIVF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37624 PyObject *resultobj = 0;
37625 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37626 void *argp1 = 0 ;
37627 int res1 = 0 ;
37628 PyObject * obj0 = 0 ;
37629
37630 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVF",&obj0)) SWIG_fail;
37631 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, SWIG_POINTER_DISOWN | 0 );
37632 if (!SWIG_IsOK(res1)) {
37633 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVF" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37634 }
37635 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37636 {
37637 Py_BEGIN_ALLOW_THREADS
37638 try {
37639 delete arg1;
37640 } catch(faiss::FaissException & e) {
37641 PyEval_RestoreThread(_save);
37642 PyErr_SetString(PyExc_RuntimeError, e.what());
37643 SWIG_fail;
37644 }
37645 Py_END_ALLOW_THREADS
37646 }
37647 resultobj = SWIG_Py_Void();
37648 return resultobj;
37649 fail:
37650 return NULL;
37651 }
37652
37653
37654 SWIGINTERN PyObject *_wrap_IndexIVF_get_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37655 PyObject *resultobj = 0;
37656 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37657 size_t arg2 ;
37658 void *argp1 = 0 ;
37659 int res1 = 0 ;
37660 size_t val2 ;
37661 int ecode2 = 0 ;
37662 PyObject * obj0 = 0 ;
37663 PyObject * obj1 = 0 ;
37664 size_t result;
37665
37666 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_get_list_size",&obj0,&obj1)) SWIG_fail;
37667 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37668 if (!SWIG_IsOK(res1)) {
37669 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_get_list_size" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37670 }
37671 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37672 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
37673 if (!SWIG_IsOK(ecode2)) {
37674 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_get_list_size" "', argument " "2"" of type '" "size_t""'");
37675 }
37676 arg2 = static_cast< size_t >(val2);
37677 {
37678 Py_BEGIN_ALLOW_THREADS
37679 try {
37680 result = (size_t)((faiss::IndexIVF const *)arg1)->get_list_size(arg2);
37681 } catch(faiss::FaissException & e) {
37682 PyEval_RestoreThread(_save);
37683 PyErr_SetString(PyExc_RuntimeError, e.what());
37684 SWIG_fail;
37685 }
37686 Py_END_ALLOW_THREADS
37687 }
37688 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
37689 return resultobj;
37690 fail:
37691 return NULL;
37692 }
37693
37694
37695 SWIGINTERN PyObject *_wrap_IndexIVF_make_direct_map__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37696 PyObject *resultobj = 0;
37697 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37698 bool arg2 ;
37699 void *argp1 = 0 ;
37700 int res1 = 0 ;
37701 bool val2 ;
37702 int ecode2 = 0 ;
37703 PyObject * obj0 = 0 ;
37704 PyObject * obj1 = 0 ;
37705
37706 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_make_direct_map",&obj0,&obj1)) SWIG_fail;
37707 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37708 if (!SWIG_IsOK(res1)) {
37709 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_make_direct_map" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37710 }
37711 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37712 ecode2 = SWIG_AsVal_bool(obj1, &val2);
37713 if (!SWIG_IsOK(ecode2)) {
37714 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVF_make_direct_map" "', argument " "2"" of type '" "bool""'");
37715 }
37716 arg2 = static_cast< bool >(val2);
37717 {
37718 Py_BEGIN_ALLOW_THREADS
37719 try {
37720 (arg1)->make_direct_map(arg2);
37721 } catch(faiss::FaissException & e) {
37722 PyEval_RestoreThread(_save);
37723 PyErr_SetString(PyExc_RuntimeError, e.what());
37724 SWIG_fail;
37725 }
37726 Py_END_ALLOW_THREADS
37727 }
37728 resultobj = SWIG_Py_Void();
37729 return resultobj;
37730 fail:
37731 return NULL;
37732 }
37733
37734
37735 SWIGINTERN PyObject *_wrap_IndexIVF_make_direct_map__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37736 PyObject *resultobj = 0;
37737 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37738 void *argp1 = 0 ;
37739 int res1 = 0 ;
37740 PyObject * obj0 = 0 ;
37741
37742 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_make_direct_map",&obj0)) SWIG_fail;
37743 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37744 if (!SWIG_IsOK(res1)) {
37745 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_make_direct_map" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37746 }
37747 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37748 {
37749 Py_BEGIN_ALLOW_THREADS
37750 try {
37751 (arg1)->make_direct_map();
37752 } catch(faiss::FaissException & e) {
37753 PyEval_RestoreThread(_save);
37754 PyErr_SetString(PyExc_RuntimeError, e.what());
37755 SWIG_fail;
37756 }
37757 Py_END_ALLOW_THREADS
37758 }
37759 resultobj = SWIG_Py_Void();
37760 return resultobj;
37761 fail:
37762 return NULL;
37763 }
37764
37765
37766 SWIGINTERN PyObject *_wrap_IndexIVF_make_direct_map(PyObject *self, PyObject *args) {
37767 Py_ssize_t argc;
37768 PyObject *argv[3] = {
37769 0
37770 };
37771 Py_ssize_t ii;
37772
37773 if (!PyTuple_Check(args)) SWIG_fail;
37774 argc = args ? PyObject_Length(args) : 0;
37775 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
37776 argv[ii] = PyTuple_GET_ITEM(args,ii);
37777 }
37778 if (argc == 1) {
37779 int _v;
37780 void *vptr = 0;
37781 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
37782 _v = SWIG_CheckState(res);
37783 if (_v) {
37784 return _wrap_IndexIVF_make_direct_map__SWIG_1(self, args);
37785 }
37786 }
37787 if (argc == 2) {
37788 int _v;
37789 void *vptr = 0;
37790 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
37791 _v = SWIG_CheckState(res);
37792 if (_v) {
37793 {
37794 int res = SWIG_AsVal_bool(argv[1], NULL);
37795 _v = SWIG_CheckState(res);
37796 }
37797 if (_v) {
37798 return _wrap_IndexIVF_make_direct_map__SWIG_0(self, args);
37799 }
37800 }
37801 }
37802
37803 fail:
37804 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVF_make_direct_map'.\n"
37805 " Possible C/C++ prototypes are:\n"
37806 " faiss::IndexIVF::make_direct_map(bool)\n"
37807 " faiss::IndexIVF::make_direct_map()\n");
37808 return 0;
37809 }
37810
37811
37812 SWIGINTERN PyObject *_wrap_IndexIVF_imbalance_factor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37813 PyObject *resultobj = 0;
37814 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37815 void *argp1 = 0 ;
37816 int res1 = 0 ;
37817 PyObject * obj0 = 0 ;
37818 double result;
37819
37820 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_imbalance_factor",&obj0)) SWIG_fail;
37821 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37822 if (!SWIG_IsOK(res1)) {
37823 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_imbalance_factor" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37824 }
37825 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37826 {
37827 Py_BEGIN_ALLOW_THREADS
37828 try {
37829 result = (double)((faiss::IndexIVF const *)arg1)->imbalance_factor();
37830 } catch(faiss::FaissException & e) {
37831 PyEval_RestoreThread(_save);
37832 PyErr_SetString(PyExc_RuntimeError, e.what());
37833 SWIG_fail;
37834 }
37835 Py_END_ALLOW_THREADS
37836 }
37837 resultobj = SWIG_From_double(static_cast< double >(result));
37838 return resultobj;
37839 fail:
37840 return NULL;
37841 }
37842
37843
37844 SWIGINTERN PyObject *_wrap_IndexIVF_print_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37845 PyObject *resultobj = 0;
37846 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37847 void *argp1 = 0 ;
37848 int res1 = 0 ;
37849 PyObject * obj0 = 0 ;
37850
37851 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVF_print_stats",&obj0)) SWIG_fail;
37852 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37853 if (!SWIG_IsOK(res1)) {
37854 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_print_stats" "', argument " "1"" of type '" "faiss::IndexIVF const *""'");
37855 }
37856 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37857 {
37858 Py_BEGIN_ALLOW_THREADS
37859 try {
37860 ((faiss::IndexIVF const *)arg1)->print_stats();
37861 } catch(faiss::FaissException & e) {
37862 PyEval_RestoreThread(_save);
37863 PyErr_SetString(PyExc_RuntimeError, e.what());
37864 SWIG_fail;
37865 }
37866 Py_END_ALLOW_THREADS
37867 }
37868 resultobj = SWIG_Py_Void();
37869 return resultobj;
37870 fail:
37871 return NULL;
37872 }
37873
37874
37875 SWIGINTERN PyObject *_wrap_IndexIVF_replace_invlists__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37876 PyObject *resultobj = 0;
37877 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37878 faiss::InvertedLists *arg2 = (faiss::InvertedLists *) 0 ;
37879 bool arg3 ;
37880 void *argp1 = 0 ;
37881 int res1 = 0 ;
37882 void *argp2 = 0 ;
37883 int res2 = 0 ;
37884 bool val3 ;
37885 int ecode3 = 0 ;
37886 PyObject * obj0 = 0 ;
37887 PyObject * obj1 = 0 ;
37888 PyObject * obj2 = 0 ;
37889
37890 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVF_replace_invlists",&obj0,&obj1,&obj2)) SWIG_fail;
37891 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37892 if (!SWIG_IsOK(res1)) {
37893 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_replace_invlists" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37894 }
37895 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37896 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
37897 if (!SWIG_IsOK(res2)) {
37898 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_replace_invlists" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
37899 }
37900 arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
37901 ecode3 = SWIG_AsVal_bool(obj2, &val3);
37902 if (!SWIG_IsOK(ecode3)) {
37903 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVF_replace_invlists" "', argument " "3"" of type '" "bool""'");
37904 }
37905 arg3 = static_cast< bool >(val3);
37906 {
37907 Py_BEGIN_ALLOW_THREADS
37908 try {
37909 (arg1)->replace_invlists(arg2,arg3);
37910 } catch(faiss::FaissException & e) {
37911 PyEval_RestoreThread(_save);
37912 PyErr_SetString(PyExc_RuntimeError, e.what());
37913 SWIG_fail;
37914 }
37915 Py_END_ALLOW_THREADS
37916 }
37917 resultobj = SWIG_Py_Void();
37918 return resultobj;
37919 fail:
37920 return NULL;
37921 }
37922
37923
37924 SWIGINTERN PyObject *_wrap_IndexIVF_replace_invlists__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
37925 PyObject *resultobj = 0;
37926 faiss::IndexIVF *arg1 = (faiss::IndexIVF *) 0 ;
37927 faiss::InvertedLists *arg2 = (faiss::InvertedLists *) 0 ;
37928 void *argp1 = 0 ;
37929 int res1 = 0 ;
37930 void *argp2 = 0 ;
37931 int res2 = 0 ;
37932 PyObject * obj0 = 0 ;
37933 PyObject * obj1 = 0 ;
37934
37935 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVF_replace_invlists",&obj0,&obj1)) SWIG_fail;
37936 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
37937 if (!SWIG_IsOK(res1)) {
37938 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVF_replace_invlists" "', argument " "1"" of type '" "faiss::IndexIVF *""'");
37939 }
37940 arg1 = reinterpret_cast< faiss::IndexIVF * >(argp1);
37941 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
37942 if (!SWIG_IsOK(res2)) {
37943 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVF_replace_invlists" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
37944 }
37945 arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
37946 {
37947 Py_BEGIN_ALLOW_THREADS
37948 try {
37949 (arg1)->replace_invlists(arg2);
37950 } catch(faiss::FaissException & e) {
37951 PyEval_RestoreThread(_save);
37952 PyErr_SetString(PyExc_RuntimeError, e.what());
37953 SWIG_fail;
37954 }
37955 Py_END_ALLOW_THREADS
37956 }
37957 resultobj = SWIG_Py_Void();
37958 return resultobj;
37959 fail:
37960 return NULL;
37961 }
37962
37963
37964 SWIGINTERN PyObject *_wrap_IndexIVF_replace_invlists(PyObject *self, PyObject *args) {
37965 Py_ssize_t argc;
37966 PyObject *argv[4] = {
37967 0
37968 };
37969 Py_ssize_t ii;
37970
37971 if (!PyTuple_Check(args)) SWIG_fail;
37972 argc = args ? PyObject_Length(args) : 0;
37973 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
37974 argv[ii] = PyTuple_GET_ITEM(args,ii);
37975 }
37976 if (argc == 2) {
37977 int _v;
37978 void *vptr = 0;
37979 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
37980 _v = SWIG_CheckState(res);
37981 if (_v) {
37982 void *vptr = 0;
37983 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__InvertedLists, 0);
37984 _v = SWIG_CheckState(res);
37985 if (_v) {
37986 return _wrap_IndexIVF_replace_invlists__SWIG_1(self, args);
37987 }
37988 }
37989 }
37990 if (argc == 3) {
37991 int _v;
37992 void *vptr = 0;
37993 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVF, 0);
37994 _v = SWIG_CheckState(res);
37995 if (_v) {
37996 void *vptr = 0;
37997 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__InvertedLists, 0);
37998 _v = SWIG_CheckState(res);
37999 if (_v) {
38000 {
38001 int res = SWIG_AsVal_bool(argv[2], NULL);
38002 _v = SWIG_CheckState(res);
38003 }
38004 if (_v) {
38005 return _wrap_IndexIVF_replace_invlists__SWIG_0(self, args);
38006 }
38007 }
38008 }
38009 }
38010
38011 fail:
38012 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVF_replace_invlists'.\n"
38013 " Possible C/C++ prototypes are:\n"
38014 " faiss::IndexIVF::replace_invlists(faiss::InvertedLists *,bool)\n"
38015 " faiss::IndexIVF::replace_invlists(faiss::InvertedLists *)\n");
38016 return 0;
38017 }
38018
38019
38020 SWIGINTERN PyObject *IndexIVF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38021 PyObject *obj;
38022 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
38023 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVF, SWIG_NewClientData(obj));
38024 return SWIG_Py_Void();
38025 }
38026
38027 SWIGINTERN PyObject *_wrap_IndexIVFStats_nq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38028 PyObject *resultobj = 0;
38029 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38030 size_t arg2 ;
38031 void *argp1 = 0 ;
38032 int res1 = 0 ;
38033 size_t val2 ;
38034 int ecode2 = 0 ;
38035 PyObject * obj0 = 0 ;
38036 PyObject * obj1 = 0 ;
38037
38038 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFStats_nq_set",&obj0,&obj1)) SWIG_fail;
38039 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38040 if (!SWIG_IsOK(res1)) {
38041 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nq_set" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38042 }
38043 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38044 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
38045 if (!SWIG_IsOK(ecode2)) {
38046 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFStats_nq_set" "', argument " "2"" of type '" "size_t""'");
38047 }
38048 arg2 = static_cast< size_t >(val2);
38049 if (arg1) (arg1)->nq = arg2;
38050 resultobj = SWIG_Py_Void();
38051 return resultobj;
38052 fail:
38053 return NULL;
38054 }
38055
38056
38057 SWIGINTERN PyObject *_wrap_IndexIVFStats_nq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38058 PyObject *resultobj = 0;
38059 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38060 void *argp1 = 0 ;
38061 int res1 = 0 ;
38062 PyObject * obj0 = 0 ;
38063 size_t result;
38064
38065 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_nq_get",&obj0)) SWIG_fail;
38066 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38067 if (!SWIG_IsOK(res1)) {
38068 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nq_get" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38069 }
38070 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38071 result = (size_t) ((arg1)->nq);
38072 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
38073 return resultobj;
38074 fail:
38075 return NULL;
38076 }
38077
38078
38079 SWIGINTERN PyObject *_wrap_IndexIVFStats_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38080 PyObject *resultobj = 0;
38081 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38082 size_t arg2 ;
38083 void *argp1 = 0 ;
38084 int res1 = 0 ;
38085 size_t val2 ;
38086 int ecode2 = 0 ;
38087 PyObject * obj0 = 0 ;
38088 PyObject * obj1 = 0 ;
38089
38090 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFStats_nlist_set",&obj0,&obj1)) SWIG_fail;
38091 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38092 if (!SWIG_IsOK(res1)) {
38093 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nlist_set" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38094 }
38095 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38096 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
38097 if (!SWIG_IsOK(ecode2)) {
38098 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFStats_nlist_set" "', argument " "2"" of type '" "size_t""'");
38099 }
38100 arg2 = static_cast< size_t >(val2);
38101 if (arg1) (arg1)->nlist = arg2;
38102 resultobj = SWIG_Py_Void();
38103 return resultobj;
38104 fail:
38105 return NULL;
38106 }
38107
38108
38109 SWIGINTERN PyObject *_wrap_IndexIVFStats_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38110 PyObject *resultobj = 0;
38111 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38112 void *argp1 = 0 ;
38113 int res1 = 0 ;
38114 PyObject * obj0 = 0 ;
38115 size_t result;
38116
38117 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_nlist_get",&obj0)) SWIG_fail;
38118 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38119 if (!SWIG_IsOK(res1)) {
38120 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nlist_get" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38121 }
38122 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38123 result = (size_t) ((arg1)->nlist);
38124 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
38125 return resultobj;
38126 fail:
38127 return NULL;
38128 }
38129
38130
38131 SWIGINTERN PyObject *_wrap_IndexIVFStats_ndis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38132 PyObject *resultobj = 0;
38133 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38134 size_t arg2 ;
38135 void *argp1 = 0 ;
38136 int res1 = 0 ;
38137 size_t val2 ;
38138 int ecode2 = 0 ;
38139 PyObject * obj0 = 0 ;
38140 PyObject * obj1 = 0 ;
38141
38142 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFStats_ndis_set",&obj0,&obj1)) SWIG_fail;
38143 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38144 if (!SWIG_IsOK(res1)) {
38145 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_ndis_set" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38146 }
38147 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38148 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
38149 if (!SWIG_IsOK(ecode2)) {
38150 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFStats_ndis_set" "', argument " "2"" of type '" "size_t""'");
38151 }
38152 arg2 = static_cast< size_t >(val2);
38153 if (arg1) (arg1)->ndis = arg2;
38154 resultobj = SWIG_Py_Void();
38155 return resultobj;
38156 fail:
38157 return NULL;
38158 }
38159
38160
38161 SWIGINTERN PyObject *_wrap_IndexIVFStats_ndis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38162 PyObject *resultobj = 0;
38163 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38164 void *argp1 = 0 ;
38165 int res1 = 0 ;
38166 PyObject * obj0 = 0 ;
38167 size_t result;
38168
38169 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_ndis_get",&obj0)) SWIG_fail;
38170 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38171 if (!SWIG_IsOK(res1)) {
38172 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_ndis_get" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38173 }
38174 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38175 result = (size_t) ((arg1)->ndis);
38176 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
38177 return resultobj;
38178 fail:
38179 return NULL;
38180 }
38181
38182
38183 SWIGINTERN PyObject *_wrap_IndexIVFStats_nheap_updates_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38184 PyObject *resultobj = 0;
38185 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38186 size_t arg2 ;
38187 void *argp1 = 0 ;
38188 int res1 = 0 ;
38189 size_t val2 ;
38190 int ecode2 = 0 ;
38191 PyObject * obj0 = 0 ;
38192 PyObject * obj1 = 0 ;
38193
38194 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFStats_nheap_updates_set",&obj0,&obj1)) SWIG_fail;
38195 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38196 if (!SWIG_IsOK(res1)) {
38197 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nheap_updates_set" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38198 }
38199 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38200 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
38201 if (!SWIG_IsOK(ecode2)) {
38202 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFStats_nheap_updates_set" "', argument " "2"" of type '" "size_t""'");
38203 }
38204 arg2 = static_cast< size_t >(val2);
38205 if (arg1) (arg1)->nheap_updates = arg2;
38206 resultobj = SWIG_Py_Void();
38207 return resultobj;
38208 fail:
38209 return NULL;
38210 }
38211
38212
38213 SWIGINTERN PyObject *_wrap_IndexIVFStats_nheap_updates_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38214 PyObject *resultobj = 0;
38215 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38216 void *argp1 = 0 ;
38217 int res1 = 0 ;
38218 PyObject * obj0 = 0 ;
38219 size_t result;
38220
38221 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_nheap_updates_get",&obj0)) SWIG_fail;
38222 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38223 if (!SWIG_IsOK(res1)) {
38224 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_nheap_updates_get" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38225 }
38226 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38227 result = (size_t) ((arg1)->nheap_updates);
38228 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
38229 return resultobj;
38230 fail:
38231 return NULL;
38232 }
38233
38234
38235 SWIGINTERN PyObject *_wrap_new_IndexIVFStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38236 PyObject *resultobj = 0;
38237 faiss::IndexIVFStats *result = 0 ;
38238
38239 if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFStats")) SWIG_fail;
38240 {
38241 Py_BEGIN_ALLOW_THREADS
38242 try {
38243 result = (faiss::IndexIVFStats *)new faiss::IndexIVFStats();
38244 } catch(faiss::FaissException & e) {
38245 PyEval_RestoreThread(_save);
38246 PyErr_SetString(PyExc_RuntimeError, e.what());
38247 SWIG_fail;
38248 }
38249 Py_END_ALLOW_THREADS
38250 }
38251 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFStats, SWIG_POINTER_NEW | 0 );
38252 return resultobj;
38253 fail:
38254 return NULL;
38255 }
38256
38257
38258 SWIGINTERN PyObject *_wrap_IndexIVFStats_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38259 PyObject *resultobj = 0;
38260 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38261 void *argp1 = 0 ;
38262 int res1 = 0 ;
38263 PyObject * obj0 = 0 ;
38264
38265 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFStats_reset",&obj0)) SWIG_fail;
38266 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0 );
38267 if (!SWIG_IsOK(res1)) {
38268 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFStats_reset" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38269 }
38270 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38271 {
38272 Py_BEGIN_ALLOW_THREADS
38273 try {
38274 (arg1)->reset();
38275 } catch(faiss::FaissException & e) {
38276 PyEval_RestoreThread(_save);
38277 PyErr_SetString(PyExc_RuntimeError, e.what());
38278 SWIG_fail;
38279 }
38280 Py_END_ALLOW_THREADS
38281 }
38282 resultobj = SWIG_Py_Void();
38283 return resultobj;
38284 fail:
38285 return NULL;
38286 }
38287
38288
38289 SWIGINTERN PyObject *_wrap_delete_IndexIVFStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38290 PyObject *resultobj = 0;
38291 faiss::IndexIVFStats *arg1 = (faiss::IndexIVFStats *) 0 ;
38292 void *argp1 = 0 ;
38293 int res1 = 0 ;
38294 PyObject * obj0 = 0 ;
38295
38296 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFStats",&obj0)) SWIG_fail;
38297 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFStats, SWIG_POINTER_DISOWN | 0 );
38298 if (!SWIG_IsOK(res1)) {
38299 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFStats" "', argument " "1"" of type '" "faiss::IndexIVFStats *""'");
38300 }
38301 arg1 = reinterpret_cast< faiss::IndexIVFStats * >(argp1);
38302 delete arg1;
38303 resultobj = SWIG_Py_Void();
38304 return resultobj;
38305 fail:
38306 return NULL;
38307 }
38308
38309
38310 SWIGINTERN PyObject *IndexIVFStats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38311 PyObject *obj;
38312 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
38313 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFStats, SWIG_NewClientData(obj));
38314 return SWIG_Py_Void();
38315 }
38316
38317 SWIGINTERN int Swig_var_indexIVF_stats_set(PyObject *_val) {
38318 {
38319 void *argp = 0;
38320 int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_faiss__IndexIVFStats, 0 | 0);
38321 if (!SWIG_IsOK(res)) {
38322 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::indexIVF_stats""' of type '""faiss::IndexIVFStats""'");
38323 }
38324 if (!argp) {
38325 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""faiss::indexIVF_stats""' of type '""faiss::IndexIVFStats""'");
38326 } else {
38327 faiss::IndexIVFStats * temp;
38328 temp = reinterpret_cast< faiss::IndexIVFStats * >(argp);
38329 faiss::indexIVF_stats = *temp;
38330 if (SWIG_IsNewObj(res)) delete temp;
38331 }
38332 }
38333 return 0;
38334 fail:
38335 return 1;
38336 }
38337
38338
38339 SWIGINTERN PyObject *Swig_var_indexIVF_stats_get(void) {
38340 PyObject *pyobj = 0;
38341
38342 pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&faiss::indexIVF_stats), SWIGTYPE_p_faiss__IndexIVFStats, 0 );
38343 return pyobj;
38344 }
38345
38346
38347 SWIGINTERN PyObject *_wrap_check_compatible_for_merge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38348 PyObject *resultobj = 0;
38349 faiss::Index *arg1 = (faiss::Index *) 0 ;
38350 faiss::Index *arg2 = (faiss::Index *) 0 ;
38351 void *argp1 = 0 ;
38352 int res1 = 0 ;
38353 void *argp2 = 0 ;
38354 int res2 = 0 ;
38355 PyObject * obj0 = 0 ;
38356 PyObject * obj1 = 0 ;
38357
38358 if (!PyArg_ParseTuple(args,(char *)"OO:check_compatible_for_merge",&obj0,&obj1)) SWIG_fail;
38359 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
38360 if (!SWIG_IsOK(res1)) {
38361 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "check_compatible_for_merge" "', argument " "1"" of type '" "faiss::Index const *""'");
38362 }
38363 arg1 = reinterpret_cast< faiss::Index * >(argp1);
38364 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
38365 if (!SWIG_IsOK(res2)) {
38366 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "check_compatible_for_merge" "', argument " "2"" of type '" "faiss::Index const *""'");
38367 }
38368 arg2 = reinterpret_cast< faiss::Index * >(argp2);
38369 {
38370 Py_BEGIN_ALLOW_THREADS
38371 try {
38372 faiss::ivflib::check_compatible_for_merge((faiss::Index const *)arg1,(faiss::Index const *)arg2);
38373 } catch(faiss::FaissException & e) {
38374 PyEval_RestoreThread(_save);
38375 PyErr_SetString(PyExc_RuntimeError, e.what());
38376 SWIG_fail;
38377 }
38378 Py_END_ALLOW_THREADS
38379 }
38380 resultobj = SWIG_Py_Void();
38381 return resultobj;
38382 fail:
38383 return NULL;
38384 }
38385
38386
38387 SWIGINTERN PyObject *_wrap_extract_index_ivf__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38388 PyObject *resultobj = 0;
38389 faiss::Index *arg1 = (faiss::Index *) 0 ;
38390 void *argp1 = 0 ;
38391 int res1 = 0 ;
38392 PyObject * obj0 = 0 ;
38393 faiss::IndexIVF *result = 0 ;
38394
38395 if (!PyArg_ParseTuple(args,(char *)"O:extract_index_ivf",&obj0)) SWIG_fail;
38396 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
38397 if (!SWIG_IsOK(res1)) {
38398 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "extract_index_ivf" "', argument " "1"" of type '" "faiss::Index const *""'");
38399 }
38400 arg1 = reinterpret_cast< faiss::Index * >(argp1);
38401 {
38402 Py_BEGIN_ALLOW_THREADS
38403 try {
38404 result = (faiss::IndexIVF *)faiss::ivflib::extract_index_ivf((faiss::Index const *)arg1);
38405 } catch(faiss::FaissException & e) {
38406 PyEval_RestoreThread(_save);
38407 PyErr_SetString(PyExc_RuntimeError, e.what());
38408 SWIG_fail;
38409 }
38410 Py_END_ALLOW_THREADS
38411 }
38412 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38413 return resultobj;
38414 fail:
38415 return NULL;
38416 }
38417
38418
38419 SWIGINTERN PyObject *_wrap_extract_index_ivf__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38420 PyObject *resultobj = 0;
38421 faiss::Index *arg1 = (faiss::Index *) 0 ;
38422 void *argp1 = 0 ;
38423 int res1 = 0 ;
38424 PyObject * obj0 = 0 ;
38425 faiss::IndexIVF *result = 0 ;
38426
38427 if (!PyArg_ParseTuple(args,(char *)"O:extract_index_ivf",&obj0)) SWIG_fail;
38428 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
38429 if (!SWIG_IsOK(res1)) {
38430 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "extract_index_ivf" "', argument " "1"" of type '" "faiss::Index *""'");
38431 }
38432 arg1 = reinterpret_cast< faiss::Index * >(argp1);
38433 {
38434 Py_BEGIN_ALLOW_THREADS
38435 try {
38436 result = (faiss::IndexIVF *)faiss::ivflib::extract_index_ivf(arg1);
38437 } catch(faiss::FaissException & e) {
38438 PyEval_RestoreThread(_save);
38439 PyErr_SetString(PyExc_RuntimeError, e.what());
38440 SWIG_fail;
38441 }
38442 Py_END_ALLOW_THREADS
38443 }
38444 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
38445 return resultobj;
38446 fail:
38447 return NULL;
38448 }
38449
38450
38451 SWIGINTERN PyObject *_wrap_extract_index_ivf(PyObject *self, PyObject *args) {
38452 Py_ssize_t argc;
38453 PyObject *argv[2] = {
38454 0
38455 };
38456 Py_ssize_t ii;
38457
38458 if (!PyTuple_Check(args)) SWIG_fail;
38459 argc = args ? PyObject_Length(args) : 0;
38460 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
38461 argv[ii] = PyTuple_GET_ITEM(args,ii);
38462 }
38463 if (argc == 1) {
38464 int _v;
38465 void *vptr = 0;
38466 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
38467 _v = SWIG_CheckState(res);
38468 if (_v) {
38469 return _wrap_extract_index_ivf__SWIG_0(self, args);
38470 }
38471 }
38472 if (argc == 1) {
38473 int _v;
38474 void *vptr = 0;
38475 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
38476 _v = SWIG_CheckState(res);
38477 if (_v) {
38478 return _wrap_extract_index_ivf__SWIG_1(self, args);
38479 }
38480 }
38481
38482 fail:
38483 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'extract_index_ivf'.\n"
38484 " Possible C/C++ prototypes are:\n"
38485 " faiss::ivflib::extract_index_ivf(faiss::Index const *)\n"
38486 " faiss::ivflib::extract_index_ivf(faiss::Index *)\n");
38487 return 0;
38488 }
38489
38490
38491 SWIGINTERN PyObject *_wrap_merge_into(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38492 PyObject *resultobj = 0;
38493 faiss::Index *arg1 = (faiss::Index *) 0 ;
38494 faiss::Index *arg2 = (faiss::Index *) 0 ;
38495 bool arg3 ;
38496 void *argp1 = 0 ;
38497 int res1 = 0 ;
38498 void *argp2 = 0 ;
38499 int res2 = 0 ;
38500 bool val3 ;
38501 int ecode3 = 0 ;
38502 PyObject * obj0 = 0 ;
38503 PyObject * obj1 = 0 ;
38504 PyObject * obj2 = 0 ;
38505
38506 if (!PyArg_ParseTuple(args,(char *)"OOO:merge_into",&obj0,&obj1,&obj2)) SWIG_fail;
38507 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
38508 if (!SWIG_IsOK(res1)) {
38509 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "merge_into" "', argument " "1"" of type '" "faiss::Index *""'");
38510 }
38511 arg1 = reinterpret_cast< faiss::Index * >(argp1);
38512 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
38513 if (!SWIG_IsOK(res2)) {
38514 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "merge_into" "', argument " "2"" of type '" "faiss::Index *""'");
38515 }
38516 arg2 = reinterpret_cast< faiss::Index * >(argp2);
38517 ecode3 = SWIG_AsVal_bool(obj2, &val3);
38518 if (!SWIG_IsOK(ecode3)) {
38519 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "merge_into" "', argument " "3"" of type '" "bool""'");
38520 }
38521 arg3 = static_cast< bool >(val3);
38522 {
38523 Py_BEGIN_ALLOW_THREADS
38524 try {
38525 faiss::ivflib::merge_into(arg1,arg2,arg3);
38526 } catch(faiss::FaissException & e) {
38527 PyEval_RestoreThread(_save);
38528 PyErr_SetString(PyExc_RuntimeError, e.what());
38529 SWIG_fail;
38530 }
38531 Py_END_ALLOW_THREADS
38532 }
38533 resultobj = SWIG_Py_Void();
38534 return resultobj;
38535 fail:
38536 return NULL;
38537 }
38538
38539
38540 SWIGINTERN PyObject *_wrap_search_centroid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38541 PyObject *resultobj = 0;
38542 faiss::Index *arg1 = (faiss::Index *) 0 ;
38543 float *arg2 = (float *) 0 ;
38544 int arg3 ;
38545 faiss::ivflib::idx_t *arg4 = (faiss::ivflib::idx_t *) 0 ;
38546 void *argp1 = 0 ;
38547 int res1 = 0 ;
38548 void *argp2 = 0 ;
38549 int res2 = 0 ;
38550 int val3 ;
38551 int ecode3 = 0 ;
38552 void *argp4 = 0 ;
38553 int res4 = 0 ;
38554 PyObject * obj0 = 0 ;
38555 PyObject * obj1 = 0 ;
38556 PyObject * obj2 = 0 ;
38557 PyObject * obj3 = 0 ;
38558
38559 if (!PyArg_ParseTuple(args,(char *)"OOOO:search_centroid",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
38560 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
38561 if (!SWIG_IsOK(res1)) {
38562 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "search_centroid" "', argument " "1"" of type '" "faiss::Index *""'");
38563 }
38564 arg1 = reinterpret_cast< faiss::Index * >(argp1);
38565 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
38566 if (!SWIG_IsOK(res2)) {
38567 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "search_centroid" "', argument " "2"" of type '" "float const *""'");
38568 }
38569 arg2 = reinterpret_cast< float * >(argp2);
38570 ecode3 = SWIG_AsVal_int(obj2, &val3);
38571 if (!SWIG_IsOK(ecode3)) {
38572 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "search_centroid" "', argument " "3"" of type '" "int""'");
38573 }
38574 arg3 = static_cast< int >(val3);
38575 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
38576 if (!SWIG_IsOK(res4)) {
38577 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "search_centroid" "', argument " "4"" of type '" "faiss::ivflib::idx_t *""'");
38578 }
38579 arg4 = reinterpret_cast< faiss::ivflib::idx_t * >(argp4);
38580 {
38581 Py_BEGIN_ALLOW_THREADS
38582 try {
38583 faiss::ivflib::search_centroid(arg1,(float const *)arg2,arg3,arg4);
38584 } catch(faiss::FaissException & e) {
38585 PyEval_RestoreThread(_save);
38586 PyErr_SetString(PyExc_RuntimeError, e.what());
38587 SWIG_fail;
38588 }
38589 Py_END_ALLOW_THREADS
38590 }
38591 resultobj = SWIG_Py_Void();
38592 return resultobj;
38593 fail:
38594 return NULL;
38595 }
38596
38597
38598 SWIGINTERN PyObject *_wrap_search_and_return_centroids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38599 PyObject *resultobj = 0;
38600 faiss::Index *arg1 = (faiss::Index *) 0 ;
38601 size_t arg2 ;
38602 float *arg3 = (float *) 0 ;
38603 long arg4 ;
38604 float *arg5 = (float *) 0 ;
38605 faiss::ivflib::idx_t *arg6 = (faiss::ivflib::idx_t *) 0 ;
38606 faiss::ivflib::idx_t *arg7 = (faiss::ivflib::idx_t *) 0 ;
38607 faiss::ivflib::idx_t *arg8 = (faiss::ivflib::idx_t *) 0 ;
38608 void *argp1 = 0 ;
38609 int res1 = 0 ;
38610 size_t val2 ;
38611 int ecode2 = 0 ;
38612 void *argp3 = 0 ;
38613 int res3 = 0 ;
38614 long val4 ;
38615 int ecode4 = 0 ;
38616 void *argp5 = 0 ;
38617 int res5 = 0 ;
38618 void *argp6 = 0 ;
38619 int res6 = 0 ;
38620 void *argp7 = 0 ;
38621 int res7 = 0 ;
38622 void *argp8 = 0 ;
38623 int res8 = 0 ;
38624 PyObject * obj0 = 0 ;
38625 PyObject * obj1 = 0 ;
38626 PyObject * obj2 = 0 ;
38627 PyObject * obj3 = 0 ;
38628 PyObject * obj4 = 0 ;
38629 PyObject * obj5 = 0 ;
38630 PyObject * obj6 = 0 ;
38631 PyObject * obj7 = 0 ;
38632
38633 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:search_and_return_centroids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
38634 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
38635 if (!SWIG_IsOK(res1)) {
38636 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "search_and_return_centroids" "', argument " "1"" of type '" "faiss::Index *""'");
38637 }
38638 arg1 = reinterpret_cast< faiss::Index * >(argp1);
38639 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
38640 if (!SWIG_IsOK(ecode2)) {
38641 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "search_and_return_centroids" "', argument " "2"" of type '" "size_t""'");
38642 }
38643 arg2 = static_cast< size_t >(val2);
38644 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
38645 if (!SWIG_IsOK(res3)) {
38646 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "search_and_return_centroids" "', argument " "3"" of type '" "float const *""'");
38647 }
38648 arg3 = reinterpret_cast< float * >(argp3);
38649 ecode4 = SWIG_AsVal_long(obj3, &val4);
38650 if (!SWIG_IsOK(ecode4)) {
38651 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "search_and_return_centroids" "', argument " "4"" of type '" "long""'");
38652 }
38653 arg4 = static_cast< long >(val4);
38654 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
38655 if (!SWIG_IsOK(res5)) {
38656 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "search_and_return_centroids" "', argument " "5"" of type '" "float *""'");
38657 }
38658 arg5 = reinterpret_cast< float * >(argp5);
38659 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
38660 if (!SWIG_IsOK(res6)) {
38661 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "search_and_return_centroids" "', argument " "6"" of type '" "faiss::ivflib::idx_t *""'");
38662 }
38663 arg6 = reinterpret_cast< faiss::ivflib::idx_t * >(argp6);
38664 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_long, 0 | 0 );
38665 if (!SWIG_IsOK(res7)) {
38666 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "search_and_return_centroids" "', argument " "7"" of type '" "faiss::ivflib::idx_t *""'");
38667 }
38668 arg7 = reinterpret_cast< faiss::ivflib::idx_t * >(argp7);
38669 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
38670 if (!SWIG_IsOK(res8)) {
38671 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "search_and_return_centroids" "', argument " "8"" of type '" "faiss::ivflib::idx_t *""'");
38672 }
38673 arg8 = reinterpret_cast< faiss::ivflib::idx_t * >(argp8);
38674 {
38675 Py_BEGIN_ALLOW_THREADS
38676 try {
38677 faiss::ivflib::search_and_return_centroids(arg1,arg2,(float const *)arg3,arg4,arg5,arg6,arg7,arg8);
38678 } catch(faiss::FaissException & e) {
38679 PyEval_RestoreThread(_save);
38680 PyErr_SetString(PyExc_RuntimeError, e.what());
38681 SWIG_fail;
38682 }
38683 Py_END_ALLOW_THREADS
38684 }
38685 resultobj = SWIG_Py_Void();
38686 return resultobj;
38687 fail:
38688 return NULL;
38689 }
38690
38691
38692 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38693 PyObject *resultobj = 0;
38694 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38695 faiss::Index *arg2 = (faiss::Index *) 0 ;
38696 void *argp1 = 0 ;
38697 int res1 = 0 ;
38698 void *argp2 = 0 ;
38699 int res2 = 0 ;
38700 PyObject * obj0 = 0 ;
38701 PyObject * obj1 = 0 ;
38702
38703 if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_index_set",&obj0,&obj1)) SWIG_fail;
38704 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38705 if (!SWIG_IsOK(res1)) {
38706 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_index_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38707 }
38708 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38709 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
38710 if (!SWIG_IsOK(res2)) {
38711 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SlidingIndexWindow_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
38712 }
38713 arg2 = reinterpret_cast< faiss::Index * >(argp2);
38714 if (arg1) (arg1)->index = arg2;
38715 resultobj = SWIG_Py_Void();
38716 return resultobj;
38717 fail:
38718 return NULL;
38719 }
38720
38721
38722 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38723 PyObject *resultobj = 0;
38724 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38725 void *argp1 = 0 ;
38726 int res1 = 0 ;
38727 PyObject * obj0 = 0 ;
38728 faiss::Index *result = 0 ;
38729
38730 if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_index_get",&obj0)) SWIG_fail;
38731 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38732 if (!SWIG_IsOK(res1)) {
38733 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_index_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38734 }
38735 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38736 result = (faiss::Index *) ((arg1)->index);
38737 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
38738 return resultobj;
38739 fail:
38740 return NULL;
38741 }
38742
38743
38744 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_ils_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38745 PyObject *resultobj = 0;
38746 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38747 faiss::ArrayInvertedLists *arg2 = (faiss::ArrayInvertedLists *) 0 ;
38748 void *argp1 = 0 ;
38749 int res1 = 0 ;
38750 void *argp2 = 0 ;
38751 int res2 = 0 ;
38752 PyObject * obj0 = 0 ;
38753 PyObject * obj1 = 0 ;
38754
38755 if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_ils_set",&obj0,&obj1)) SWIG_fail;
38756 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38757 if (!SWIG_IsOK(res1)) {
38758 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_ils_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38759 }
38760 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38761 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ArrayInvertedLists, SWIG_POINTER_DISOWN | 0 );
38762 if (!SWIG_IsOK(res2)) {
38763 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SlidingIndexWindow_ils_set" "', argument " "2"" of type '" "faiss::ArrayInvertedLists *""'");
38764 }
38765 arg2 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp2);
38766 if (arg1) (arg1)->ils = arg2;
38767 resultobj = SWIG_Py_Void();
38768 return resultobj;
38769 fail:
38770 return NULL;
38771 }
38772
38773
38774 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_ils_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38775 PyObject *resultobj = 0;
38776 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38777 void *argp1 = 0 ;
38778 int res1 = 0 ;
38779 PyObject * obj0 = 0 ;
38780 faiss::ArrayInvertedLists *result = 0 ;
38781
38782 if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_ils_get",&obj0)) SWIG_fail;
38783 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38784 if (!SWIG_IsOK(res1)) {
38785 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_ils_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38786 }
38787 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38788 result = (faiss::ArrayInvertedLists *) ((arg1)->ils);
38789 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
38790 return resultobj;
38791 fail:
38792 return NULL;
38793 }
38794
38795
38796 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_n_slice_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38797 PyObject *resultobj = 0;
38798 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38799 int arg2 ;
38800 void *argp1 = 0 ;
38801 int res1 = 0 ;
38802 int val2 ;
38803 int ecode2 = 0 ;
38804 PyObject * obj0 = 0 ;
38805 PyObject * obj1 = 0 ;
38806
38807 if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_n_slice_set",&obj0,&obj1)) SWIG_fail;
38808 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38809 if (!SWIG_IsOK(res1)) {
38810 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_n_slice_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38811 }
38812 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38813 ecode2 = SWIG_AsVal_int(obj1, &val2);
38814 if (!SWIG_IsOK(ecode2)) {
38815 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SlidingIndexWindow_n_slice_set" "', argument " "2"" of type '" "int""'");
38816 }
38817 arg2 = static_cast< int >(val2);
38818 if (arg1) (arg1)->n_slice = arg2;
38819 resultobj = SWIG_Py_Void();
38820 return resultobj;
38821 fail:
38822 return NULL;
38823 }
38824
38825
38826 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_n_slice_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38827 PyObject *resultobj = 0;
38828 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38829 void *argp1 = 0 ;
38830 int res1 = 0 ;
38831 PyObject * obj0 = 0 ;
38832 int result;
38833
38834 if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_n_slice_get",&obj0)) SWIG_fail;
38835 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38836 if (!SWIG_IsOK(res1)) {
38837 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_n_slice_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38838 }
38839 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38840 result = (int) ((arg1)->n_slice);
38841 resultobj = SWIG_From_int(static_cast< int >(result));
38842 return resultobj;
38843 fail:
38844 return NULL;
38845 }
38846
38847
38848 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38849 PyObject *resultobj = 0;
38850 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38851 size_t arg2 ;
38852 void *argp1 = 0 ;
38853 int res1 = 0 ;
38854 size_t val2 ;
38855 int ecode2 = 0 ;
38856 PyObject * obj0 = 0 ;
38857 PyObject * obj1 = 0 ;
38858
38859 if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_nlist_set",&obj0,&obj1)) SWIG_fail;
38860 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38861 if (!SWIG_IsOK(res1)) {
38862 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_nlist_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38863 }
38864 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38865 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
38866 if (!SWIG_IsOK(ecode2)) {
38867 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "SlidingIndexWindow_nlist_set" "', argument " "2"" of type '" "size_t""'");
38868 }
38869 arg2 = static_cast< size_t >(val2);
38870 if (arg1) (arg1)->nlist = arg2;
38871 resultobj = SWIG_Py_Void();
38872 return resultobj;
38873 fail:
38874 return NULL;
38875 }
38876
38877
38878 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38879 PyObject *resultobj = 0;
38880 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38881 void *argp1 = 0 ;
38882 int res1 = 0 ;
38883 PyObject * obj0 = 0 ;
38884 size_t result;
38885
38886 if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_nlist_get",&obj0)) SWIG_fail;
38887 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38888 if (!SWIG_IsOK(res1)) {
38889 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_nlist_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38890 }
38891 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38892 result = (size_t) ((arg1)->nlist);
38893 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
38894 return resultobj;
38895 fail:
38896 return NULL;
38897 }
38898
38899
38900 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_sizes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38901 PyObject *resultobj = 0;
38902 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38903 std::vector< std::vector< size_t > > *arg2 = (std::vector< std::vector< size_t > > *) 0 ;
38904 void *argp1 = 0 ;
38905 int res1 = 0 ;
38906 void *argp2 = 0 ;
38907 int res2 = 0 ;
38908 PyObject * obj0 = 0 ;
38909 PyObject * obj1 = 0 ;
38910
38911 if (!PyArg_ParseTuple(args,(char *)"OO:SlidingIndexWindow_sizes_set",&obj0,&obj1)) SWIG_fail;
38912 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38913 if (!SWIG_IsOK(res1)) {
38914 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_sizes_set" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38915 }
38916 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38917 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_long_t_t, 0 | 0 );
38918 if (!SWIG_IsOK(res2)) {
38919 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SlidingIndexWindow_sizes_set" "', argument " "2"" of type '" "std::vector< std::vector< size_t > > *""'");
38920 }
38921 arg2 = reinterpret_cast< std::vector< std::vector< size_t > > * >(argp2);
38922 if (arg1) (arg1)->sizes = *arg2;
38923 resultobj = SWIG_Py_Void();
38924 return resultobj;
38925 fail:
38926 return NULL;
38927 }
38928
38929
38930 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_sizes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38931 PyObject *resultobj = 0;
38932 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38933 void *argp1 = 0 ;
38934 int res1 = 0 ;
38935 PyObject * obj0 = 0 ;
38936 std::vector< std::vector< size_t > > *result = 0 ;
38937
38938 if (!PyArg_ParseTuple(args,(char *)"O:SlidingIndexWindow_sizes_get",&obj0)) SWIG_fail;
38939 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
38940 if (!SWIG_IsOK(res1)) {
38941 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_sizes_get" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
38942 }
38943 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
38944 result = (std::vector< std::vector< size_t > > *)& ((arg1)->sizes);
38945 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_std__vectorT_unsigned_long_t_t, 0 | 0 );
38946 return resultobj;
38947 fail:
38948 return NULL;
38949 }
38950
38951
38952 SWIGINTERN PyObject *_wrap_new_SlidingIndexWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38953 PyObject *resultobj = 0;
38954 faiss::Index *arg1 = (faiss::Index *) 0 ;
38955 void *argp1 = 0 ;
38956 int res1 = 0 ;
38957 PyObject * obj0 = 0 ;
38958 faiss::ivflib::SlidingIndexWindow *result = 0 ;
38959
38960 if (!PyArg_ParseTuple(args,(char *)"O:new_SlidingIndexWindow",&obj0)) SWIG_fail;
38961 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
38962 if (!SWIG_IsOK(res1)) {
38963 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_SlidingIndexWindow" "', argument " "1"" of type '" "faiss::Index *""'");
38964 }
38965 arg1 = reinterpret_cast< faiss::Index * >(argp1);
38966 {
38967 Py_BEGIN_ALLOW_THREADS
38968 try {
38969 result = (faiss::ivflib::SlidingIndexWindow *)new faiss::ivflib::SlidingIndexWindow(arg1);
38970 } catch(faiss::FaissException & e) {
38971 PyEval_RestoreThread(_save);
38972 PyErr_SetString(PyExc_RuntimeError, e.what());
38973 SWIG_fail;
38974 }
38975 Py_END_ALLOW_THREADS
38976 }
38977 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, SWIG_POINTER_NEW | 0 );
38978 return resultobj;
38979 fail:
38980 return NULL;
38981 }
38982
38983
38984 SWIGINTERN PyObject *_wrap_SlidingIndexWindow_step(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
38985 PyObject *resultobj = 0;
38986 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
38987 faiss::Index *arg2 = (faiss::Index *) 0 ;
38988 bool arg3 ;
38989 void *argp1 = 0 ;
38990 int res1 = 0 ;
38991 void *argp2 = 0 ;
38992 int res2 = 0 ;
38993 bool val3 ;
38994 int ecode3 = 0 ;
38995 PyObject * obj0 = 0 ;
38996 PyObject * obj1 = 0 ;
38997 PyObject * obj2 = 0 ;
38998
38999 if (!PyArg_ParseTuple(args,(char *)"OOO:SlidingIndexWindow_step",&obj0,&obj1,&obj2)) SWIG_fail;
39000 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, 0 | 0 );
39001 if (!SWIG_IsOK(res1)) {
39002 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "SlidingIndexWindow_step" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
39003 }
39004 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
39005 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
39006 if (!SWIG_IsOK(res2)) {
39007 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "SlidingIndexWindow_step" "', argument " "2"" of type '" "faiss::Index const *""'");
39008 }
39009 arg2 = reinterpret_cast< faiss::Index * >(argp2);
39010 ecode3 = SWIG_AsVal_bool(obj2, &val3);
39011 if (!SWIG_IsOK(ecode3)) {
39012 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "SlidingIndexWindow_step" "', argument " "3"" of type '" "bool""'");
39013 }
39014 arg3 = static_cast< bool >(val3);
39015 {
39016 Py_BEGIN_ALLOW_THREADS
39017 try {
39018 (arg1)->step((faiss::Index const *)arg2,arg3);
39019 } catch(faiss::FaissException & e) {
39020 PyEval_RestoreThread(_save);
39021 PyErr_SetString(PyExc_RuntimeError, e.what());
39022 SWIG_fail;
39023 }
39024 Py_END_ALLOW_THREADS
39025 }
39026 resultobj = SWIG_Py_Void();
39027 return resultobj;
39028 fail:
39029 return NULL;
39030 }
39031
39032
39033 SWIGINTERN PyObject *_wrap_delete_SlidingIndexWindow(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39034 PyObject *resultobj = 0;
39035 faiss::ivflib::SlidingIndexWindow *arg1 = (faiss::ivflib::SlidingIndexWindow *) 0 ;
39036 void *argp1 = 0 ;
39037 int res1 = 0 ;
39038 PyObject * obj0 = 0 ;
39039
39040 if (!PyArg_ParseTuple(args,(char *)"O:delete_SlidingIndexWindow",&obj0)) SWIG_fail;
39041 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, SWIG_POINTER_DISOWN | 0 );
39042 if (!SWIG_IsOK(res1)) {
39043 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_SlidingIndexWindow" "', argument " "1"" of type '" "faiss::ivflib::SlidingIndexWindow *""'");
39044 }
39045 arg1 = reinterpret_cast< faiss::ivflib::SlidingIndexWindow * >(argp1);
39046 delete arg1;
39047 resultobj = SWIG_Py_Void();
39048 return resultobj;
39049 fail:
39050 return NULL;
39051 }
39052
39053
39054 SWIGINTERN PyObject *SlidingIndexWindow_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39055 PyObject *obj;
39056 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
39057 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ivflib__SlidingIndexWindow, SWIG_NewClientData(obj));
39058 return SWIG_Py_Void();
39059 }
39060
39061 SWIGINTERN PyObject *_wrap_get_invlist_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39062 PyObject *resultobj = 0;
39063 faiss::Index *arg1 = (faiss::Index *) 0 ;
39064 long arg2 ;
39065 long arg3 ;
39066 void *argp1 = 0 ;
39067 int res1 = 0 ;
39068 long val2 ;
39069 int ecode2 = 0 ;
39070 long val3 ;
39071 int ecode3 = 0 ;
39072 PyObject * obj0 = 0 ;
39073 PyObject * obj1 = 0 ;
39074 PyObject * obj2 = 0 ;
39075 faiss::ArrayInvertedLists *result = 0 ;
39076
39077 if (!PyArg_ParseTuple(args,(char *)"OOO:get_invlist_range",&obj0,&obj1,&obj2)) SWIG_fail;
39078 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39079 if (!SWIG_IsOK(res1)) {
39080 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "get_invlist_range" "', argument " "1"" of type '" "faiss::Index const *""'");
39081 }
39082 arg1 = reinterpret_cast< faiss::Index * >(argp1);
39083 ecode2 = SWIG_AsVal_long(obj1, &val2);
39084 if (!SWIG_IsOK(ecode2)) {
39085 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "get_invlist_range" "', argument " "2"" of type '" "long""'");
39086 }
39087 arg2 = static_cast< long >(val2);
39088 ecode3 = SWIG_AsVal_long(obj2, &val3);
39089 if (!SWIG_IsOK(ecode3)) {
39090 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "get_invlist_range" "', argument " "3"" of type '" "long""'");
39091 }
39092 arg3 = static_cast< long >(val3);
39093 {
39094 Py_BEGIN_ALLOW_THREADS
39095 try {
39096 result = (faiss::ArrayInvertedLists *)faiss::ivflib::get_invlist_range((faiss::Index const *)arg1,arg2,arg3);
39097 } catch(faiss::FaissException & e) {
39098 PyEval_RestoreThread(_save);
39099 PyErr_SetString(PyExc_RuntimeError, e.what());
39100 SWIG_fail;
39101 }
39102 Py_END_ALLOW_THREADS
39103 }
39104 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
39105 return resultobj;
39106 fail:
39107 return NULL;
39108 }
39109
39110
39111 SWIGINTERN PyObject *_wrap_set_invlist_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39112 PyObject *resultobj = 0;
39113 faiss::Index *arg1 = (faiss::Index *) 0 ;
39114 long arg2 ;
39115 long arg3 ;
39116 faiss::ArrayInvertedLists *arg4 = (faiss::ArrayInvertedLists *) 0 ;
39117 void *argp1 = 0 ;
39118 int res1 = 0 ;
39119 long val2 ;
39120 int ecode2 = 0 ;
39121 long val3 ;
39122 int ecode3 = 0 ;
39123 void *argp4 = 0 ;
39124 int res4 = 0 ;
39125 PyObject * obj0 = 0 ;
39126 PyObject * obj1 = 0 ;
39127 PyObject * obj2 = 0 ;
39128 PyObject * obj3 = 0 ;
39129
39130 if (!PyArg_ParseTuple(args,(char *)"OOOO:set_invlist_range",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
39131 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39132 if (!SWIG_IsOK(res1)) {
39133 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "set_invlist_range" "', argument " "1"" of type '" "faiss::Index *""'");
39134 }
39135 arg1 = reinterpret_cast< faiss::Index * >(argp1);
39136 ecode2 = SWIG_AsVal_long(obj1, &val2);
39137 if (!SWIG_IsOK(ecode2)) {
39138 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "set_invlist_range" "', argument " "2"" of type '" "long""'");
39139 }
39140 arg2 = static_cast< long >(val2);
39141 ecode3 = SWIG_AsVal_long(obj2, &val3);
39142 if (!SWIG_IsOK(ecode3)) {
39143 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "set_invlist_range" "', argument " "3"" of type '" "long""'");
39144 }
39145 arg3 = static_cast< long >(val3);
39146 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_faiss__ArrayInvertedLists, 0 | 0 );
39147 if (!SWIG_IsOK(res4)) {
39148 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "set_invlist_range" "', argument " "4"" of type '" "faiss::ArrayInvertedLists *""'");
39149 }
39150 arg4 = reinterpret_cast< faiss::ArrayInvertedLists * >(argp4);
39151 {
39152 Py_BEGIN_ALLOW_THREADS
39153 try {
39154 faiss::ivflib::set_invlist_range(arg1,arg2,arg3,arg4);
39155 } catch(faiss::FaissException & e) {
39156 PyEval_RestoreThread(_save);
39157 PyErr_SetString(PyExc_RuntimeError, e.what());
39158 SWIG_fail;
39159 }
39160 Py_END_ALLOW_THREADS
39161 }
39162 resultobj = SWIG_Py_Void();
39163 return resultobj;
39164 fail:
39165 return NULL;
39166 }
39167
39168
39169 SWIGINTERN PyObject *_wrap_search_with_parameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39170 PyObject *resultobj = 0;
39171 faiss::Index *arg1 = (faiss::Index *) 0 ;
39172 faiss::ivflib::idx_t arg2 ;
39173 float *arg3 = (float *) 0 ;
39174 faiss::ivflib::idx_t arg4 ;
39175 float *arg5 = (float *) 0 ;
39176 faiss::ivflib::idx_t *arg6 = (faiss::ivflib::idx_t *) 0 ;
39177 faiss::IVFSearchParameters *arg7 = (faiss::IVFSearchParameters *) 0 ;
39178 void *argp1 = 0 ;
39179 int res1 = 0 ;
39180 long val2 ;
39181 int ecode2 = 0 ;
39182 void *argp3 = 0 ;
39183 int res3 = 0 ;
39184 long val4 ;
39185 int ecode4 = 0 ;
39186 void *argp5 = 0 ;
39187 int res5 = 0 ;
39188 void *argp6 = 0 ;
39189 int res6 = 0 ;
39190 void *argp7 = 0 ;
39191 int res7 = 0 ;
39192 PyObject * obj0 = 0 ;
39193 PyObject * obj1 = 0 ;
39194 PyObject * obj2 = 0 ;
39195 PyObject * obj3 = 0 ;
39196 PyObject * obj4 = 0 ;
39197 PyObject * obj5 = 0 ;
39198 PyObject * obj6 = 0 ;
39199
39200 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:search_with_parameters",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
39201 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
39202 if (!SWIG_IsOK(res1)) {
39203 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "search_with_parameters" "', argument " "1"" of type '" "faiss::Index const *""'");
39204 }
39205 arg1 = reinterpret_cast< faiss::Index * >(argp1);
39206 ecode2 = SWIG_AsVal_long(obj1, &val2);
39207 if (!SWIG_IsOK(ecode2)) {
39208 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "search_with_parameters" "', argument " "2"" of type '" "faiss::ivflib::idx_t""'");
39209 }
39210 arg2 = static_cast< faiss::ivflib::idx_t >(val2);
39211 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
39212 if (!SWIG_IsOK(res3)) {
39213 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "search_with_parameters" "', argument " "3"" of type '" "float const *""'");
39214 }
39215 arg3 = reinterpret_cast< float * >(argp3);
39216 ecode4 = SWIG_AsVal_long(obj3, &val4);
39217 if (!SWIG_IsOK(ecode4)) {
39218 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "search_with_parameters" "', argument " "4"" of type '" "faiss::ivflib::idx_t""'");
39219 }
39220 arg4 = static_cast< faiss::ivflib::idx_t >(val4);
39221 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
39222 if (!SWIG_IsOK(res5)) {
39223 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "search_with_parameters" "', argument " "5"" of type '" "float *""'");
39224 }
39225 arg5 = reinterpret_cast< float * >(argp5);
39226 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
39227 if (!SWIG_IsOK(res6)) {
39228 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "search_with_parameters" "', argument " "6"" of type '" "faiss::ivflib::idx_t *""'");
39229 }
39230 arg6 = reinterpret_cast< faiss::ivflib::idx_t * >(argp6);
39231 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
39232 if (!SWIG_IsOK(res7)) {
39233 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "search_with_parameters" "', argument " "7"" of type '" "faiss::IVFSearchParameters *""'");
39234 }
39235 arg7 = reinterpret_cast< faiss::IVFSearchParameters * >(argp7);
39236 {
39237 Py_BEGIN_ALLOW_THREADS
39238 try {
39239 faiss::ivflib::search_with_parameters((faiss::Index const *)arg1,arg2,(float const *)arg3,arg4,arg5,arg6,arg7);
39240 } catch(faiss::FaissException & e) {
39241 PyEval_RestoreThread(_save);
39242 PyErr_SetString(PyExc_RuntimeError, e.what());
39243 SWIG_fail;
39244 }
39245 Py_END_ALLOW_THREADS
39246 }
39247 resultobj = SWIG_Py_Void();
39248 return resultobj;
39249 fail:
39250 return NULL;
39251 }
39252
39253
39254 SWIGINTERN PyObject *_wrap_ScalarQuantizer_qtype_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39255 PyObject *resultobj = 0;
39256 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39257 faiss::ScalarQuantizer::QuantizerType arg2 ;
39258 void *argp1 = 0 ;
39259 int res1 = 0 ;
39260 int val2 ;
39261 int ecode2 = 0 ;
39262 PyObject * obj0 = 0 ;
39263 PyObject * obj1 = 0 ;
39264
39265 if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_qtype_set",&obj0,&obj1)) SWIG_fail;
39266 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39267 if (!SWIG_IsOK(res1)) {
39268 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_qtype_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39269 }
39270 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39271 ecode2 = SWIG_AsVal_int(obj1, &val2);
39272 if (!SWIG_IsOK(ecode2)) {
39273 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_qtype_set" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
39274 }
39275 arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
39276 if (arg1) (arg1)->qtype = arg2;
39277 resultobj = SWIG_Py_Void();
39278 return resultobj;
39279 fail:
39280 return NULL;
39281 }
39282
39283
39284 SWIGINTERN PyObject *_wrap_ScalarQuantizer_qtype_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39285 PyObject *resultobj = 0;
39286 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39287 void *argp1 = 0 ;
39288 int res1 = 0 ;
39289 PyObject * obj0 = 0 ;
39290 faiss::ScalarQuantizer::QuantizerType result;
39291
39292 if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_qtype_get",&obj0)) SWIG_fail;
39293 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39294 if (!SWIG_IsOK(res1)) {
39295 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_qtype_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39296 }
39297 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39298 result = (faiss::ScalarQuantizer::QuantizerType) ((arg1)->qtype);
39299 resultobj = SWIG_From_int(static_cast< int >(result));
39300 return resultobj;
39301 fail:
39302 return NULL;
39303 }
39304
39305
39306 SWIGINTERN PyObject *_wrap_ScalarQuantizer_rangestat_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39307 PyObject *resultobj = 0;
39308 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39309 faiss::ScalarQuantizer::RangeStat arg2 ;
39310 void *argp1 = 0 ;
39311 int res1 = 0 ;
39312 int val2 ;
39313 int ecode2 = 0 ;
39314 PyObject * obj0 = 0 ;
39315 PyObject * obj1 = 0 ;
39316
39317 if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_rangestat_set",&obj0,&obj1)) SWIG_fail;
39318 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39319 if (!SWIG_IsOK(res1)) {
39320 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_rangestat_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39321 }
39322 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39323 ecode2 = SWIG_AsVal_int(obj1, &val2);
39324 if (!SWIG_IsOK(ecode2)) {
39325 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_rangestat_set" "', argument " "2"" of type '" "faiss::ScalarQuantizer::RangeStat""'");
39326 }
39327 arg2 = static_cast< faiss::ScalarQuantizer::RangeStat >(val2);
39328 if (arg1) (arg1)->rangestat = arg2;
39329 resultobj = SWIG_Py_Void();
39330 return resultobj;
39331 fail:
39332 return NULL;
39333 }
39334
39335
39336 SWIGINTERN PyObject *_wrap_ScalarQuantizer_rangestat_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39337 PyObject *resultobj = 0;
39338 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39339 void *argp1 = 0 ;
39340 int res1 = 0 ;
39341 PyObject * obj0 = 0 ;
39342 faiss::ScalarQuantizer::RangeStat result;
39343
39344 if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_rangestat_get",&obj0)) SWIG_fail;
39345 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39346 if (!SWIG_IsOK(res1)) {
39347 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_rangestat_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39348 }
39349 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39350 result = (faiss::ScalarQuantizer::RangeStat) ((arg1)->rangestat);
39351 resultobj = SWIG_From_int(static_cast< int >(result));
39352 return resultobj;
39353 fail:
39354 return NULL;
39355 }
39356
39357
39358 SWIGINTERN PyObject *_wrap_ScalarQuantizer_rangestat_arg_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39359 PyObject *resultobj = 0;
39360 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39361 float arg2 ;
39362 void *argp1 = 0 ;
39363 int res1 = 0 ;
39364 float val2 ;
39365 int ecode2 = 0 ;
39366 PyObject * obj0 = 0 ;
39367 PyObject * obj1 = 0 ;
39368
39369 if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_rangestat_arg_set",&obj0,&obj1)) SWIG_fail;
39370 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39371 if (!SWIG_IsOK(res1)) {
39372 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_rangestat_arg_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39373 }
39374 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39375 ecode2 = SWIG_AsVal_float(obj1, &val2);
39376 if (!SWIG_IsOK(ecode2)) {
39377 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_rangestat_arg_set" "', argument " "2"" of type '" "float""'");
39378 }
39379 arg2 = static_cast< float >(val2);
39380 if (arg1) (arg1)->rangestat_arg = arg2;
39381 resultobj = SWIG_Py_Void();
39382 return resultobj;
39383 fail:
39384 return NULL;
39385 }
39386
39387
39388 SWIGINTERN PyObject *_wrap_ScalarQuantizer_rangestat_arg_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39389 PyObject *resultobj = 0;
39390 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39391 void *argp1 = 0 ;
39392 int res1 = 0 ;
39393 PyObject * obj0 = 0 ;
39394 float result;
39395
39396 if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_rangestat_arg_get",&obj0)) SWIG_fail;
39397 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39398 if (!SWIG_IsOK(res1)) {
39399 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_rangestat_arg_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39400 }
39401 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39402 result = (float) ((arg1)->rangestat_arg);
39403 resultobj = SWIG_From_float(static_cast< float >(result));
39404 return resultobj;
39405 fail:
39406 return NULL;
39407 }
39408
39409
39410 SWIGINTERN PyObject *_wrap_ScalarQuantizer_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39411 PyObject *resultobj = 0;
39412 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39413 size_t arg2 ;
39414 void *argp1 = 0 ;
39415 int res1 = 0 ;
39416 size_t val2 ;
39417 int ecode2 = 0 ;
39418 PyObject * obj0 = 0 ;
39419 PyObject * obj1 = 0 ;
39420
39421 if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_d_set",&obj0,&obj1)) SWIG_fail;
39422 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39423 if (!SWIG_IsOK(res1)) {
39424 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_d_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39425 }
39426 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39427 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39428 if (!SWIG_IsOK(ecode2)) {
39429 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_d_set" "', argument " "2"" of type '" "size_t""'");
39430 }
39431 arg2 = static_cast< size_t >(val2);
39432 if (arg1) (arg1)->d = arg2;
39433 resultobj = SWIG_Py_Void();
39434 return resultobj;
39435 fail:
39436 return NULL;
39437 }
39438
39439
39440 SWIGINTERN PyObject *_wrap_ScalarQuantizer_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39441 PyObject *resultobj = 0;
39442 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39443 void *argp1 = 0 ;
39444 int res1 = 0 ;
39445 PyObject * obj0 = 0 ;
39446 size_t result;
39447
39448 if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_d_get",&obj0)) SWIG_fail;
39449 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39450 if (!SWIG_IsOK(res1)) {
39451 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_d_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39452 }
39453 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39454 result = (size_t) ((arg1)->d);
39455 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
39456 return resultobj;
39457 fail:
39458 return NULL;
39459 }
39460
39461
39462 SWIGINTERN PyObject *_wrap_ScalarQuantizer_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39463 PyObject *resultobj = 0;
39464 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39465 size_t arg2 ;
39466 void *argp1 = 0 ;
39467 int res1 = 0 ;
39468 size_t val2 ;
39469 int ecode2 = 0 ;
39470 PyObject * obj0 = 0 ;
39471 PyObject * obj1 = 0 ;
39472
39473 if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_code_size_set",&obj0,&obj1)) SWIG_fail;
39474 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39475 if (!SWIG_IsOK(res1)) {
39476 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_code_size_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39477 }
39478 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39479 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39480 if (!SWIG_IsOK(ecode2)) {
39481 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_code_size_set" "', argument " "2"" of type '" "size_t""'");
39482 }
39483 arg2 = static_cast< size_t >(val2);
39484 if (arg1) (arg1)->code_size = arg2;
39485 resultobj = SWIG_Py_Void();
39486 return resultobj;
39487 fail:
39488 return NULL;
39489 }
39490
39491
39492 SWIGINTERN PyObject *_wrap_ScalarQuantizer_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39493 PyObject *resultobj = 0;
39494 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39495 void *argp1 = 0 ;
39496 int res1 = 0 ;
39497 PyObject * obj0 = 0 ;
39498 size_t result;
39499
39500 if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_code_size_get",&obj0)) SWIG_fail;
39501 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39502 if (!SWIG_IsOK(res1)) {
39503 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_code_size_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39504 }
39505 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39506 result = (size_t) ((arg1)->code_size);
39507 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
39508 return resultobj;
39509 fail:
39510 return NULL;
39511 }
39512
39513
39514 SWIGINTERN PyObject *_wrap_ScalarQuantizer_trained_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39515 PyObject *resultobj = 0;
39516 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39517 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
39518 void *argp1 = 0 ;
39519 int res1 = 0 ;
39520 void *argp2 = 0 ;
39521 int res2 = 0 ;
39522 PyObject * obj0 = 0 ;
39523 PyObject * obj1 = 0 ;
39524
39525 if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_trained_set",&obj0,&obj1)) SWIG_fail;
39526 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39527 if (!SWIG_IsOK(res1)) {
39528 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_trained_set" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39529 }
39530 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39531 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
39532 if (!SWIG_IsOK(res2)) {
39533 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ScalarQuantizer_trained_set" "', argument " "2"" of type '" "std::vector< float > *""'");
39534 }
39535 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
39536 if (arg1) (arg1)->trained = *arg2;
39537 resultobj = SWIG_Py_Void();
39538 return resultobj;
39539 fail:
39540 return NULL;
39541 }
39542
39543
39544 SWIGINTERN PyObject *_wrap_ScalarQuantizer_trained_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39545 PyObject *resultobj = 0;
39546 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39547 void *argp1 = 0 ;
39548 int res1 = 0 ;
39549 PyObject * obj0 = 0 ;
39550 std::vector< float > *result = 0 ;
39551
39552 if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_trained_get",&obj0)) SWIG_fail;
39553 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39554 if (!SWIG_IsOK(res1)) {
39555 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_trained_get" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39556 }
39557 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39558 result = (std::vector< float > *)& ((arg1)->trained);
39559 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
39560 return resultobj;
39561 fail:
39562 return NULL;
39563 }
39564
39565
39566 SWIGINTERN PyObject *_wrap_new_ScalarQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39567 PyObject *resultobj = 0;
39568 size_t arg1 ;
39569 faiss::ScalarQuantizer::QuantizerType arg2 ;
39570 size_t val1 ;
39571 int ecode1 = 0 ;
39572 int val2 ;
39573 int ecode2 = 0 ;
39574 PyObject * obj0 = 0 ;
39575 PyObject * obj1 = 0 ;
39576 faiss::ScalarQuantizer *result = 0 ;
39577
39578 if (!PyArg_ParseTuple(args,(char *)"OO:new_ScalarQuantizer",&obj0,&obj1)) SWIG_fail;
39579 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
39580 if (!SWIG_IsOK(ecode1)) {
39581 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_ScalarQuantizer" "', argument " "1"" of type '" "size_t""'");
39582 }
39583 arg1 = static_cast< size_t >(val1);
39584 ecode2 = SWIG_AsVal_int(obj1, &val2);
39585 if (!SWIG_IsOK(ecode2)) {
39586 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ScalarQuantizer" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
39587 }
39588 arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
39589 {
39590 Py_BEGIN_ALLOW_THREADS
39591 try {
39592 result = (faiss::ScalarQuantizer *)new faiss::ScalarQuantizer(arg1,arg2);
39593 } catch(faiss::FaissException & e) {
39594 PyEval_RestoreThread(_save);
39595 PyErr_SetString(PyExc_RuntimeError, e.what());
39596 SWIG_fail;
39597 }
39598 Py_END_ALLOW_THREADS
39599 }
39600 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer, SWIG_POINTER_NEW | 0 );
39601 return resultobj;
39602 fail:
39603 return NULL;
39604 }
39605
39606
39607 SWIGINTERN PyObject *_wrap_new_ScalarQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39608 PyObject *resultobj = 0;
39609 faiss::ScalarQuantizer *result = 0 ;
39610
39611 if (!PyArg_ParseTuple(args,(char *)":new_ScalarQuantizer")) SWIG_fail;
39612 {
39613 Py_BEGIN_ALLOW_THREADS
39614 try {
39615 result = (faiss::ScalarQuantizer *)new faiss::ScalarQuantizer();
39616 } catch(faiss::FaissException & e) {
39617 PyEval_RestoreThread(_save);
39618 PyErr_SetString(PyExc_RuntimeError, e.what());
39619 SWIG_fail;
39620 }
39621 Py_END_ALLOW_THREADS
39622 }
39623 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer, SWIG_POINTER_NEW | 0 );
39624 return resultobj;
39625 fail:
39626 return NULL;
39627 }
39628
39629
39630 SWIGINTERN PyObject *_wrap_new_ScalarQuantizer(PyObject *self, PyObject *args) {
39631 Py_ssize_t argc;
39632 PyObject *argv[3] = {
39633 0
39634 };
39635 Py_ssize_t ii;
39636
39637 if (!PyTuple_Check(args)) SWIG_fail;
39638 argc = args ? PyObject_Length(args) : 0;
39639 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
39640 argv[ii] = PyTuple_GET_ITEM(args,ii);
39641 }
39642 if (argc == 0) {
39643 return _wrap_new_ScalarQuantizer__SWIG_1(self, args);
39644 }
39645 if (argc == 2) {
39646 int _v;
39647 {
39648 int res = SWIG_AsVal_size_t(argv[0], NULL);
39649 _v = SWIG_CheckState(res);
39650 }
39651 if (_v) {
39652 {
39653 int res = SWIG_AsVal_int(argv[1], NULL);
39654 _v = SWIG_CheckState(res);
39655 }
39656 if (_v) {
39657 return _wrap_new_ScalarQuantizer__SWIG_0(self, args);
39658 }
39659 }
39660 }
39661
39662 fail:
39663 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ScalarQuantizer'.\n"
39664 " Possible C/C++ prototypes are:\n"
39665 " faiss::ScalarQuantizer::ScalarQuantizer(size_t,faiss::ScalarQuantizer::QuantizerType)\n"
39666 " faiss::ScalarQuantizer::ScalarQuantizer()\n");
39667 return 0;
39668 }
39669
39670
39671 SWIGINTERN PyObject *_wrap_ScalarQuantizer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39672 PyObject *resultobj = 0;
39673 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39674 size_t arg2 ;
39675 float *arg3 = (float *) 0 ;
39676 void *argp1 = 0 ;
39677 int res1 = 0 ;
39678 size_t val2 ;
39679 int ecode2 = 0 ;
39680 void *argp3 = 0 ;
39681 int res3 = 0 ;
39682 PyObject * obj0 = 0 ;
39683 PyObject * obj1 = 0 ;
39684 PyObject * obj2 = 0 ;
39685
39686 if (!PyArg_ParseTuple(args,(char *)"OOO:ScalarQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
39687 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39688 if (!SWIG_IsOK(res1)) {
39689 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_train" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39690 }
39691 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39692 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
39693 if (!SWIG_IsOK(ecode2)) {
39694 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_train" "', argument " "2"" of type '" "size_t""'");
39695 }
39696 arg2 = static_cast< size_t >(val2);
39697 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
39698 if (!SWIG_IsOK(res3)) {
39699 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ScalarQuantizer_train" "', argument " "3"" of type '" "float const *""'");
39700 }
39701 arg3 = reinterpret_cast< float * >(argp3);
39702 {
39703 Py_BEGIN_ALLOW_THREADS
39704 try {
39705 (arg1)->train(arg2,(float const *)arg3);
39706 } catch(faiss::FaissException & e) {
39707 PyEval_RestoreThread(_save);
39708 PyErr_SetString(PyExc_RuntimeError, e.what());
39709 SWIG_fail;
39710 }
39711 Py_END_ALLOW_THREADS
39712 }
39713 resultobj = SWIG_Py_Void();
39714 return resultobj;
39715 fail:
39716 return NULL;
39717 }
39718
39719
39720 SWIGINTERN PyObject *_wrap_ScalarQuantizer_compute_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39721 PyObject *resultobj = 0;
39722 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39723 float *arg2 = (float *) 0 ;
39724 uint8_t *arg3 = (uint8_t *) 0 ;
39725 size_t arg4 ;
39726 void *argp1 = 0 ;
39727 int res1 = 0 ;
39728 void *argp2 = 0 ;
39729 int res2 = 0 ;
39730 void *argp3 = 0 ;
39731 int res3 = 0 ;
39732 size_t val4 ;
39733 int ecode4 = 0 ;
39734 PyObject * obj0 = 0 ;
39735 PyObject * obj1 = 0 ;
39736 PyObject * obj2 = 0 ;
39737 PyObject * obj3 = 0 ;
39738
39739 if (!PyArg_ParseTuple(args,(char *)"OOOO:ScalarQuantizer_compute_codes",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
39740 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39741 if (!SWIG_IsOK(res1)) {
39742 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_compute_codes" "', argument " "1"" of type '" "faiss::ScalarQuantizer const *""'");
39743 }
39744 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39745 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
39746 if (!SWIG_IsOK(res2)) {
39747 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ScalarQuantizer_compute_codes" "', argument " "2"" of type '" "float const *""'");
39748 }
39749 arg2 = reinterpret_cast< float * >(argp2);
39750 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
39751 if (!SWIG_IsOK(res3)) {
39752 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ScalarQuantizer_compute_codes" "', argument " "3"" of type '" "uint8_t *""'");
39753 }
39754 arg3 = reinterpret_cast< uint8_t * >(argp3);
39755 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
39756 if (!SWIG_IsOK(ecode4)) {
39757 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ScalarQuantizer_compute_codes" "', argument " "4"" of type '" "size_t""'");
39758 }
39759 arg4 = static_cast< size_t >(val4);
39760 {
39761 Py_BEGIN_ALLOW_THREADS
39762 try {
39763 ((faiss::ScalarQuantizer const *)arg1)->compute_codes((float const *)arg2,arg3,arg4);
39764 } catch(faiss::FaissException & e) {
39765 PyEval_RestoreThread(_save);
39766 PyErr_SetString(PyExc_RuntimeError, e.what());
39767 SWIG_fail;
39768 }
39769 Py_END_ALLOW_THREADS
39770 }
39771 resultobj = SWIG_Py_Void();
39772 return resultobj;
39773 fail:
39774 return NULL;
39775 }
39776
39777
39778 SWIGINTERN PyObject *_wrap_ScalarQuantizer_decode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39779 PyObject *resultobj = 0;
39780 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39781 uint8_t *arg2 = (uint8_t *) 0 ;
39782 float *arg3 = (float *) 0 ;
39783 size_t arg4 ;
39784 void *argp1 = 0 ;
39785 int res1 = 0 ;
39786 void *argp2 = 0 ;
39787 int res2 = 0 ;
39788 void *argp3 = 0 ;
39789 int res3 = 0 ;
39790 size_t val4 ;
39791 int ecode4 = 0 ;
39792 PyObject * obj0 = 0 ;
39793 PyObject * obj1 = 0 ;
39794 PyObject * obj2 = 0 ;
39795 PyObject * obj3 = 0 ;
39796
39797 if (!PyArg_ParseTuple(args,(char *)"OOOO:ScalarQuantizer_decode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
39798 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39799 if (!SWIG_IsOK(res1)) {
39800 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_decode" "', argument " "1"" of type '" "faiss::ScalarQuantizer const *""'");
39801 }
39802 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39803 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, 0 | 0 );
39804 if (!SWIG_IsOK(res2)) {
39805 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ScalarQuantizer_decode" "', argument " "2"" of type '" "uint8_t const *""'");
39806 }
39807 arg2 = reinterpret_cast< uint8_t * >(argp2);
39808 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
39809 if (!SWIG_IsOK(res3)) {
39810 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ScalarQuantizer_decode" "', argument " "3"" of type '" "float *""'");
39811 }
39812 arg3 = reinterpret_cast< float * >(argp3);
39813 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
39814 if (!SWIG_IsOK(ecode4)) {
39815 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ScalarQuantizer_decode" "', argument " "4"" of type '" "size_t""'");
39816 }
39817 arg4 = static_cast< size_t >(val4);
39818 {
39819 Py_BEGIN_ALLOW_THREADS
39820 try {
39821 ((faiss::ScalarQuantizer const *)arg1)->decode((uint8_t const *)arg2,arg3,arg4);
39822 } catch(faiss::FaissException & e) {
39823 PyEval_RestoreThread(_save);
39824 PyErr_SetString(PyExc_RuntimeError, e.what());
39825 SWIG_fail;
39826 }
39827 Py_END_ALLOW_THREADS
39828 }
39829 resultobj = SWIG_Py_Void();
39830 return resultobj;
39831 fail:
39832 return NULL;
39833 }
39834
39835
39836 SWIGINTERN PyObject *_wrap_ScalarQuantizer_get_distance_computer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39837 PyObject *resultobj = 0;
39838 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39839 faiss::MetricType arg2 ;
39840 void *argp1 = 0 ;
39841 int res1 = 0 ;
39842 int val2 ;
39843 int ecode2 = 0 ;
39844 PyObject * obj0 = 0 ;
39845 PyObject * obj1 = 0 ;
39846 faiss::ScalarQuantizer::DistanceComputer *result = 0 ;
39847
39848 if (!PyArg_ParseTuple(args,(char *)"OO:ScalarQuantizer_get_distance_computer",&obj0,&obj1)) SWIG_fail;
39849 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39850 if (!SWIG_IsOK(res1)) {
39851 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_get_distance_computer" "', argument " "1"" of type '" "faiss::ScalarQuantizer const *""'");
39852 }
39853 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39854 ecode2 = SWIG_AsVal_int(obj1, &val2);
39855 if (!SWIG_IsOK(ecode2)) {
39856 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ScalarQuantizer_get_distance_computer" "', argument " "2"" of type '" "faiss::MetricType""'");
39857 }
39858 arg2 = static_cast< faiss::MetricType >(val2);
39859 {
39860 Py_BEGIN_ALLOW_THREADS
39861 try {
39862 result = (faiss::ScalarQuantizer::DistanceComputer *)((faiss::ScalarQuantizer const *)arg1)->get_distance_computer(arg2);
39863 } catch(faiss::FaissException & e) {
39864 PyEval_RestoreThread(_save);
39865 PyErr_SetString(PyExc_RuntimeError, e.what());
39866 SWIG_fail;
39867 }
39868 Py_END_ALLOW_THREADS
39869 }
39870 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer__DistanceComputer, 0 | 0 );
39871 return resultobj;
39872 fail:
39873 return NULL;
39874 }
39875
39876
39877 SWIGINTERN PyObject *_wrap_ScalarQuantizer_get_distance_computer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39878 PyObject *resultobj = 0;
39879 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39880 void *argp1 = 0 ;
39881 int res1 = 0 ;
39882 PyObject * obj0 = 0 ;
39883 faiss::ScalarQuantizer::DistanceComputer *result = 0 ;
39884
39885 if (!PyArg_ParseTuple(args,(char *)"O:ScalarQuantizer_get_distance_computer",&obj0)) SWIG_fail;
39886 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
39887 if (!SWIG_IsOK(res1)) {
39888 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ScalarQuantizer_get_distance_computer" "', argument " "1"" of type '" "faiss::ScalarQuantizer const *""'");
39889 }
39890 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39891 {
39892 Py_BEGIN_ALLOW_THREADS
39893 try {
39894 result = (faiss::ScalarQuantizer::DistanceComputer *)((faiss::ScalarQuantizer const *)arg1)->get_distance_computer();
39895 } catch(faiss::FaissException & e) {
39896 PyEval_RestoreThread(_save);
39897 PyErr_SetString(PyExc_RuntimeError, e.what());
39898 SWIG_fail;
39899 }
39900 Py_END_ALLOW_THREADS
39901 }
39902 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer__DistanceComputer, 0 | 0 );
39903 return resultobj;
39904 fail:
39905 return NULL;
39906 }
39907
39908
39909 SWIGINTERN PyObject *_wrap_ScalarQuantizer_get_distance_computer(PyObject *self, PyObject *args) {
39910 Py_ssize_t argc;
39911 PyObject *argv[3] = {
39912 0
39913 };
39914 Py_ssize_t ii;
39915
39916 if (!PyTuple_Check(args)) SWIG_fail;
39917 argc = args ? PyObject_Length(args) : 0;
39918 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
39919 argv[ii] = PyTuple_GET_ITEM(args,ii);
39920 }
39921 if (argc == 1) {
39922 int _v;
39923 void *vptr = 0;
39924 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ScalarQuantizer, 0);
39925 _v = SWIG_CheckState(res);
39926 if (_v) {
39927 return _wrap_ScalarQuantizer_get_distance_computer__SWIG_1(self, args);
39928 }
39929 }
39930 if (argc == 2) {
39931 int _v;
39932 void *vptr = 0;
39933 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ScalarQuantizer, 0);
39934 _v = SWIG_CheckState(res);
39935 if (_v) {
39936 {
39937 int res = SWIG_AsVal_int(argv[1], NULL);
39938 _v = SWIG_CheckState(res);
39939 }
39940 if (_v) {
39941 return _wrap_ScalarQuantizer_get_distance_computer__SWIG_0(self, args);
39942 }
39943 }
39944 }
39945
39946 fail:
39947 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ScalarQuantizer_get_distance_computer'.\n"
39948 " Possible C/C++ prototypes are:\n"
39949 " faiss::ScalarQuantizer::get_distance_computer(faiss::MetricType) const\n"
39950 " faiss::ScalarQuantizer::get_distance_computer() const\n");
39951 return 0;
39952 }
39953
39954
39955 SWIGINTERN PyObject *_wrap_delete_ScalarQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39956 PyObject *resultobj = 0;
39957 faiss::ScalarQuantizer *arg1 = (faiss::ScalarQuantizer *) 0 ;
39958 void *argp1 = 0 ;
39959 int res1 = 0 ;
39960 PyObject * obj0 = 0 ;
39961
39962 if (!PyArg_ParseTuple(args,(char *)"O:delete_ScalarQuantizer",&obj0)) SWIG_fail;
39963 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ScalarQuantizer, SWIG_POINTER_DISOWN | 0 );
39964 if (!SWIG_IsOK(res1)) {
39965 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ScalarQuantizer" "', argument " "1"" of type '" "faiss::ScalarQuantizer *""'");
39966 }
39967 arg1 = reinterpret_cast< faiss::ScalarQuantizer * >(argp1);
39968 delete arg1;
39969 resultobj = SWIG_Py_Void();
39970 return resultobj;
39971 fail:
39972 return NULL;
39973 }
39974
39975
39976 SWIGINTERN PyObject *ScalarQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39977 PyObject *obj;
39978 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
39979 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ScalarQuantizer, SWIG_NewClientData(obj));
39980 return SWIG_Py_Void();
39981 }
39982
39983 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_sq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
39984 PyObject *resultobj = 0;
39985 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
39986 faiss::ScalarQuantizer *arg2 = (faiss::ScalarQuantizer *) 0 ;
39987 void *argp1 = 0 ;
39988 int res1 = 0 ;
39989 void *argp2 = 0 ;
39990 int res2 = 0 ;
39991 PyObject * obj0 = 0 ;
39992 PyObject * obj1 = 0 ;
39993
39994 if (!PyArg_ParseTuple(args,(char *)"OO:IndexScalarQuantizer_sq_set",&obj0,&obj1)) SWIG_fail;
39995 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
39996 if (!SWIG_IsOK(res1)) {
39997 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_sq_set" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
39998 }
39999 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40000 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40001 if (!SWIG_IsOK(res2)) {
40002 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexScalarQuantizer_sq_set" "', argument " "2"" of type '" "faiss::ScalarQuantizer *""'");
40003 }
40004 arg2 = reinterpret_cast< faiss::ScalarQuantizer * >(argp2);
40005 if (arg1) (arg1)->sq = *arg2;
40006 resultobj = SWIG_Py_Void();
40007 return resultobj;
40008 fail:
40009 return NULL;
40010 }
40011
40012
40013 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_sq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40014 PyObject *resultobj = 0;
40015 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40016 void *argp1 = 0 ;
40017 int res1 = 0 ;
40018 PyObject * obj0 = 0 ;
40019 faiss::ScalarQuantizer *result = 0 ;
40020
40021 if (!PyArg_ParseTuple(args,(char *)"O:IndexScalarQuantizer_sq_get",&obj0)) SWIG_fail;
40022 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40023 if (!SWIG_IsOK(res1)) {
40024 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_sq_get" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40025 }
40026 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40027 result = (faiss::ScalarQuantizer *)& ((arg1)->sq);
40028 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40029 return resultobj;
40030 fail:
40031 return NULL;
40032 }
40033
40034
40035 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40036 PyObject *resultobj = 0;
40037 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40038 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
40039 void *argp1 = 0 ;
40040 int res1 = 0 ;
40041 void *argp2 = 0 ;
40042 int res2 = 0 ;
40043 PyObject * obj0 = 0 ;
40044 PyObject * obj1 = 0 ;
40045
40046 if (!PyArg_ParseTuple(args,(char *)"OO:IndexScalarQuantizer_codes_set",&obj0,&obj1)) SWIG_fail;
40047 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40048 if (!SWIG_IsOK(res1)) {
40049 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_codes_set" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40050 }
40051 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40052 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
40053 if (!SWIG_IsOK(res2)) {
40054 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexScalarQuantizer_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
40055 }
40056 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
40057 if (arg1) (arg1)->codes = *arg2;
40058 resultobj = SWIG_Py_Void();
40059 return resultobj;
40060 fail:
40061 return NULL;
40062 }
40063
40064
40065 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40066 PyObject *resultobj = 0;
40067 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40068 void *argp1 = 0 ;
40069 int res1 = 0 ;
40070 PyObject * obj0 = 0 ;
40071 std::vector< uint8_t > *result = 0 ;
40072
40073 if (!PyArg_ParseTuple(args,(char *)"O:IndexScalarQuantizer_codes_get",&obj0)) SWIG_fail;
40074 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40075 if (!SWIG_IsOK(res1)) {
40076 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_codes_get" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40077 }
40078 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40079 result = (std::vector< uint8_t > *)& ((arg1)->codes);
40080 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
40081 return resultobj;
40082 fail:
40083 return NULL;
40084 }
40085
40086
40087 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40088 PyObject *resultobj = 0;
40089 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40090 size_t arg2 ;
40091 void *argp1 = 0 ;
40092 int res1 = 0 ;
40093 size_t val2 ;
40094 int ecode2 = 0 ;
40095 PyObject * obj0 = 0 ;
40096 PyObject * obj1 = 0 ;
40097
40098 if (!PyArg_ParseTuple(args,(char *)"OO:IndexScalarQuantizer_code_size_set",&obj0,&obj1)) SWIG_fail;
40099 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40100 if (!SWIG_IsOK(res1)) {
40101 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_code_size_set" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40102 }
40103 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40104 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
40105 if (!SWIG_IsOK(ecode2)) {
40106 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_code_size_set" "', argument " "2"" of type '" "size_t""'");
40107 }
40108 arg2 = static_cast< size_t >(val2);
40109 if (arg1) (arg1)->code_size = arg2;
40110 resultobj = SWIG_Py_Void();
40111 return resultobj;
40112 fail:
40113 return NULL;
40114 }
40115
40116
40117 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40118 PyObject *resultobj = 0;
40119 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40120 void *argp1 = 0 ;
40121 int res1 = 0 ;
40122 PyObject * obj0 = 0 ;
40123 size_t result;
40124
40125 if (!PyArg_ParseTuple(args,(char *)"O:IndexScalarQuantizer_code_size_get",&obj0)) SWIG_fail;
40126 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40127 if (!SWIG_IsOK(res1)) {
40128 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_code_size_get" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40129 }
40130 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40131 result = (size_t) ((arg1)->code_size);
40132 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
40133 return resultobj;
40134 fail:
40135 return NULL;
40136 }
40137
40138
40139 SWIGINTERN PyObject *_wrap_new_IndexScalarQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40140 PyObject *resultobj = 0;
40141 int arg1 ;
40142 faiss::ScalarQuantizer::QuantizerType arg2 ;
40143 faiss::MetricType arg3 ;
40144 int val1 ;
40145 int ecode1 = 0 ;
40146 int val2 ;
40147 int ecode2 = 0 ;
40148 int val3 ;
40149 int ecode3 = 0 ;
40150 PyObject * obj0 = 0 ;
40151 PyObject * obj1 = 0 ;
40152 PyObject * obj2 = 0 ;
40153 faiss::IndexScalarQuantizer *result = 0 ;
40154
40155 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexScalarQuantizer",&obj0,&obj1,&obj2)) SWIG_fail;
40156 ecode1 = SWIG_AsVal_int(obj0, &val1);
40157 if (!SWIG_IsOK(ecode1)) {
40158 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexScalarQuantizer" "', argument " "1"" of type '" "int""'");
40159 }
40160 arg1 = static_cast< int >(val1);
40161 ecode2 = SWIG_AsVal_int(obj1, &val2);
40162 if (!SWIG_IsOK(ecode2)) {
40163 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexScalarQuantizer" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
40164 }
40165 arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
40166 ecode3 = SWIG_AsVal_int(obj2, &val3);
40167 if (!SWIG_IsOK(ecode3)) {
40168 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexScalarQuantizer" "', argument " "3"" of type '" "faiss::MetricType""'");
40169 }
40170 arg3 = static_cast< faiss::MetricType >(val3);
40171 {
40172 Py_BEGIN_ALLOW_THREADS
40173 try {
40174 result = (faiss::IndexScalarQuantizer *)new faiss::IndexScalarQuantizer(arg1,arg2,arg3);
40175 } catch(faiss::FaissException & e) {
40176 PyEval_RestoreThread(_save);
40177 PyErr_SetString(PyExc_RuntimeError, e.what());
40178 SWIG_fail;
40179 }
40180 Py_END_ALLOW_THREADS
40181 }
40182 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_POINTER_NEW | 0 );
40183 return resultobj;
40184 fail:
40185 return NULL;
40186 }
40187
40188
40189 SWIGINTERN PyObject *_wrap_new_IndexScalarQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40190 PyObject *resultobj = 0;
40191 int arg1 ;
40192 faiss::ScalarQuantizer::QuantizerType arg2 ;
40193 int val1 ;
40194 int ecode1 = 0 ;
40195 int val2 ;
40196 int ecode2 = 0 ;
40197 PyObject * obj0 = 0 ;
40198 PyObject * obj1 = 0 ;
40199 faiss::IndexScalarQuantizer *result = 0 ;
40200
40201 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexScalarQuantizer",&obj0,&obj1)) SWIG_fail;
40202 ecode1 = SWIG_AsVal_int(obj0, &val1);
40203 if (!SWIG_IsOK(ecode1)) {
40204 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexScalarQuantizer" "', argument " "1"" of type '" "int""'");
40205 }
40206 arg1 = static_cast< int >(val1);
40207 ecode2 = SWIG_AsVal_int(obj1, &val2);
40208 if (!SWIG_IsOK(ecode2)) {
40209 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexScalarQuantizer" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
40210 }
40211 arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
40212 {
40213 Py_BEGIN_ALLOW_THREADS
40214 try {
40215 result = (faiss::IndexScalarQuantizer *)new faiss::IndexScalarQuantizer(arg1,arg2);
40216 } catch(faiss::FaissException & e) {
40217 PyEval_RestoreThread(_save);
40218 PyErr_SetString(PyExc_RuntimeError, e.what());
40219 SWIG_fail;
40220 }
40221 Py_END_ALLOW_THREADS
40222 }
40223 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_POINTER_NEW | 0 );
40224 return resultobj;
40225 fail:
40226 return NULL;
40227 }
40228
40229
40230 SWIGINTERN PyObject *_wrap_new_IndexScalarQuantizer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40231 PyObject *resultobj = 0;
40232 faiss::IndexScalarQuantizer *result = 0 ;
40233
40234 if (!PyArg_ParseTuple(args,(char *)":new_IndexScalarQuantizer")) SWIG_fail;
40235 {
40236 Py_BEGIN_ALLOW_THREADS
40237 try {
40238 result = (faiss::IndexScalarQuantizer *)new faiss::IndexScalarQuantizer();
40239 } catch(faiss::FaissException & e) {
40240 PyEval_RestoreThread(_save);
40241 PyErr_SetString(PyExc_RuntimeError, e.what());
40242 SWIG_fail;
40243 }
40244 Py_END_ALLOW_THREADS
40245 }
40246 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_POINTER_NEW | 0 );
40247 return resultobj;
40248 fail:
40249 return NULL;
40250 }
40251
40252
40253 SWIGINTERN PyObject *_wrap_new_IndexScalarQuantizer(PyObject *self, PyObject *args) {
40254 Py_ssize_t argc;
40255 PyObject *argv[4] = {
40256 0
40257 };
40258 Py_ssize_t ii;
40259
40260 if (!PyTuple_Check(args)) SWIG_fail;
40261 argc = args ? PyObject_Length(args) : 0;
40262 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
40263 argv[ii] = PyTuple_GET_ITEM(args,ii);
40264 }
40265 if (argc == 0) {
40266 return _wrap_new_IndexScalarQuantizer__SWIG_2(self, args);
40267 }
40268 if (argc == 2) {
40269 int _v;
40270 {
40271 int res = SWIG_AsVal_int(argv[0], NULL);
40272 _v = SWIG_CheckState(res);
40273 }
40274 if (_v) {
40275 {
40276 int res = SWIG_AsVal_int(argv[1], NULL);
40277 _v = SWIG_CheckState(res);
40278 }
40279 if (_v) {
40280 return _wrap_new_IndexScalarQuantizer__SWIG_1(self, args);
40281 }
40282 }
40283 }
40284 if (argc == 3) {
40285 int _v;
40286 {
40287 int res = SWIG_AsVal_int(argv[0], NULL);
40288 _v = SWIG_CheckState(res);
40289 }
40290 if (_v) {
40291 {
40292 int res = SWIG_AsVal_int(argv[1], NULL);
40293 _v = SWIG_CheckState(res);
40294 }
40295 if (_v) {
40296 {
40297 int res = SWIG_AsVal_int(argv[2], NULL);
40298 _v = SWIG_CheckState(res);
40299 }
40300 if (_v) {
40301 return _wrap_new_IndexScalarQuantizer__SWIG_0(self, args);
40302 }
40303 }
40304 }
40305 }
40306
40307 fail:
40308 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexScalarQuantizer'.\n"
40309 " Possible C/C++ prototypes are:\n"
40310 " faiss::IndexScalarQuantizer::IndexScalarQuantizer(int,faiss::ScalarQuantizer::QuantizerType,faiss::MetricType)\n"
40311 " faiss::IndexScalarQuantizer::IndexScalarQuantizer(int,faiss::ScalarQuantizer::QuantizerType)\n"
40312 " faiss::IndexScalarQuantizer::IndexScalarQuantizer()\n");
40313 return 0;
40314 }
40315
40316
40317 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40318 PyObject *resultobj = 0;
40319 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40320 faiss::Index::idx_t arg2 ;
40321 float *arg3 = (float *) 0 ;
40322 void *argp1 = 0 ;
40323 int res1 = 0 ;
40324 long val2 ;
40325 int ecode2 = 0 ;
40326 void *argp3 = 0 ;
40327 int res3 = 0 ;
40328 PyObject * obj0 = 0 ;
40329 PyObject * obj1 = 0 ;
40330 PyObject * obj2 = 0 ;
40331
40332 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexScalarQuantizer_train",&obj0,&obj1,&obj2)) SWIG_fail;
40333 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40334 if (!SWIG_IsOK(res1)) {
40335 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_train" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40336 }
40337 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40338 ecode2 = SWIG_AsVal_long(obj1, &val2);
40339 if (!SWIG_IsOK(ecode2)) {
40340 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
40341 }
40342 arg2 = static_cast< faiss::Index::idx_t >(val2);
40343 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
40344 if (!SWIG_IsOK(res3)) {
40345 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexScalarQuantizer_train" "', argument " "3"" of type '" "float const *""'");
40346 }
40347 arg3 = reinterpret_cast< float * >(argp3);
40348 {
40349 Py_BEGIN_ALLOW_THREADS
40350 try {
40351 (arg1)->train(arg2,(float const *)arg3);
40352 } catch(faiss::FaissException & e) {
40353 PyEval_RestoreThread(_save);
40354 PyErr_SetString(PyExc_RuntimeError, e.what());
40355 SWIG_fail;
40356 }
40357 Py_END_ALLOW_THREADS
40358 }
40359 resultobj = SWIG_Py_Void();
40360 return resultobj;
40361 fail:
40362 return NULL;
40363 }
40364
40365
40366 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40367 PyObject *resultobj = 0;
40368 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40369 faiss::Index::idx_t arg2 ;
40370 float *arg3 = (float *) 0 ;
40371 void *argp1 = 0 ;
40372 int res1 = 0 ;
40373 long val2 ;
40374 int ecode2 = 0 ;
40375 void *argp3 = 0 ;
40376 int res3 = 0 ;
40377 PyObject * obj0 = 0 ;
40378 PyObject * obj1 = 0 ;
40379 PyObject * obj2 = 0 ;
40380
40381 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexScalarQuantizer_add",&obj0,&obj1,&obj2)) SWIG_fail;
40382 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40383 if (!SWIG_IsOK(res1)) {
40384 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_add" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40385 }
40386 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40387 ecode2 = SWIG_AsVal_long(obj1, &val2);
40388 if (!SWIG_IsOK(ecode2)) {
40389 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
40390 }
40391 arg2 = static_cast< faiss::Index::idx_t >(val2);
40392 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
40393 if (!SWIG_IsOK(res3)) {
40394 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexScalarQuantizer_add" "', argument " "3"" of type '" "float const *""'");
40395 }
40396 arg3 = reinterpret_cast< float * >(argp3);
40397 {
40398 Py_BEGIN_ALLOW_THREADS
40399 try {
40400 (arg1)->add(arg2,(float const *)arg3);
40401 } catch(faiss::FaissException & e) {
40402 PyEval_RestoreThread(_save);
40403 PyErr_SetString(PyExc_RuntimeError, e.what());
40404 SWIG_fail;
40405 }
40406 Py_END_ALLOW_THREADS
40407 }
40408 resultobj = SWIG_Py_Void();
40409 return resultobj;
40410 fail:
40411 return NULL;
40412 }
40413
40414
40415 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40416 PyObject *resultobj = 0;
40417 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40418 faiss::Index::idx_t arg2 ;
40419 float *arg3 = (float *) 0 ;
40420 faiss::Index::idx_t arg4 ;
40421 float *arg5 = (float *) 0 ;
40422 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
40423 void *argp1 = 0 ;
40424 int res1 = 0 ;
40425 long val2 ;
40426 int ecode2 = 0 ;
40427 void *argp3 = 0 ;
40428 int res3 = 0 ;
40429 long val4 ;
40430 int ecode4 = 0 ;
40431 void *argp5 = 0 ;
40432 int res5 = 0 ;
40433 void *argp6 = 0 ;
40434 int res6 = 0 ;
40435 PyObject * obj0 = 0 ;
40436 PyObject * obj1 = 0 ;
40437 PyObject * obj2 = 0 ;
40438 PyObject * obj3 = 0 ;
40439 PyObject * obj4 = 0 ;
40440 PyObject * obj5 = 0 ;
40441
40442 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexScalarQuantizer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
40443 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40444 if (!SWIG_IsOK(res1)) {
40445 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_search" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer const *""'");
40446 }
40447 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40448 ecode2 = SWIG_AsVal_long(obj1, &val2);
40449 if (!SWIG_IsOK(ecode2)) {
40450 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
40451 }
40452 arg2 = static_cast< faiss::Index::idx_t >(val2);
40453 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
40454 if (!SWIG_IsOK(res3)) {
40455 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexScalarQuantizer_search" "', argument " "3"" of type '" "float const *""'");
40456 }
40457 arg3 = reinterpret_cast< float * >(argp3);
40458 ecode4 = SWIG_AsVal_long(obj3, &val4);
40459 if (!SWIG_IsOK(ecode4)) {
40460 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexScalarQuantizer_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
40461 }
40462 arg4 = static_cast< faiss::Index::idx_t >(val4);
40463 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
40464 if (!SWIG_IsOK(res5)) {
40465 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexScalarQuantizer_search" "', argument " "5"" of type '" "float *""'");
40466 }
40467 arg5 = reinterpret_cast< float * >(argp5);
40468 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
40469 if (!SWIG_IsOK(res6)) {
40470 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexScalarQuantizer_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
40471 }
40472 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
40473 {
40474 Py_BEGIN_ALLOW_THREADS
40475 try {
40476 ((faiss::IndexScalarQuantizer const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
40477 } catch(faiss::FaissException & e) {
40478 PyEval_RestoreThread(_save);
40479 PyErr_SetString(PyExc_RuntimeError, e.what());
40480 SWIG_fail;
40481 }
40482 Py_END_ALLOW_THREADS
40483 }
40484 resultobj = SWIG_Py_Void();
40485 return resultobj;
40486 fail:
40487 return NULL;
40488 }
40489
40490
40491 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40492 PyObject *resultobj = 0;
40493 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40494 void *argp1 = 0 ;
40495 int res1 = 0 ;
40496 PyObject * obj0 = 0 ;
40497
40498 if (!PyArg_ParseTuple(args,(char *)"O:IndexScalarQuantizer_reset",&obj0)) SWIG_fail;
40499 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40500 if (!SWIG_IsOK(res1)) {
40501 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_reset" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40502 }
40503 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40504 {
40505 Py_BEGIN_ALLOW_THREADS
40506 try {
40507 (arg1)->reset();
40508 } catch(faiss::FaissException & e) {
40509 PyEval_RestoreThread(_save);
40510 PyErr_SetString(PyExc_RuntimeError, e.what());
40511 SWIG_fail;
40512 }
40513 Py_END_ALLOW_THREADS
40514 }
40515 resultobj = SWIG_Py_Void();
40516 return resultobj;
40517 fail:
40518 return NULL;
40519 }
40520
40521
40522 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40523 PyObject *resultobj = 0;
40524 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40525 faiss::Index::idx_t arg2 ;
40526 faiss::Index::idx_t arg3 ;
40527 float *arg4 = (float *) 0 ;
40528 void *argp1 = 0 ;
40529 int res1 = 0 ;
40530 long val2 ;
40531 int ecode2 = 0 ;
40532 long val3 ;
40533 int ecode3 = 0 ;
40534 void *argp4 = 0 ;
40535 int res4 = 0 ;
40536 PyObject * obj0 = 0 ;
40537 PyObject * obj1 = 0 ;
40538 PyObject * obj2 = 0 ;
40539 PyObject * obj3 = 0 ;
40540
40541 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexScalarQuantizer_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
40542 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40543 if (!SWIG_IsOK(res1)) {
40544 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer const *""'");
40545 }
40546 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40547 ecode2 = SWIG_AsVal_long(obj1, &val2);
40548 if (!SWIG_IsOK(ecode2)) {
40549 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
40550 }
40551 arg2 = static_cast< faiss::Index::idx_t >(val2);
40552 ecode3 = SWIG_AsVal_long(obj2, &val3);
40553 if (!SWIG_IsOK(ecode3)) {
40554 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexScalarQuantizer_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
40555 }
40556 arg3 = static_cast< faiss::Index::idx_t >(val3);
40557 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
40558 if (!SWIG_IsOK(res4)) {
40559 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexScalarQuantizer_reconstruct_n" "', argument " "4"" of type '" "float *""'");
40560 }
40561 arg4 = reinterpret_cast< float * >(argp4);
40562 {
40563 Py_BEGIN_ALLOW_THREADS
40564 try {
40565 ((faiss::IndexScalarQuantizer const *)arg1)->reconstruct_n(arg2,arg3,arg4);
40566 } catch(faiss::FaissException & e) {
40567 PyEval_RestoreThread(_save);
40568 PyErr_SetString(PyExc_RuntimeError, e.what());
40569 SWIG_fail;
40570 }
40571 Py_END_ALLOW_THREADS
40572 }
40573 resultobj = SWIG_Py_Void();
40574 return resultobj;
40575 fail:
40576 return NULL;
40577 }
40578
40579
40580 SWIGINTERN PyObject *_wrap_IndexScalarQuantizer_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40581 PyObject *resultobj = 0;
40582 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40583 faiss::Index::idx_t arg2 ;
40584 float *arg3 = (float *) 0 ;
40585 void *argp1 = 0 ;
40586 int res1 = 0 ;
40587 long val2 ;
40588 int ecode2 = 0 ;
40589 void *argp3 = 0 ;
40590 int res3 = 0 ;
40591 PyObject * obj0 = 0 ;
40592 PyObject * obj1 = 0 ;
40593 PyObject * obj2 = 0 ;
40594
40595 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexScalarQuantizer_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
40596 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, 0 | 0 );
40597 if (!SWIG_IsOK(res1)) {
40598 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexScalarQuantizer_reconstruct" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer const *""'");
40599 }
40600 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40601 ecode2 = SWIG_AsVal_long(obj1, &val2);
40602 if (!SWIG_IsOK(ecode2)) {
40603 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexScalarQuantizer_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
40604 }
40605 arg2 = static_cast< faiss::Index::idx_t >(val2);
40606 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
40607 if (!SWIG_IsOK(res3)) {
40608 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexScalarQuantizer_reconstruct" "', argument " "3"" of type '" "float *""'");
40609 }
40610 arg3 = reinterpret_cast< float * >(argp3);
40611 {
40612 Py_BEGIN_ALLOW_THREADS
40613 try {
40614 ((faiss::IndexScalarQuantizer const *)arg1)->reconstruct(arg2,arg3);
40615 } catch(faiss::FaissException & e) {
40616 PyEval_RestoreThread(_save);
40617 PyErr_SetString(PyExc_RuntimeError, e.what());
40618 SWIG_fail;
40619 }
40620 Py_END_ALLOW_THREADS
40621 }
40622 resultobj = SWIG_Py_Void();
40623 return resultobj;
40624 fail:
40625 return NULL;
40626 }
40627
40628
40629 SWIGINTERN PyObject *_wrap_delete_IndexScalarQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40630 PyObject *resultobj = 0;
40631 faiss::IndexScalarQuantizer *arg1 = (faiss::IndexScalarQuantizer *) 0 ;
40632 void *argp1 = 0 ;
40633 int res1 = 0 ;
40634 PyObject * obj0 = 0 ;
40635
40636 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexScalarQuantizer",&obj0)) SWIG_fail;
40637 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_POINTER_DISOWN | 0 );
40638 if (!SWIG_IsOK(res1)) {
40639 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexScalarQuantizer" "', argument " "1"" of type '" "faiss::IndexScalarQuantizer *""'");
40640 }
40641 arg1 = reinterpret_cast< faiss::IndexScalarQuantizer * >(argp1);
40642 delete arg1;
40643 resultobj = SWIG_Py_Void();
40644 return resultobj;
40645 fail:
40646 return NULL;
40647 }
40648
40649
40650 SWIGINTERN PyObject *IndexScalarQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40651 PyObject *obj;
40652 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
40653 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexScalarQuantizer, SWIG_NewClientData(obj));
40654 return SWIG_Py_Void();
40655 }
40656
40657 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_sq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40658 PyObject *resultobj = 0;
40659 faiss::IndexIVFScalarQuantizer *arg1 = (faiss::IndexIVFScalarQuantizer *) 0 ;
40660 faiss::ScalarQuantizer *arg2 = (faiss::ScalarQuantizer *) 0 ;
40661 void *argp1 = 0 ;
40662 int res1 = 0 ;
40663 void *argp2 = 0 ;
40664 int res2 = 0 ;
40665 PyObject * obj0 = 0 ;
40666 PyObject * obj1 = 0 ;
40667
40668 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFScalarQuantizer_sq_set",&obj0,&obj1)) SWIG_fail;
40669 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
40670 if (!SWIG_IsOK(res1)) {
40671 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_sq_set" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
40672 }
40673 arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
40674 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40675 if (!SWIG_IsOK(res2)) {
40676 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFScalarQuantizer_sq_set" "', argument " "2"" of type '" "faiss::ScalarQuantizer *""'");
40677 }
40678 arg2 = reinterpret_cast< faiss::ScalarQuantizer * >(argp2);
40679 if (arg1) (arg1)->sq = *arg2;
40680 resultobj = SWIG_Py_Void();
40681 return resultobj;
40682 fail:
40683 return NULL;
40684 }
40685
40686
40687 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_sq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40688 PyObject *resultobj = 0;
40689 faiss::IndexIVFScalarQuantizer *arg1 = (faiss::IndexIVFScalarQuantizer *) 0 ;
40690 void *argp1 = 0 ;
40691 int res1 = 0 ;
40692 PyObject * obj0 = 0 ;
40693 faiss::ScalarQuantizer *result = 0 ;
40694
40695 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFScalarQuantizer_sq_get",&obj0)) SWIG_fail;
40696 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
40697 if (!SWIG_IsOK(res1)) {
40698 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_sq_get" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
40699 }
40700 arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
40701 result = (faiss::ScalarQuantizer *)& ((arg1)->sq);
40702 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ScalarQuantizer, 0 | 0 );
40703 return resultobj;
40704 fail:
40705 return NULL;
40706 }
40707
40708
40709 SWIGINTERN PyObject *_wrap_new_IndexIVFScalarQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40710 PyObject *resultobj = 0;
40711 faiss::Index *arg1 = (faiss::Index *) 0 ;
40712 size_t arg2 ;
40713 size_t arg3 ;
40714 faiss::ScalarQuantizer::QuantizerType arg4 ;
40715 faiss::MetricType arg5 ;
40716 void *argp1 = 0 ;
40717 int res1 = 0 ;
40718 size_t val2 ;
40719 int ecode2 = 0 ;
40720 size_t val3 ;
40721 int ecode3 = 0 ;
40722 int val4 ;
40723 int ecode4 = 0 ;
40724 int val5 ;
40725 int ecode5 = 0 ;
40726 PyObject * obj0 = 0 ;
40727 PyObject * obj1 = 0 ;
40728 PyObject * obj2 = 0 ;
40729 PyObject * obj3 = 0 ;
40730 PyObject * obj4 = 0 ;
40731 faiss::IndexIVFScalarQuantizer *result = 0 ;
40732
40733 if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_IndexIVFScalarQuantizer",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
40734 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
40735 if (!SWIG_IsOK(res1)) {
40736 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "1"" of type '" "faiss::Index *""'");
40737 }
40738 arg1 = reinterpret_cast< faiss::Index * >(argp1);
40739 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
40740 if (!SWIG_IsOK(ecode2)) {
40741 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "2"" of type '" "size_t""'");
40742 }
40743 arg2 = static_cast< size_t >(val2);
40744 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
40745 if (!SWIG_IsOK(ecode3)) {
40746 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "3"" of type '" "size_t""'");
40747 }
40748 arg3 = static_cast< size_t >(val3);
40749 ecode4 = SWIG_AsVal_int(obj3, &val4);
40750 if (!SWIG_IsOK(ecode4)) {
40751 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "4"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
40752 }
40753 arg4 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val4);
40754 ecode5 = SWIG_AsVal_int(obj4, &val5);
40755 if (!SWIG_IsOK(ecode5)) {
40756 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "5"" of type '" "faiss::MetricType""'");
40757 }
40758 arg5 = static_cast< faiss::MetricType >(val5);
40759 {
40760 Py_BEGIN_ALLOW_THREADS
40761 try {
40762 result = (faiss::IndexIVFScalarQuantizer *)new faiss::IndexIVFScalarQuantizer(arg1,arg2,arg3,arg4,arg5);
40763 } catch(faiss::FaissException & e) {
40764 PyEval_RestoreThread(_save);
40765 PyErr_SetString(PyExc_RuntimeError, e.what());
40766 SWIG_fail;
40767 }
40768 Py_END_ALLOW_THREADS
40769 }
40770 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_POINTER_NEW | 0 );
40771 return resultobj;
40772 fail:
40773 return NULL;
40774 }
40775
40776
40777 SWIGINTERN PyObject *_wrap_new_IndexIVFScalarQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40778 PyObject *resultobj = 0;
40779 faiss::Index *arg1 = (faiss::Index *) 0 ;
40780 size_t arg2 ;
40781 size_t arg3 ;
40782 faiss::ScalarQuantizer::QuantizerType arg4 ;
40783 void *argp1 = 0 ;
40784 int res1 = 0 ;
40785 size_t val2 ;
40786 int ecode2 = 0 ;
40787 size_t val3 ;
40788 int ecode3 = 0 ;
40789 int val4 ;
40790 int ecode4 = 0 ;
40791 PyObject * obj0 = 0 ;
40792 PyObject * obj1 = 0 ;
40793 PyObject * obj2 = 0 ;
40794 PyObject * obj3 = 0 ;
40795 faiss::IndexIVFScalarQuantizer *result = 0 ;
40796
40797 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexIVFScalarQuantizer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
40798 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
40799 if (!SWIG_IsOK(res1)) {
40800 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "1"" of type '" "faiss::Index *""'");
40801 }
40802 arg1 = reinterpret_cast< faiss::Index * >(argp1);
40803 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
40804 if (!SWIG_IsOK(ecode2)) {
40805 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "2"" of type '" "size_t""'");
40806 }
40807 arg2 = static_cast< size_t >(val2);
40808 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
40809 if (!SWIG_IsOK(ecode3)) {
40810 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "3"" of type '" "size_t""'");
40811 }
40812 arg3 = static_cast< size_t >(val3);
40813 ecode4 = SWIG_AsVal_int(obj3, &val4);
40814 if (!SWIG_IsOK(ecode4)) {
40815 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFScalarQuantizer" "', argument " "4"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
40816 }
40817 arg4 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val4);
40818 {
40819 Py_BEGIN_ALLOW_THREADS
40820 try {
40821 result = (faiss::IndexIVFScalarQuantizer *)new faiss::IndexIVFScalarQuantizer(arg1,arg2,arg3,arg4);
40822 } catch(faiss::FaissException & e) {
40823 PyEval_RestoreThread(_save);
40824 PyErr_SetString(PyExc_RuntimeError, e.what());
40825 SWIG_fail;
40826 }
40827 Py_END_ALLOW_THREADS
40828 }
40829 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_POINTER_NEW | 0 );
40830 return resultobj;
40831 fail:
40832 return NULL;
40833 }
40834
40835
40836 SWIGINTERN PyObject *_wrap_new_IndexIVFScalarQuantizer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40837 PyObject *resultobj = 0;
40838 faiss::IndexIVFScalarQuantizer *result = 0 ;
40839
40840 if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFScalarQuantizer")) SWIG_fail;
40841 {
40842 Py_BEGIN_ALLOW_THREADS
40843 try {
40844 result = (faiss::IndexIVFScalarQuantizer *)new faiss::IndexIVFScalarQuantizer();
40845 } catch(faiss::FaissException & e) {
40846 PyEval_RestoreThread(_save);
40847 PyErr_SetString(PyExc_RuntimeError, e.what());
40848 SWIG_fail;
40849 }
40850 Py_END_ALLOW_THREADS
40851 }
40852 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_POINTER_NEW | 0 );
40853 return resultobj;
40854 fail:
40855 return NULL;
40856 }
40857
40858
40859 SWIGINTERN PyObject *_wrap_new_IndexIVFScalarQuantizer(PyObject *self, PyObject *args) {
40860 Py_ssize_t argc;
40861 PyObject *argv[6] = {
40862 0
40863 };
40864 Py_ssize_t ii;
40865
40866 if (!PyTuple_Check(args)) SWIG_fail;
40867 argc = args ? PyObject_Length(args) : 0;
40868 for (ii = 0; (ii < 5) && (ii < argc); ii++) {
40869 argv[ii] = PyTuple_GET_ITEM(args,ii);
40870 }
40871 if (argc == 0) {
40872 return _wrap_new_IndexIVFScalarQuantizer__SWIG_2(self, args);
40873 }
40874 if (argc == 4) {
40875 int _v;
40876 void *vptr = 0;
40877 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
40878 _v = SWIG_CheckState(res);
40879 if (_v) {
40880 {
40881 int res = SWIG_AsVal_size_t(argv[1], NULL);
40882 _v = SWIG_CheckState(res);
40883 }
40884 if (_v) {
40885 {
40886 int res = SWIG_AsVal_size_t(argv[2], NULL);
40887 _v = SWIG_CheckState(res);
40888 }
40889 if (_v) {
40890 {
40891 int res = SWIG_AsVal_int(argv[3], NULL);
40892 _v = SWIG_CheckState(res);
40893 }
40894 if (_v) {
40895 return _wrap_new_IndexIVFScalarQuantizer__SWIG_1(self, args);
40896 }
40897 }
40898 }
40899 }
40900 }
40901 if (argc == 5) {
40902 int _v;
40903 void *vptr = 0;
40904 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
40905 _v = SWIG_CheckState(res);
40906 if (_v) {
40907 {
40908 int res = SWIG_AsVal_size_t(argv[1], NULL);
40909 _v = SWIG_CheckState(res);
40910 }
40911 if (_v) {
40912 {
40913 int res = SWIG_AsVal_size_t(argv[2], NULL);
40914 _v = SWIG_CheckState(res);
40915 }
40916 if (_v) {
40917 {
40918 int res = SWIG_AsVal_int(argv[3], NULL);
40919 _v = SWIG_CheckState(res);
40920 }
40921 if (_v) {
40922 {
40923 int res = SWIG_AsVal_int(argv[4], NULL);
40924 _v = SWIG_CheckState(res);
40925 }
40926 if (_v) {
40927 return _wrap_new_IndexIVFScalarQuantizer__SWIG_0(self, args);
40928 }
40929 }
40930 }
40931 }
40932 }
40933 }
40934
40935 fail:
40936 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFScalarQuantizer'.\n"
40937 " Possible C/C++ prototypes are:\n"
40938 " faiss::IndexIVFScalarQuantizer::IndexIVFScalarQuantizer(faiss::Index *,size_t,size_t,faiss::ScalarQuantizer::QuantizerType,faiss::MetricType)\n"
40939 " faiss::IndexIVFScalarQuantizer::IndexIVFScalarQuantizer(faiss::Index *,size_t,size_t,faiss::ScalarQuantizer::QuantizerType)\n"
40940 " faiss::IndexIVFScalarQuantizer::IndexIVFScalarQuantizer()\n");
40941 return 0;
40942 }
40943
40944
40945 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_train_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40946 PyObject *resultobj = 0;
40947 faiss::IndexIVFScalarQuantizer *arg1 = (faiss::IndexIVFScalarQuantizer *) 0 ;
40948 faiss::Index::idx_t arg2 ;
40949 float *arg3 = (float *) 0 ;
40950 void *argp1 = 0 ;
40951 int res1 = 0 ;
40952 long val2 ;
40953 int ecode2 = 0 ;
40954 void *argp3 = 0 ;
40955 int res3 = 0 ;
40956 PyObject * obj0 = 0 ;
40957 PyObject * obj1 = 0 ;
40958 PyObject * obj2 = 0 ;
40959
40960 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFScalarQuantizer_train_residual",&obj0,&obj1,&obj2)) SWIG_fail;
40961 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
40962 if (!SWIG_IsOK(res1)) {
40963 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_train_residual" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
40964 }
40965 arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
40966 ecode2 = SWIG_AsVal_long(obj1, &val2);
40967 if (!SWIG_IsOK(ecode2)) {
40968 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_train_residual" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
40969 }
40970 arg2 = static_cast< faiss::Index::idx_t >(val2);
40971 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
40972 if (!SWIG_IsOK(res3)) {
40973 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFScalarQuantizer_train_residual" "', argument " "3"" of type '" "float const *""'");
40974 }
40975 arg3 = reinterpret_cast< float * >(argp3);
40976 {
40977 Py_BEGIN_ALLOW_THREADS
40978 try {
40979 (arg1)->train_residual(arg2,(float const *)arg3);
40980 } catch(faiss::FaissException & e) {
40981 PyEval_RestoreThread(_save);
40982 PyErr_SetString(PyExc_RuntimeError, e.what());
40983 SWIG_fail;
40984 }
40985 Py_END_ALLOW_THREADS
40986 }
40987 resultobj = SWIG_Py_Void();
40988 return resultobj;
40989 fail:
40990 return NULL;
40991 }
40992
40993
40994 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_encode_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
40995 PyObject *resultobj = 0;
40996 faiss::IndexIVFScalarQuantizer *arg1 = (faiss::IndexIVFScalarQuantizer *) 0 ;
40997 faiss::Index::idx_t arg2 ;
40998 float *arg3 = (float *) 0 ;
40999 faiss::Index::idx_t *arg4 = (faiss::Index::idx_t *) 0 ;
41000 uint8_t *arg5 = (uint8_t *) 0 ;
41001 void *argp1 = 0 ;
41002 int res1 = 0 ;
41003 long val2 ;
41004 int ecode2 = 0 ;
41005 void *argp3 = 0 ;
41006 int res3 = 0 ;
41007 void *argp4 = 0 ;
41008 int res4 = 0 ;
41009 void *argp5 = 0 ;
41010 int res5 = 0 ;
41011 PyObject * obj0 = 0 ;
41012 PyObject * obj1 = 0 ;
41013 PyObject * obj2 = 0 ;
41014 PyObject * obj3 = 0 ;
41015 PyObject * obj4 = 0 ;
41016
41017 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFScalarQuantizer_encode_vectors",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
41018 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
41019 if (!SWIG_IsOK(res1)) {
41020 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer const *""'");
41021 }
41022 arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
41023 ecode2 = SWIG_AsVal_long(obj1, &val2);
41024 if (!SWIG_IsOK(ecode2)) {
41025 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
41026 }
41027 arg2 = static_cast< faiss::Index::idx_t >(val2);
41028 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
41029 if (!SWIG_IsOK(res3)) {
41030 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "3"" of type '" "float const *""'");
41031 }
41032 arg3 = reinterpret_cast< float * >(argp3);
41033 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
41034 if (!SWIG_IsOK(res4)) {
41035 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
41036 }
41037 arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
41038 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
41039 if (!SWIG_IsOK(res5)) {
41040 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFScalarQuantizer_encode_vectors" "', argument " "5"" of type '" "uint8_t *""'");
41041 }
41042 arg5 = reinterpret_cast< uint8_t * >(argp5);
41043 {
41044 Py_BEGIN_ALLOW_THREADS
41045 try {
41046 ((faiss::IndexIVFScalarQuantizer const *)arg1)->encode_vectors(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4,arg5);
41047 } catch(faiss::FaissException & e) {
41048 PyEval_RestoreThread(_save);
41049 PyErr_SetString(PyExc_RuntimeError, e.what());
41050 SWIG_fail;
41051 }
41052 Py_END_ALLOW_THREADS
41053 }
41054 resultobj = SWIG_Py_Void();
41055 return resultobj;
41056 fail:
41057 return NULL;
41058 }
41059
41060
41061 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41062 PyObject *resultobj = 0;
41063 faiss::IndexIVFScalarQuantizer *arg1 = (faiss::IndexIVFScalarQuantizer *) 0 ;
41064 faiss::Index::idx_t arg2 ;
41065 float *arg3 = (float *) 0 ;
41066 long *arg4 = (long *) 0 ;
41067 void *argp1 = 0 ;
41068 int res1 = 0 ;
41069 long val2 ;
41070 int ecode2 = 0 ;
41071 void *argp3 = 0 ;
41072 int res3 = 0 ;
41073 void *argp4 = 0 ;
41074 int res4 = 0 ;
41075 PyObject * obj0 = 0 ;
41076 PyObject * obj1 = 0 ;
41077 PyObject * obj2 = 0 ;
41078 PyObject * obj3 = 0 ;
41079
41080 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFScalarQuantizer_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
41081 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
41082 if (!SWIG_IsOK(res1)) {
41083 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
41084 }
41085 arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
41086 ecode2 = SWIG_AsVal_long(obj1, &val2);
41087 if (!SWIG_IsOK(ecode2)) {
41088 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
41089 }
41090 arg2 = static_cast< faiss::Index::idx_t >(val2);
41091 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
41092 if (!SWIG_IsOK(res3)) {
41093 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFScalarQuantizer_add_with_ids" "', argument " "3"" of type '" "float const *""'");
41094 }
41095 arg3 = reinterpret_cast< float * >(argp3);
41096 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
41097 if (!SWIG_IsOK(res4)) {
41098 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFScalarQuantizer_add_with_ids" "', argument " "4"" of type '" "long const *""'");
41099 }
41100 arg4 = reinterpret_cast< long * >(argp4);
41101 {
41102 Py_BEGIN_ALLOW_THREADS
41103 try {
41104 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
41105 } catch(faiss::FaissException & e) {
41106 PyEval_RestoreThread(_save);
41107 PyErr_SetString(PyExc_RuntimeError, e.what());
41108 SWIG_fail;
41109 }
41110 Py_END_ALLOW_THREADS
41111 }
41112 resultobj = SWIG_Py_Void();
41113 return resultobj;
41114 fail:
41115 return NULL;
41116 }
41117
41118
41119 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_get_InvertedListScanner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41120 PyObject *resultobj = 0;
41121 faiss::IndexIVFScalarQuantizer *arg1 = (faiss::IndexIVFScalarQuantizer *) 0 ;
41122 bool arg2 ;
41123 void *argp1 = 0 ;
41124 int res1 = 0 ;
41125 bool val2 ;
41126 int ecode2 = 0 ;
41127 PyObject * obj0 = 0 ;
41128 PyObject * obj1 = 0 ;
41129 faiss::InvertedListScanner *result = 0 ;
41130
41131 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFScalarQuantizer_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
41132 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
41133 if (!SWIG_IsOK(res1)) {
41134 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer const *""'");
41135 }
41136 arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
41137 ecode2 = SWIG_AsVal_bool(obj1, &val2);
41138 if (!SWIG_IsOK(ecode2)) {
41139 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
41140 }
41141 arg2 = static_cast< bool >(val2);
41142 {
41143 Py_BEGIN_ALLOW_THREADS
41144 try {
41145 result = (faiss::InvertedListScanner *)((faiss::IndexIVFScalarQuantizer const *)arg1)->get_InvertedListScanner(arg2);
41146 } catch(faiss::FaissException & e) {
41147 PyEval_RestoreThread(_save);
41148 PyErr_SetString(PyExc_RuntimeError, e.what());
41149 SWIG_fail;
41150 }
41151 Py_END_ALLOW_THREADS
41152 }
41153 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
41154 return resultobj;
41155 fail:
41156 return NULL;
41157 }
41158
41159
41160 SWIGINTERN PyObject *_wrap_IndexIVFScalarQuantizer_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41161 PyObject *resultobj = 0;
41162 faiss::IndexIVFScalarQuantizer *arg1 = (faiss::IndexIVFScalarQuantizer *) 0 ;
41163 long arg2 ;
41164 long arg3 ;
41165 float *arg4 = (float *) 0 ;
41166 void *argp1 = 0 ;
41167 int res1 = 0 ;
41168 long val2 ;
41169 int ecode2 = 0 ;
41170 long val3 ;
41171 int ecode3 = 0 ;
41172 void *argp4 = 0 ;
41173 int res4 = 0 ;
41174 PyObject * obj0 = 0 ;
41175 PyObject * obj1 = 0 ;
41176 PyObject * obj2 = 0 ;
41177 PyObject * obj3 = 0 ;
41178
41179 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFScalarQuantizer_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
41180 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, 0 | 0 );
41181 if (!SWIG_IsOK(res1)) {
41182 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFScalarQuantizer_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer const *""'");
41183 }
41184 arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
41185 ecode2 = SWIG_AsVal_long(obj1, &val2);
41186 if (!SWIG_IsOK(ecode2)) {
41187 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFScalarQuantizer_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
41188 }
41189 arg2 = static_cast< long >(val2);
41190 ecode3 = SWIG_AsVal_long(obj2, &val3);
41191 if (!SWIG_IsOK(ecode3)) {
41192 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFScalarQuantizer_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
41193 }
41194 arg3 = static_cast< long >(val3);
41195 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
41196 if (!SWIG_IsOK(res4)) {
41197 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFScalarQuantizer_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
41198 }
41199 arg4 = reinterpret_cast< float * >(argp4);
41200 {
41201 Py_BEGIN_ALLOW_THREADS
41202 try {
41203 ((faiss::IndexIVFScalarQuantizer const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
41204 } catch(faiss::FaissException & e) {
41205 PyEval_RestoreThread(_save);
41206 PyErr_SetString(PyExc_RuntimeError, e.what());
41207 SWIG_fail;
41208 }
41209 Py_END_ALLOW_THREADS
41210 }
41211 resultobj = SWIG_Py_Void();
41212 return resultobj;
41213 fail:
41214 return NULL;
41215 }
41216
41217
41218 SWIGINTERN PyObject *_wrap_delete_IndexIVFScalarQuantizer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41219 PyObject *resultobj = 0;
41220 faiss::IndexIVFScalarQuantizer *arg1 = (faiss::IndexIVFScalarQuantizer *) 0 ;
41221 void *argp1 = 0 ;
41222 int res1 = 0 ;
41223 PyObject * obj0 = 0 ;
41224
41225 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFScalarQuantizer",&obj0)) SWIG_fail;
41226 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_POINTER_DISOWN | 0 );
41227 if (!SWIG_IsOK(res1)) {
41228 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFScalarQuantizer" "', argument " "1"" of type '" "faiss::IndexIVFScalarQuantizer *""'");
41229 }
41230 arg1 = reinterpret_cast< faiss::IndexIVFScalarQuantizer * >(argp1);
41231 delete arg1;
41232 resultobj = SWIG_Py_Void();
41233 return resultobj;
41234 fail:
41235 return NULL;
41236 }
41237
41238
41239 SWIGINTERN PyObject *IndexIVFScalarQuantizer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41240 PyObject *obj;
41241 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
41242 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFScalarQuantizer, SWIG_NewClientData(obj));
41243 return SWIG_Py_Void();
41244 }
41245
41246 SWIGINTERN PyObject *_wrap_HNSW_assign_probas_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41247 PyObject *resultobj = 0;
41248 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41249 std::vector< double > *arg2 = (std::vector< double > *) 0 ;
41250 void *argp1 = 0 ;
41251 int res1 = 0 ;
41252 void *argp2 = 0 ;
41253 int res2 = 0 ;
41254 PyObject * obj0 = 0 ;
41255 PyObject * obj1 = 0 ;
41256
41257 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_assign_probas_set",&obj0,&obj1)) SWIG_fail;
41258 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41259 if (!SWIG_IsOK(res1)) {
41260 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_assign_probas_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41261 }
41262 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41263 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
41264 if (!SWIG_IsOK(res2)) {
41265 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_assign_probas_set" "', argument " "2"" of type '" "std::vector< double > *""'");
41266 }
41267 arg2 = reinterpret_cast< std::vector< double > * >(argp2);
41268 if (arg1) (arg1)->assign_probas = *arg2;
41269 resultobj = SWIG_Py_Void();
41270 return resultobj;
41271 fail:
41272 return NULL;
41273 }
41274
41275
41276 SWIGINTERN PyObject *_wrap_HNSW_assign_probas_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41277 PyObject *resultobj = 0;
41278 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41279 void *argp1 = 0 ;
41280 int res1 = 0 ;
41281 PyObject * obj0 = 0 ;
41282 std::vector< double > *result = 0 ;
41283
41284 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_assign_probas_get",&obj0)) SWIG_fail;
41285 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41286 if (!SWIG_IsOK(res1)) {
41287 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_assign_probas_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41288 }
41289 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41290 result = (std::vector< double > *)& ((arg1)->assign_probas);
41291 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
41292 return resultobj;
41293 fail:
41294 return NULL;
41295 }
41296
41297
41298 SWIGINTERN PyObject *_wrap_HNSW_cum_nneighbor_per_level_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41299 PyObject *resultobj = 0;
41300 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41301 std::vector< int > *arg2 = (std::vector< int > *) 0 ;
41302 void *argp1 = 0 ;
41303 int res1 = 0 ;
41304 void *argp2 = 0 ;
41305 int res2 = 0 ;
41306 PyObject * obj0 = 0 ;
41307 PyObject * obj1 = 0 ;
41308
41309 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_cum_nneighbor_per_level_set",&obj0,&obj1)) SWIG_fail;
41310 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41311 if (!SWIG_IsOK(res1)) {
41312 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_cum_nneighbor_per_level_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41313 }
41314 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41315 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
41316 if (!SWIG_IsOK(res2)) {
41317 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_cum_nneighbor_per_level_set" "', argument " "2"" of type '" "std::vector< int > *""'");
41318 }
41319 arg2 = reinterpret_cast< std::vector< int > * >(argp2);
41320 if (arg1) (arg1)->cum_nneighbor_per_level = *arg2;
41321 resultobj = SWIG_Py_Void();
41322 return resultobj;
41323 fail:
41324 return NULL;
41325 }
41326
41327
41328 SWIGINTERN PyObject *_wrap_HNSW_cum_nneighbor_per_level_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41329 PyObject *resultobj = 0;
41330 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41331 void *argp1 = 0 ;
41332 int res1 = 0 ;
41333 PyObject * obj0 = 0 ;
41334 std::vector< int > *result = 0 ;
41335
41336 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_cum_nneighbor_per_level_get",&obj0)) SWIG_fail;
41337 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41338 if (!SWIG_IsOK(res1)) {
41339 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_cum_nneighbor_per_level_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41340 }
41341 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41342 result = (std::vector< int > *)& ((arg1)->cum_nneighbor_per_level);
41343 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
41344 return resultobj;
41345 fail:
41346 return NULL;
41347 }
41348
41349
41350 SWIGINTERN PyObject *_wrap_HNSW_levels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41351 PyObject *resultobj = 0;
41352 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41353 std::vector< int > *arg2 = (std::vector< int > *) 0 ;
41354 void *argp1 = 0 ;
41355 int res1 = 0 ;
41356 void *argp2 = 0 ;
41357 int res2 = 0 ;
41358 PyObject * obj0 = 0 ;
41359 PyObject * obj1 = 0 ;
41360
41361 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_levels_set",&obj0,&obj1)) SWIG_fail;
41362 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41363 if (!SWIG_IsOK(res1)) {
41364 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_levels_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41365 }
41366 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41367 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
41368 if (!SWIG_IsOK(res2)) {
41369 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_levels_set" "', argument " "2"" of type '" "std::vector< int > *""'");
41370 }
41371 arg2 = reinterpret_cast< std::vector< int > * >(argp2);
41372 if (arg1) (arg1)->levels = *arg2;
41373 resultobj = SWIG_Py_Void();
41374 return resultobj;
41375 fail:
41376 return NULL;
41377 }
41378
41379
41380 SWIGINTERN PyObject *_wrap_HNSW_levels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41381 PyObject *resultobj = 0;
41382 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41383 void *argp1 = 0 ;
41384 int res1 = 0 ;
41385 PyObject * obj0 = 0 ;
41386 std::vector< int > *result = 0 ;
41387
41388 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_levels_get",&obj0)) SWIG_fail;
41389 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41390 if (!SWIG_IsOK(res1)) {
41391 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_levels_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41392 }
41393 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41394 result = (std::vector< int > *)& ((arg1)->levels);
41395 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
41396 return resultobj;
41397 fail:
41398 return NULL;
41399 }
41400
41401
41402 SWIGINTERN PyObject *_wrap_HNSW_offsets_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41403 PyObject *resultobj = 0;
41404 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41405 std::vector< size_t > *arg2 = (std::vector< size_t > *) 0 ;
41406 void *argp1 = 0 ;
41407 int res1 = 0 ;
41408 void *argp2 = 0 ;
41409 int res2 = 0 ;
41410 PyObject * obj0 = 0 ;
41411 PyObject * obj1 = 0 ;
41412
41413 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_offsets_set",&obj0,&obj1)) SWIG_fail;
41414 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41415 if (!SWIG_IsOK(res1)) {
41416 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_offsets_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41417 }
41418 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41419 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
41420 if (!SWIG_IsOK(res2)) {
41421 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_offsets_set" "', argument " "2"" of type '" "std::vector< size_t > *""'");
41422 }
41423 arg2 = reinterpret_cast< std::vector< size_t > * >(argp2);
41424 if (arg1) (arg1)->offsets = *arg2;
41425 resultobj = SWIG_Py_Void();
41426 return resultobj;
41427 fail:
41428 return NULL;
41429 }
41430
41431
41432 SWIGINTERN PyObject *_wrap_HNSW_offsets_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41433 PyObject *resultobj = 0;
41434 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41435 void *argp1 = 0 ;
41436 int res1 = 0 ;
41437 PyObject * obj0 = 0 ;
41438 std::vector< size_t > *result = 0 ;
41439
41440 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_offsets_get",&obj0)) SWIG_fail;
41441 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41442 if (!SWIG_IsOK(res1)) {
41443 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_offsets_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41444 }
41445 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41446 result = (std::vector< size_t > *)& ((arg1)->offsets);
41447 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_long_t, 0 | 0 );
41448 return resultobj;
41449 fail:
41450 return NULL;
41451 }
41452
41453
41454 SWIGINTERN PyObject *_wrap_HNSW_neighbors_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41455 PyObject *resultobj = 0;
41456 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41457 std::vector< faiss::HNSW::storage_idx_t > *arg2 = (std::vector< faiss::HNSW::storage_idx_t > *) 0 ;
41458 void *argp1 = 0 ;
41459 int res1 = 0 ;
41460 void *argp2 = 0 ;
41461 int res2 = 0 ;
41462 PyObject * obj0 = 0 ;
41463 PyObject * obj1 = 0 ;
41464
41465 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_neighbors_set",&obj0,&obj1)) SWIG_fail;
41466 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41467 if (!SWIG_IsOK(res1)) {
41468 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_neighbors_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41469 }
41470 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41471 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
41472 if (!SWIG_IsOK(res2)) {
41473 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_neighbors_set" "', argument " "2"" of type '" "std::vector< faiss::HNSW::storage_idx_t > *""'");
41474 }
41475 arg2 = reinterpret_cast< std::vector< faiss::HNSW::storage_idx_t > * >(argp2);
41476 if (arg1) (arg1)->neighbors = *arg2;
41477 resultobj = SWIG_Py_Void();
41478 return resultobj;
41479 fail:
41480 return NULL;
41481 }
41482
41483
41484 SWIGINTERN PyObject *_wrap_HNSW_neighbors_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41485 PyObject *resultobj = 0;
41486 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41487 void *argp1 = 0 ;
41488 int res1 = 0 ;
41489 PyObject * obj0 = 0 ;
41490 std::vector< faiss::HNSW::storage_idx_t > *result = 0 ;
41491
41492 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_neighbors_get",&obj0)) SWIG_fail;
41493 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41494 if (!SWIG_IsOK(res1)) {
41495 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_neighbors_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41496 }
41497 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41498 result = (std::vector< faiss::HNSW::storage_idx_t > *)& ((arg1)->neighbors);
41499 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_int_t, 0 | 0 );
41500 return resultobj;
41501 fail:
41502 return NULL;
41503 }
41504
41505
41506 SWIGINTERN PyObject *_wrap_HNSW_entry_point_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41507 PyObject *resultobj = 0;
41508 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41509 faiss::HNSW::storage_idx_t arg2 ;
41510 void *argp1 = 0 ;
41511 int res1 = 0 ;
41512 int val2 ;
41513 int ecode2 = 0 ;
41514 PyObject * obj0 = 0 ;
41515 PyObject * obj1 = 0 ;
41516
41517 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_entry_point_set",&obj0,&obj1)) SWIG_fail;
41518 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41519 if (!SWIG_IsOK(res1)) {
41520 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_entry_point_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41521 }
41522 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41523 ecode2 = SWIG_AsVal_int(obj1, &val2);
41524 if (!SWIG_IsOK(ecode2)) {
41525 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_entry_point_set" "', argument " "2"" of type '" "faiss::HNSW::storage_idx_t""'");
41526 }
41527 arg2 = static_cast< faiss::HNSW::storage_idx_t >(val2);
41528 if (arg1) (arg1)->entry_point = arg2;
41529 resultobj = SWIG_Py_Void();
41530 return resultobj;
41531 fail:
41532 return NULL;
41533 }
41534
41535
41536 SWIGINTERN PyObject *_wrap_HNSW_entry_point_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41537 PyObject *resultobj = 0;
41538 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41539 void *argp1 = 0 ;
41540 int res1 = 0 ;
41541 PyObject * obj0 = 0 ;
41542 faiss::HNSW::storage_idx_t result;
41543
41544 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_entry_point_get",&obj0)) SWIG_fail;
41545 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41546 if (!SWIG_IsOK(res1)) {
41547 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_entry_point_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41548 }
41549 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41550 result = (faiss::HNSW::storage_idx_t) ((arg1)->entry_point);
41551 resultobj = SWIG_From_int(static_cast< int >(result));
41552 return resultobj;
41553 fail:
41554 return NULL;
41555 }
41556
41557
41558 SWIGINTERN PyObject *_wrap_HNSW_rng_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41559 PyObject *resultobj = 0;
41560 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41561 faiss::RandomGenerator *arg2 = (faiss::RandomGenerator *) 0 ;
41562 void *argp1 = 0 ;
41563 int res1 = 0 ;
41564 void *argp2 = 0 ;
41565 int res2 = 0 ;
41566 PyObject * obj0 = 0 ;
41567 PyObject * obj1 = 0 ;
41568
41569 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_rng_set",&obj0,&obj1)) SWIG_fail;
41570 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41571 if (!SWIG_IsOK(res1)) {
41572 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_rng_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41573 }
41574 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41575 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
41576 if (!SWIG_IsOK(res2)) {
41577 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_rng_set" "', argument " "2"" of type '" "faiss::RandomGenerator *""'");
41578 }
41579 arg2 = reinterpret_cast< faiss::RandomGenerator * >(argp2);
41580 if (arg1) (arg1)->rng = *arg2;
41581 resultobj = SWIG_Py_Void();
41582 return resultobj;
41583 fail:
41584 return NULL;
41585 }
41586
41587
41588 SWIGINTERN PyObject *_wrap_HNSW_rng_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41589 PyObject *resultobj = 0;
41590 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41591 void *argp1 = 0 ;
41592 int res1 = 0 ;
41593 PyObject * obj0 = 0 ;
41594 faiss::RandomGenerator *result = 0 ;
41595
41596 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_rng_get",&obj0)) SWIG_fail;
41597 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41598 if (!SWIG_IsOK(res1)) {
41599 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_rng_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41600 }
41601 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41602 result = (faiss::RandomGenerator *)& ((arg1)->rng);
41603 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RandomGenerator, 0 | 0 );
41604 return resultobj;
41605 fail:
41606 return NULL;
41607 }
41608
41609
41610 SWIGINTERN PyObject *_wrap_HNSW_max_level_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41611 PyObject *resultobj = 0;
41612 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41613 int arg2 ;
41614 void *argp1 = 0 ;
41615 int res1 = 0 ;
41616 int val2 ;
41617 int ecode2 = 0 ;
41618 PyObject * obj0 = 0 ;
41619 PyObject * obj1 = 0 ;
41620
41621 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_max_level_set",&obj0,&obj1)) SWIG_fail;
41622 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41623 if (!SWIG_IsOK(res1)) {
41624 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_max_level_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41625 }
41626 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41627 ecode2 = SWIG_AsVal_int(obj1, &val2);
41628 if (!SWIG_IsOK(ecode2)) {
41629 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_max_level_set" "', argument " "2"" of type '" "int""'");
41630 }
41631 arg2 = static_cast< int >(val2);
41632 if (arg1) (arg1)->max_level = arg2;
41633 resultobj = SWIG_Py_Void();
41634 return resultobj;
41635 fail:
41636 return NULL;
41637 }
41638
41639
41640 SWIGINTERN PyObject *_wrap_HNSW_max_level_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41641 PyObject *resultobj = 0;
41642 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41643 void *argp1 = 0 ;
41644 int res1 = 0 ;
41645 PyObject * obj0 = 0 ;
41646 int result;
41647
41648 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_max_level_get",&obj0)) SWIG_fail;
41649 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41650 if (!SWIG_IsOK(res1)) {
41651 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_max_level_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41652 }
41653 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41654 result = (int) ((arg1)->max_level);
41655 resultobj = SWIG_From_int(static_cast< int >(result));
41656 return resultobj;
41657 fail:
41658 return NULL;
41659 }
41660
41661
41662 SWIGINTERN PyObject *_wrap_HNSW_efConstruction_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41663 PyObject *resultobj = 0;
41664 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41665 int arg2 ;
41666 void *argp1 = 0 ;
41667 int res1 = 0 ;
41668 int val2 ;
41669 int ecode2 = 0 ;
41670 PyObject * obj0 = 0 ;
41671 PyObject * obj1 = 0 ;
41672
41673 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_efConstruction_set",&obj0,&obj1)) SWIG_fail;
41674 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41675 if (!SWIG_IsOK(res1)) {
41676 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_efConstruction_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41677 }
41678 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41679 ecode2 = SWIG_AsVal_int(obj1, &val2);
41680 if (!SWIG_IsOK(ecode2)) {
41681 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_efConstruction_set" "', argument " "2"" of type '" "int""'");
41682 }
41683 arg2 = static_cast< int >(val2);
41684 if (arg1) (arg1)->efConstruction = arg2;
41685 resultobj = SWIG_Py_Void();
41686 return resultobj;
41687 fail:
41688 return NULL;
41689 }
41690
41691
41692 SWIGINTERN PyObject *_wrap_HNSW_efConstruction_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41693 PyObject *resultobj = 0;
41694 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41695 void *argp1 = 0 ;
41696 int res1 = 0 ;
41697 PyObject * obj0 = 0 ;
41698 int result;
41699
41700 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_efConstruction_get",&obj0)) SWIG_fail;
41701 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41702 if (!SWIG_IsOK(res1)) {
41703 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_efConstruction_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41704 }
41705 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41706 result = (int) ((arg1)->efConstruction);
41707 resultobj = SWIG_From_int(static_cast< int >(result));
41708 return resultobj;
41709 fail:
41710 return NULL;
41711 }
41712
41713
41714 SWIGINTERN PyObject *_wrap_HNSW_efSearch_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41715 PyObject *resultobj = 0;
41716 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41717 int arg2 ;
41718 void *argp1 = 0 ;
41719 int res1 = 0 ;
41720 int val2 ;
41721 int ecode2 = 0 ;
41722 PyObject * obj0 = 0 ;
41723 PyObject * obj1 = 0 ;
41724
41725 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_efSearch_set",&obj0,&obj1)) SWIG_fail;
41726 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41727 if (!SWIG_IsOK(res1)) {
41728 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_efSearch_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41729 }
41730 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41731 ecode2 = SWIG_AsVal_int(obj1, &val2);
41732 if (!SWIG_IsOK(ecode2)) {
41733 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_efSearch_set" "', argument " "2"" of type '" "int""'");
41734 }
41735 arg2 = static_cast< int >(val2);
41736 if (arg1) (arg1)->efSearch = arg2;
41737 resultobj = SWIG_Py_Void();
41738 return resultobj;
41739 fail:
41740 return NULL;
41741 }
41742
41743
41744 SWIGINTERN PyObject *_wrap_HNSW_efSearch_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41745 PyObject *resultobj = 0;
41746 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41747 void *argp1 = 0 ;
41748 int res1 = 0 ;
41749 PyObject * obj0 = 0 ;
41750 int result;
41751
41752 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_efSearch_get",&obj0)) SWIG_fail;
41753 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41754 if (!SWIG_IsOK(res1)) {
41755 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_efSearch_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41756 }
41757 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41758 result = (int) ((arg1)->efSearch);
41759 resultobj = SWIG_From_int(static_cast< int >(result));
41760 return resultobj;
41761 fail:
41762 return NULL;
41763 }
41764
41765
41766 SWIGINTERN PyObject *_wrap_HNSW_upper_beam_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41767 PyObject *resultobj = 0;
41768 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41769 int arg2 ;
41770 void *argp1 = 0 ;
41771 int res1 = 0 ;
41772 int val2 ;
41773 int ecode2 = 0 ;
41774 PyObject * obj0 = 0 ;
41775 PyObject * obj1 = 0 ;
41776
41777 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_upper_beam_set",&obj0,&obj1)) SWIG_fail;
41778 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41779 if (!SWIG_IsOK(res1)) {
41780 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_upper_beam_set" "', argument " "1"" of type '" "faiss::HNSW *""'");
41781 }
41782 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41783 ecode2 = SWIG_AsVal_int(obj1, &val2);
41784 if (!SWIG_IsOK(ecode2)) {
41785 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_upper_beam_set" "', argument " "2"" of type '" "int""'");
41786 }
41787 arg2 = static_cast< int >(val2);
41788 if (arg1) (arg1)->upper_beam = arg2;
41789 resultobj = SWIG_Py_Void();
41790 return resultobj;
41791 fail:
41792 return NULL;
41793 }
41794
41795
41796 SWIGINTERN PyObject *_wrap_HNSW_upper_beam_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41797 PyObject *resultobj = 0;
41798 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41799 void *argp1 = 0 ;
41800 int res1 = 0 ;
41801 PyObject * obj0 = 0 ;
41802 int result;
41803
41804 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_upper_beam_get",&obj0)) SWIG_fail;
41805 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41806 if (!SWIG_IsOK(res1)) {
41807 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_upper_beam_get" "', argument " "1"" of type '" "faiss::HNSW *""'");
41808 }
41809 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41810 result = (int) ((arg1)->upper_beam);
41811 resultobj = SWIG_From_int(static_cast< int >(result));
41812 return resultobj;
41813 fail:
41814 return NULL;
41815 }
41816
41817
41818 SWIGINTERN PyObject *_wrap_HNSW_set_default_probas(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41819 PyObject *resultobj = 0;
41820 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41821 int arg2 ;
41822 float arg3 ;
41823 void *argp1 = 0 ;
41824 int res1 = 0 ;
41825 int val2 ;
41826 int ecode2 = 0 ;
41827 float val3 ;
41828 int ecode3 = 0 ;
41829 PyObject * obj0 = 0 ;
41830 PyObject * obj1 = 0 ;
41831 PyObject * obj2 = 0 ;
41832
41833 if (!PyArg_ParseTuple(args,(char *)"OOO:HNSW_set_default_probas",&obj0,&obj1,&obj2)) SWIG_fail;
41834 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41835 if (!SWIG_IsOK(res1)) {
41836 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_set_default_probas" "', argument " "1"" of type '" "faiss::HNSW *""'");
41837 }
41838 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41839 ecode2 = SWIG_AsVal_int(obj1, &val2);
41840 if (!SWIG_IsOK(ecode2)) {
41841 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_set_default_probas" "', argument " "2"" of type '" "int""'");
41842 }
41843 arg2 = static_cast< int >(val2);
41844 ecode3 = SWIG_AsVal_float(obj2, &val3);
41845 if (!SWIG_IsOK(ecode3)) {
41846 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_set_default_probas" "', argument " "3"" of type '" "float""'");
41847 }
41848 arg3 = static_cast< float >(val3);
41849 {
41850 Py_BEGIN_ALLOW_THREADS
41851 try {
41852 (arg1)->set_default_probas(arg2,arg3);
41853 } catch(faiss::FaissException & e) {
41854 PyEval_RestoreThread(_save);
41855 PyErr_SetString(PyExc_RuntimeError, e.what());
41856 SWIG_fail;
41857 }
41858 Py_END_ALLOW_THREADS
41859 }
41860 resultobj = SWIG_Py_Void();
41861 return resultobj;
41862 fail:
41863 return NULL;
41864 }
41865
41866
41867 SWIGINTERN PyObject *_wrap_HNSW_set_nb_neighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41868 PyObject *resultobj = 0;
41869 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41870 int arg2 ;
41871 int arg3 ;
41872 void *argp1 = 0 ;
41873 int res1 = 0 ;
41874 int val2 ;
41875 int ecode2 = 0 ;
41876 int val3 ;
41877 int ecode3 = 0 ;
41878 PyObject * obj0 = 0 ;
41879 PyObject * obj1 = 0 ;
41880 PyObject * obj2 = 0 ;
41881
41882 if (!PyArg_ParseTuple(args,(char *)"OOO:HNSW_set_nb_neighbors",&obj0,&obj1,&obj2)) SWIG_fail;
41883 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41884 if (!SWIG_IsOK(res1)) {
41885 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_set_nb_neighbors" "', argument " "1"" of type '" "faiss::HNSW *""'");
41886 }
41887 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41888 ecode2 = SWIG_AsVal_int(obj1, &val2);
41889 if (!SWIG_IsOK(ecode2)) {
41890 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_set_nb_neighbors" "', argument " "2"" of type '" "int""'");
41891 }
41892 arg2 = static_cast< int >(val2);
41893 ecode3 = SWIG_AsVal_int(obj2, &val3);
41894 if (!SWIG_IsOK(ecode3)) {
41895 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_set_nb_neighbors" "', argument " "3"" of type '" "int""'");
41896 }
41897 arg3 = static_cast< int >(val3);
41898 {
41899 Py_BEGIN_ALLOW_THREADS
41900 try {
41901 (arg1)->set_nb_neighbors(arg2,arg3);
41902 } catch(faiss::FaissException & e) {
41903 PyEval_RestoreThread(_save);
41904 PyErr_SetString(PyExc_RuntimeError, e.what());
41905 SWIG_fail;
41906 }
41907 Py_END_ALLOW_THREADS
41908 }
41909 resultobj = SWIG_Py_Void();
41910 return resultobj;
41911 fail:
41912 return NULL;
41913 }
41914
41915
41916 SWIGINTERN PyObject *_wrap_HNSW_nb_neighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41917 PyObject *resultobj = 0;
41918 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41919 int arg2 ;
41920 void *argp1 = 0 ;
41921 int res1 = 0 ;
41922 int val2 ;
41923 int ecode2 = 0 ;
41924 PyObject * obj0 = 0 ;
41925 PyObject * obj1 = 0 ;
41926 int result;
41927
41928 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_nb_neighbors",&obj0,&obj1)) SWIG_fail;
41929 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41930 if (!SWIG_IsOK(res1)) {
41931 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_nb_neighbors" "', argument " "1"" of type '" "faiss::HNSW const *""'");
41932 }
41933 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41934 ecode2 = SWIG_AsVal_int(obj1, &val2);
41935 if (!SWIG_IsOK(ecode2)) {
41936 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_nb_neighbors" "', argument " "2"" of type '" "int""'");
41937 }
41938 arg2 = static_cast< int >(val2);
41939 {
41940 Py_BEGIN_ALLOW_THREADS
41941 try {
41942 result = (int)((faiss::HNSW const *)arg1)->nb_neighbors(arg2);
41943 } catch(faiss::FaissException & e) {
41944 PyEval_RestoreThread(_save);
41945 PyErr_SetString(PyExc_RuntimeError, e.what());
41946 SWIG_fail;
41947 }
41948 Py_END_ALLOW_THREADS
41949 }
41950 resultobj = SWIG_From_int(static_cast< int >(result));
41951 return resultobj;
41952 fail:
41953 return NULL;
41954 }
41955
41956
41957 SWIGINTERN PyObject *_wrap_HNSW_cum_nb_neighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41958 PyObject *resultobj = 0;
41959 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
41960 int arg2 ;
41961 void *argp1 = 0 ;
41962 int res1 = 0 ;
41963 int val2 ;
41964 int ecode2 = 0 ;
41965 PyObject * obj0 = 0 ;
41966 PyObject * obj1 = 0 ;
41967 int result;
41968
41969 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_cum_nb_neighbors",&obj0,&obj1)) SWIG_fail;
41970 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
41971 if (!SWIG_IsOK(res1)) {
41972 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_cum_nb_neighbors" "', argument " "1"" of type '" "faiss::HNSW const *""'");
41973 }
41974 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
41975 ecode2 = SWIG_AsVal_int(obj1, &val2);
41976 if (!SWIG_IsOK(ecode2)) {
41977 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_cum_nb_neighbors" "', argument " "2"" of type '" "int""'");
41978 }
41979 arg2 = static_cast< int >(val2);
41980 {
41981 Py_BEGIN_ALLOW_THREADS
41982 try {
41983 result = (int)((faiss::HNSW const *)arg1)->cum_nb_neighbors(arg2);
41984 } catch(faiss::FaissException & e) {
41985 PyEval_RestoreThread(_save);
41986 PyErr_SetString(PyExc_RuntimeError, e.what());
41987 SWIG_fail;
41988 }
41989 Py_END_ALLOW_THREADS
41990 }
41991 resultobj = SWIG_From_int(static_cast< int >(result));
41992 return resultobj;
41993 fail:
41994 return NULL;
41995 }
41996
41997
41998 SWIGINTERN PyObject *_wrap_HNSW_neighbor_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
41999 PyObject *resultobj = 0;
42000 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42001 faiss::HNSW::idx_t arg2 ;
42002 int arg3 ;
42003 size_t *arg4 = (size_t *) 0 ;
42004 size_t *arg5 = (size_t *) 0 ;
42005 void *argp1 = 0 ;
42006 int res1 = 0 ;
42007 long val2 ;
42008 int ecode2 = 0 ;
42009 int val3 ;
42010 int ecode3 = 0 ;
42011 void *argp4 = 0 ;
42012 int res4 = 0 ;
42013 void *argp5 = 0 ;
42014 int res5 = 0 ;
42015 PyObject * obj0 = 0 ;
42016 PyObject * obj1 = 0 ;
42017 PyObject * obj2 = 0 ;
42018 PyObject * obj3 = 0 ;
42019 PyObject * obj4 = 0 ;
42020
42021 if (!PyArg_ParseTuple(args,(char *)"OOOOO:HNSW_neighbor_range",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
42022 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42023 if (!SWIG_IsOK(res1)) {
42024 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_neighbor_range" "', argument " "1"" of type '" "faiss::HNSW const *""'");
42025 }
42026 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42027 ecode2 = SWIG_AsVal_long(obj1, &val2);
42028 if (!SWIG_IsOK(ecode2)) {
42029 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_neighbor_range" "', argument " "2"" of type '" "faiss::HNSW::idx_t""'");
42030 }
42031 arg2 = static_cast< faiss::HNSW::idx_t >(val2);
42032 ecode3 = SWIG_AsVal_int(obj2, &val3);
42033 if (!SWIG_IsOK(ecode3)) {
42034 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_neighbor_range" "', argument " "3"" of type '" "int""'");
42035 }
42036 arg3 = static_cast< int >(val3);
42037 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_long, 0 | 0 );
42038 if (!SWIG_IsOK(res4)) {
42039 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HNSW_neighbor_range" "', argument " "4"" of type '" "size_t *""'");
42040 }
42041 arg4 = reinterpret_cast< size_t * >(argp4);
42042 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_long, 0 | 0 );
42043 if (!SWIG_IsOK(res5)) {
42044 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_neighbor_range" "', argument " "5"" of type '" "size_t *""'");
42045 }
42046 arg5 = reinterpret_cast< size_t * >(argp5);
42047 {
42048 Py_BEGIN_ALLOW_THREADS
42049 try {
42050 ((faiss::HNSW const *)arg1)->neighbor_range(arg2,arg3,arg4,arg5);
42051 } catch(faiss::FaissException & e) {
42052 PyEval_RestoreThread(_save);
42053 PyErr_SetString(PyExc_RuntimeError, e.what());
42054 SWIG_fail;
42055 }
42056 Py_END_ALLOW_THREADS
42057 }
42058 resultobj = SWIG_Py_Void();
42059 return resultobj;
42060 fail:
42061 return NULL;
42062 }
42063
42064
42065 SWIGINTERN PyObject *_wrap_new_HNSW__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42066 PyObject *resultobj = 0;
42067 int arg1 ;
42068 int val1 ;
42069 int ecode1 = 0 ;
42070 PyObject * obj0 = 0 ;
42071 faiss::HNSW *result = 0 ;
42072
42073 if (!PyArg_ParseTuple(args,(char *)"O:new_HNSW",&obj0)) SWIG_fail;
42074 ecode1 = SWIG_AsVal_int(obj0, &val1);
42075 if (!SWIG_IsOK(ecode1)) {
42076 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_HNSW" "', argument " "1"" of type '" "int""'");
42077 }
42078 arg1 = static_cast< int >(val1);
42079 {
42080 Py_BEGIN_ALLOW_THREADS
42081 try {
42082 result = (faiss::HNSW *)new faiss::HNSW(arg1);
42083 } catch(faiss::FaissException & e) {
42084 PyEval_RestoreThread(_save);
42085 PyErr_SetString(PyExc_RuntimeError, e.what());
42086 SWIG_fail;
42087 }
42088 Py_END_ALLOW_THREADS
42089 }
42090 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW, SWIG_POINTER_NEW | 0 );
42091 return resultobj;
42092 fail:
42093 return NULL;
42094 }
42095
42096
42097 SWIGINTERN PyObject *_wrap_new_HNSW__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42098 PyObject *resultobj = 0;
42099 faiss::HNSW *result = 0 ;
42100
42101 if (!PyArg_ParseTuple(args,(char *)":new_HNSW")) SWIG_fail;
42102 {
42103 Py_BEGIN_ALLOW_THREADS
42104 try {
42105 result = (faiss::HNSW *)new faiss::HNSW();
42106 } catch(faiss::FaissException & e) {
42107 PyEval_RestoreThread(_save);
42108 PyErr_SetString(PyExc_RuntimeError, e.what());
42109 SWIG_fail;
42110 }
42111 Py_END_ALLOW_THREADS
42112 }
42113 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW, SWIG_POINTER_NEW | 0 );
42114 return resultobj;
42115 fail:
42116 return NULL;
42117 }
42118
42119
42120 SWIGINTERN PyObject *_wrap_new_HNSW(PyObject *self, PyObject *args) {
42121 Py_ssize_t argc;
42122 PyObject *argv[2] = {
42123 0
42124 };
42125 Py_ssize_t ii;
42126
42127 if (!PyTuple_Check(args)) SWIG_fail;
42128 argc = args ? PyObject_Length(args) : 0;
42129 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
42130 argv[ii] = PyTuple_GET_ITEM(args,ii);
42131 }
42132 if (argc == 0) {
42133 return _wrap_new_HNSW__SWIG_1(self, args);
42134 }
42135 if (argc == 1) {
42136 int _v;
42137 {
42138 int res = SWIG_AsVal_int(argv[0], NULL);
42139 _v = SWIG_CheckState(res);
42140 }
42141 if (_v) {
42142 return _wrap_new_HNSW__SWIG_0(self, args);
42143 }
42144 }
42145
42146 fail:
42147 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_HNSW'.\n"
42148 " Possible C/C++ prototypes are:\n"
42149 " faiss::HNSW::HNSW(int)\n"
42150 " faiss::HNSW::HNSW()\n");
42151 return 0;
42152 }
42153
42154
42155 SWIGINTERN PyObject *_wrap_HNSW_random_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42156 PyObject *resultobj = 0;
42157 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42158 void *argp1 = 0 ;
42159 int res1 = 0 ;
42160 PyObject * obj0 = 0 ;
42161 int result;
42162
42163 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_random_level",&obj0)) SWIG_fail;
42164 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42165 if (!SWIG_IsOK(res1)) {
42166 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_random_level" "', argument " "1"" of type '" "faiss::HNSW *""'");
42167 }
42168 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42169 {
42170 Py_BEGIN_ALLOW_THREADS
42171 try {
42172 result = (int)(arg1)->random_level();
42173 } catch(faiss::FaissException & e) {
42174 PyEval_RestoreThread(_save);
42175 PyErr_SetString(PyExc_RuntimeError, e.what());
42176 SWIG_fail;
42177 }
42178 Py_END_ALLOW_THREADS
42179 }
42180 resultobj = SWIG_From_int(static_cast< int >(result));
42181 return resultobj;
42182 fail:
42183 return NULL;
42184 }
42185
42186
42187 SWIGINTERN PyObject *_wrap_HNSW_fill_with_random_links(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42188 PyObject *resultobj = 0;
42189 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42190 size_t arg2 ;
42191 void *argp1 = 0 ;
42192 int res1 = 0 ;
42193 size_t val2 ;
42194 int ecode2 = 0 ;
42195 PyObject * obj0 = 0 ;
42196 PyObject * obj1 = 0 ;
42197
42198 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_fill_with_random_links",&obj0,&obj1)) SWIG_fail;
42199 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42200 if (!SWIG_IsOK(res1)) {
42201 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_fill_with_random_links" "', argument " "1"" of type '" "faiss::HNSW *""'");
42202 }
42203 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42204 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
42205 if (!SWIG_IsOK(ecode2)) {
42206 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_fill_with_random_links" "', argument " "2"" of type '" "size_t""'");
42207 }
42208 arg2 = static_cast< size_t >(val2);
42209 {
42210 Py_BEGIN_ALLOW_THREADS
42211 try {
42212 (arg1)->fill_with_random_links(arg2);
42213 } catch(faiss::FaissException & e) {
42214 PyEval_RestoreThread(_save);
42215 PyErr_SetString(PyExc_RuntimeError, e.what());
42216 SWIG_fail;
42217 }
42218 Py_END_ALLOW_THREADS
42219 }
42220 resultobj = SWIG_Py_Void();
42221 return resultobj;
42222 fail:
42223 return NULL;
42224 }
42225
42226
42227 SWIGINTERN PyObject *_wrap_HNSW_add_links_starting_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42228 PyObject *resultobj = 0;
42229 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42230 faiss::HNSW::DistanceComputer *arg2 = 0 ;
42231 faiss::HNSW::storage_idx_t arg3 ;
42232 faiss::HNSW::storage_idx_t arg4 ;
42233 float arg5 ;
42234 int arg6 ;
42235 omp_lock_t *arg7 = (omp_lock_t *) 0 ;
42236 faiss::VisitedTable *arg8 = 0 ;
42237 void *argp1 = 0 ;
42238 int res1 = 0 ;
42239 void *argp2 = 0 ;
42240 int res2 = 0 ;
42241 int val3 ;
42242 int ecode3 = 0 ;
42243 int val4 ;
42244 int ecode4 = 0 ;
42245 float val5 ;
42246 int ecode5 = 0 ;
42247 int val6 ;
42248 int ecode6 = 0 ;
42249 void *argp7 = 0 ;
42250 int res7 = 0 ;
42251 void *argp8 = 0 ;
42252 int res8 = 0 ;
42253 PyObject * obj0 = 0 ;
42254 PyObject * obj1 = 0 ;
42255 PyObject * obj2 = 0 ;
42256 PyObject * obj3 = 0 ;
42257 PyObject * obj4 = 0 ;
42258 PyObject * obj5 = 0 ;
42259 PyObject * obj6 = 0 ;
42260 PyObject * obj7 = 0 ;
42261
42262 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:HNSW_add_links_starting_from",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
42263 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42264 if (!SWIG_IsOK(res1)) {
42265 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_add_links_starting_from" "', argument " "1"" of type '" "faiss::HNSW *""'");
42266 }
42267 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42268 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
42269 if (!SWIG_IsOK(res2)) {
42270 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_add_links_starting_from" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42271 }
42272 if (!argp2) {
42273 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_links_starting_from" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42274 }
42275 arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
42276 ecode3 = SWIG_AsVal_int(obj2, &val3);
42277 if (!SWIG_IsOK(ecode3)) {
42278 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_add_links_starting_from" "', argument " "3"" of type '" "faiss::HNSW::storage_idx_t""'");
42279 }
42280 arg3 = static_cast< faiss::HNSW::storage_idx_t >(val3);
42281 ecode4 = SWIG_AsVal_int(obj3, &val4);
42282 if (!SWIG_IsOK(ecode4)) {
42283 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HNSW_add_links_starting_from" "', argument " "4"" of type '" "faiss::HNSW::storage_idx_t""'");
42284 }
42285 arg4 = static_cast< faiss::HNSW::storage_idx_t >(val4);
42286 ecode5 = SWIG_AsVal_float(obj4, &val5);
42287 if (!SWIG_IsOK(ecode5)) {
42288 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "HNSW_add_links_starting_from" "', argument " "5"" of type '" "float""'");
42289 }
42290 arg5 = static_cast< float >(val5);
42291 ecode6 = SWIG_AsVal_int(obj5, &val6);
42292 if (!SWIG_IsOK(ecode6)) {
42293 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "HNSW_add_links_starting_from" "', argument " "6"" of type '" "int""'");
42294 }
42295 arg6 = static_cast< int >(val6);
42296 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_omp_lock_t, 0 | 0 );
42297 if (!SWIG_IsOK(res7)) {
42298 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "HNSW_add_links_starting_from" "', argument " "7"" of type '" "omp_lock_t *""'");
42299 }
42300 arg7 = reinterpret_cast< omp_lock_t * >(argp7);
42301 res8 = SWIG_ConvertPtr(obj7, &argp8, SWIGTYPE_p_faiss__VisitedTable, 0 );
42302 if (!SWIG_IsOK(res8)) {
42303 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "HNSW_add_links_starting_from" "', argument " "8"" of type '" "faiss::VisitedTable &""'");
42304 }
42305 if (!argp8) {
42306 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_links_starting_from" "', argument " "8"" of type '" "faiss::VisitedTable &""'");
42307 }
42308 arg8 = reinterpret_cast< faiss::VisitedTable * >(argp8);
42309 {
42310 Py_BEGIN_ALLOW_THREADS
42311 try {
42312 (arg1)->add_links_starting_from(*arg2,arg3,arg4,arg5,arg6,arg7,*arg8);
42313 } catch(faiss::FaissException & e) {
42314 PyEval_RestoreThread(_save);
42315 PyErr_SetString(PyExc_RuntimeError, e.what());
42316 SWIG_fail;
42317 }
42318 Py_END_ALLOW_THREADS
42319 }
42320 resultobj = SWIG_Py_Void();
42321 return resultobj;
42322 fail:
42323 return NULL;
42324 }
42325
42326
42327 SWIGINTERN PyObject *_wrap_HNSW_add_with_locks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42328 PyObject *resultobj = 0;
42329 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42330 faiss::HNSW::DistanceComputer *arg2 = 0 ;
42331 int arg3 ;
42332 int arg4 ;
42333 std::vector< omp_lock_t > *arg5 = 0 ;
42334 faiss::VisitedTable *arg6 = 0 ;
42335 void *argp1 = 0 ;
42336 int res1 = 0 ;
42337 void *argp2 = 0 ;
42338 int res2 = 0 ;
42339 int val3 ;
42340 int ecode3 = 0 ;
42341 int val4 ;
42342 int ecode4 = 0 ;
42343 void *argp5 = 0 ;
42344 int res5 = 0 ;
42345 void *argp6 = 0 ;
42346 int res6 = 0 ;
42347 PyObject * obj0 = 0 ;
42348 PyObject * obj1 = 0 ;
42349 PyObject * obj2 = 0 ;
42350 PyObject * obj3 = 0 ;
42351 PyObject * obj4 = 0 ;
42352 PyObject * obj5 = 0 ;
42353
42354 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:HNSW_add_with_locks",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
42355 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42356 if (!SWIG_IsOK(res1)) {
42357 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_add_with_locks" "', argument " "1"" of type '" "faiss::HNSW *""'");
42358 }
42359 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42360 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
42361 if (!SWIG_IsOK(res2)) {
42362 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_add_with_locks" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42363 }
42364 if (!argp2) {
42365 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_with_locks" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42366 }
42367 arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
42368 ecode3 = SWIG_AsVal_int(obj2, &val3);
42369 if (!SWIG_IsOK(ecode3)) {
42370 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_add_with_locks" "', argument " "3"" of type '" "int""'");
42371 }
42372 arg3 = static_cast< int >(val3);
42373 ecode4 = SWIG_AsVal_int(obj3, &val4);
42374 if (!SWIG_IsOK(ecode4)) {
42375 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HNSW_add_with_locks" "', argument " "4"" of type '" "int""'");
42376 }
42377 arg4 = static_cast< int >(val4);
42378 res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_std__vectorT_omp_lock_t_t, 0 );
42379 if (!SWIG_IsOK(res5)) {
42380 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_add_with_locks" "', argument " "5"" of type '" "std::vector< omp_lock_t > &""'");
42381 }
42382 if (!argp5) {
42383 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_with_locks" "', argument " "5"" of type '" "std::vector< omp_lock_t > &""'");
42384 }
42385 arg5 = reinterpret_cast< std::vector< omp_lock_t > * >(argp5);
42386 res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_faiss__VisitedTable, 0 );
42387 if (!SWIG_IsOK(res6)) {
42388 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "HNSW_add_with_locks" "', argument " "6"" of type '" "faiss::VisitedTable &""'");
42389 }
42390 if (!argp6) {
42391 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_add_with_locks" "', argument " "6"" of type '" "faiss::VisitedTable &""'");
42392 }
42393 arg6 = reinterpret_cast< faiss::VisitedTable * >(argp6);
42394 {
42395 Py_BEGIN_ALLOW_THREADS
42396 try {
42397 (arg1)->add_with_locks(*arg2,arg3,arg4,*arg5,*arg6);
42398 } catch(faiss::FaissException & e) {
42399 PyEval_RestoreThread(_save);
42400 PyErr_SetString(PyExc_RuntimeError, e.what());
42401 SWIG_fail;
42402 }
42403 Py_END_ALLOW_THREADS
42404 }
42405 resultobj = SWIG_Py_Void();
42406 return resultobj;
42407 fail:
42408 return NULL;
42409 }
42410
42411
42412 SWIGINTERN PyObject *_wrap_HNSW_search_from_candidates__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42413 PyObject *resultobj = 0;
42414 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42415 faiss::HNSW::DistanceComputer *arg2 = 0 ;
42416 int arg3 ;
42417 faiss::HNSW::idx_t *arg4 = (faiss::HNSW::idx_t *) 0 ;
42418 float *arg5 = (float *) 0 ;
42419 faiss::HNSW::MinimaxHeap *arg6 = 0 ;
42420 faiss::VisitedTable *arg7 = 0 ;
42421 int arg8 ;
42422 int arg9 ;
42423 void *argp1 = 0 ;
42424 int res1 = 0 ;
42425 void *argp2 = 0 ;
42426 int res2 = 0 ;
42427 int val3 ;
42428 int ecode3 = 0 ;
42429 void *argp4 = 0 ;
42430 int res4 = 0 ;
42431 void *argp5 = 0 ;
42432 int res5 = 0 ;
42433 void *argp6 = 0 ;
42434 int res6 = 0 ;
42435 void *argp7 = 0 ;
42436 int res7 = 0 ;
42437 int val8 ;
42438 int ecode8 = 0 ;
42439 int val9 ;
42440 int ecode9 = 0 ;
42441 PyObject * obj0 = 0 ;
42442 PyObject * obj1 = 0 ;
42443 PyObject * obj2 = 0 ;
42444 PyObject * obj3 = 0 ;
42445 PyObject * obj4 = 0 ;
42446 PyObject * obj5 = 0 ;
42447 PyObject * obj6 = 0 ;
42448 PyObject * obj7 = 0 ;
42449 PyObject * obj8 = 0 ;
42450 int result;
42451
42452 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:HNSW_search_from_candidates",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
42453 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42454 if (!SWIG_IsOK(res1)) {
42455 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_search_from_candidates" "', argument " "1"" of type '" "faiss::HNSW const *""'");
42456 }
42457 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42458 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
42459 if (!SWIG_IsOK(res2)) {
42460 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_search_from_candidates" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42461 }
42462 if (!argp2) {
42463 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42464 }
42465 arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
42466 ecode3 = SWIG_AsVal_int(obj2, &val3);
42467 if (!SWIG_IsOK(ecode3)) {
42468 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_search_from_candidates" "', argument " "3"" of type '" "int""'");
42469 }
42470 arg3 = static_cast< int >(val3);
42471 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
42472 if (!SWIG_IsOK(res4)) {
42473 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HNSW_search_from_candidates" "', argument " "4"" of type '" "faiss::HNSW::idx_t *""'");
42474 }
42475 arg4 = reinterpret_cast< faiss::HNSW::idx_t * >(argp4);
42476 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
42477 if (!SWIG_IsOK(res5)) {
42478 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_search_from_candidates" "', argument " "5"" of type '" "float *""'");
42479 }
42480 arg5 = reinterpret_cast< float * >(argp5);
42481 res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_faiss__HNSW__MinimaxHeap, 0 );
42482 if (!SWIG_IsOK(res6)) {
42483 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "HNSW_search_from_candidates" "', argument " "6"" of type '" "faiss::HNSW::MinimaxHeap &""'");
42484 }
42485 if (!argp6) {
42486 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "6"" of type '" "faiss::HNSW::MinimaxHeap &""'");
42487 }
42488 arg6 = reinterpret_cast< faiss::HNSW::MinimaxHeap * >(argp6);
42489 res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_faiss__VisitedTable, 0 );
42490 if (!SWIG_IsOK(res7)) {
42491 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "HNSW_search_from_candidates" "', argument " "7"" of type '" "faiss::VisitedTable &""'");
42492 }
42493 if (!argp7) {
42494 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "7"" of type '" "faiss::VisitedTable &""'");
42495 }
42496 arg7 = reinterpret_cast< faiss::VisitedTable * >(argp7);
42497 ecode8 = SWIG_AsVal_int(obj7, &val8);
42498 if (!SWIG_IsOK(ecode8)) {
42499 SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "HNSW_search_from_candidates" "', argument " "8"" of type '" "int""'");
42500 }
42501 arg8 = static_cast< int >(val8);
42502 ecode9 = SWIG_AsVal_int(obj8, &val9);
42503 if (!SWIG_IsOK(ecode9)) {
42504 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "HNSW_search_from_candidates" "', argument " "9"" of type '" "int""'");
42505 }
42506 arg9 = static_cast< int >(val9);
42507 {
42508 Py_BEGIN_ALLOW_THREADS
42509 try {
42510 result = (int)((faiss::HNSW const *)arg1)->search_from_candidates(*arg2,arg3,arg4,arg5,*arg6,*arg7,arg8,arg9);
42511 } catch(faiss::FaissException & e) {
42512 PyEval_RestoreThread(_save);
42513 PyErr_SetString(PyExc_RuntimeError, e.what());
42514 SWIG_fail;
42515 }
42516 Py_END_ALLOW_THREADS
42517 }
42518 resultobj = SWIG_From_int(static_cast< int >(result));
42519 return resultobj;
42520 fail:
42521 return NULL;
42522 }
42523
42524
42525 SWIGINTERN PyObject *_wrap_HNSW_search_from_candidates__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42526 PyObject *resultobj = 0;
42527 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42528 faiss::HNSW::DistanceComputer *arg2 = 0 ;
42529 int arg3 ;
42530 faiss::HNSW::idx_t *arg4 = (faiss::HNSW::idx_t *) 0 ;
42531 float *arg5 = (float *) 0 ;
42532 faiss::HNSW::MinimaxHeap *arg6 = 0 ;
42533 faiss::VisitedTable *arg7 = 0 ;
42534 int arg8 ;
42535 void *argp1 = 0 ;
42536 int res1 = 0 ;
42537 void *argp2 = 0 ;
42538 int res2 = 0 ;
42539 int val3 ;
42540 int ecode3 = 0 ;
42541 void *argp4 = 0 ;
42542 int res4 = 0 ;
42543 void *argp5 = 0 ;
42544 int res5 = 0 ;
42545 void *argp6 = 0 ;
42546 int res6 = 0 ;
42547 void *argp7 = 0 ;
42548 int res7 = 0 ;
42549 int val8 ;
42550 int ecode8 = 0 ;
42551 PyObject * obj0 = 0 ;
42552 PyObject * obj1 = 0 ;
42553 PyObject * obj2 = 0 ;
42554 PyObject * obj3 = 0 ;
42555 PyObject * obj4 = 0 ;
42556 PyObject * obj5 = 0 ;
42557 PyObject * obj6 = 0 ;
42558 PyObject * obj7 = 0 ;
42559 int result;
42560
42561 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:HNSW_search_from_candidates",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
42562 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42563 if (!SWIG_IsOK(res1)) {
42564 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_search_from_candidates" "', argument " "1"" of type '" "faiss::HNSW const *""'");
42565 }
42566 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42567 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
42568 if (!SWIG_IsOK(res2)) {
42569 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_search_from_candidates" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42570 }
42571 if (!argp2) {
42572 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42573 }
42574 arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
42575 ecode3 = SWIG_AsVal_int(obj2, &val3);
42576 if (!SWIG_IsOK(ecode3)) {
42577 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_search_from_candidates" "', argument " "3"" of type '" "int""'");
42578 }
42579 arg3 = static_cast< int >(val3);
42580 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
42581 if (!SWIG_IsOK(res4)) {
42582 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HNSW_search_from_candidates" "', argument " "4"" of type '" "faiss::HNSW::idx_t *""'");
42583 }
42584 arg4 = reinterpret_cast< faiss::HNSW::idx_t * >(argp4);
42585 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
42586 if (!SWIG_IsOK(res5)) {
42587 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_search_from_candidates" "', argument " "5"" of type '" "float *""'");
42588 }
42589 arg5 = reinterpret_cast< float * >(argp5);
42590 res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_faiss__HNSW__MinimaxHeap, 0 );
42591 if (!SWIG_IsOK(res6)) {
42592 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "HNSW_search_from_candidates" "', argument " "6"" of type '" "faiss::HNSW::MinimaxHeap &""'");
42593 }
42594 if (!argp6) {
42595 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "6"" of type '" "faiss::HNSW::MinimaxHeap &""'");
42596 }
42597 arg6 = reinterpret_cast< faiss::HNSW::MinimaxHeap * >(argp6);
42598 res7 = SWIG_ConvertPtr(obj6, &argp7, SWIGTYPE_p_faiss__VisitedTable, 0 );
42599 if (!SWIG_IsOK(res7)) {
42600 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "HNSW_search_from_candidates" "', argument " "7"" of type '" "faiss::VisitedTable &""'");
42601 }
42602 if (!argp7) {
42603 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from_candidates" "', argument " "7"" of type '" "faiss::VisitedTable &""'");
42604 }
42605 arg7 = reinterpret_cast< faiss::VisitedTable * >(argp7);
42606 ecode8 = SWIG_AsVal_int(obj7, &val8);
42607 if (!SWIG_IsOK(ecode8)) {
42608 SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "HNSW_search_from_candidates" "', argument " "8"" of type '" "int""'");
42609 }
42610 arg8 = static_cast< int >(val8);
42611 {
42612 Py_BEGIN_ALLOW_THREADS
42613 try {
42614 result = (int)((faiss::HNSW const *)arg1)->search_from_candidates(*arg2,arg3,arg4,arg5,*arg6,*arg7,arg8);
42615 } catch(faiss::FaissException & e) {
42616 PyEval_RestoreThread(_save);
42617 PyErr_SetString(PyExc_RuntimeError, e.what());
42618 SWIG_fail;
42619 }
42620 Py_END_ALLOW_THREADS
42621 }
42622 resultobj = SWIG_From_int(static_cast< int >(result));
42623 return resultobj;
42624 fail:
42625 return NULL;
42626 }
42627
42628
42629 SWIGINTERN PyObject *_wrap_HNSW_search_from_candidates(PyObject *self, PyObject *args) {
42630 Py_ssize_t argc;
42631 PyObject *argv[10] = {
42632 0
42633 };
42634 Py_ssize_t ii;
42635
42636 if (!PyTuple_Check(args)) SWIG_fail;
42637 argc = args ? PyObject_Length(args) : 0;
42638 for (ii = 0; (ii < 9) && (ii < argc); ii++) {
42639 argv[ii] = PyTuple_GET_ITEM(args,ii);
42640 }
42641 if (argc == 8) {
42642 int _v;
42643 void *vptr = 0;
42644 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HNSW, 0);
42645 _v = SWIG_CheckState(res);
42646 if (_v) {
42647 void *vptr = 0;
42648 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0);
42649 _v = SWIG_CheckState(res);
42650 if (_v) {
42651 {
42652 int res = SWIG_AsVal_int(argv[2], NULL);
42653 _v = SWIG_CheckState(res);
42654 }
42655 if (_v) {
42656 void *vptr = 0;
42657 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
42658 _v = SWIG_CheckState(res);
42659 if (_v) {
42660 void *vptr = 0;
42661 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
42662 _v = SWIG_CheckState(res);
42663 if (_v) {
42664 void *vptr = 0;
42665 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HNSW__MinimaxHeap, 0);
42666 _v = SWIG_CheckState(res);
42667 if (_v) {
42668 void *vptr = 0;
42669 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_faiss__VisitedTable, 0);
42670 _v = SWIG_CheckState(res);
42671 if (_v) {
42672 {
42673 int res = SWIG_AsVal_int(argv[7], NULL);
42674 _v = SWIG_CheckState(res);
42675 }
42676 if (_v) {
42677 return _wrap_HNSW_search_from_candidates__SWIG_1(self, args);
42678 }
42679 }
42680 }
42681 }
42682 }
42683 }
42684 }
42685 }
42686 }
42687 if (argc == 9) {
42688 int _v;
42689 void *vptr = 0;
42690 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HNSW, 0);
42691 _v = SWIG_CheckState(res);
42692 if (_v) {
42693 void *vptr = 0;
42694 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0);
42695 _v = SWIG_CheckState(res);
42696 if (_v) {
42697 {
42698 int res = SWIG_AsVal_int(argv[2], NULL);
42699 _v = SWIG_CheckState(res);
42700 }
42701 if (_v) {
42702 void *vptr = 0;
42703 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
42704 _v = SWIG_CheckState(res);
42705 if (_v) {
42706 void *vptr = 0;
42707 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
42708 _v = SWIG_CheckState(res);
42709 if (_v) {
42710 void *vptr = 0;
42711 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_faiss__HNSW__MinimaxHeap, 0);
42712 _v = SWIG_CheckState(res);
42713 if (_v) {
42714 void *vptr = 0;
42715 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_faiss__VisitedTable, 0);
42716 _v = SWIG_CheckState(res);
42717 if (_v) {
42718 {
42719 int res = SWIG_AsVal_int(argv[7], NULL);
42720 _v = SWIG_CheckState(res);
42721 }
42722 if (_v) {
42723 {
42724 int res = SWIG_AsVal_int(argv[8], NULL);
42725 _v = SWIG_CheckState(res);
42726 }
42727 if (_v) {
42728 return _wrap_HNSW_search_from_candidates__SWIG_0(self, args);
42729 }
42730 }
42731 }
42732 }
42733 }
42734 }
42735 }
42736 }
42737 }
42738 }
42739
42740 fail:
42741 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'HNSW_search_from_candidates'.\n"
42742 " Possible C/C++ prototypes are:\n"
42743 " faiss::HNSW::search_from_candidates(faiss::HNSW::DistanceComputer &,int,faiss::HNSW::idx_t *,float *,faiss::HNSW::MinimaxHeap &,faiss::VisitedTable &,int,int) const\n"
42744 " faiss::HNSW::search_from_candidates(faiss::HNSW::DistanceComputer &,int,faiss::HNSW::idx_t *,float *,faiss::HNSW::MinimaxHeap &,faiss::VisitedTable &,int) const\n");
42745 return 0;
42746 }
42747
42748
42749 SWIGINTERN PyObject *_wrap_HNSW_search_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42750 PyObject *resultobj = 0;
42751 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42752 faiss::HNSW::Node *arg2 = 0 ;
42753 faiss::HNSW::DistanceComputer *arg3 = 0 ;
42754 int arg4 ;
42755 faiss::VisitedTable *arg5 = (faiss::VisitedTable *) 0 ;
42756 void *argp1 = 0 ;
42757 int res1 = 0 ;
42758 void *argp2 = 0 ;
42759 int res2 = 0 ;
42760 void *argp3 = 0 ;
42761 int res3 = 0 ;
42762 int val4 ;
42763 int ecode4 = 0 ;
42764 void *argp5 = 0 ;
42765 int res5 = 0 ;
42766 PyObject * obj0 = 0 ;
42767 PyObject * obj1 = 0 ;
42768 PyObject * obj2 = 0 ;
42769 PyObject * obj3 = 0 ;
42770 PyObject * obj4 = 0 ;
42771 std::priority_queue< faiss::HNSW::Node > result;
42772
42773 if (!PyArg_ParseTuple(args,(char *)"OOOOO:HNSW_search_from",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
42774 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42775 if (!SWIG_IsOK(res1)) {
42776 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_search_from" "', argument " "1"" of type '" "faiss::HNSW const *""'");
42777 }
42778 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42779 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__pairT_float_int_t, 0 | 0);
42780 if (!SWIG_IsOK(res2)) {
42781 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_search_from" "', argument " "2"" of type '" "faiss::HNSW::Node const &""'");
42782 }
42783 if (!argp2) {
42784 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from" "', argument " "2"" of type '" "faiss::HNSW::Node const &""'");
42785 }
42786 arg2 = reinterpret_cast< faiss::HNSW::Node * >(argp2);
42787 res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
42788 if (!SWIG_IsOK(res3)) {
42789 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HNSW_search_from" "', argument " "3"" of type '" "faiss::HNSW::DistanceComputer &""'");
42790 }
42791 if (!argp3) {
42792 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search_from" "', argument " "3"" of type '" "faiss::HNSW::DistanceComputer &""'");
42793 }
42794 arg3 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp3);
42795 ecode4 = SWIG_AsVal_int(obj3, &val4);
42796 if (!SWIG_IsOK(ecode4)) {
42797 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HNSW_search_from" "', argument " "4"" of type '" "int""'");
42798 }
42799 arg4 = static_cast< int >(val4);
42800 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
42801 if (!SWIG_IsOK(res5)) {
42802 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_search_from" "', argument " "5"" of type '" "faiss::VisitedTable *""'");
42803 }
42804 arg5 = reinterpret_cast< faiss::VisitedTable * >(argp5);
42805 {
42806 Py_BEGIN_ALLOW_THREADS
42807 try {
42808 result = ((faiss::HNSW const *)arg1)->search_from((faiss::HNSW::Node const &)*arg2,*arg3,arg4,arg5);
42809 } catch(faiss::FaissException & e) {
42810 PyEval_RestoreThread(_save);
42811 PyErr_SetString(PyExc_RuntimeError, e.what());
42812 SWIG_fail;
42813 }
42814 Py_END_ALLOW_THREADS
42815 }
42816 resultobj = SWIG_NewPointerObj((new std::priority_queue< faiss::HNSW::Node >(static_cast< const std::priority_queue< faiss::HNSW::Node >& >(result))), SWIGTYPE_p_std__priority_queueT_std__pairT_float_int_t_t, SWIG_POINTER_OWN | 0 );
42817 return resultobj;
42818 fail:
42819 return NULL;
42820 }
42821
42822
42823 SWIGINTERN PyObject *_wrap_HNSW_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42824 PyObject *resultobj = 0;
42825 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42826 faiss::HNSW::DistanceComputer *arg2 = 0 ;
42827 int arg3 ;
42828 faiss::HNSW::idx_t *arg4 = (faiss::HNSW::idx_t *) 0 ;
42829 float *arg5 = (float *) 0 ;
42830 faiss::VisitedTable *arg6 = 0 ;
42831 void *argp1 = 0 ;
42832 int res1 = 0 ;
42833 void *argp2 = 0 ;
42834 int res2 = 0 ;
42835 int val3 ;
42836 int ecode3 = 0 ;
42837 void *argp4 = 0 ;
42838 int res4 = 0 ;
42839 void *argp5 = 0 ;
42840 int res5 = 0 ;
42841 void *argp6 = 0 ;
42842 int res6 = 0 ;
42843 PyObject * obj0 = 0 ;
42844 PyObject * obj1 = 0 ;
42845 PyObject * obj2 = 0 ;
42846 PyObject * obj3 = 0 ;
42847 PyObject * obj4 = 0 ;
42848 PyObject * obj5 = 0 ;
42849
42850 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:HNSW_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
42851 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42852 if (!SWIG_IsOK(res1)) {
42853 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_search" "', argument " "1"" of type '" "faiss::HNSW const *""'");
42854 }
42855 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42856 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
42857 if (!SWIG_IsOK(res2)) {
42858 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_search" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42859 }
42860 if (!argp2) {
42861 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search" "', argument " "2"" of type '" "faiss::HNSW::DistanceComputer &""'");
42862 }
42863 arg2 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp2);
42864 ecode3 = SWIG_AsVal_int(obj2, &val3);
42865 if (!SWIG_IsOK(ecode3)) {
42866 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_search" "', argument " "3"" of type '" "int""'");
42867 }
42868 arg3 = static_cast< int >(val3);
42869 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
42870 if (!SWIG_IsOK(res4)) {
42871 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "HNSW_search" "', argument " "4"" of type '" "faiss::HNSW::idx_t *""'");
42872 }
42873 arg4 = reinterpret_cast< faiss::HNSW::idx_t * >(argp4);
42874 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
42875 if (!SWIG_IsOK(res5)) {
42876 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "HNSW_search" "', argument " "5"" of type '" "float *""'");
42877 }
42878 arg5 = reinterpret_cast< float * >(argp5);
42879 res6 = SWIG_ConvertPtr(obj5, &argp6, SWIGTYPE_p_faiss__VisitedTable, 0 );
42880 if (!SWIG_IsOK(res6)) {
42881 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "HNSW_search" "', argument " "6"" of type '" "faiss::VisitedTable &""'");
42882 }
42883 if (!argp6) {
42884 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_search" "', argument " "6"" of type '" "faiss::VisitedTable &""'");
42885 }
42886 arg6 = reinterpret_cast< faiss::VisitedTable * >(argp6);
42887 {
42888 Py_BEGIN_ALLOW_THREADS
42889 try {
42890 ((faiss::HNSW const *)arg1)->search(*arg2,arg3,arg4,arg5,*arg6);
42891 } catch(faiss::FaissException & e) {
42892 PyEval_RestoreThread(_save);
42893 PyErr_SetString(PyExc_RuntimeError, e.what());
42894 SWIG_fail;
42895 }
42896 Py_END_ALLOW_THREADS
42897 }
42898 resultobj = SWIG_Py_Void();
42899 return resultobj;
42900 fail:
42901 return NULL;
42902 }
42903
42904
42905 SWIGINTERN PyObject *_wrap_HNSW_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42906 PyObject *resultobj = 0;
42907 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42908 void *argp1 = 0 ;
42909 int res1 = 0 ;
42910 PyObject * obj0 = 0 ;
42911
42912 if (!PyArg_ParseTuple(args,(char *)"O:HNSW_reset",&obj0)) SWIG_fail;
42913 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42914 if (!SWIG_IsOK(res1)) {
42915 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_reset" "', argument " "1"" of type '" "faiss::HNSW *""'");
42916 }
42917 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42918 {
42919 Py_BEGIN_ALLOW_THREADS
42920 try {
42921 (arg1)->reset();
42922 } catch(faiss::FaissException & e) {
42923 PyEval_RestoreThread(_save);
42924 PyErr_SetString(PyExc_RuntimeError, e.what());
42925 SWIG_fail;
42926 }
42927 Py_END_ALLOW_THREADS
42928 }
42929 resultobj = SWIG_Py_Void();
42930 return resultobj;
42931 fail:
42932 return NULL;
42933 }
42934
42935
42936 SWIGINTERN PyObject *_wrap_HNSW_clear_neighbor_tables(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42937 PyObject *resultobj = 0;
42938 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42939 int arg2 ;
42940 void *argp1 = 0 ;
42941 int res1 = 0 ;
42942 int val2 ;
42943 int ecode2 = 0 ;
42944 PyObject * obj0 = 0 ;
42945 PyObject * obj1 = 0 ;
42946
42947 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_clear_neighbor_tables",&obj0,&obj1)) SWIG_fail;
42948 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42949 if (!SWIG_IsOK(res1)) {
42950 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_clear_neighbor_tables" "', argument " "1"" of type '" "faiss::HNSW *""'");
42951 }
42952 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42953 ecode2 = SWIG_AsVal_int(obj1, &val2);
42954 if (!SWIG_IsOK(ecode2)) {
42955 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_clear_neighbor_tables" "', argument " "2"" of type '" "int""'");
42956 }
42957 arg2 = static_cast< int >(val2);
42958 {
42959 Py_BEGIN_ALLOW_THREADS
42960 try {
42961 (arg1)->clear_neighbor_tables(arg2);
42962 } catch(faiss::FaissException & e) {
42963 PyEval_RestoreThread(_save);
42964 PyErr_SetString(PyExc_RuntimeError, e.what());
42965 SWIG_fail;
42966 }
42967 Py_END_ALLOW_THREADS
42968 }
42969 resultobj = SWIG_Py_Void();
42970 return resultobj;
42971 fail:
42972 return NULL;
42973 }
42974
42975
42976 SWIGINTERN PyObject *_wrap_HNSW_print_neighbor_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
42977 PyObject *resultobj = 0;
42978 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
42979 int arg2 ;
42980 void *argp1 = 0 ;
42981 int res1 = 0 ;
42982 int val2 ;
42983 int ecode2 = 0 ;
42984 PyObject * obj0 = 0 ;
42985 PyObject * obj1 = 0 ;
42986
42987 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_print_neighbor_stats",&obj0,&obj1)) SWIG_fail;
42988 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
42989 if (!SWIG_IsOK(res1)) {
42990 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_print_neighbor_stats" "', argument " "1"" of type '" "faiss::HNSW const *""'");
42991 }
42992 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
42993 ecode2 = SWIG_AsVal_int(obj1, &val2);
42994 if (!SWIG_IsOK(ecode2)) {
42995 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_print_neighbor_stats" "', argument " "2"" of type '" "int""'");
42996 }
42997 arg2 = static_cast< int >(val2);
42998 {
42999 Py_BEGIN_ALLOW_THREADS
43000 try {
43001 ((faiss::HNSW const *)arg1)->print_neighbor_stats(arg2);
43002 } catch(faiss::FaissException & e) {
43003 PyEval_RestoreThread(_save);
43004 PyErr_SetString(PyExc_RuntimeError, e.what());
43005 SWIG_fail;
43006 }
43007 Py_END_ALLOW_THREADS
43008 }
43009 resultobj = SWIG_Py_Void();
43010 return resultobj;
43011 fail:
43012 return NULL;
43013 }
43014
43015
43016 SWIGINTERN PyObject *_wrap_HNSW_prepare_level_tab__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43017 PyObject *resultobj = 0;
43018 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43019 size_t arg2 ;
43020 bool arg3 ;
43021 void *argp1 = 0 ;
43022 int res1 = 0 ;
43023 size_t val2 ;
43024 int ecode2 = 0 ;
43025 bool val3 ;
43026 int ecode3 = 0 ;
43027 PyObject * obj0 = 0 ;
43028 PyObject * obj1 = 0 ;
43029 PyObject * obj2 = 0 ;
43030 int result;
43031
43032 if (!PyArg_ParseTuple(args,(char *)"OOO:HNSW_prepare_level_tab",&obj0,&obj1,&obj2)) SWIG_fail;
43033 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43034 if (!SWIG_IsOK(res1)) {
43035 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_prepare_level_tab" "', argument " "1"" of type '" "faiss::HNSW *""'");
43036 }
43037 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43038 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
43039 if (!SWIG_IsOK(ecode2)) {
43040 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_prepare_level_tab" "', argument " "2"" of type '" "size_t""'");
43041 }
43042 arg2 = static_cast< size_t >(val2);
43043 ecode3 = SWIG_AsVal_bool(obj2, &val3);
43044 if (!SWIG_IsOK(ecode3)) {
43045 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "HNSW_prepare_level_tab" "', argument " "3"" of type '" "bool""'");
43046 }
43047 arg3 = static_cast< bool >(val3);
43048 {
43049 Py_BEGIN_ALLOW_THREADS
43050 try {
43051 result = (int)(arg1)->prepare_level_tab(arg2,arg3);
43052 } catch(faiss::FaissException & e) {
43053 PyEval_RestoreThread(_save);
43054 PyErr_SetString(PyExc_RuntimeError, e.what());
43055 SWIG_fail;
43056 }
43057 Py_END_ALLOW_THREADS
43058 }
43059 resultobj = SWIG_From_int(static_cast< int >(result));
43060 return resultobj;
43061 fail:
43062 return NULL;
43063 }
43064
43065
43066 SWIGINTERN PyObject *_wrap_HNSW_prepare_level_tab__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43067 PyObject *resultobj = 0;
43068 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43069 size_t arg2 ;
43070 void *argp1 = 0 ;
43071 int res1 = 0 ;
43072 size_t val2 ;
43073 int ecode2 = 0 ;
43074 PyObject * obj0 = 0 ;
43075 PyObject * obj1 = 0 ;
43076 int result;
43077
43078 if (!PyArg_ParseTuple(args,(char *)"OO:HNSW_prepare_level_tab",&obj0,&obj1)) SWIG_fail;
43079 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
43080 if (!SWIG_IsOK(res1)) {
43081 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_prepare_level_tab" "', argument " "1"" of type '" "faiss::HNSW *""'");
43082 }
43083 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43084 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
43085 if (!SWIG_IsOK(ecode2)) {
43086 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSW_prepare_level_tab" "', argument " "2"" of type '" "size_t""'");
43087 }
43088 arg2 = static_cast< size_t >(val2);
43089 {
43090 Py_BEGIN_ALLOW_THREADS
43091 try {
43092 result = (int)(arg1)->prepare_level_tab(arg2);
43093 } catch(faiss::FaissException & e) {
43094 PyEval_RestoreThread(_save);
43095 PyErr_SetString(PyExc_RuntimeError, e.what());
43096 SWIG_fail;
43097 }
43098 Py_END_ALLOW_THREADS
43099 }
43100 resultobj = SWIG_From_int(static_cast< int >(result));
43101 return resultobj;
43102 fail:
43103 return NULL;
43104 }
43105
43106
43107 SWIGINTERN PyObject *_wrap_HNSW_prepare_level_tab(PyObject *self, PyObject *args) {
43108 Py_ssize_t argc;
43109 PyObject *argv[4] = {
43110 0
43111 };
43112 Py_ssize_t ii;
43113
43114 if (!PyTuple_Check(args)) SWIG_fail;
43115 argc = args ? PyObject_Length(args) : 0;
43116 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
43117 argv[ii] = PyTuple_GET_ITEM(args,ii);
43118 }
43119 if (argc == 2) {
43120 int _v;
43121 void *vptr = 0;
43122 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HNSW, 0);
43123 _v = SWIG_CheckState(res);
43124 if (_v) {
43125 {
43126 int res = SWIG_AsVal_size_t(argv[1], NULL);
43127 _v = SWIG_CheckState(res);
43128 }
43129 if (_v) {
43130 return _wrap_HNSW_prepare_level_tab__SWIG_1(self, args);
43131 }
43132 }
43133 }
43134 if (argc == 3) {
43135 int _v;
43136 void *vptr = 0;
43137 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HNSW, 0);
43138 _v = SWIG_CheckState(res);
43139 if (_v) {
43140 {
43141 int res = SWIG_AsVal_size_t(argv[1], NULL);
43142 _v = SWIG_CheckState(res);
43143 }
43144 if (_v) {
43145 {
43146 int res = SWIG_AsVal_bool(argv[2], NULL);
43147 _v = SWIG_CheckState(res);
43148 }
43149 if (_v) {
43150 return _wrap_HNSW_prepare_level_tab__SWIG_0(self, args);
43151 }
43152 }
43153 }
43154 }
43155
43156 fail:
43157 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'HNSW_prepare_level_tab'.\n"
43158 " Possible C/C++ prototypes are:\n"
43159 " faiss::HNSW::prepare_level_tab(size_t,bool)\n"
43160 " faiss::HNSW::prepare_level_tab(size_t)\n");
43161 return 0;
43162 }
43163
43164
43165 SWIGINTERN PyObject *_wrap_HNSW_shrink_neighbor_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43166 PyObject *resultobj = 0;
43167 faiss::HNSW::DistanceComputer *arg1 = 0 ;
43168 std::priority_queue< faiss::HNSW::NodeDistFarther > *arg2 = 0 ;
43169 std::vector< faiss::HNSW::NodeDistFarther > *arg3 = 0 ;
43170 int arg4 ;
43171 void *argp1 = 0 ;
43172 int res1 = 0 ;
43173 void *argp2 = 0 ;
43174 int res2 = 0 ;
43175 void *argp3 = 0 ;
43176 int res3 = 0 ;
43177 int val4 ;
43178 int ecode4 = 0 ;
43179 PyObject * obj0 = 0 ;
43180 PyObject * obj1 = 0 ;
43181 PyObject * obj2 = 0 ;
43182 PyObject * obj3 = 0 ;
43183
43184 if (!PyArg_ParseTuple(args,(char *)"OOOO:HNSW_shrink_neighbor_list",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
43185 res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 );
43186 if (!SWIG_IsOK(res1)) {
43187 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSW_shrink_neighbor_list" "', argument " "1"" of type '" "faiss::HNSW::DistanceComputer &""'");
43188 }
43189 if (!argp1) {
43190 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_shrink_neighbor_list" "', argument " "1"" of type '" "faiss::HNSW::DistanceComputer &""'");
43191 }
43192 arg1 = reinterpret_cast< faiss::HNSW::DistanceComputer * >(argp1);
43193 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t, 0 );
43194 if (!SWIG_IsOK(res2)) {
43195 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "HNSW_shrink_neighbor_list" "', argument " "2"" of type '" "std::priority_queue< faiss::HNSW::NodeDistFarther > &""'");
43196 }
43197 if (!argp2) {
43198 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_shrink_neighbor_list" "', argument " "2"" of type '" "std::priority_queue< faiss::HNSW::NodeDistFarther > &""'");
43199 }
43200 arg2 = reinterpret_cast< std::priority_queue< faiss::HNSW::NodeDistFarther > * >(argp2);
43201 res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_std__vectorT_faiss__HNSW__NodeDistFarther_t, 0 );
43202 if (!SWIG_IsOK(res3)) {
43203 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "HNSW_shrink_neighbor_list" "', argument " "3"" of type '" "std::vector< faiss::HNSW::NodeDistFarther > &""'");
43204 }
43205 if (!argp3) {
43206 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "HNSW_shrink_neighbor_list" "', argument " "3"" of type '" "std::vector< faiss::HNSW::NodeDistFarther > &""'");
43207 }
43208 arg3 = reinterpret_cast< std::vector< faiss::HNSW::NodeDistFarther > * >(argp3);
43209 ecode4 = SWIG_AsVal_int(obj3, &val4);
43210 if (!SWIG_IsOK(ecode4)) {
43211 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "HNSW_shrink_neighbor_list" "', argument " "4"" of type '" "int""'");
43212 }
43213 arg4 = static_cast< int >(val4);
43214 {
43215 Py_BEGIN_ALLOW_THREADS
43216 try {
43217 faiss::HNSW::shrink_neighbor_list(*arg1,*arg2,*arg3,arg4);
43218 } catch(faiss::FaissException & e) {
43219 PyEval_RestoreThread(_save);
43220 PyErr_SetString(PyExc_RuntimeError, e.what());
43221 SWIG_fail;
43222 }
43223 Py_END_ALLOW_THREADS
43224 }
43225 resultobj = SWIG_Py_Void();
43226 return resultobj;
43227 fail:
43228 return NULL;
43229 }
43230
43231
43232 SWIGINTERN PyObject *_wrap_delete_HNSW(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43233 PyObject *resultobj = 0;
43234 faiss::HNSW *arg1 = (faiss::HNSW *) 0 ;
43235 void *argp1 = 0 ;
43236 int res1 = 0 ;
43237 PyObject * obj0 = 0 ;
43238
43239 if (!PyArg_ParseTuple(args,(char *)"O:delete_HNSW",&obj0)) SWIG_fail;
43240 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSW, SWIG_POINTER_DISOWN | 0 );
43241 if (!SWIG_IsOK(res1)) {
43242 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HNSW" "', argument " "1"" of type '" "faiss::HNSW *""'");
43243 }
43244 arg1 = reinterpret_cast< faiss::HNSW * >(argp1);
43245 delete arg1;
43246 resultobj = SWIG_Py_Void();
43247 return resultobj;
43248 fail:
43249 return NULL;
43250 }
43251
43252
43253 SWIGINTERN PyObject *HNSW_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43254 PyObject *obj;
43255 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
43256 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HNSW, SWIG_NewClientData(obj));
43257 return SWIG_Py_Void();
43258 }
43259
43260 SWIGINTERN PyObject *_wrap_VisitedTable_visited_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43261 PyObject *resultobj = 0;
43262 faiss::VisitedTable *arg1 = (faiss::VisitedTable *) 0 ;
43263 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
43264 void *argp1 = 0 ;
43265 int res1 = 0 ;
43266 void *argp2 = 0 ;
43267 int res2 = 0 ;
43268 PyObject * obj0 = 0 ;
43269 PyObject * obj1 = 0 ;
43270
43271 if (!PyArg_ParseTuple(args,(char *)"OO:VisitedTable_visited_set",&obj0,&obj1)) SWIG_fail;
43272 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
43273 if (!SWIG_IsOK(res1)) {
43274 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_visited_set" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
43275 }
43276 arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
43277 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
43278 if (!SWIG_IsOK(res2)) {
43279 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VisitedTable_visited_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
43280 }
43281 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
43282 if (arg1) (arg1)->visited = *arg2;
43283 resultobj = SWIG_Py_Void();
43284 return resultobj;
43285 fail:
43286 return NULL;
43287 }
43288
43289
43290 SWIGINTERN PyObject *_wrap_VisitedTable_visited_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43291 PyObject *resultobj = 0;
43292 faiss::VisitedTable *arg1 = (faiss::VisitedTable *) 0 ;
43293 void *argp1 = 0 ;
43294 int res1 = 0 ;
43295 PyObject * obj0 = 0 ;
43296 std::vector< uint8_t > *result = 0 ;
43297
43298 if (!PyArg_ParseTuple(args,(char *)"O:VisitedTable_visited_get",&obj0)) SWIG_fail;
43299 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
43300 if (!SWIG_IsOK(res1)) {
43301 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_visited_get" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
43302 }
43303 arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
43304 result = (std::vector< uint8_t > *)& ((arg1)->visited);
43305 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
43306 return resultobj;
43307 fail:
43308 return NULL;
43309 }
43310
43311
43312 SWIGINTERN PyObject *_wrap_VisitedTable_visno_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43313 PyObject *resultobj = 0;
43314 faiss::VisitedTable *arg1 = (faiss::VisitedTable *) 0 ;
43315 int arg2 ;
43316 void *argp1 = 0 ;
43317 int res1 = 0 ;
43318 int val2 ;
43319 int ecode2 = 0 ;
43320 PyObject * obj0 = 0 ;
43321 PyObject * obj1 = 0 ;
43322
43323 if (!PyArg_ParseTuple(args,(char *)"OO:VisitedTable_visno_set",&obj0,&obj1)) SWIG_fail;
43324 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
43325 if (!SWIG_IsOK(res1)) {
43326 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_visno_set" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
43327 }
43328 arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
43329 ecode2 = SWIG_AsVal_int(obj1, &val2);
43330 if (!SWIG_IsOK(ecode2)) {
43331 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VisitedTable_visno_set" "', argument " "2"" of type '" "int""'");
43332 }
43333 arg2 = static_cast< int >(val2);
43334 if (arg1) (arg1)->visno = arg2;
43335 resultobj = SWIG_Py_Void();
43336 return resultobj;
43337 fail:
43338 return NULL;
43339 }
43340
43341
43342 SWIGINTERN PyObject *_wrap_VisitedTable_visno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43343 PyObject *resultobj = 0;
43344 faiss::VisitedTable *arg1 = (faiss::VisitedTable *) 0 ;
43345 void *argp1 = 0 ;
43346 int res1 = 0 ;
43347 PyObject * obj0 = 0 ;
43348 int result;
43349
43350 if (!PyArg_ParseTuple(args,(char *)"O:VisitedTable_visno_get",&obj0)) SWIG_fail;
43351 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
43352 if (!SWIG_IsOK(res1)) {
43353 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_visno_get" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
43354 }
43355 arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
43356 result = (int) ((arg1)->visno);
43357 resultobj = SWIG_From_int(static_cast< int >(result));
43358 return resultobj;
43359 fail:
43360 return NULL;
43361 }
43362
43363
43364 SWIGINTERN PyObject *_wrap_new_VisitedTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43365 PyObject *resultobj = 0;
43366 int arg1 ;
43367 int val1 ;
43368 int ecode1 = 0 ;
43369 PyObject * obj0 = 0 ;
43370 faiss::VisitedTable *result = 0 ;
43371
43372 if (!PyArg_ParseTuple(args,(char *)"O:new_VisitedTable",&obj0)) SWIG_fail;
43373 ecode1 = SWIG_AsVal_int(obj0, &val1);
43374 if (!SWIG_IsOK(ecode1)) {
43375 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_VisitedTable" "', argument " "1"" of type '" "int""'");
43376 }
43377 arg1 = static_cast< int >(val1);
43378 {
43379 Py_BEGIN_ALLOW_THREADS
43380 try {
43381 result = (faiss::VisitedTable *)new faiss::VisitedTable(arg1);
43382 } catch(faiss::FaissException & e) {
43383 PyEval_RestoreThread(_save);
43384 PyErr_SetString(PyExc_RuntimeError, e.what());
43385 SWIG_fail;
43386 }
43387 Py_END_ALLOW_THREADS
43388 }
43389 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VisitedTable, SWIG_POINTER_NEW | 0 );
43390 return resultobj;
43391 fail:
43392 return NULL;
43393 }
43394
43395
43396 SWIGINTERN PyObject *_wrap_VisitedTable_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43397 PyObject *resultobj = 0;
43398 faiss::VisitedTable *arg1 = (faiss::VisitedTable *) 0 ;
43399 int arg2 ;
43400 void *argp1 = 0 ;
43401 int res1 = 0 ;
43402 int val2 ;
43403 int ecode2 = 0 ;
43404 PyObject * obj0 = 0 ;
43405 PyObject * obj1 = 0 ;
43406
43407 if (!PyArg_ParseTuple(args,(char *)"OO:VisitedTable_set",&obj0,&obj1)) SWIG_fail;
43408 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
43409 if (!SWIG_IsOK(res1)) {
43410 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_set" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
43411 }
43412 arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
43413 ecode2 = SWIG_AsVal_int(obj1, &val2);
43414 if (!SWIG_IsOK(ecode2)) {
43415 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VisitedTable_set" "', argument " "2"" of type '" "int""'");
43416 }
43417 arg2 = static_cast< int >(val2);
43418 {
43419 Py_BEGIN_ALLOW_THREADS
43420 try {
43421 (arg1)->set(arg2);
43422 } catch(faiss::FaissException & e) {
43423 PyEval_RestoreThread(_save);
43424 PyErr_SetString(PyExc_RuntimeError, e.what());
43425 SWIG_fail;
43426 }
43427 Py_END_ALLOW_THREADS
43428 }
43429 resultobj = SWIG_Py_Void();
43430 return resultobj;
43431 fail:
43432 return NULL;
43433 }
43434
43435
43436 SWIGINTERN PyObject *_wrap_VisitedTable_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43437 PyObject *resultobj = 0;
43438 faiss::VisitedTable *arg1 = (faiss::VisitedTable *) 0 ;
43439 int arg2 ;
43440 void *argp1 = 0 ;
43441 int res1 = 0 ;
43442 int val2 ;
43443 int ecode2 = 0 ;
43444 PyObject * obj0 = 0 ;
43445 PyObject * obj1 = 0 ;
43446 bool result;
43447
43448 if (!PyArg_ParseTuple(args,(char *)"OO:VisitedTable_get",&obj0,&obj1)) SWIG_fail;
43449 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
43450 if (!SWIG_IsOK(res1)) {
43451 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_get" "', argument " "1"" of type '" "faiss::VisitedTable const *""'");
43452 }
43453 arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
43454 ecode2 = SWIG_AsVal_int(obj1, &val2);
43455 if (!SWIG_IsOK(ecode2)) {
43456 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VisitedTable_get" "', argument " "2"" of type '" "int""'");
43457 }
43458 arg2 = static_cast< int >(val2);
43459 {
43460 Py_BEGIN_ALLOW_THREADS
43461 try {
43462 result = (bool)((faiss::VisitedTable const *)arg1)->get(arg2);
43463 } catch(faiss::FaissException & e) {
43464 PyEval_RestoreThread(_save);
43465 PyErr_SetString(PyExc_RuntimeError, e.what());
43466 SWIG_fail;
43467 }
43468 Py_END_ALLOW_THREADS
43469 }
43470 resultobj = SWIG_From_bool(static_cast< bool >(result));
43471 return resultobj;
43472 fail:
43473 return NULL;
43474 }
43475
43476
43477 SWIGINTERN PyObject *_wrap_VisitedTable_advance(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43478 PyObject *resultobj = 0;
43479 faiss::VisitedTable *arg1 = (faiss::VisitedTable *) 0 ;
43480 void *argp1 = 0 ;
43481 int res1 = 0 ;
43482 PyObject * obj0 = 0 ;
43483
43484 if (!PyArg_ParseTuple(args,(char *)"O:VisitedTable_advance",&obj0)) SWIG_fail;
43485 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, 0 | 0 );
43486 if (!SWIG_IsOK(res1)) {
43487 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VisitedTable_advance" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
43488 }
43489 arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
43490 {
43491 Py_BEGIN_ALLOW_THREADS
43492 try {
43493 (arg1)->advance();
43494 } catch(faiss::FaissException & e) {
43495 PyEval_RestoreThread(_save);
43496 PyErr_SetString(PyExc_RuntimeError, e.what());
43497 SWIG_fail;
43498 }
43499 Py_END_ALLOW_THREADS
43500 }
43501 resultobj = SWIG_Py_Void();
43502 return resultobj;
43503 fail:
43504 return NULL;
43505 }
43506
43507
43508 SWIGINTERN PyObject *_wrap_delete_VisitedTable(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43509 PyObject *resultobj = 0;
43510 faiss::VisitedTable *arg1 = (faiss::VisitedTable *) 0 ;
43511 void *argp1 = 0 ;
43512 int res1 = 0 ;
43513 PyObject * obj0 = 0 ;
43514
43515 if (!PyArg_ParseTuple(args,(char *)"O:delete_VisitedTable",&obj0)) SWIG_fail;
43516 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VisitedTable, SWIG_POINTER_DISOWN | 0 );
43517 if (!SWIG_IsOK(res1)) {
43518 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VisitedTable" "', argument " "1"" of type '" "faiss::VisitedTable *""'");
43519 }
43520 arg1 = reinterpret_cast< faiss::VisitedTable * >(argp1);
43521 delete arg1;
43522 resultobj = SWIG_Py_Void();
43523 return resultobj;
43524 fail:
43525 return NULL;
43526 }
43527
43528
43529 SWIGINTERN PyObject *VisitedTable_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43530 PyObject *obj;
43531 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
43532 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VisitedTable, SWIG_NewClientData(obj));
43533 return SWIG_Py_Void();
43534 }
43535
43536 SWIGINTERN PyObject *_wrap_HNSWStats_n1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43537 PyObject *resultobj = 0;
43538 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43539 size_t arg2 ;
43540 void *argp1 = 0 ;
43541 int res1 = 0 ;
43542 size_t val2 ;
43543 int ecode2 = 0 ;
43544 PyObject * obj0 = 0 ;
43545 PyObject * obj1 = 0 ;
43546
43547 if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_n1_set",&obj0,&obj1)) SWIG_fail;
43548 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43549 if (!SWIG_IsOK(res1)) {
43550 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n1_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43551 }
43552 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43553 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
43554 if (!SWIG_IsOK(ecode2)) {
43555 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_n1_set" "', argument " "2"" of type '" "size_t""'");
43556 }
43557 arg2 = static_cast< size_t >(val2);
43558 if (arg1) (arg1)->n1 = arg2;
43559 resultobj = SWIG_Py_Void();
43560 return resultobj;
43561 fail:
43562 return NULL;
43563 }
43564
43565
43566 SWIGINTERN PyObject *_wrap_HNSWStats_n1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43567 PyObject *resultobj = 0;
43568 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43569 void *argp1 = 0 ;
43570 int res1 = 0 ;
43571 PyObject * obj0 = 0 ;
43572 size_t result;
43573
43574 if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_n1_get",&obj0)) SWIG_fail;
43575 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43576 if (!SWIG_IsOK(res1)) {
43577 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n1_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43578 }
43579 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43580 result = (size_t) ((arg1)->n1);
43581 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
43582 return resultobj;
43583 fail:
43584 return NULL;
43585 }
43586
43587
43588 SWIGINTERN PyObject *_wrap_HNSWStats_n2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43589 PyObject *resultobj = 0;
43590 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43591 size_t arg2 ;
43592 void *argp1 = 0 ;
43593 int res1 = 0 ;
43594 size_t val2 ;
43595 int ecode2 = 0 ;
43596 PyObject * obj0 = 0 ;
43597 PyObject * obj1 = 0 ;
43598
43599 if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_n2_set",&obj0,&obj1)) SWIG_fail;
43600 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43601 if (!SWIG_IsOK(res1)) {
43602 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n2_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43603 }
43604 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43605 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
43606 if (!SWIG_IsOK(ecode2)) {
43607 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_n2_set" "', argument " "2"" of type '" "size_t""'");
43608 }
43609 arg2 = static_cast< size_t >(val2);
43610 if (arg1) (arg1)->n2 = arg2;
43611 resultobj = SWIG_Py_Void();
43612 return resultobj;
43613 fail:
43614 return NULL;
43615 }
43616
43617
43618 SWIGINTERN PyObject *_wrap_HNSWStats_n2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43619 PyObject *resultobj = 0;
43620 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43621 void *argp1 = 0 ;
43622 int res1 = 0 ;
43623 PyObject * obj0 = 0 ;
43624 size_t result;
43625
43626 if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_n2_get",&obj0)) SWIG_fail;
43627 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43628 if (!SWIG_IsOK(res1)) {
43629 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n2_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43630 }
43631 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43632 result = (size_t) ((arg1)->n2);
43633 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
43634 return resultobj;
43635 fail:
43636 return NULL;
43637 }
43638
43639
43640 SWIGINTERN PyObject *_wrap_HNSWStats_n3_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43641 PyObject *resultobj = 0;
43642 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43643 size_t arg2 ;
43644 void *argp1 = 0 ;
43645 int res1 = 0 ;
43646 size_t val2 ;
43647 int ecode2 = 0 ;
43648 PyObject * obj0 = 0 ;
43649 PyObject * obj1 = 0 ;
43650
43651 if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_n3_set",&obj0,&obj1)) SWIG_fail;
43652 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43653 if (!SWIG_IsOK(res1)) {
43654 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n3_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43655 }
43656 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43657 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
43658 if (!SWIG_IsOK(ecode2)) {
43659 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_n3_set" "', argument " "2"" of type '" "size_t""'");
43660 }
43661 arg2 = static_cast< size_t >(val2);
43662 if (arg1) (arg1)->n3 = arg2;
43663 resultobj = SWIG_Py_Void();
43664 return resultobj;
43665 fail:
43666 return NULL;
43667 }
43668
43669
43670 SWIGINTERN PyObject *_wrap_HNSWStats_n3_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43671 PyObject *resultobj = 0;
43672 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43673 void *argp1 = 0 ;
43674 int res1 = 0 ;
43675 PyObject * obj0 = 0 ;
43676 size_t result;
43677
43678 if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_n3_get",&obj0)) SWIG_fail;
43679 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43680 if (!SWIG_IsOK(res1)) {
43681 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_n3_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43682 }
43683 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43684 result = (size_t) ((arg1)->n3);
43685 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
43686 return resultobj;
43687 fail:
43688 return NULL;
43689 }
43690
43691
43692 SWIGINTERN PyObject *_wrap_HNSWStats_ndis_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43693 PyObject *resultobj = 0;
43694 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43695 size_t arg2 ;
43696 void *argp1 = 0 ;
43697 int res1 = 0 ;
43698 size_t val2 ;
43699 int ecode2 = 0 ;
43700 PyObject * obj0 = 0 ;
43701 PyObject * obj1 = 0 ;
43702
43703 if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_ndis_set",&obj0,&obj1)) SWIG_fail;
43704 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43705 if (!SWIG_IsOK(res1)) {
43706 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_ndis_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43707 }
43708 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43709 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
43710 if (!SWIG_IsOK(ecode2)) {
43711 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_ndis_set" "', argument " "2"" of type '" "size_t""'");
43712 }
43713 arg2 = static_cast< size_t >(val2);
43714 if (arg1) (arg1)->ndis = arg2;
43715 resultobj = SWIG_Py_Void();
43716 return resultobj;
43717 fail:
43718 return NULL;
43719 }
43720
43721
43722 SWIGINTERN PyObject *_wrap_HNSWStats_ndis_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43723 PyObject *resultobj = 0;
43724 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43725 void *argp1 = 0 ;
43726 int res1 = 0 ;
43727 PyObject * obj0 = 0 ;
43728 size_t result;
43729
43730 if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_ndis_get",&obj0)) SWIG_fail;
43731 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43732 if (!SWIG_IsOK(res1)) {
43733 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_ndis_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43734 }
43735 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43736 result = (size_t) ((arg1)->ndis);
43737 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
43738 return resultobj;
43739 fail:
43740 return NULL;
43741 }
43742
43743
43744 SWIGINTERN PyObject *_wrap_HNSWStats_nreorder_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43745 PyObject *resultobj = 0;
43746 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43747 size_t arg2 ;
43748 void *argp1 = 0 ;
43749 int res1 = 0 ;
43750 size_t val2 ;
43751 int ecode2 = 0 ;
43752 PyObject * obj0 = 0 ;
43753 PyObject * obj1 = 0 ;
43754
43755 if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_nreorder_set",&obj0,&obj1)) SWIG_fail;
43756 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43757 if (!SWIG_IsOK(res1)) {
43758 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_nreorder_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43759 }
43760 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43761 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
43762 if (!SWIG_IsOK(ecode2)) {
43763 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_nreorder_set" "', argument " "2"" of type '" "size_t""'");
43764 }
43765 arg2 = static_cast< size_t >(val2);
43766 if (arg1) (arg1)->nreorder = arg2;
43767 resultobj = SWIG_Py_Void();
43768 return resultobj;
43769 fail:
43770 return NULL;
43771 }
43772
43773
43774 SWIGINTERN PyObject *_wrap_HNSWStats_nreorder_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43775 PyObject *resultobj = 0;
43776 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43777 void *argp1 = 0 ;
43778 int res1 = 0 ;
43779 PyObject * obj0 = 0 ;
43780 size_t result;
43781
43782 if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_nreorder_get",&obj0)) SWIG_fail;
43783 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43784 if (!SWIG_IsOK(res1)) {
43785 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_nreorder_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43786 }
43787 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43788 result = (size_t) ((arg1)->nreorder);
43789 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
43790 return resultobj;
43791 fail:
43792 return NULL;
43793 }
43794
43795
43796 SWIGINTERN PyObject *_wrap_HNSWStats_view_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43797 PyObject *resultobj = 0;
43798 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43799 bool arg2 ;
43800 void *argp1 = 0 ;
43801 int res1 = 0 ;
43802 bool val2 ;
43803 int ecode2 = 0 ;
43804 PyObject * obj0 = 0 ;
43805 PyObject * obj1 = 0 ;
43806
43807 if (!PyArg_ParseTuple(args,(char *)"OO:HNSWStats_view_set",&obj0,&obj1)) SWIG_fail;
43808 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43809 if (!SWIG_IsOK(res1)) {
43810 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_view_set" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43811 }
43812 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43813 ecode2 = SWIG_AsVal_bool(obj1, &val2);
43814 if (!SWIG_IsOK(ecode2)) {
43815 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "HNSWStats_view_set" "', argument " "2"" of type '" "bool""'");
43816 }
43817 arg2 = static_cast< bool >(val2);
43818 if (arg1) (arg1)->view = arg2;
43819 resultobj = SWIG_Py_Void();
43820 return resultobj;
43821 fail:
43822 return NULL;
43823 }
43824
43825
43826 SWIGINTERN PyObject *_wrap_HNSWStats_view_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43827 PyObject *resultobj = 0;
43828 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43829 void *argp1 = 0 ;
43830 int res1 = 0 ;
43831 PyObject * obj0 = 0 ;
43832 bool result;
43833
43834 if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_view_get",&obj0)) SWIG_fail;
43835 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43836 if (!SWIG_IsOK(res1)) {
43837 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_view_get" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43838 }
43839 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43840 result = (bool) ((arg1)->view);
43841 resultobj = SWIG_From_bool(static_cast< bool >(result));
43842 return resultobj;
43843 fail:
43844 return NULL;
43845 }
43846
43847
43848 SWIGINTERN PyObject *_wrap_new_HNSWStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43849 PyObject *resultobj = 0;
43850 faiss::HNSWStats *result = 0 ;
43851
43852 if (!PyArg_ParseTuple(args,(char *)":new_HNSWStats")) SWIG_fail;
43853 {
43854 Py_BEGIN_ALLOW_THREADS
43855 try {
43856 result = (faiss::HNSWStats *)new faiss::HNSWStats();
43857 } catch(faiss::FaissException & e) {
43858 PyEval_RestoreThread(_save);
43859 PyErr_SetString(PyExc_RuntimeError, e.what());
43860 SWIG_fail;
43861 }
43862 Py_END_ALLOW_THREADS
43863 }
43864 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSWStats, SWIG_POINTER_NEW | 0 );
43865 return resultobj;
43866 fail:
43867 return NULL;
43868 }
43869
43870
43871 SWIGINTERN PyObject *_wrap_HNSWStats_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43872 PyObject *resultobj = 0;
43873 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43874 void *argp1 = 0 ;
43875 int res1 = 0 ;
43876 PyObject * obj0 = 0 ;
43877
43878 if (!PyArg_ParseTuple(args,(char *)"O:HNSWStats_reset",&obj0)) SWIG_fail;
43879 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, 0 | 0 );
43880 if (!SWIG_IsOK(res1)) {
43881 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "HNSWStats_reset" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43882 }
43883 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43884 {
43885 Py_BEGIN_ALLOW_THREADS
43886 try {
43887 (arg1)->reset();
43888 } catch(faiss::FaissException & e) {
43889 PyEval_RestoreThread(_save);
43890 PyErr_SetString(PyExc_RuntimeError, e.what());
43891 SWIG_fail;
43892 }
43893 Py_END_ALLOW_THREADS
43894 }
43895 resultobj = SWIG_Py_Void();
43896 return resultobj;
43897 fail:
43898 return NULL;
43899 }
43900
43901
43902 SWIGINTERN PyObject *_wrap_delete_HNSWStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43903 PyObject *resultobj = 0;
43904 faiss::HNSWStats *arg1 = (faiss::HNSWStats *) 0 ;
43905 void *argp1 = 0 ;
43906 int res1 = 0 ;
43907 PyObject * obj0 = 0 ;
43908
43909 if (!PyArg_ParseTuple(args,(char *)"O:delete_HNSWStats",&obj0)) SWIG_fail;
43910 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HNSWStats, SWIG_POINTER_DISOWN | 0 );
43911 if (!SWIG_IsOK(res1)) {
43912 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_HNSWStats" "', argument " "1"" of type '" "faiss::HNSWStats *""'");
43913 }
43914 arg1 = reinterpret_cast< faiss::HNSWStats * >(argp1);
43915 delete arg1;
43916 resultobj = SWIG_Py_Void();
43917 return resultobj;
43918 fail:
43919 return NULL;
43920 }
43921
43922
43923 SWIGINTERN PyObject *HNSWStats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43924 PyObject *obj;
43925 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
43926 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HNSWStats, SWIG_NewClientData(obj));
43927 return SWIG_Py_Void();
43928 }
43929
43930 SWIGINTERN int Swig_var_hnsw_stats_set(PyObject *_val) {
43931 {
43932 void *argp = 0;
43933 int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_faiss__HNSWStats, 0 | 0);
43934 if (!SWIG_IsOK(res)) {
43935 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::hnsw_stats""' of type '""faiss::HNSWStats""'");
43936 }
43937 if (!argp) {
43938 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""faiss::hnsw_stats""' of type '""faiss::HNSWStats""'");
43939 } else {
43940 faiss::HNSWStats * temp;
43941 temp = reinterpret_cast< faiss::HNSWStats * >(argp);
43942 faiss::hnsw_stats = *temp;
43943 if (SWIG_IsNewObj(res)) delete temp;
43944 }
43945 }
43946 return 0;
43947 fail:
43948 return 1;
43949 }
43950
43951
43952 SWIGINTERN PyObject *Swig_var_hnsw_stats_get(void) {
43953 PyObject *pyobj = 0;
43954
43955 pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&faiss::hnsw_stats), SWIGTYPE_p_faiss__HNSWStats, 0 );
43956 return pyobj;
43957 }
43958
43959
43960 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43961 PyObject *resultobj = 0;
43962 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
43963 void *argp1 = 0 ;
43964 int res1 = 0 ;
43965 PyObject * obj0 = 0 ;
43966 faiss::IndexHNSW *result = 0 ;
43967
43968 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_index_get",&obj0)) SWIG_fail;
43969 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
43970 if (!SWIG_IsOK(res1)) {
43971 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_index_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
43972 }
43973 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
43974 result = (faiss::IndexHNSW *) &(faiss::IndexHNSW const &) ((arg1)->index);
43975 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
43976 return resultobj;
43977 fail:
43978 return NULL;
43979 }
43980
43981
43982 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_M_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
43983 PyObject *resultobj = 0;
43984 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
43985 size_t arg2 ;
43986 void *argp1 = 0 ;
43987 int res1 = 0 ;
43988 size_t val2 ;
43989 int ecode2 = 0 ;
43990 PyObject * obj0 = 0 ;
43991 PyObject * obj1 = 0 ;
43992
43993 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_M_set",&obj0,&obj1)) SWIG_fail;
43994 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
43995 if (!SWIG_IsOK(res1)) {
43996 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_M_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
43997 }
43998 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
43999 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44000 if (!SWIG_IsOK(ecode2)) {
44001 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_M_set" "', argument " "2"" of type '" "size_t""'");
44002 }
44003 arg2 = static_cast< size_t >(val2);
44004 if (arg1) (arg1)->M = arg2;
44005 resultobj = SWIG_Py_Void();
44006 return resultobj;
44007 fail:
44008 return NULL;
44009 }
44010
44011
44012 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_M_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44013 PyObject *resultobj = 0;
44014 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44015 void *argp1 = 0 ;
44016 int res1 = 0 ;
44017 PyObject * obj0 = 0 ;
44018 size_t result;
44019
44020 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_M_get",&obj0)) SWIG_fail;
44021 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44022 if (!SWIG_IsOK(res1)) {
44023 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_M_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44024 }
44025 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44026 result = (size_t) ((arg1)->M);
44027 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44028 return resultobj;
44029 fail:
44030 return NULL;
44031 }
44032
44033
44034 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44035 PyObject *resultobj = 0;
44036 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44037 size_t arg2 ;
44038 void *argp1 = 0 ;
44039 int res1 = 0 ;
44040 size_t val2 ;
44041 int ecode2 = 0 ;
44042 PyObject * obj0 = 0 ;
44043 PyObject * obj1 = 0 ;
44044
44045 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_k_set",&obj0,&obj1)) SWIG_fail;
44046 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44047 if (!SWIG_IsOK(res1)) {
44048 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_k_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44049 }
44050 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44051 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44052 if (!SWIG_IsOK(ecode2)) {
44053 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_k_set" "', argument " "2"" of type '" "size_t""'");
44054 }
44055 arg2 = static_cast< size_t >(val2);
44056 if (arg1) (arg1)->k = arg2;
44057 resultobj = SWIG_Py_Void();
44058 return resultobj;
44059 fail:
44060 return NULL;
44061 }
44062
44063
44064 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44065 PyObject *resultobj = 0;
44066 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44067 void *argp1 = 0 ;
44068 int res1 = 0 ;
44069 PyObject * obj0 = 0 ;
44070 size_t result;
44071
44072 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_k_get",&obj0)) SWIG_fail;
44073 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44074 if (!SWIG_IsOK(res1)) {
44075 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_k_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44076 }
44077 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44078 result = (size_t) ((arg1)->k);
44079 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44080 return resultobj;
44081 fail:
44082 return NULL;
44083 }
44084
44085
44086 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_nsq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44087 PyObject *resultobj = 0;
44088 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44089 size_t arg2 ;
44090 void *argp1 = 0 ;
44091 int res1 = 0 ;
44092 size_t val2 ;
44093 int ecode2 = 0 ;
44094 PyObject * obj0 = 0 ;
44095 PyObject * obj1 = 0 ;
44096
44097 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_nsq_set",&obj0,&obj1)) SWIG_fail;
44098 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44099 if (!SWIG_IsOK(res1)) {
44100 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_nsq_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44101 }
44102 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44103 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44104 if (!SWIG_IsOK(ecode2)) {
44105 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_nsq_set" "', argument " "2"" of type '" "size_t""'");
44106 }
44107 arg2 = static_cast< size_t >(val2);
44108 if (arg1) (arg1)->nsq = arg2;
44109 resultobj = SWIG_Py_Void();
44110 return resultobj;
44111 fail:
44112 return NULL;
44113 }
44114
44115
44116 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_nsq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44117 PyObject *resultobj = 0;
44118 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44119 void *argp1 = 0 ;
44120 int res1 = 0 ;
44121 PyObject * obj0 = 0 ;
44122 size_t result;
44123
44124 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_nsq_get",&obj0)) SWIG_fail;
44125 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44126 if (!SWIG_IsOK(res1)) {
44127 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_nsq_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44128 }
44129 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44130 result = (size_t) ((arg1)->nsq);
44131 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44132 return resultobj;
44133 fail:
44134 return NULL;
44135 }
44136
44137
44138 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44139 PyObject *resultobj = 0;
44140 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44141 size_t arg2 ;
44142 void *argp1 = 0 ;
44143 int res1 = 0 ;
44144 size_t val2 ;
44145 int ecode2 = 0 ;
44146 PyObject * obj0 = 0 ;
44147 PyObject * obj1 = 0 ;
44148
44149 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_code_size_set",&obj0,&obj1)) SWIG_fail;
44150 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44151 if (!SWIG_IsOK(res1)) {
44152 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_code_size_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44153 }
44154 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44155 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44156 if (!SWIG_IsOK(ecode2)) {
44157 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_code_size_set" "', argument " "2"" of type '" "size_t""'");
44158 }
44159 arg2 = static_cast< size_t >(val2);
44160 if (arg1) (arg1)->code_size = arg2;
44161 resultobj = SWIG_Py_Void();
44162 return resultobj;
44163 fail:
44164 return NULL;
44165 }
44166
44167
44168 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44169 PyObject *resultobj = 0;
44170 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44171 void *argp1 = 0 ;
44172 int res1 = 0 ;
44173 PyObject * obj0 = 0 ;
44174 size_t result;
44175
44176 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_code_size_get",&obj0)) SWIG_fail;
44177 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44178 if (!SWIG_IsOK(res1)) {
44179 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_code_size_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44180 }
44181 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44182 result = (size_t) ((arg1)->code_size);
44183 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44184 return resultobj;
44185 fail:
44186 return NULL;
44187 }
44188
44189
44190 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_k_reorder_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44191 PyObject *resultobj = 0;
44192 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44193 int arg2 ;
44194 void *argp1 = 0 ;
44195 int res1 = 0 ;
44196 int val2 ;
44197 int ecode2 = 0 ;
44198 PyObject * obj0 = 0 ;
44199 PyObject * obj1 = 0 ;
44200
44201 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_k_reorder_set",&obj0,&obj1)) SWIG_fail;
44202 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44203 if (!SWIG_IsOK(res1)) {
44204 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_k_reorder_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44205 }
44206 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44207 ecode2 = SWIG_AsVal_int(obj1, &val2);
44208 if (!SWIG_IsOK(ecode2)) {
44209 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_k_reorder_set" "', argument " "2"" of type '" "int""'");
44210 }
44211 arg2 = static_cast< int >(val2);
44212 if (arg1) (arg1)->k_reorder = arg2;
44213 resultobj = SWIG_Py_Void();
44214 return resultobj;
44215 fail:
44216 return NULL;
44217 }
44218
44219
44220 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_k_reorder_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44221 PyObject *resultobj = 0;
44222 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44223 void *argp1 = 0 ;
44224 int res1 = 0 ;
44225 PyObject * obj0 = 0 ;
44226 int result;
44227
44228 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_k_reorder_get",&obj0)) SWIG_fail;
44229 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44230 if (!SWIG_IsOK(res1)) {
44231 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_k_reorder_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44232 }
44233 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44234 result = (int) ((arg1)->k_reorder);
44235 resultobj = SWIG_From_int(static_cast< int >(result));
44236 return resultobj;
44237 fail:
44238 return NULL;
44239 }
44240
44241
44242 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_codebook_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44243 PyObject *resultobj = 0;
44244 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44245 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
44246 void *argp1 = 0 ;
44247 int res1 = 0 ;
44248 void *argp2 = 0 ;
44249 int res2 = 0 ;
44250 PyObject * obj0 = 0 ;
44251 PyObject * obj1 = 0 ;
44252
44253 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_codebook_set",&obj0,&obj1)) SWIG_fail;
44254 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44255 if (!SWIG_IsOK(res1)) {
44256 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_codebook_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44257 }
44258 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44259 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
44260 if (!SWIG_IsOK(res2)) {
44261 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReconstructFromNeighbors_codebook_set" "', argument " "2"" of type '" "std::vector< float > *""'");
44262 }
44263 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
44264 if (arg1) (arg1)->codebook = *arg2;
44265 resultobj = SWIG_Py_Void();
44266 return resultobj;
44267 fail:
44268 return NULL;
44269 }
44270
44271
44272 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_codebook_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44273 PyObject *resultobj = 0;
44274 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44275 void *argp1 = 0 ;
44276 int res1 = 0 ;
44277 PyObject * obj0 = 0 ;
44278 std::vector< float > *result = 0 ;
44279
44280 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_codebook_get",&obj0)) SWIG_fail;
44281 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44282 if (!SWIG_IsOK(res1)) {
44283 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_codebook_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44284 }
44285 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44286 result = (std::vector< float > *)& ((arg1)->codebook);
44287 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
44288 return resultobj;
44289 fail:
44290 return NULL;
44291 }
44292
44293
44294 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44295 PyObject *resultobj = 0;
44296 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44297 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
44298 void *argp1 = 0 ;
44299 int res1 = 0 ;
44300 void *argp2 = 0 ;
44301 int res2 = 0 ;
44302 PyObject * obj0 = 0 ;
44303 PyObject * obj1 = 0 ;
44304
44305 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_codes_set",&obj0,&obj1)) SWIG_fail;
44306 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44307 if (!SWIG_IsOK(res1)) {
44308 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_codes_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44309 }
44310 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44311 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
44312 if (!SWIG_IsOK(res2)) {
44313 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReconstructFromNeighbors_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
44314 }
44315 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
44316 if (arg1) (arg1)->codes = *arg2;
44317 resultobj = SWIG_Py_Void();
44318 return resultobj;
44319 fail:
44320 return NULL;
44321 }
44322
44323
44324 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44325 PyObject *resultobj = 0;
44326 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44327 void *argp1 = 0 ;
44328 int res1 = 0 ;
44329 PyObject * obj0 = 0 ;
44330 std::vector< uint8_t > *result = 0 ;
44331
44332 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_codes_get",&obj0)) SWIG_fail;
44333 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44334 if (!SWIG_IsOK(res1)) {
44335 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_codes_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44336 }
44337 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44338 result = (std::vector< uint8_t > *)& ((arg1)->codes);
44339 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
44340 return resultobj;
44341 fail:
44342 return NULL;
44343 }
44344
44345
44346 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_ntotal_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44347 PyObject *resultobj = 0;
44348 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44349 size_t arg2 ;
44350 void *argp1 = 0 ;
44351 int res1 = 0 ;
44352 size_t val2 ;
44353 int ecode2 = 0 ;
44354 PyObject * obj0 = 0 ;
44355 PyObject * obj1 = 0 ;
44356
44357 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_ntotal_set",&obj0,&obj1)) SWIG_fail;
44358 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44359 if (!SWIG_IsOK(res1)) {
44360 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_ntotal_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44361 }
44362 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44363 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44364 if (!SWIG_IsOK(ecode2)) {
44365 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_ntotal_set" "', argument " "2"" of type '" "size_t""'");
44366 }
44367 arg2 = static_cast< size_t >(val2);
44368 if (arg1) (arg1)->ntotal = arg2;
44369 resultobj = SWIG_Py_Void();
44370 return resultobj;
44371 fail:
44372 return NULL;
44373 }
44374
44375
44376 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_ntotal_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44377 PyObject *resultobj = 0;
44378 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44379 void *argp1 = 0 ;
44380 int res1 = 0 ;
44381 PyObject * obj0 = 0 ;
44382 size_t result;
44383
44384 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_ntotal_get",&obj0)) SWIG_fail;
44385 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44386 if (!SWIG_IsOK(res1)) {
44387 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_ntotal_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44388 }
44389 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44390 result = (size_t) ((arg1)->ntotal);
44391 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44392 return resultobj;
44393 fail:
44394 return NULL;
44395 }
44396
44397
44398 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44399 PyObject *resultobj = 0;
44400 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44401 size_t arg2 ;
44402 void *argp1 = 0 ;
44403 int res1 = 0 ;
44404 size_t val2 ;
44405 int ecode2 = 0 ;
44406 PyObject * obj0 = 0 ;
44407 PyObject * obj1 = 0 ;
44408
44409 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_d_set",&obj0,&obj1)) SWIG_fail;
44410 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44411 if (!SWIG_IsOK(res1)) {
44412 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_d_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44413 }
44414 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44415 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44416 if (!SWIG_IsOK(ecode2)) {
44417 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_d_set" "', argument " "2"" of type '" "size_t""'");
44418 }
44419 arg2 = static_cast< size_t >(val2);
44420 if (arg1) (arg1)->d = arg2;
44421 resultobj = SWIG_Py_Void();
44422 return resultobj;
44423 fail:
44424 return NULL;
44425 }
44426
44427
44428 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44429 PyObject *resultobj = 0;
44430 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44431 void *argp1 = 0 ;
44432 int res1 = 0 ;
44433 PyObject * obj0 = 0 ;
44434 size_t result;
44435
44436 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_d_get",&obj0)) SWIG_fail;
44437 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44438 if (!SWIG_IsOK(res1)) {
44439 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_d_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44440 }
44441 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44442 result = (size_t) ((arg1)->d);
44443 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44444 return resultobj;
44445 fail:
44446 return NULL;
44447 }
44448
44449
44450 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_dsub_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44451 PyObject *resultobj = 0;
44452 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44453 size_t arg2 ;
44454 void *argp1 = 0 ;
44455 int res1 = 0 ;
44456 size_t val2 ;
44457 int ecode2 = 0 ;
44458 PyObject * obj0 = 0 ;
44459 PyObject * obj1 = 0 ;
44460
44461 if (!PyArg_ParseTuple(args,(char *)"OO:ReconstructFromNeighbors_dsub_set",&obj0,&obj1)) SWIG_fail;
44462 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44463 if (!SWIG_IsOK(res1)) {
44464 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_dsub_set" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44465 }
44466 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44467 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44468 if (!SWIG_IsOK(ecode2)) {
44469 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_dsub_set" "', argument " "2"" of type '" "size_t""'");
44470 }
44471 arg2 = static_cast< size_t >(val2);
44472 if (arg1) (arg1)->dsub = arg2;
44473 resultobj = SWIG_Py_Void();
44474 return resultobj;
44475 fail:
44476 return NULL;
44477 }
44478
44479
44480 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_dsub_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44481 PyObject *resultobj = 0;
44482 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44483 void *argp1 = 0 ;
44484 int res1 = 0 ;
44485 PyObject * obj0 = 0 ;
44486 size_t result;
44487
44488 if (!PyArg_ParseTuple(args,(char *)"O:ReconstructFromNeighbors_dsub_get",&obj0)) SWIG_fail;
44489 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44490 if (!SWIG_IsOK(res1)) {
44491 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_dsub_get" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44492 }
44493 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44494 result = (size_t) ((arg1)->dsub);
44495 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44496 return resultobj;
44497 fail:
44498 return NULL;
44499 }
44500
44501
44502 SWIGINTERN PyObject *_wrap_new_ReconstructFromNeighbors__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44503 PyObject *resultobj = 0;
44504 faiss::IndexHNSW *arg1 = 0 ;
44505 size_t arg2 ;
44506 size_t arg3 ;
44507 void *argp1 = 0 ;
44508 int res1 = 0 ;
44509 size_t val2 ;
44510 int ecode2 = 0 ;
44511 size_t val3 ;
44512 int ecode3 = 0 ;
44513 PyObject * obj0 = 0 ;
44514 PyObject * obj1 = 0 ;
44515 PyObject * obj2 = 0 ;
44516 faiss::ReconstructFromNeighbors *result = 0 ;
44517
44518 if (!PyArg_ParseTuple(args,(char *)"OOO:new_ReconstructFromNeighbors",&obj0,&obj1,&obj2)) SWIG_fail;
44519 res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_faiss__IndexHNSW, 0 | 0);
44520 if (!SWIG_IsOK(res1)) {
44521 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
44522 }
44523 if (!argp1) {
44524 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
44525 }
44526 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
44527 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44528 if (!SWIG_IsOK(ecode2)) {
44529 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ReconstructFromNeighbors" "', argument " "2"" of type '" "size_t""'");
44530 }
44531 arg2 = static_cast< size_t >(val2);
44532 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
44533 if (!SWIG_IsOK(ecode3)) {
44534 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_ReconstructFromNeighbors" "', argument " "3"" of type '" "size_t""'");
44535 }
44536 arg3 = static_cast< size_t >(val3);
44537 {
44538 Py_BEGIN_ALLOW_THREADS
44539 try {
44540 result = (faiss::ReconstructFromNeighbors *)new faiss::ReconstructFromNeighbors((faiss::IndexHNSW const &)*arg1,arg2,arg3);
44541 } catch(faiss::FaissException & e) {
44542 PyEval_RestoreThread(_save);
44543 PyErr_SetString(PyExc_RuntimeError, e.what());
44544 SWIG_fail;
44545 }
44546 Py_END_ALLOW_THREADS
44547 }
44548 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_NEW | 0 );
44549 return resultobj;
44550 fail:
44551 return NULL;
44552 }
44553
44554
44555 SWIGINTERN PyObject *_wrap_new_ReconstructFromNeighbors__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44556 PyObject *resultobj = 0;
44557 faiss::IndexHNSW *arg1 = 0 ;
44558 size_t arg2 ;
44559 void *argp1 = 0 ;
44560 int res1 = 0 ;
44561 size_t val2 ;
44562 int ecode2 = 0 ;
44563 PyObject * obj0 = 0 ;
44564 PyObject * obj1 = 0 ;
44565 faiss::ReconstructFromNeighbors *result = 0 ;
44566
44567 if (!PyArg_ParseTuple(args,(char *)"OO:new_ReconstructFromNeighbors",&obj0,&obj1)) SWIG_fail;
44568 res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_faiss__IndexHNSW, 0 | 0);
44569 if (!SWIG_IsOK(res1)) {
44570 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
44571 }
44572 if (!argp1) {
44573 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
44574 }
44575 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
44576 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44577 if (!SWIG_IsOK(ecode2)) {
44578 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_ReconstructFromNeighbors" "', argument " "2"" of type '" "size_t""'");
44579 }
44580 arg2 = static_cast< size_t >(val2);
44581 {
44582 Py_BEGIN_ALLOW_THREADS
44583 try {
44584 result = (faiss::ReconstructFromNeighbors *)new faiss::ReconstructFromNeighbors((faiss::IndexHNSW const &)*arg1,arg2);
44585 } catch(faiss::FaissException & e) {
44586 PyEval_RestoreThread(_save);
44587 PyErr_SetString(PyExc_RuntimeError, e.what());
44588 SWIG_fail;
44589 }
44590 Py_END_ALLOW_THREADS
44591 }
44592 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_NEW | 0 );
44593 return resultobj;
44594 fail:
44595 return NULL;
44596 }
44597
44598
44599 SWIGINTERN PyObject *_wrap_new_ReconstructFromNeighbors__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44600 PyObject *resultobj = 0;
44601 faiss::IndexHNSW *arg1 = 0 ;
44602 void *argp1 = 0 ;
44603 int res1 = 0 ;
44604 PyObject * obj0 = 0 ;
44605 faiss::ReconstructFromNeighbors *result = 0 ;
44606
44607 if (!PyArg_ParseTuple(args,(char *)"O:new_ReconstructFromNeighbors",&obj0)) SWIG_fail;
44608 res1 = SWIG_ConvertPtr(obj0, &argp1, SWIGTYPE_p_faiss__IndexHNSW, 0 | 0);
44609 if (!SWIG_IsOK(res1)) {
44610 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
44611 }
44612 if (!argp1) {
44613 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "new_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::IndexHNSW const &""'");
44614 }
44615 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
44616 {
44617 Py_BEGIN_ALLOW_THREADS
44618 try {
44619 result = (faiss::ReconstructFromNeighbors *)new faiss::ReconstructFromNeighbors((faiss::IndexHNSW const &)*arg1);
44620 } catch(faiss::FaissException & e) {
44621 PyEval_RestoreThread(_save);
44622 PyErr_SetString(PyExc_RuntimeError, e.what());
44623 SWIG_fail;
44624 }
44625 Py_END_ALLOW_THREADS
44626 }
44627 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_NEW | 0 );
44628 return resultobj;
44629 fail:
44630 return NULL;
44631 }
44632
44633
44634 SWIGINTERN PyObject *_wrap_new_ReconstructFromNeighbors(PyObject *self, PyObject *args) {
44635 Py_ssize_t argc;
44636 PyObject *argv[4] = {
44637 0
44638 };
44639 Py_ssize_t ii;
44640
44641 if (!PyTuple_Check(args)) SWIG_fail;
44642 argc = args ? PyObject_Length(args) : 0;
44643 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
44644 argv[ii] = PyTuple_GET_ITEM(args,ii);
44645 }
44646 if (argc == 1) {
44647 int _v;
44648 int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_faiss__IndexHNSW, 0);
44649 _v = SWIG_CheckState(res);
44650 if (_v) {
44651 return _wrap_new_ReconstructFromNeighbors__SWIG_2(self, args);
44652 }
44653 }
44654 if (argc == 2) {
44655 int _v;
44656 int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_faiss__IndexHNSW, 0);
44657 _v = SWIG_CheckState(res);
44658 if (_v) {
44659 {
44660 int res = SWIG_AsVal_size_t(argv[1], NULL);
44661 _v = SWIG_CheckState(res);
44662 }
44663 if (_v) {
44664 return _wrap_new_ReconstructFromNeighbors__SWIG_1(self, args);
44665 }
44666 }
44667 }
44668 if (argc == 3) {
44669 int _v;
44670 int res = SWIG_ConvertPtr(argv[0], 0, SWIGTYPE_p_faiss__IndexHNSW, 0);
44671 _v = SWIG_CheckState(res);
44672 if (_v) {
44673 {
44674 int res = SWIG_AsVal_size_t(argv[1], NULL);
44675 _v = SWIG_CheckState(res);
44676 }
44677 if (_v) {
44678 {
44679 int res = SWIG_AsVal_size_t(argv[2], NULL);
44680 _v = SWIG_CheckState(res);
44681 }
44682 if (_v) {
44683 return _wrap_new_ReconstructFromNeighbors__SWIG_0(self, args);
44684 }
44685 }
44686 }
44687 }
44688
44689 fail:
44690 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_ReconstructFromNeighbors'.\n"
44691 " Possible C/C++ prototypes are:\n"
44692 " faiss::ReconstructFromNeighbors::ReconstructFromNeighbors(faiss::IndexHNSW const &,size_t,size_t)\n"
44693 " faiss::ReconstructFromNeighbors::ReconstructFromNeighbors(faiss::IndexHNSW const &,size_t)\n"
44694 " faiss::ReconstructFromNeighbors::ReconstructFromNeighbors(faiss::IndexHNSW const &)\n");
44695 return 0;
44696 }
44697
44698
44699 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_add_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44700 PyObject *resultobj = 0;
44701 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44702 size_t arg2 ;
44703 float *arg3 = (float *) 0 ;
44704 void *argp1 = 0 ;
44705 int res1 = 0 ;
44706 size_t val2 ;
44707 int ecode2 = 0 ;
44708 void *argp3 = 0 ;
44709 int res3 = 0 ;
44710 PyObject * obj0 = 0 ;
44711 PyObject * obj1 = 0 ;
44712 PyObject * obj2 = 0 ;
44713
44714 if (!PyArg_ParseTuple(args,(char *)"OOO:ReconstructFromNeighbors_add_codes",&obj0,&obj1,&obj2)) SWIG_fail;
44715 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44716 if (!SWIG_IsOK(res1)) {
44717 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_add_codes" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
44718 }
44719 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44720 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44721 if (!SWIG_IsOK(ecode2)) {
44722 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_add_codes" "', argument " "2"" of type '" "size_t""'");
44723 }
44724 arg2 = static_cast< size_t >(val2);
44725 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
44726 if (!SWIG_IsOK(res3)) {
44727 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReconstructFromNeighbors_add_codes" "', argument " "3"" of type '" "float const *""'");
44728 }
44729 arg3 = reinterpret_cast< float * >(argp3);
44730 {
44731 Py_BEGIN_ALLOW_THREADS
44732 try {
44733 (arg1)->add_codes(arg2,(float const *)arg3);
44734 } catch(faiss::FaissException & e) {
44735 PyEval_RestoreThread(_save);
44736 PyErr_SetString(PyExc_RuntimeError, e.what());
44737 SWIG_fail;
44738 }
44739 Py_END_ALLOW_THREADS
44740 }
44741 resultobj = SWIG_Py_Void();
44742 return resultobj;
44743 fail:
44744 return NULL;
44745 }
44746
44747
44748 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_compute_distances(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44749 PyObject *resultobj = 0;
44750 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44751 size_t arg2 ;
44752 faiss::ReconstructFromNeighbors::idx_t *arg3 = (faiss::ReconstructFromNeighbors::idx_t *) 0 ;
44753 float *arg4 = (float *) 0 ;
44754 float *arg5 = (float *) 0 ;
44755 void *argp1 = 0 ;
44756 int res1 = 0 ;
44757 size_t val2 ;
44758 int ecode2 = 0 ;
44759 void *argp3 = 0 ;
44760 int res3 = 0 ;
44761 void *argp4 = 0 ;
44762 int res4 = 0 ;
44763 void *argp5 = 0 ;
44764 int res5 = 0 ;
44765 PyObject * obj0 = 0 ;
44766 PyObject * obj1 = 0 ;
44767 PyObject * obj2 = 0 ;
44768 PyObject * obj3 = 0 ;
44769 PyObject * obj4 = 0 ;
44770 size_t result;
44771
44772 if (!PyArg_ParseTuple(args,(char *)"OOOOO:ReconstructFromNeighbors_compute_distances",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
44773 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44774 if (!SWIG_IsOK(res1)) {
44775 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
44776 }
44777 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44778 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
44779 if (!SWIG_IsOK(ecode2)) {
44780 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "2"" of type '" "size_t""'");
44781 }
44782 arg2 = static_cast< size_t >(val2);
44783 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
44784 if (!SWIG_IsOK(res3)) {
44785 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "3"" of type '" "faiss::ReconstructFromNeighbors::idx_t const *""'");
44786 }
44787 arg3 = reinterpret_cast< faiss::ReconstructFromNeighbors::idx_t * >(argp3);
44788 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
44789 if (!SWIG_IsOK(res4)) {
44790 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "4"" of type '" "float const *""'");
44791 }
44792 arg4 = reinterpret_cast< float * >(argp4);
44793 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
44794 if (!SWIG_IsOK(res5)) {
44795 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ReconstructFromNeighbors_compute_distances" "', argument " "5"" of type '" "float *""'");
44796 }
44797 arg5 = reinterpret_cast< float * >(argp5);
44798 {
44799 Py_BEGIN_ALLOW_THREADS
44800 try {
44801 result = (size_t)((faiss::ReconstructFromNeighbors const *)arg1)->compute_distances(arg2,(faiss::ReconstructFromNeighbors::idx_t const *)arg3,(float const *)arg4,arg5);
44802 } catch(faiss::FaissException & e) {
44803 PyEval_RestoreThread(_save);
44804 PyErr_SetString(PyExc_RuntimeError, e.what());
44805 SWIG_fail;
44806 }
44807 Py_END_ALLOW_THREADS
44808 }
44809 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
44810 return resultobj;
44811 fail:
44812 return NULL;
44813 }
44814
44815
44816 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_estimate_code(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44817 PyObject *resultobj = 0;
44818 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44819 float *arg2 = (float *) 0 ;
44820 faiss::ReconstructFromNeighbors::storage_idx_t arg3 ;
44821 uint8_t *arg4 = (uint8_t *) 0 ;
44822 void *argp1 = 0 ;
44823 int res1 = 0 ;
44824 void *argp2 = 0 ;
44825 int res2 = 0 ;
44826 int val3 ;
44827 int ecode3 = 0 ;
44828 void *argp4 = 0 ;
44829 int res4 = 0 ;
44830 PyObject * obj0 = 0 ;
44831 PyObject * obj1 = 0 ;
44832 PyObject * obj2 = 0 ;
44833 PyObject * obj3 = 0 ;
44834
44835 if (!PyArg_ParseTuple(args,(char *)"OOOO:ReconstructFromNeighbors_estimate_code",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
44836 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44837 if (!SWIG_IsOK(res1)) {
44838 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_estimate_code" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
44839 }
44840 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44841 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
44842 if (!SWIG_IsOK(res2)) {
44843 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ReconstructFromNeighbors_estimate_code" "', argument " "2"" of type '" "float const *""'");
44844 }
44845 arg2 = reinterpret_cast< float * >(argp2);
44846 ecode3 = SWIG_AsVal_int(obj2, &val3);
44847 if (!SWIG_IsOK(ecode3)) {
44848 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReconstructFromNeighbors_estimate_code" "', argument " "3"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
44849 }
44850 arg3 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val3);
44851 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
44852 if (!SWIG_IsOK(res4)) {
44853 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReconstructFromNeighbors_estimate_code" "', argument " "4"" of type '" "uint8_t *""'");
44854 }
44855 arg4 = reinterpret_cast< uint8_t * >(argp4);
44856 {
44857 Py_BEGIN_ALLOW_THREADS
44858 try {
44859 ((faiss::ReconstructFromNeighbors const *)arg1)->estimate_code((float const *)arg2,arg3,arg4);
44860 } catch(faiss::FaissException & e) {
44861 PyEval_RestoreThread(_save);
44862 PyErr_SetString(PyExc_RuntimeError, e.what());
44863 SWIG_fail;
44864 }
44865 Py_END_ALLOW_THREADS
44866 }
44867 resultobj = SWIG_Py_Void();
44868 return resultobj;
44869 fail:
44870 return NULL;
44871 }
44872
44873
44874 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44875 PyObject *resultobj = 0;
44876 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44877 faiss::ReconstructFromNeighbors::storage_idx_t arg2 ;
44878 float *arg3 = (float *) 0 ;
44879 float *arg4 = (float *) 0 ;
44880 void *argp1 = 0 ;
44881 int res1 = 0 ;
44882 int val2 ;
44883 int ecode2 = 0 ;
44884 void *argp3 = 0 ;
44885 int res3 = 0 ;
44886 void *argp4 = 0 ;
44887 int res4 = 0 ;
44888 PyObject * obj0 = 0 ;
44889 PyObject * obj1 = 0 ;
44890 PyObject * obj2 = 0 ;
44891 PyObject * obj3 = 0 ;
44892
44893 if (!PyArg_ParseTuple(args,(char *)"OOOO:ReconstructFromNeighbors_reconstruct",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
44894 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44895 if (!SWIG_IsOK(res1)) {
44896 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_reconstruct" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
44897 }
44898 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44899 ecode2 = SWIG_AsVal_int(obj1, &val2);
44900 if (!SWIG_IsOK(ecode2)) {
44901 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_reconstruct" "', argument " "2"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
44902 }
44903 arg2 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val2);
44904 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
44905 if (!SWIG_IsOK(res3)) {
44906 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReconstructFromNeighbors_reconstruct" "', argument " "3"" of type '" "float *""'");
44907 }
44908 arg3 = reinterpret_cast< float * >(argp3);
44909 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
44910 if (!SWIG_IsOK(res4)) {
44911 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReconstructFromNeighbors_reconstruct" "', argument " "4"" of type '" "float *""'");
44912 }
44913 arg4 = reinterpret_cast< float * >(argp4);
44914 {
44915 Py_BEGIN_ALLOW_THREADS
44916 try {
44917 ((faiss::ReconstructFromNeighbors const *)arg1)->reconstruct(arg2,arg3,arg4);
44918 } catch(faiss::FaissException & e) {
44919 PyEval_RestoreThread(_save);
44920 PyErr_SetString(PyExc_RuntimeError, e.what());
44921 SWIG_fail;
44922 }
44923 Py_END_ALLOW_THREADS
44924 }
44925 resultobj = SWIG_Py_Void();
44926 return resultobj;
44927 fail:
44928 return NULL;
44929 }
44930
44931
44932 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44933 PyObject *resultobj = 0;
44934 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44935 faiss::ReconstructFromNeighbors::storage_idx_t arg2 ;
44936 faiss::ReconstructFromNeighbors::storage_idx_t arg3 ;
44937 float *arg4 = (float *) 0 ;
44938 void *argp1 = 0 ;
44939 int res1 = 0 ;
44940 int val2 ;
44941 int ecode2 = 0 ;
44942 int val3 ;
44943 int ecode3 = 0 ;
44944 void *argp4 = 0 ;
44945 int res4 = 0 ;
44946 PyObject * obj0 = 0 ;
44947 PyObject * obj1 = 0 ;
44948 PyObject * obj2 = 0 ;
44949 PyObject * obj3 = 0 ;
44950
44951 if (!PyArg_ParseTuple(args,(char *)"OOOO:ReconstructFromNeighbors_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
44952 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
44953 if (!SWIG_IsOK(res1)) {
44954 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_reconstruct_n" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
44955 }
44956 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
44957 ecode2 = SWIG_AsVal_int(obj1, &val2);
44958 if (!SWIG_IsOK(ecode2)) {
44959 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_reconstruct_n" "', argument " "2"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
44960 }
44961 arg2 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val2);
44962 ecode3 = SWIG_AsVal_int(obj2, &val3);
44963 if (!SWIG_IsOK(ecode3)) {
44964 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ReconstructFromNeighbors_reconstruct_n" "', argument " "3"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
44965 }
44966 arg3 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val3);
44967 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
44968 if (!SWIG_IsOK(res4)) {
44969 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ReconstructFromNeighbors_reconstruct_n" "', argument " "4"" of type '" "float *""'");
44970 }
44971 arg4 = reinterpret_cast< float * >(argp4);
44972 {
44973 Py_BEGIN_ALLOW_THREADS
44974 try {
44975 ((faiss::ReconstructFromNeighbors const *)arg1)->reconstruct_n(arg2,arg3,arg4);
44976 } catch(faiss::FaissException & e) {
44977 PyEval_RestoreThread(_save);
44978 PyErr_SetString(PyExc_RuntimeError, e.what());
44979 SWIG_fail;
44980 }
44981 Py_END_ALLOW_THREADS
44982 }
44983 resultobj = SWIG_Py_Void();
44984 return resultobj;
44985 fail:
44986 return NULL;
44987 }
44988
44989
44990 SWIGINTERN PyObject *_wrap_ReconstructFromNeighbors_get_neighbor_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
44991 PyObject *resultobj = 0;
44992 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
44993 faiss::ReconstructFromNeighbors::storage_idx_t arg2 ;
44994 float *arg3 = (float *) 0 ;
44995 void *argp1 = 0 ;
44996 int res1 = 0 ;
44997 int val2 ;
44998 int ecode2 = 0 ;
44999 void *argp3 = 0 ;
45000 int res3 = 0 ;
45001 PyObject * obj0 = 0 ;
45002 PyObject * obj1 = 0 ;
45003 PyObject * obj2 = 0 ;
45004
45005 if (!PyArg_ParseTuple(args,(char *)"OOO:ReconstructFromNeighbors_get_neighbor_table",&obj0,&obj1,&obj2)) SWIG_fail;
45006 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45007 if (!SWIG_IsOK(res1)) {
45008 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ReconstructFromNeighbors_get_neighbor_table" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors const *""'");
45009 }
45010 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45011 ecode2 = SWIG_AsVal_int(obj1, &val2);
45012 if (!SWIG_IsOK(ecode2)) {
45013 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ReconstructFromNeighbors_get_neighbor_table" "', argument " "2"" of type '" "faiss::ReconstructFromNeighbors::storage_idx_t""'");
45014 }
45015 arg2 = static_cast< faiss::ReconstructFromNeighbors::storage_idx_t >(val2);
45016 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
45017 if (!SWIG_IsOK(res3)) {
45018 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ReconstructFromNeighbors_get_neighbor_table" "', argument " "3"" of type '" "float *""'");
45019 }
45020 arg3 = reinterpret_cast< float * >(argp3);
45021 {
45022 Py_BEGIN_ALLOW_THREADS
45023 try {
45024 ((faiss::ReconstructFromNeighbors const *)arg1)->get_neighbor_table(arg2,arg3);
45025 } catch(faiss::FaissException & e) {
45026 PyEval_RestoreThread(_save);
45027 PyErr_SetString(PyExc_RuntimeError, e.what());
45028 SWIG_fail;
45029 }
45030 Py_END_ALLOW_THREADS
45031 }
45032 resultobj = SWIG_Py_Void();
45033 return resultobj;
45034 fail:
45035 return NULL;
45036 }
45037
45038
45039 SWIGINTERN PyObject *_wrap_delete_ReconstructFromNeighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45040 PyObject *resultobj = 0;
45041 faiss::ReconstructFromNeighbors *arg1 = (faiss::ReconstructFromNeighbors *) 0 ;
45042 void *argp1 = 0 ;
45043 int res1 = 0 ;
45044 PyObject * obj0 = 0 ;
45045
45046 if (!PyArg_ParseTuple(args,(char *)"O:delete_ReconstructFromNeighbors",&obj0)) SWIG_fail;
45047 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_DISOWN | 0 );
45048 if (!SWIG_IsOK(res1)) {
45049 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ReconstructFromNeighbors" "', argument " "1"" of type '" "faiss::ReconstructFromNeighbors *""'");
45050 }
45051 arg1 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp1);
45052 delete arg1;
45053 resultobj = SWIG_Py_Void();
45054 return resultobj;
45055 fail:
45056 return NULL;
45057 }
45058
45059
45060 SWIGINTERN PyObject *ReconstructFromNeighbors_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45061 PyObject *obj;
45062 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
45063 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_NewClientData(obj));
45064 return SWIG_Py_Void();
45065 }
45066
45067 SWIGINTERN PyObject *_wrap_IndexHNSW_hnsw_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45068 PyObject *resultobj = 0;
45069 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45070 faiss::HNSW *arg2 = (faiss::HNSW *) 0 ;
45071 void *argp1 = 0 ;
45072 int res1 = 0 ;
45073 void *argp2 = 0 ;
45074 int res2 = 0 ;
45075 PyObject * obj0 = 0 ;
45076 PyObject * obj1 = 0 ;
45077
45078 if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_hnsw_set",&obj0,&obj1)) SWIG_fail;
45079 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45080 if (!SWIG_IsOK(res1)) {
45081 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_hnsw_set" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45082 }
45083 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45084 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
45085 if (!SWIG_IsOK(res2)) {
45086 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexHNSW_hnsw_set" "', argument " "2"" of type '" "faiss::HNSW *""'");
45087 }
45088 arg2 = reinterpret_cast< faiss::HNSW * >(argp2);
45089 if (arg1) (arg1)->hnsw = *arg2;
45090 resultobj = SWIG_Py_Void();
45091 return resultobj;
45092 fail:
45093 return NULL;
45094 }
45095
45096
45097 SWIGINTERN PyObject *_wrap_IndexHNSW_hnsw_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45098 PyObject *resultobj = 0;
45099 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45100 void *argp1 = 0 ;
45101 int res1 = 0 ;
45102 PyObject * obj0 = 0 ;
45103 faiss::HNSW *result = 0 ;
45104
45105 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_hnsw_get",&obj0)) SWIG_fail;
45106 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45107 if (!SWIG_IsOK(res1)) {
45108 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_hnsw_get" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45109 }
45110 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45111 result = (faiss::HNSW *)& ((arg1)->hnsw);
45112 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW, 0 | 0 );
45113 return resultobj;
45114 fail:
45115 return NULL;
45116 }
45117
45118
45119 SWIGINTERN PyObject *_wrap_IndexHNSW_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45120 PyObject *resultobj = 0;
45121 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45122 bool arg2 ;
45123 void *argp1 = 0 ;
45124 int res1 = 0 ;
45125 bool val2 ;
45126 int ecode2 = 0 ;
45127 PyObject * obj0 = 0 ;
45128 PyObject * obj1 = 0 ;
45129
45130 if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_own_fields_set",&obj0,&obj1)) SWIG_fail;
45131 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45132 if (!SWIG_IsOK(res1)) {
45133 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_own_fields_set" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45134 }
45135 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45136 ecode2 = SWIG_AsVal_bool(obj1, &val2);
45137 if (!SWIG_IsOK(ecode2)) {
45138 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_own_fields_set" "', argument " "2"" of type '" "bool""'");
45139 }
45140 arg2 = static_cast< bool >(val2);
45141 if (arg1) (arg1)->own_fields = arg2;
45142 resultobj = SWIG_Py_Void();
45143 return resultobj;
45144 fail:
45145 return NULL;
45146 }
45147
45148
45149 SWIGINTERN PyObject *_wrap_IndexHNSW_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45150 PyObject *resultobj = 0;
45151 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45152 void *argp1 = 0 ;
45153 int res1 = 0 ;
45154 PyObject * obj0 = 0 ;
45155 bool result;
45156
45157 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_own_fields_get",&obj0)) SWIG_fail;
45158 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45159 if (!SWIG_IsOK(res1)) {
45160 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_own_fields_get" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45161 }
45162 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45163 result = (bool) ((arg1)->own_fields);
45164 resultobj = SWIG_From_bool(static_cast< bool >(result));
45165 return resultobj;
45166 fail:
45167 return NULL;
45168 }
45169
45170
45171 SWIGINTERN PyObject *_wrap_IndexHNSW_storage_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45172 PyObject *resultobj = 0;
45173 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45174 faiss::Index *arg2 = (faiss::Index *) 0 ;
45175 void *argp1 = 0 ;
45176 int res1 = 0 ;
45177 void *argp2 = 0 ;
45178 int res2 = 0 ;
45179 PyObject * obj0 = 0 ;
45180 PyObject * obj1 = 0 ;
45181
45182 if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_storage_set",&obj0,&obj1)) SWIG_fail;
45183 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45184 if (!SWIG_IsOK(res1)) {
45185 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_storage_set" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45186 }
45187 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45188 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
45189 if (!SWIG_IsOK(res2)) {
45190 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexHNSW_storage_set" "', argument " "2"" of type '" "faiss::Index *""'");
45191 }
45192 arg2 = reinterpret_cast< faiss::Index * >(argp2);
45193 if (arg1) (arg1)->storage = arg2;
45194 resultobj = SWIG_Py_Void();
45195 return resultobj;
45196 fail:
45197 return NULL;
45198 }
45199
45200
45201 SWIGINTERN PyObject *_wrap_IndexHNSW_storage_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45202 PyObject *resultobj = 0;
45203 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45204 void *argp1 = 0 ;
45205 int res1 = 0 ;
45206 PyObject * obj0 = 0 ;
45207 faiss::Index *result = 0 ;
45208
45209 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_storage_get",&obj0)) SWIG_fail;
45210 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45211 if (!SWIG_IsOK(res1)) {
45212 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_storage_get" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45213 }
45214 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45215 result = (faiss::Index *) ((arg1)->storage);
45216 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
45217 return resultobj;
45218 fail:
45219 return NULL;
45220 }
45221
45222
45223 SWIGINTERN PyObject *_wrap_IndexHNSW_reconstruct_from_neighbors_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45224 PyObject *resultobj = 0;
45225 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45226 faiss::ReconstructFromNeighbors *arg2 = (faiss::ReconstructFromNeighbors *) 0 ;
45227 void *argp1 = 0 ;
45228 int res1 = 0 ;
45229 void *argp2 = 0 ;
45230 int res2 = 0 ;
45231 PyObject * obj0 = 0 ;
45232 PyObject * obj1 = 0 ;
45233
45234 if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_reconstruct_from_neighbors_set",&obj0,&obj1)) SWIG_fail;
45235 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45236 if (!SWIG_IsOK(res1)) {
45237 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reconstruct_from_neighbors_set" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45238 }
45239 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45240 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ReconstructFromNeighbors, SWIG_POINTER_DISOWN | 0 );
45241 if (!SWIG_IsOK(res2)) {
45242 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexHNSW_reconstruct_from_neighbors_set" "', argument " "2"" of type '" "faiss::ReconstructFromNeighbors *""'");
45243 }
45244 arg2 = reinterpret_cast< faiss::ReconstructFromNeighbors * >(argp2);
45245 if (arg1) (arg1)->reconstruct_from_neighbors = arg2;
45246 resultobj = SWIG_Py_Void();
45247 return resultobj;
45248 fail:
45249 return NULL;
45250 }
45251
45252
45253 SWIGINTERN PyObject *_wrap_IndexHNSW_reconstruct_from_neighbors_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45254 PyObject *resultobj = 0;
45255 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45256 void *argp1 = 0 ;
45257 int res1 = 0 ;
45258 PyObject * obj0 = 0 ;
45259 faiss::ReconstructFromNeighbors *result = 0 ;
45260
45261 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_reconstruct_from_neighbors_get",&obj0)) SWIG_fail;
45262 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45263 if (!SWIG_IsOK(res1)) {
45264 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reconstruct_from_neighbors_get" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45265 }
45266 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45267 result = (faiss::ReconstructFromNeighbors *) ((arg1)->reconstruct_from_neighbors);
45268 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ReconstructFromNeighbors, 0 | 0 );
45269 return resultobj;
45270 fail:
45271 return NULL;
45272 }
45273
45274
45275 SWIGINTERN PyObject *_wrap_delete_IndexHNSW(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45276 PyObject *resultobj = 0;
45277 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45278 void *argp1 = 0 ;
45279 int res1 = 0 ;
45280 PyObject * obj0 = 0 ;
45281
45282 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSW",&obj0)) SWIG_fail;
45283 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, SWIG_POINTER_DISOWN | 0 );
45284 if (!SWIG_IsOK(res1)) {
45285 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSW" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45286 }
45287 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45288 {
45289 Py_BEGIN_ALLOW_THREADS
45290 try {
45291 delete arg1;
45292 } catch(faiss::FaissException & e) {
45293 PyEval_RestoreThread(_save);
45294 PyErr_SetString(PyExc_RuntimeError, e.what());
45295 SWIG_fail;
45296 }
45297 Py_END_ALLOW_THREADS
45298 }
45299 resultobj = SWIG_Py_Void();
45300 return resultobj;
45301 fail:
45302 return NULL;
45303 }
45304
45305
45306 SWIGINTERN PyObject *_wrap_IndexHNSW_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45307 PyObject *resultobj = 0;
45308 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45309 void *argp1 = 0 ;
45310 int res1 = 0 ;
45311 PyObject * obj0 = 0 ;
45312 faiss::HNSW::DistanceComputer *result = 0 ;
45313
45314 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_get_distance_computer",&obj0)) SWIG_fail;
45315 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45316 if (!SWIG_IsOK(res1)) {
45317 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
45318 }
45319 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45320 {
45321 Py_BEGIN_ALLOW_THREADS
45322 try {
45323 result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSW const *)arg1)->get_distance_computer();
45324 } catch(faiss::FaissException & e) {
45325 PyEval_RestoreThread(_save);
45326 PyErr_SetString(PyExc_RuntimeError, e.what());
45327 SWIG_fail;
45328 }
45329 Py_END_ALLOW_THREADS
45330 }
45331 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
45332 return resultobj;
45333 fail:
45334 return NULL;
45335 }
45336
45337
45338 SWIGINTERN PyObject *_wrap_IndexHNSW_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45339 PyObject *resultobj = 0;
45340 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45341 faiss::Index::idx_t arg2 ;
45342 float *arg3 = (float *) 0 ;
45343 void *argp1 = 0 ;
45344 int res1 = 0 ;
45345 long val2 ;
45346 int ecode2 = 0 ;
45347 void *argp3 = 0 ;
45348 int res3 = 0 ;
45349 PyObject * obj0 = 0 ;
45350 PyObject * obj1 = 0 ;
45351 PyObject * obj2 = 0 ;
45352
45353 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexHNSW_add",&obj0,&obj1,&obj2)) SWIG_fail;
45354 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45355 if (!SWIG_IsOK(res1)) {
45356 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_add" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45357 }
45358 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45359 ecode2 = SWIG_AsVal_long(obj1, &val2);
45360 if (!SWIG_IsOK(ecode2)) {
45361 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
45362 }
45363 arg2 = static_cast< faiss::Index::idx_t >(val2);
45364 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
45365 if (!SWIG_IsOK(res3)) {
45366 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_add" "', argument " "3"" of type '" "float const *""'");
45367 }
45368 arg3 = reinterpret_cast< float * >(argp3);
45369 {
45370 Py_BEGIN_ALLOW_THREADS
45371 try {
45372 (arg1)->add(arg2,(float const *)arg3);
45373 } catch(faiss::FaissException & e) {
45374 PyEval_RestoreThread(_save);
45375 PyErr_SetString(PyExc_RuntimeError, e.what());
45376 SWIG_fail;
45377 }
45378 Py_END_ALLOW_THREADS
45379 }
45380 resultobj = SWIG_Py_Void();
45381 return resultobj;
45382 fail:
45383 return NULL;
45384 }
45385
45386
45387 SWIGINTERN PyObject *_wrap_IndexHNSW_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45388 PyObject *resultobj = 0;
45389 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45390 faiss::Index::idx_t arg2 ;
45391 float *arg3 = (float *) 0 ;
45392 void *argp1 = 0 ;
45393 int res1 = 0 ;
45394 long val2 ;
45395 int ecode2 = 0 ;
45396 void *argp3 = 0 ;
45397 int res3 = 0 ;
45398 PyObject * obj0 = 0 ;
45399 PyObject * obj1 = 0 ;
45400 PyObject * obj2 = 0 ;
45401
45402 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexHNSW_train",&obj0,&obj1,&obj2)) SWIG_fail;
45403 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45404 if (!SWIG_IsOK(res1)) {
45405 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_train" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45406 }
45407 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45408 ecode2 = SWIG_AsVal_long(obj1, &val2);
45409 if (!SWIG_IsOK(ecode2)) {
45410 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
45411 }
45412 arg2 = static_cast< faiss::Index::idx_t >(val2);
45413 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
45414 if (!SWIG_IsOK(res3)) {
45415 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_train" "', argument " "3"" of type '" "float const *""'");
45416 }
45417 arg3 = reinterpret_cast< float * >(argp3);
45418 {
45419 Py_BEGIN_ALLOW_THREADS
45420 try {
45421 (arg1)->train(arg2,(float const *)arg3);
45422 } catch(faiss::FaissException & e) {
45423 PyEval_RestoreThread(_save);
45424 PyErr_SetString(PyExc_RuntimeError, e.what());
45425 SWIG_fail;
45426 }
45427 Py_END_ALLOW_THREADS
45428 }
45429 resultobj = SWIG_Py_Void();
45430 return resultobj;
45431 fail:
45432 return NULL;
45433 }
45434
45435
45436 SWIGINTERN PyObject *_wrap_IndexHNSW_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45437 PyObject *resultobj = 0;
45438 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45439 faiss::Index::idx_t arg2 ;
45440 float *arg3 = (float *) 0 ;
45441 faiss::Index::idx_t arg4 ;
45442 float *arg5 = (float *) 0 ;
45443 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
45444 void *argp1 = 0 ;
45445 int res1 = 0 ;
45446 long val2 ;
45447 int ecode2 = 0 ;
45448 void *argp3 = 0 ;
45449 int res3 = 0 ;
45450 long val4 ;
45451 int ecode4 = 0 ;
45452 void *argp5 = 0 ;
45453 int res5 = 0 ;
45454 void *argp6 = 0 ;
45455 int res6 = 0 ;
45456 PyObject * obj0 = 0 ;
45457 PyObject * obj1 = 0 ;
45458 PyObject * obj2 = 0 ;
45459 PyObject * obj3 = 0 ;
45460 PyObject * obj4 = 0 ;
45461 PyObject * obj5 = 0 ;
45462
45463 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexHNSW_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
45464 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45465 if (!SWIG_IsOK(res1)) {
45466 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_search" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
45467 }
45468 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45469 ecode2 = SWIG_AsVal_long(obj1, &val2);
45470 if (!SWIG_IsOK(ecode2)) {
45471 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
45472 }
45473 arg2 = static_cast< faiss::Index::idx_t >(val2);
45474 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
45475 if (!SWIG_IsOK(res3)) {
45476 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_search" "', argument " "3"" of type '" "float const *""'");
45477 }
45478 arg3 = reinterpret_cast< float * >(argp3);
45479 ecode4 = SWIG_AsVal_long(obj3, &val4);
45480 if (!SWIG_IsOK(ecode4)) {
45481 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
45482 }
45483 arg4 = static_cast< faiss::Index::idx_t >(val4);
45484 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
45485 if (!SWIG_IsOK(res5)) {
45486 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW_search" "', argument " "5"" of type '" "float *""'");
45487 }
45488 arg5 = reinterpret_cast< float * >(argp5);
45489 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
45490 if (!SWIG_IsOK(res6)) {
45491 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
45492 }
45493 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
45494 {
45495 Py_BEGIN_ALLOW_THREADS
45496 try {
45497 ((faiss::IndexHNSW const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
45498 } catch(faiss::FaissException & e) {
45499 PyEval_RestoreThread(_save);
45500 PyErr_SetString(PyExc_RuntimeError, e.what());
45501 SWIG_fail;
45502 }
45503 Py_END_ALLOW_THREADS
45504 }
45505 resultobj = SWIG_Py_Void();
45506 return resultobj;
45507 fail:
45508 return NULL;
45509 }
45510
45511
45512 SWIGINTERN PyObject *_wrap_IndexHNSW_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45513 PyObject *resultobj = 0;
45514 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45515 faiss::Index::idx_t arg2 ;
45516 float *arg3 = (float *) 0 ;
45517 void *argp1 = 0 ;
45518 int res1 = 0 ;
45519 long val2 ;
45520 int ecode2 = 0 ;
45521 void *argp3 = 0 ;
45522 int res3 = 0 ;
45523 PyObject * obj0 = 0 ;
45524 PyObject * obj1 = 0 ;
45525 PyObject * obj2 = 0 ;
45526
45527 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexHNSW_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
45528 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45529 if (!SWIG_IsOK(res1)) {
45530 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reconstruct" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
45531 }
45532 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45533 ecode2 = SWIG_AsVal_long(obj1, &val2);
45534 if (!SWIG_IsOK(ecode2)) {
45535 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
45536 }
45537 arg2 = static_cast< faiss::Index::idx_t >(val2);
45538 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
45539 if (!SWIG_IsOK(res3)) {
45540 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_reconstruct" "', argument " "3"" of type '" "float *""'");
45541 }
45542 arg3 = reinterpret_cast< float * >(argp3);
45543 {
45544 Py_BEGIN_ALLOW_THREADS
45545 try {
45546 ((faiss::IndexHNSW const *)arg1)->reconstruct(arg2,arg3);
45547 } catch(faiss::FaissException & e) {
45548 PyEval_RestoreThread(_save);
45549 PyErr_SetString(PyExc_RuntimeError, e.what());
45550 SWIG_fail;
45551 }
45552 Py_END_ALLOW_THREADS
45553 }
45554 resultobj = SWIG_Py_Void();
45555 return resultobj;
45556 fail:
45557 return NULL;
45558 }
45559
45560
45561 SWIGINTERN PyObject *_wrap_IndexHNSW_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45562 PyObject *resultobj = 0;
45563 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45564 void *argp1 = 0 ;
45565 int res1 = 0 ;
45566 PyObject * obj0 = 0 ;
45567
45568 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_reset",&obj0)) SWIG_fail;
45569 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45570 if (!SWIG_IsOK(res1)) {
45571 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reset" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45572 }
45573 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45574 {
45575 Py_BEGIN_ALLOW_THREADS
45576 try {
45577 (arg1)->reset();
45578 } catch(faiss::FaissException & e) {
45579 PyEval_RestoreThread(_save);
45580 PyErr_SetString(PyExc_RuntimeError, e.what());
45581 SWIG_fail;
45582 }
45583 Py_END_ALLOW_THREADS
45584 }
45585 resultobj = SWIG_Py_Void();
45586 return resultobj;
45587 fail:
45588 return NULL;
45589 }
45590
45591
45592 SWIGINTERN PyObject *_wrap_IndexHNSW_shrink_level_0_neighbors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45593 PyObject *resultobj = 0;
45594 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45595 int arg2 ;
45596 void *argp1 = 0 ;
45597 int res1 = 0 ;
45598 int val2 ;
45599 int ecode2 = 0 ;
45600 PyObject * obj0 = 0 ;
45601 PyObject * obj1 = 0 ;
45602
45603 if (!PyArg_ParseTuple(args,(char *)"OO:IndexHNSW_shrink_level_0_neighbors",&obj0,&obj1)) SWIG_fail;
45604 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45605 if (!SWIG_IsOK(res1)) {
45606 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_shrink_level_0_neighbors" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
45607 }
45608 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45609 ecode2 = SWIG_AsVal_int(obj1, &val2);
45610 if (!SWIG_IsOK(ecode2)) {
45611 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_shrink_level_0_neighbors" "', argument " "2"" of type '" "int""'");
45612 }
45613 arg2 = static_cast< int >(val2);
45614 {
45615 Py_BEGIN_ALLOW_THREADS
45616 try {
45617 (arg1)->shrink_level_0_neighbors(arg2);
45618 } catch(faiss::FaissException & e) {
45619 PyEval_RestoreThread(_save);
45620 PyErr_SetString(PyExc_RuntimeError, e.what());
45621 SWIG_fail;
45622 }
45623 Py_END_ALLOW_THREADS
45624 }
45625 resultobj = SWIG_Py_Void();
45626 return resultobj;
45627 fail:
45628 return NULL;
45629 }
45630
45631
45632 SWIGINTERN PyObject *_wrap_IndexHNSW_search_level_0__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45633 PyObject *resultobj = 0;
45634 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45635 faiss::Index::idx_t arg2 ;
45636 float *arg3 = (float *) 0 ;
45637 faiss::Index::idx_t arg4 ;
45638 faiss::IndexHNSW::storage_idx_t *arg5 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
45639 float *arg6 = (float *) 0 ;
45640 float *arg7 = (float *) 0 ;
45641 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
45642 int arg9 ;
45643 int arg10 ;
45644 void *argp1 = 0 ;
45645 int res1 = 0 ;
45646 long val2 ;
45647 int ecode2 = 0 ;
45648 void *argp3 = 0 ;
45649 int res3 = 0 ;
45650 long val4 ;
45651 int ecode4 = 0 ;
45652 void *argp5 = 0 ;
45653 int res5 = 0 ;
45654 void *argp6 = 0 ;
45655 int res6 = 0 ;
45656 void *argp7 = 0 ;
45657 int res7 = 0 ;
45658 void *argp8 = 0 ;
45659 int res8 = 0 ;
45660 int val9 ;
45661 int ecode9 = 0 ;
45662 int val10 ;
45663 int ecode10 = 0 ;
45664 PyObject * obj0 = 0 ;
45665 PyObject * obj1 = 0 ;
45666 PyObject * obj2 = 0 ;
45667 PyObject * obj3 = 0 ;
45668 PyObject * obj4 = 0 ;
45669 PyObject * obj5 = 0 ;
45670 PyObject * obj6 = 0 ;
45671 PyObject * obj7 = 0 ;
45672 PyObject * obj8 = 0 ;
45673 PyObject * obj9 = 0 ;
45674
45675 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexHNSW_search_level_0",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
45676 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45677 if (!SWIG_IsOK(res1)) {
45678 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_search_level_0" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
45679 }
45680 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45681 ecode2 = SWIG_AsVal_long(obj1, &val2);
45682 if (!SWIG_IsOK(ecode2)) {
45683 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_search_level_0" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
45684 }
45685 arg2 = static_cast< faiss::Index::idx_t >(val2);
45686 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
45687 if (!SWIG_IsOK(res3)) {
45688 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_search_level_0" "', argument " "3"" of type '" "float const *""'");
45689 }
45690 arg3 = reinterpret_cast< float * >(argp3);
45691 ecode4 = SWIG_AsVal_long(obj3, &val4);
45692 if (!SWIG_IsOK(ecode4)) {
45693 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW_search_level_0" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
45694 }
45695 arg4 = static_cast< faiss::Index::idx_t >(val4);
45696 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
45697 if (!SWIG_IsOK(res5)) {
45698 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW_search_level_0" "', argument " "5"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
45699 }
45700 arg5 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp5);
45701 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
45702 if (!SWIG_IsOK(res6)) {
45703 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW_search_level_0" "', argument " "6"" of type '" "float const *""'");
45704 }
45705 arg6 = reinterpret_cast< float * >(argp6);
45706 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
45707 if (!SWIG_IsOK(res7)) {
45708 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexHNSW_search_level_0" "', argument " "7"" of type '" "float *""'");
45709 }
45710 arg7 = reinterpret_cast< float * >(argp7);
45711 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
45712 if (!SWIG_IsOK(res8)) {
45713 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexHNSW_search_level_0" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
45714 }
45715 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
45716 ecode9 = SWIG_AsVal_int(obj8, &val9);
45717 if (!SWIG_IsOK(ecode9)) {
45718 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexHNSW_search_level_0" "', argument " "9"" of type '" "int""'");
45719 }
45720 arg9 = static_cast< int >(val9);
45721 ecode10 = SWIG_AsVal_int(obj9, &val10);
45722 if (!SWIG_IsOK(ecode10)) {
45723 SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "IndexHNSW_search_level_0" "', argument " "10"" of type '" "int""'");
45724 }
45725 arg10 = static_cast< int >(val10);
45726 {
45727 Py_BEGIN_ALLOW_THREADS
45728 try {
45729 ((faiss::IndexHNSW const *)arg1)->search_level_0(arg2,(float const *)arg3,arg4,(faiss::IndexHNSW::storage_idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9,arg10);
45730 } catch(faiss::FaissException & e) {
45731 PyEval_RestoreThread(_save);
45732 PyErr_SetString(PyExc_RuntimeError, e.what());
45733 SWIG_fail;
45734 }
45735 Py_END_ALLOW_THREADS
45736 }
45737 resultobj = SWIG_Py_Void();
45738 return resultobj;
45739 fail:
45740 return NULL;
45741 }
45742
45743
45744 SWIGINTERN PyObject *_wrap_IndexHNSW_search_level_0__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45745 PyObject *resultobj = 0;
45746 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45747 faiss::Index::idx_t arg2 ;
45748 float *arg3 = (float *) 0 ;
45749 faiss::Index::idx_t arg4 ;
45750 faiss::IndexHNSW::storage_idx_t *arg5 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
45751 float *arg6 = (float *) 0 ;
45752 float *arg7 = (float *) 0 ;
45753 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
45754 int arg9 ;
45755 void *argp1 = 0 ;
45756 int res1 = 0 ;
45757 long val2 ;
45758 int ecode2 = 0 ;
45759 void *argp3 = 0 ;
45760 int res3 = 0 ;
45761 long val4 ;
45762 int ecode4 = 0 ;
45763 void *argp5 = 0 ;
45764 int res5 = 0 ;
45765 void *argp6 = 0 ;
45766 int res6 = 0 ;
45767 void *argp7 = 0 ;
45768 int res7 = 0 ;
45769 void *argp8 = 0 ;
45770 int res8 = 0 ;
45771 int val9 ;
45772 int ecode9 = 0 ;
45773 PyObject * obj0 = 0 ;
45774 PyObject * obj1 = 0 ;
45775 PyObject * obj2 = 0 ;
45776 PyObject * obj3 = 0 ;
45777 PyObject * obj4 = 0 ;
45778 PyObject * obj5 = 0 ;
45779 PyObject * obj6 = 0 ;
45780 PyObject * obj7 = 0 ;
45781 PyObject * obj8 = 0 ;
45782
45783 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexHNSW_search_level_0",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
45784 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45785 if (!SWIG_IsOK(res1)) {
45786 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_search_level_0" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
45787 }
45788 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45789 ecode2 = SWIG_AsVal_long(obj1, &val2);
45790 if (!SWIG_IsOK(ecode2)) {
45791 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_search_level_0" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
45792 }
45793 arg2 = static_cast< faiss::Index::idx_t >(val2);
45794 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
45795 if (!SWIG_IsOK(res3)) {
45796 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_search_level_0" "', argument " "3"" of type '" "float const *""'");
45797 }
45798 arg3 = reinterpret_cast< float * >(argp3);
45799 ecode4 = SWIG_AsVal_long(obj3, &val4);
45800 if (!SWIG_IsOK(ecode4)) {
45801 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW_search_level_0" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
45802 }
45803 arg4 = static_cast< faiss::Index::idx_t >(val4);
45804 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
45805 if (!SWIG_IsOK(res5)) {
45806 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW_search_level_0" "', argument " "5"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
45807 }
45808 arg5 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp5);
45809 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
45810 if (!SWIG_IsOK(res6)) {
45811 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW_search_level_0" "', argument " "6"" of type '" "float const *""'");
45812 }
45813 arg6 = reinterpret_cast< float * >(argp6);
45814 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
45815 if (!SWIG_IsOK(res7)) {
45816 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexHNSW_search_level_0" "', argument " "7"" of type '" "float *""'");
45817 }
45818 arg7 = reinterpret_cast< float * >(argp7);
45819 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
45820 if (!SWIG_IsOK(res8)) {
45821 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexHNSW_search_level_0" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
45822 }
45823 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
45824 ecode9 = SWIG_AsVal_int(obj8, &val9);
45825 if (!SWIG_IsOK(ecode9)) {
45826 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexHNSW_search_level_0" "', argument " "9"" of type '" "int""'");
45827 }
45828 arg9 = static_cast< int >(val9);
45829 {
45830 Py_BEGIN_ALLOW_THREADS
45831 try {
45832 ((faiss::IndexHNSW const *)arg1)->search_level_0(arg2,(float const *)arg3,arg4,(faiss::IndexHNSW::storage_idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9);
45833 } catch(faiss::FaissException & e) {
45834 PyEval_RestoreThread(_save);
45835 PyErr_SetString(PyExc_RuntimeError, e.what());
45836 SWIG_fail;
45837 }
45838 Py_END_ALLOW_THREADS
45839 }
45840 resultobj = SWIG_Py_Void();
45841 return resultobj;
45842 fail:
45843 return NULL;
45844 }
45845
45846
45847 SWIGINTERN PyObject *_wrap_IndexHNSW_search_level_0__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
45848 PyObject *resultobj = 0;
45849 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
45850 faiss::Index::idx_t arg2 ;
45851 float *arg3 = (float *) 0 ;
45852 faiss::Index::idx_t arg4 ;
45853 faiss::IndexHNSW::storage_idx_t *arg5 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
45854 float *arg6 = (float *) 0 ;
45855 float *arg7 = (float *) 0 ;
45856 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
45857 void *argp1 = 0 ;
45858 int res1 = 0 ;
45859 long val2 ;
45860 int ecode2 = 0 ;
45861 void *argp3 = 0 ;
45862 int res3 = 0 ;
45863 long val4 ;
45864 int ecode4 = 0 ;
45865 void *argp5 = 0 ;
45866 int res5 = 0 ;
45867 void *argp6 = 0 ;
45868 int res6 = 0 ;
45869 void *argp7 = 0 ;
45870 int res7 = 0 ;
45871 void *argp8 = 0 ;
45872 int res8 = 0 ;
45873 PyObject * obj0 = 0 ;
45874 PyObject * obj1 = 0 ;
45875 PyObject * obj2 = 0 ;
45876 PyObject * obj3 = 0 ;
45877 PyObject * obj4 = 0 ;
45878 PyObject * obj5 = 0 ;
45879 PyObject * obj6 = 0 ;
45880 PyObject * obj7 = 0 ;
45881
45882 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOO:IndexHNSW_search_level_0",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7)) SWIG_fail;
45883 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
45884 if (!SWIG_IsOK(res1)) {
45885 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_search_level_0" "', argument " "1"" of type '" "faiss::IndexHNSW const *""'");
45886 }
45887 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
45888 ecode2 = SWIG_AsVal_long(obj1, &val2);
45889 if (!SWIG_IsOK(ecode2)) {
45890 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_search_level_0" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
45891 }
45892 arg2 = static_cast< faiss::Index::idx_t >(val2);
45893 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
45894 if (!SWIG_IsOK(res3)) {
45895 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_search_level_0" "', argument " "3"" of type '" "float const *""'");
45896 }
45897 arg3 = reinterpret_cast< float * >(argp3);
45898 ecode4 = SWIG_AsVal_long(obj3, &val4);
45899 if (!SWIG_IsOK(ecode4)) {
45900 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW_search_level_0" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
45901 }
45902 arg4 = static_cast< faiss::Index::idx_t >(val4);
45903 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
45904 if (!SWIG_IsOK(res5)) {
45905 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW_search_level_0" "', argument " "5"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
45906 }
45907 arg5 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp5);
45908 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
45909 if (!SWIG_IsOK(res6)) {
45910 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW_search_level_0" "', argument " "6"" of type '" "float const *""'");
45911 }
45912 arg6 = reinterpret_cast< float * >(argp6);
45913 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
45914 if (!SWIG_IsOK(res7)) {
45915 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexHNSW_search_level_0" "', argument " "7"" of type '" "float *""'");
45916 }
45917 arg7 = reinterpret_cast< float * >(argp7);
45918 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
45919 if (!SWIG_IsOK(res8)) {
45920 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexHNSW_search_level_0" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
45921 }
45922 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
45923 {
45924 Py_BEGIN_ALLOW_THREADS
45925 try {
45926 ((faiss::IndexHNSW const *)arg1)->search_level_0(arg2,(float const *)arg3,arg4,(faiss::IndexHNSW::storage_idx_t const *)arg5,(float const *)arg6,arg7,arg8);
45927 } catch(faiss::FaissException & e) {
45928 PyEval_RestoreThread(_save);
45929 PyErr_SetString(PyExc_RuntimeError, e.what());
45930 SWIG_fail;
45931 }
45932 Py_END_ALLOW_THREADS
45933 }
45934 resultobj = SWIG_Py_Void();
45935 return resultobj;
45936 fail:
45937 return NULL;
45938 }
45939
45940
45941 SWIGINTERN PyObject *_wrap_IndexHNSW_search_level_0(PyObject *self, PyObject *args) {
45942 Py_ssize_t argc;
45943 PyObject *argv[11] = {
45944 0
45945 };
45946 Py_ssize_t ii;
45947
45948 if (!PyTuple_Check(args)) SWIG_fail;
45949 argc = args ? PyObject_Length(args) : 0;
45950 for (ii = 0; (ii < 10) && (ii < argc); ii++) {
45951 argv[ii] = PyTuple_GET_ITEM(args,ii);
45952 }
45953 if (argc == 8) {
45954 int _v;
45955 void *vptr = 0;
45956 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexHNSW, 0);
45957 _v = SWIG_CheckState(res);
45958 if (_v) {
45959 {
45960 int res = SWIG_AsVal_long(argv[1], NULL);
45961 _v = SWIG_CheckState(res);
45962 }
45963 if (_v) {
45964 void *vptr = 0;
45965 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
45966 _v = SWIG_CheckState(res);
45967 if (_v) {
45968 {
45969 int res = SWIG_AsVal_long(argv[3], NULL);
45970 _v = SWIG_CheckState(res);
45971 }
45972 if (_v) {
45973 void *vptr = 0;
45974 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
45975 _v = SWIG_CheckState(res);
45976 if (_v) {
45977 void *vptr = 0;
45978 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
45979 _v = SWIG_CheckState(res);
45980 if (_v) {
45981 void *vptr = 0;
45982 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
45983 _v = SWIG_CheckState(res);
45984 if (_v) {
45985 void *vptr = 0;
45986 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
45987 _v = SWIG_CheckState(res);
45988 if (_v) {
45989 return _wrap_IndexHNSW_search_level_0__SWIG_2(self, args);
45990 }
45991 }
45992 }
45993 }
45994 }
45995 }
45996 }
45997 }
45998 }
45999 if (argc == 9) {
46000 int _v;
46001 void *vptr = 0;
46002 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexHNSW, 0);
46003 _v = SWIG_CheckState(res);
46004 if (_v) {
46005 {
46006 int res = SWIG_AsVal_long(argv[1], NULL);
46007 _v = SWIG_CheckState(res);
46008 }
46009 if (_v) {
46010 void *vptr = 0;
46011 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
46012 _v = SWIG_CheckState(res);
46013 if (_v) {
46014 {
46015 int res = SWIG_AsVal_long(argv[3], NULL);
46016 _v = SWIG_CheckState(res);
46017 }
46018 if (_v) {
46019 void *vptr = 0;
46020 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
46021 _v = SWIG_CheckState(res);
46022 if (_v) {
46023 void *vptr = 0;
46024 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
46025 _v = SWIG_CheckState(res);
46026 if (_v) {
46027 void *vptr = 0;
46028 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
46029 _v = SWIG_CheckState(res);
46030 if (_v) {
46031 void *vptr = 0;
46032 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
46033 _v = SWIG_CheckState(res);
46034 if (_v) {
46035 {
46036 int res = SWIG_AsVal_int(argv[8], NULL);
46037 _v = SWIG_CheckState(res);
46038 }
46039 if (_v) {
46040 return _wrap_IndexHNSW_search_level_0__SWIG_1(self, args);
46041 }
46042 }
46043 }
46044 }
46045 }
46046 }
46047 }
46048 }
46049 }
46050 }
46051 if (argc == 10) {
46052 int _v;
46053 void *vptr = 0;
46054 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexHNSW, 0);
46055 _v = SWIG_CheckState(res);
46056 if (_v) {
46057 {
46058 int res = SWIG_AsVal_long(argv[1], NULL);
46059 _v = SWIG_CheckState(res);
46060 }
46061 if (_v) {
46062 void *vptr = 0;
46063 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
46064 _v = SWIG_CheckState(res);
46065 if (_v) {
46066 {
46067 int res = SWIG_AsVal_long(argv[3], NULL);
46068 _v = SWIG_CheckState(res);
46069 }
46070 if (_v) {
46071 void *vptr = 0;
46072 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_int, 0);
46073 _v = SWIG_CheckState(res);
46074 if (_v) {
46075 void *vptr = 0;
46076 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
46077 _v = SWIG_CheckState(res);
46078 if (_v) {
46079 void *vptr = 0;
46080 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
46081 _v = SWIG_CheckState(res);
46082 if (_v) {
46083 void *vptr = 0;
46084 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
46085 _v = SWIG_CheckState(res);
46086 if (_v) {
46087 {
46088 int res = SWIG_AsVal_int(argv[8], NULL);
46089 _v = SWIG_CheckState(res);
46090 }
46091 if (_v) {
46092 {
46093 int res = SWIG_AsVal_int(argv[9], NULL);
46094 _v = SWIG_CheckState(res);
46095 }
46096 if (_v) {
46097 return _wrap_IndexHNSW_search_level_0__SWIG_0(self, args);
46098 }
46099 }
46100 }
46101 }
46102 }
46103 }
46104 }
46105 }
46106 }
46107 }
46108 }
46109
46110 fail:
46111 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexHNSW_search_level_0'.\n"
46112 " Possible C/C++ prototypes are:\n"
46113 " faiss::IndexHNSW::search_level_0(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::IndexHNSW::storage_idx_t const *,float const *,float *,faiss::Index::idx_t *,int,int) const\n"
46114 " faiss::IndexHNSW::search_level_0(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::IndexHNSW::storage_idx_t const *,float const *,float *,faiss::Index::idx_t *,int) const\n"
46115 " faiss::IndexHNSW::search_level_0(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::IndexHNSW::storage_idx_t const *,float const *,float *,faiss::Index::idx_t *) const\n");
46116 return 0;
46117 }
46118
46119
46120 SWIGINTERN PyObject *_wrap_IndexHNSW_init_level_0_from_knngraph(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46121 PyObject *resultobj = 0;
46122 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46123 int arg2 ;
46124 float *arg3 = (float *) 0 ;
46125 faiss::Index::idx_t *arg4 = (faiss::Index::idx_t *) 0 ;
46126 void *argp1 = 0 ;
46127 int res1 = 0 ;
46128 int val2 ;
46129 int ecode2 = 0 ;
46130 void *argp3 = 0 ;
46131 int res3 = 0 ;
46132 void *argp4 = 0 ;
46133 int res4 = 0 ;
46134 PyObject * obj0 = 0 ;
46135 PyObject * obj1 = 0 ;
46136 PyObject * obj2 = 0 ;
46137 PyObject * obj3 = 0 ;
46138
46139 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexHNSW_init_level_0_from_knngraph",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
46140 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46141 if (!SWIG_IsOK(res1)) {
46142 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_init_level_0_from_knngraph" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46143 }
46144 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46145 ecode2 = SWIG_AsVal_int(obj1, &val2);
46146 if (!SWIG_IsOK(ecode2)) {
46147 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_init_level_0_from_knngraph" "', argument " "2"" of type '" "int""'");
46148 }
46149 arg2 = static_cast< int >(val2);
46150 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46151 if (!SWIG_IsOK(res3)) {
46152 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_init_level_0_from_knngraph" "', argument " "3"" of type '" "float const *""'");
46153 }
46154 arg3 = reinterpret_cast< float * >(argp3);
46155 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
46156 if (!SWIG_IsOK(res4)) {
46157 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexHNSW_init_level_0_from_knngraph" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
46158 }
46159 arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
46160 {
46161 Py_BEGIN_ALLOW_THREADS
46162 try {
46163 (arg1)->init_level_0_from_knngraph(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4);
46164 } catch(faiss::FaissException & e) {
46165 PyEval_RestoreThread(_save);
46166 PyErr_SetString(PyExc_RuntimeError, e.what());
46167 SWIG_fail;
46168 }
46169 Py_END_ALLOW_THREADS
46170 }
46171 resultobj = SWIG_Py_Void();
46172 return resultobj;
46173 fail:
46174 return NULL;
46175 }
46176
46177
46178 SWIGINTERN PyObject *_wrap_IndexHNSW_init_level_0_from_entry_points(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46179 PyObject *resultobj = 0;
46180 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46181 int arg2 ;
46182 faiss::IndexHNSW::storage_idx_t *arg3 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
46183 faiss::IndexHNSW::storage_idx_t *arg4 = (faiss::IndexHNSW::storage_idx_t *) 0 ;
46184 void *argp1 = 0 ;
46185 int res1 = 0 ;
46186 int val2 ;
46187 int ecode2 = 0 ;
46188 void *argp3 = 0 ;
46189 int res3 = 0 ;
46190 void *argp4 = 0 ;
46191 int res4 = 0 ;
46192 PyObject * obj0 = 0 ;
46193 PyObject * obj1 = 0 ;
46194 PyObject * obj2 = 0 ;
46195 PyObject * obj3 = 0 ;
46196
46197 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexHNSW_init_level_0_from_entry_points",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
46198 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46199 if (!SWIG_IsOK(res1)) {
46200 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_init_level_0_from_entry_points" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46201 }
46202 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46203 ecode2 = SWIG_AsVal_int(obj1, &val2);
46204 if (!SWIG_IsOK(ecode2)) {
46205 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW_init_level_0_from_entry_points" "', argument " "2"" of type '" "int""'");
46206 }
46207 arg2 = static_cast< int >(val2);
46208 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
46209 if (!SWIG_IsOK(res3)) {
46210 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW_init_level_0_from_entry_points" "', argument " "3"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
46211 }
46212 arg3 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp3);
46213 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_int, 0 | 0 );
46214 if (!SWIG_IsOK(res4)) {
46215 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexHNSW_init_level_0_from_entry_points" "', argument " "4"" of type '" "faiss::IndexHNSW::storage_idx_t const *""'");
46216 }
46217 arg4 = reinterpret_cast< faiss::IndexHNSW::storage_idx_t * >(argp4);
46218 {
46219 Py_BEGIN_ALLOW_THREADS
46220 try {
46221 (arg1)->init_level_0_from_entry_points(arg2,(faiss::IndexHNSW::storage_idx_t const *)arg3,(faiss::IndexHNSW::storage_idx_t const *)arg4);
46222 } catch(faiss::FaissException & e) {
46223 PyEval_RestoreThread(_save);
46224 PyErr_SetString(PyExc_RuntimeError, e.what());
46225 SWIG_fail;
46226 }
46227 Py_END_ALLOW_THREADS
46228 }
46229 resultobj = SWIG_Py_Void();
46230 return resultobj;
46231 fail:
46232 return NULL;
46233 }
46234
46235
46236 SWIGINTERN PyObject *_wrap_IndexHNSW_reorder_links(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46237 PyObject *resultobj = 0;
46238 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46239 void *argp1 = 0 ;
46240 int res1 = 0 ;
46241 PyObject * obj0 = 0 ;
46242
46243 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_reorder_links",&obj0)) SWIG_fail;
46244 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46245 if (!SWIG_IsOK(res1)) {
46246 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_reorder_links" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46247 }
46248 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46249 {
46250 Py_BEGIN_ALLOW_THREADS
46251 try {
46252 (arg1)->reorder_links();
46253 } catch(faiss::FaissException & e) {
46254 PyEval_RestoreThread(_save);
46255 PyErr_SetString(PyExc_RuntimeError, e.what());
46256 SWIG_fail;
46257 }
46258 Py_END_ALLOW_THREADS
46259 }
46260 resultobj = SWIG_Py_Void();
46261 return resultobj;
46262 fail:
46263 return NULL;
46264 }
46265
46266
46267 SWIGINTERN PyObject *_wrap_IndexHNSW_link_singletons(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46268 PyObject *resultobj = 0;
46269 faiss::IndexHNSW *arg1 = (faiss::IndexHNSW *) 0 ;
46270 void *argp1 = 0 ;
46271 int res1 = 0 ;
46272 PyObject * obj0 = 0 ;
46273
46274 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW_link_singletons",&obj0)) SWIG_fail;
46275 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW, 0 | 0 );
46276 if (!SWIG_IsOK(res1)) {
46277 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW_link_singletons" "', argument " "1"" of type '" "faiss::IndexHNSW *""'");
46278 }
46279 arg1 = reinterpret_cast< faiss::IndexHNSW * >(argp1);
46280 {
46281 Py_BEGIN_ALLOW_THREADS
46282 try {
46283 (arg1)->link_singletons();
46284 } catch(faiss::FaissException & e) {
46285 PyEval_RestoreThread(_save);
46286 PyErr_SetString(PyExc_RuntimeError, e.what());
46287 SWIG_fail;
46288 }
46289 Py_END_ALLOW_THREADS
46290 }
46291 resultobj = SWIG_Py_Void();
46292 return resultobj;
46293 fail:
46294 return NULL;
46295 }
46296
46297
46298 SWIGINTERN PyObject *IndexHNSW_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46299 PyObject *obj;
46300 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
46301 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSW, SWIG_NewClientData(obj));
46302 return SWIG_Py_Void();
46303 }
46304
46305 SWIGINTERN PyObject *_wrap_new_IndexHNSWFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46306 PyObject *resultobj = 0;
46307 faiss::IndexHNSWFlat *result = 0 ;
46308
46309 if (!PyArg_ParseTuple(args,(char *)":new_IndexHNSWFlat")) SWIG_fail;
46310 {
46311 Py_BEGIN_ALLOW_THREADS
46312 try {
46313 result = (faiss::IndexHNSWFlat *)new faiss::IndexHNSWFlat();
46314 } catch(faiss::FaissException & e) {
46315 PyEval_RestoreThread(_save);
46316 PyErr_SetString(PyExc_RuntimeError, e.what());
46317 SWIG_fail;
46318 }
46319 Py_END_ALLOW_THREADS
46320 }
46321 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWFlat, SWIG_POINTER_NEW | 0 );
46322 return resultobj;
46323 fail:
46324 return NULL;
46325 }
46326
46327
46328 SWIGINTERN PyObject *_wrap_new_IndexHNSWFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46329 PyObject *resultobj = 0;
46330 int arg1 ;
46331 int arg2 ;
46332 int val1 ;
46333 int ecode1 = 0 ;
46334 int val2 ;
46335 int ecode2 = 0 ;
46336 PyObject * obj0 = 0 ;
46337 PyObject * obj1 = 0 ;
46338 faiss::IndexHNSWFlat *result = 0 ;
46339
46340 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexHNSWFlat",&obj0,&obj1)) SWIG_fail;
46341 ecode1 = SWIG_AsVal_int(obj0, &val1);
46342 if (!SWIG_IsOK(ecode1)) {
46343 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexHNSWFlat" "', argument " "1"" of type '" "int""'");
46344 }
46345 arg1 = static_cast< int >(val1);
46346 ecode2 = SWIG_AsVal_int(obj1, &val2);
46347 if (!SWIG_IsOK(ecode2)) {
46348 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexHNSWFlat" "', argument " "2"" of type '" "int""'");
46349 }
46350 arg2 = static_cast< int >(val2);
46351 {
46352 Py_BEGIN_ALLOW_THREADS
46353 try {
46354 result = (faiss::IndexHNSWFlat *)new faiss::IndexHNSWFlat(arg1,arg2);
46355 } catch(faiss::FaissException & e) {
46356 PyEval_RestoreThread(_save);
46357 PyErr_SetString(PyExc_RuntimeError, e.what());
46358 SWIG_fail;
46359 }
46360 Py_END_ALLOW_THREADS
46361 }
46362 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWFlat, SWIG_POINTER_NEW | 0 );
46363 return resultobj;
46364 fail:
46365 return NULL;
46366 }
46367
46368
46369 SWIGINTERN PyObject *_wrap_new_IndexHNSWFlat(PyObject *self, PyObject *args) {
46370 Py_ssize_t argc;
46371 PyObject *argv[3] = {
46372 0
46373 };
46374 Py_ssize_t ii;
46375
46376 if (!PyTuple_Check(args)) SWIG_fail;
46377 argc = args ? PyObject_Length(args) : 0;
46378 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
46379 argv[ii] = PyTuple_GET_ITEM(args,ii);
46380 }
46381 if (argc == 0) {
46382 return _wrap_new_IndexHNSWFlat__SWIG_0(self, args);
46383 }
46384 if (argc == 2) {
46385 int _v;
46386 {
46387 int res = SWIG_AsVal_int(argv[0], NULL);
46388 _v = SWIG_CheckState(res);
46389 }
46390 if (_v) {
46391 {
46392 int res = SWIG_AsVal_int(argv[1], NULL);
46393 _v = SWIG_CheckState(res);
46394 }
46395 if (_v) {
46396 return _wrap_new_IndexHNSWFlat__SWIG_1(self, args);
46397 }
46398 }
46399 }
46400
46401 fail:
46402 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexHNSWFlat'.\n"
46403 " Possible C/C++ prototypes are:\n"
46404 " faiss::IndexHNSWFlat::IndexHNSWFlat()\n"
46405 " faiss::IndexHNSWFlat::IndexHNSWFlat(int,int)\n");
46406 return 0;
46407 }
46408
46409
46410 SWIGINTERN PyObject *_wrap_IndexHNSWFlat_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46411 PyObject *resultobj = 0;
46412 faiss::IndexHNSWFlat *arg1 = (faiss::IndexHNSWFlat *) 0 ;
46413 void *argp1 = 0 ;
46414 int res1 = 0 ;
46415 PyObject * obj0 = 0 ;
46416 faiss::HNSW::DistanceComputer *result = 0 ;
46417
46418 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSWFlat_get_distance_computer",&obj0)) SWIG_fail;
46419 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWFlat, 0 | 0 );
46420 if (!SWIG_IsOK(res1)) {
46421 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSWFlat_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSWFlat const *""'");
46422 }
46423 arg1 = reinterpret_cast< faiss::IndexHNSWFlat * >(argp1);
46424 {
46425 Py_BEGIN_ALLOW_THREADS
46426 try {
46427 result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSWFlat const *)arg1)->get_distance_computer();
46428 } catch(faiss::FaissException & e) {
46429 PyEval_RestoreThread(_save);
46430 PyErr_SetString(PyExc_RuntimeError, e.what());
46431 SWIG_fail;
46432 }
46433 Py_END_ALLOW_THREADS
46434 }
46435 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
46436 return resultobj;
46437 fail:
46438 return NULL;
46439 }
46440
46441
46442 SWIGINTERN PyObject *_wrap_delete_IndexHNSWFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46443 PyObject *resultobj = 0;
46444 faiss::IndexHNSWFlat *arg1 = (faiss::IndexHNSWFlat *) 0 ;
46445 void *argp1 = 0 ;
46446 int res1 = 0 ;
46447 PyObject * obj0 = 0 ;
46448
46449 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSWFlat",&obj0)) SWIG_fail;
46450 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWFlat, SWIG_POINTER_DISOWN | 0 );
46451 if (!SWIG_IsOK(res1)) {
46452 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSWFlat" "', argument " "1"" of type '" "faiss::IndexHNSWFlat *""'");
46453 }
46454 arg1 = reinterpret_cast< faiss::IndexHNSWFlat * >(argp1);
46455 delete arg1;
46456 resultobj = SWIG_Py_Void();
46457 return resultobj;
46458 fail:
46459 return NULL;
46460 }
46461
46462
46463 SWIGINTERN PyObject *IndexHNSWFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46464 PyObject *obj;
46465 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
46466 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSWFlat, SWIG_NewClientData(obj));
46467 return SWIG_Py_Void();
46468 }
46469
46470 SWIGINTERN PyObject *_wrap_new_IndexHNSWPQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46471 PyObject *resultobj = 0;
46472 faiss::IndexHNSWPQ *result = 0 ;
46473
46474 if (!PyArg_ParseTuple(args,(char *)":new_IndexHNSWPQ")) SWIG_fail;
46475 {
46476 Py_BEGIN_ALLOW_THREADS
46477 try {
46478 result = (faiss::IndexHNSWPQ *)new faiss::IndexHNSWPQ();
46479 } catch(faiss::FaissException & e) {
46480 PyEval_RestoreThread(_save);
46481 PyErr_SetString(PyExc_RuntimeError, e.what());
46482 SWIG_fail;
46483 }
46484 Py_END_ALLOW_THREADS
46485 }
46486 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWPQ, SWIG_POINTER_NEW | 0 );
46487 return resultobj;
46488 fail:
46489 return NULL;
46490 }
46491
46492
46493 SWIGINTERN PyObject *_wrap_new_IndexHNSWPQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46494 PyObject *resultobj = 0;
46495 int arg1 ;
46496 int arg2 ;
46497 int arg3 ;
46498 int val1 ;
46499 int ecode1 = 0 ;
46500 int val2 ;
46501 int ecode2 = 0 ;
46502 int val3 ;
46503 int ecode3 = 0 ;
46504 PyObject * obj0 = 0 ;
46505 PyObject * obj1 = 0 ;
46506 PyObject * obj2 = 0 ;
46507 faiss::IndexHNSWPQ *result = 0 ;
46508
46509 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexHNSWPQ",&obj0,&obj1,&obj2)) SWIG_fail;
46510 ecode1 = SWIG_AsVal_int(obj0, &val1);
46511 if (!SWIG_IsOK(ecode1)) {
46512 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexHNSWPQ" "', argument " "1"" of type '" "int""'");
46513 }
46514 arg1 = static_cast< int >(val1);
46515 ecode2 = SWIG_AsVal_int(obj1, &val2);
46516 if (!SWIG_IsOK(ecode2)) {
46517 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexHNSWPQ" "', argument " "2"" of type '" "int""'");
46518 }
46519 arg2 = static_cast< int >(val2);
46520 ecode3 = SWIG_AsVal_int(obj2, &val3);
46521 if (!SWIG_IsOK(ecode3)) {
46522 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexHNSWPQ" "', argument " "3"" of type '" "int""'");
46523 }
46524 arg3 = static_cast< int >(val3);
46525 {
46526 Py_BEGIN_ALLOW_THREADS
46527 try {
46528 result = (faiss::IndexHNSWPQ *)new faiss::IndexHNSWPQ(arg1,arg2,arg3);
46529 } catch(faiss::FaissException & e) {
46530 PyEval_RestoreThread(_save);
46531 PyErr_SetString(PyExc_RuntimeError, e.what());
46532 SWIG_fail;
46533 }
46534 Py_END_ALLOW_THREADS
46535 }
46536 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWPQ, SWIG_POINTER_NEW | 0 );
46537 return resultobj;
46538 fail:
46539 return NULL;
46540 }
46541
46542
46543 SWIGINTERN PyObject *_wrap_new_IndexHNSWPQ(PyObject *self, PyObject *args) {
46544 Py_ssize_t argc;
46545 PyObject *argv[4] = {
46546 0
46547 };
46548 Py_ssize_t ii;
46549
46550 if (!PyTuple_Check(args)) SWIG_fail;
46551 argc = args ? PyObject_Length(args) : 0;
46552 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
46553 argv[ii] = PyTuple_GET_ITEM(args,ii);
46554 }
46555 if (argc == 0) {
46556 return _wrap_new_IndexHNSWPQ__SWIG_0(self, args);
46557 }
46558 if (argc == 3) {
46559 int _v;
46560 {
46561 int res = SWIG_AsVal_int(argv[0], NULL);
46562 _v = SWIG_CheckState(res);
46563 }
46564 if (_v) {
46565 {
46566 int res = SWIG_AsVal_int(argv[1], NULL);
46567 _v = SWIG_CheckState(res);
46568 }
46569 if (_v) {
46570 {
46571 int res = SWIG_AsVal_int(argv[2], NULL);
46572 _v = SWIG_CheckState(res);
46573 }
46574 if (_v) {
46575 return _wrap_new_IndexHNSWPQ__SWIG_1(self, args);
46576 }
46577 }
46578 }
46579 }
46580
46581 fail:
46582 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexHNSWPQ'.\n"
46583 " Possible C/C++ prototypes are:\n"
46584 " faiss::IndexHNSWPQ::IndexHNSWPQ()\n"
46585 " faiss::IndexHNSWPQ::IndexHNSWPQ(int,int,int)\n");
46586 return 0;
46587 }
46588
46589
46590 SWIGINTERN PyObject *_wrap_IndexHNSWPQ_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46591 PyObject *resultobj = 0;
46592 faiss::IndexHNSWPQ *arg1 = (faiss::IndexHNSWPQ *) 0 ;
46593 faiss::Index::idx_t arg2 ;
46594 float *arg3 = (float *) 0 ;
46595 void *argp1 = 0 ;
46596 int res1 = 0 ;
46597 long val2 ;
46598 int ecode2 = 0 ;
46599 void *argp3 = 0 ;
46600 int res3 = 0 ;
46601 PyObject * obj0 = 0 ;
46602 PyObject * obj1 = 0 ;
46603 PyObject * obj2 = 0 ;
46604
46605 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexHNSWPQ_train",&obj0,&obj1,&obj2)) SWIG_fail;
46606 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWPQ, 0 | 0 );
46607 if (!SWIG_IsOK(res1)) {
46608 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSWPQ_train" "', argument " "1"" of type '" "faiss::IndexHNSWPQ *""'");
46609 }
46610 arg1 = reinterpret_cast< faiss::IndexHNSWPQ * >(argp1);
46611 ecode2 = SWIG_AsVal_long(obj1, &val2);
46612 if (!SWIG_IsOK(ecode2)) {
46613 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSWPQ_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
46614 }
46615 arg2 = static_cast< faiss::Index::idx_t >(val2);
46616 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
46617 if (!SWIG_IsOK(res3)) {
46618 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSWPQ_train" "', argument " "3"" of type '" "float const *""'");
46619 }
46620 arg3 = reinterpret_cast< float * >(argp3);
46621 {
46622 Py_BEGIN_ALLOW_THREADS
46623 try {
46624 (arg1)->train(arg2,(float const *)arg3);
46625 } catch(faiss::FaissException & e) {
46626 PyEval_RestoreThread(_save);
46627 PyErr_SetString(PyExc_RuntimeError, e.what());
46628 SWIG_fail;
46629 }
46630 Py_END_ALLOW_THREADS
46631 }
46632 resultobj = SWIG_Py_Void();
46633 return resultobj;
46634 fail:
46635 return NULL;
46636 }
46637
46638
46639 SWIGINTERN PyObject *_wrap_IndexHNSWPQ_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46640 PyObject *resultobj = 0;
46641 faiss::IndexHNSWPQ *arg1 = (faiss::IndexHNSWPQ *) 0 ;
46642 void *argp1 = 0 ;
46643 int res1 = 0 ;
46644 PyObject * obj0 = 0 ;
46645 faiss::HNSW::DistanceComputer *result = 0 ;
46646
46647 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSWPQ_get_distance_computer",&obj0)) SWIG_fail;
46648 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWPQ, 0 | 0 );
46649 if (!SWIG_IsOK(res1)) {
46650 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSWPQ_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSWPQ const *""'");
46651 }
46652 arg1 = reinterpret_cast< faiss::IndexHNSWPQ * >(argp1);
46653 {
46654 Py_BEGIN_ALLOW_THREADS
46655 try {
46656 result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSWPQ const *)arg1)->get_distance_computer();
46657 } catch(faiss::FaissException & e) {
46658 PyEval_RestoreThread(_save);
46659 PyErr_SetString(PyExc_RuntimeError, e.what());
46660 SWIG_fail;
46661 }
46662 Py_END_ALLOW_THREADS
46663 }
46664 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
46665 return resultobj;
46666 fail:
46667 return NULL;
46668 }
46669
46670
46671 SWIGINTERN PyObject *_wrap_delete_IndexHNSWPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46672 PyObject *resultobj = 0;
46673 faiss::IndexHNSWPQ *arg1 = (faiss::IndexHNSWPQ *) 0 ;
46674 void *argp1 = 0 ;
46675 int res1 = 0 ;
46676 PyObject * obj0 = 0 ;
46677
46678 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSWPQ",&obj0)) SWIG_fail;
46679 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWPQ, SWIG_POINTER_DISOWN | 0 );
46680 if (!SWIG_IsOK(res1)) {
46681 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSWPQ" "', argument " "1"" of type '" "faiss::IndexHNSWPQ *""'");
46682 }
46683 arg1 = reinterpret_cast< faiss::IndexHNSWPQ * >(argp1);
46684 delete arg1;
46685 resultobj = SWIG_Py_Void();
46686 return resultobj;
46687 fail:
46688 return NULL;
46689 }
46690
46691
46692 SWIGINTERN PyObject *IndexHNSWPQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46693 PyObject *obj;
46694 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
46695 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSWPQ, SWIG_NewClientData(obj));
46696 return SWIG_Py_Void();
46697 }
46698
46699 SWIGINTERN PyObject *_wrap_new_IndexHNSWSQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46700 PyObject *resultobj = 0;
46701 faiss::IndexHNSWSQ *result = 0 ;
46702
46703 if (!PyArg_ParseTuple(args,(char *)":new_IndexHNSWSQ")) SWIG_fail;
46704 {
46705 Py_BEGIN_ALLOW_THREADS
46706 try {
46707 result = (faiss::IndexHNSWSQ *)new faiss::IndexHNSWSQ();
46708 } catch(faiss::FaissException & e) {
46709 PyEval_RestoreThread(_save);
46710 PyErr_SetString(PyExc_RuntimeError, e.what());
46711 SWIG_fail;
46712 }
46713 Py_END_ALLOW_THREADS
46714 }
46715 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWSQ, SWIG_POINTER_NEW | 0 );
46716 return resultobj;
46717 fail:
46718 return NULL;
46719 }
46720
46721
46722 SWIGINTERN PyObject *_wrap_new_IndexHNSWSQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46723 PyObject *resultobj = 0;
46724 int arg1 ;
46725 faiss::ScalarQuantizer::QuantizerType arg2 ;
46726 int arg3 ;
46727 int val1 ;
46728 int ecode1 = 0 ;
46729 int val2 ;
46730 int ecode2 = 0 ;
46731 int val3 ;
46732 int ecode3 = 0 ;
46733 PyObject * obj0 = 0 ;
46734 PyObject * obj1 = 0 ;
46735 PyObject * obj2 = 0 ;
46736 faiss::IndexHNSWSQ *result = 0 ;
46737
46738 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexHNSWSQ",&obj0,&obj1,&obj2)) SWIG_fail;
46739 ecode1 = SWIG_AsVal_int(obj0, &val1);
46740 if (!SWIG_IsOK(ecode1)) {
46741 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexHNSWSQ" "', argument " "1"" of type '" "int""'");
46742 }
46743 arg1 = static_cast< int >(val1);
46744 ecode2 = SWIG_AsVal_int(obj1, &val2);
46745 if (!SWIG_IsOK(ecode2)) {
46746 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexHNSWSQ" "', argument " "2"" of type '" "faiss::ScalarQuantizer::QuantizerType""'");
46747 }
46748 arg2 = static_cast< faiss::ScalarQuantizer::QuantizerType >(val2);
46749 ecode3 = SWIG_AsVal_int(obj2, &val3);
46750 if (!SWIG_IsOK(ecode3)) {
46751 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexHNSWSQ" "', argument " "3"" of type '" "int""'");
46752 }
46753 arg3 = static_cast< int >(val3);
46754 {
46755 Py_BEGIN_ALLOW_THREADS
46756 try {
46757 result = (faiss::IndexHNSWSQ *)new faiss::IndexHNSWSQ(arg1,arg2,arg3);
46758 } catch(faiss::FaissException & e) {
46759 PyEval_RestoreThread(_save);
46760 PyErr_SetString(PyExc_RuntimeError, e.what());
46761 SWIG_fail;
46762 }
46763 Py_END_ALLOW_THREADS
46764 }
46765 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSWSQ, SWIG_POINTER_NEW | 0 );
46766 return resultobj;
46767 fail:
46768 return NULL;
46769 }
46770
46771
46772 SWIGINTERN PyObject *_wrap_new_IndexHNSWSQ(PyObject *self, PyObject *args) {
46773 Py_ssize_t argc;
46774 PyObject *argv[4] = {
46775 0
46776 };
46777 Py_ssize_t ii;
46778
46779 if (!PyTuple_Check(args)) SWIG_fail;
46780 argc = args ? PyObject_Length(args) : 0;
46781 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
46782 argv[ii] = PyTuple_GET_ITEM(args,ii);
46783 }
46784 if (argc == 0) {
46785 return _wrap_new_IndexHNSWSQ__SWIG_0(self, args);
46786 }
46787 if (argc == 3) {
46788 int _v;
46789 {
46790 int res = SWIG_AsVal_int(argv[0], NULL);
46791 _v = SWIG_CheckState(res);
46792 }
46793 if (_v) {
46794 {
46795 int res = SWIG_AsVal_int(argv[1], NULL);
46796 _v = SWIG_CheckState(res);
46797 }
46798 if (_v) {
46799 {
46800 int res = SWIG_AsVal_int(argv[2], NULL);
46801 _v = SWIG_CheckState(res);
46802 }
46803 if (_v) {
46804 return _wrap_new_IndexHNSWSQ__SWIG_1(self, args);
46805 }
46806 }
46807 }
46808 }
46809
46810 fail:
46811 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexHNSWSQ'.\n"
46812 " Possible C/C++ prototypes are:\n"
46813 " faiss::IndexHNSWSQ::IndexHNSWSQ()\n"
46814 " faiss::IndexHNSWSQ::IndexHNSWSQ(int,faiss::ScalarQuantizer::QuantizerType,int)\n");
46815 return 0;
46816 }
46817
46818
46819 SWIGINTERN PyObject *_wrap_IndexHNSWSQ_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46820 PyObject *resultobj = 0;
46821 faiss::IndexHNSWSQ *arg1 = (faiss::IndexHNSWSQ *) 0 ;
46822 void *argp1 = 0 ;
46823 int res1 = 0 ;
46824 PyObject * obj0 = 0 ;
46825 faiss::HNSW::DistanceComputer *result = 0 ;
46826
46827 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSWSQ_get_distance_computer",&obj0)) SWIG_fail;
46828 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWSQ, 0 | 0 );
46829 if (!SWIG_IsOK(res1)) {
46830 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSWSQ_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSWSQ const *""'");
46831 }
46832 arg1 = reinterpret_cast< faiss::IndexHNSWSQ * >(argp1);
46833 {
46834 Py_BEGIN_ALLOW_THREADS
46835 try {
46836 result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSWSQ const *)arg1)->get_distance_computer();
46837 } catch(faiss::FaissException & e) {
46838 PyEval_RestoreThread(_save);
46839 PyErr_SetString(PyExc_RuntimeError, e.what());
46840 SWIG_fail;
46841 }
46842 Py_END_ALLOW_THREADS
46843 }
46844 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
46845 return resultobj;
46846 fail:
46847 return NULL;
46848 }
46849
46850
46851 SWIGINTERN PyObject *_wrap_delete_IndexHNSWSQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46852 PyObject *resultobj = 0;
46853 faiss::IndexHNSWSQ *arg1 = (faiss::IndexHNSWSQ *) 0 ;
46854 void *argp1 = 0 ;
46855 int res1 = 0 ;
46856 PyObject * obj0 = 0 ;
46857
46858 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSWSQ",&obj0)) SWIG_fail;
46859 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSWSQ, SWIG_POINTER_DISOWN | 0 );
46860 if (!SWIG_IsOK(res1)) {
46861 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSWSQ" "', argument " "1"" of type '" "faiss::IndexHNSWSQ *""'");
46862 }
46863 arg1 = reinterpret_cast< faiss::IndexHNSWSQ * >(argp1);
46864 delete arg1;
46865 resultobj = SWIG_Py_Void();
46866 return resultobj;
46867 fail:
46868 return NULL;
46869 }
46870
46871
46872 SWIGINTERN PyObject *IndexHNSWSQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46873 PyObject *obj;
46874 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
46875 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSWSQ, SWIG_NewClientData(obj));
46876 return SWIG_Py_Void();
46877 }
46878
46879 SWIGINTERN PyObject *_wrap_new_IndexHNSW2Level__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46880 PyObject *resultobj = 0;
46881 faiss::IndexHNSW2Level *result = 0 ;
46882
46883 if (!PyArg_ParseTuple(args,(char *)":new_IndexHNSW2Level")) SWIG_fail;
46884 {
46885 Py_BEGIN_ALLOW_THREADS
46886 try {
46887 result = (faiss::IndexHNSW2Level *)new faiss::IndexHNSW2Level();
46888 } catch(faiss::FaissException & e) {
46889 PyEval_RestoreThread(_save);
46890 PyErr_SetString(PyExc_RuntimeError, e.what());
46891 SWIG_fail;
46892 }
46893 Py_END_ALLOW_THREADS
46894 }
46895 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSW2Level, SWIG_POINTER_NEW | 0 );
46896 return resultobj;
46897 fail:
46898 return NULL;
46899 }
46900
46901
46902 SWIGINTERN PyObject *_wrap_new_IndexHNSW2Level__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
46903 PyObject *resultobj = 0;
46904 faiss::Index *arg1 = (faiss::Index *) 0 ;
46905 size_t arg2 ;
46906 int arg3 ;
46907 int arg4 ;
46908 void *argp1 = 0 ;
46909 int res1 = 0 ;
46910 size_t val2 ;
46911 int ecode2 = 0 ;
46912 int val3 ;
46913 int ecode3 = 0 ;
46914 int val4 ;
46915 int ecode4 = 0 ;
46916 PyObject * obj0 = 0 ;
46917 PyObject * obj1 = 0 ;
46918 PyObject * obj2 = 0 ;
46919 PyObject * obj3 = 0 ;
46920 faiss::IndexHNSW2Level *result = 0 ;
46921
46922 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexHNSW2Level",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
46923 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
46924 if (!SWIG_IsOK(res1)) {
46925 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexHNSW2Level" "', argument " "1"" of type '" "faiss::Index *""'");
46926 }
46927 arg1 = reinterpret_cast< faiss::Index * >(argp1);
46928 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
46929 if (!SWIG_IsOK(ecode2)) {
46930 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexHNSW2Level" "', argument " "2"" of type '" "size_t""'");
46931 }
46932 arg2 = static_cast< size_t >(val2);
46933 ecode3 = SWIG_AsVal_int(obj2, &val3);
46934 if (!SWIG_IsOK(ecode3)) {
46935 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexHNSW2Level" "', argument " "3"" of type '" "int""'");
46936 }
46937 arg3 = static_cast< int >(val3);
46938 ecode4 = SWIG_AsVal_int(obj3, &val4);
46939 if (!SWIG_IsOK(ecode4)) {
46940 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexHNSW2Level" "', argument " "4"" of type '" "int""'");
46941 }
46942 arg4 = static_cast< int >(val4);
46943 {
46944 Py_BEGIN_ALLOW_THREADS
46945 try {
46946 result = (faiss::IndexHNSW2Level *)new faiss::IndexHNSW2Level(arg1,arg2,arg3,arg4);
46947 } catch(faiss::FaissException & e) {
46948 PyEval_RestoreThread(_save);
46949 PyErr_SetString(PyExc_RuntimeError, e.what());
46950 SWIG_fail;
46951 }
46952 Py_END_ALLOW_THREADS
46953 }
46954 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexHNSW2Level, SWIG_POINTER_NEW | 0 );
46955 return resultobj;
46956 fail:
46957 return NULL;
46958 }
46959
46960
46961 SWIGINTERN PyObject *_wrap_new_IndexHNSW2Level(PyObject *self, PyObject *args) {
46962 Py_ssize_t argc;
46963 PyObject *argv[5] = {
46964 0
46965 };
46966 Py_ssize_t ii;
46967
46968 if (!PyTuple_Check(args)) SWIG_fail;
46969 argc = args ? PyObject_Length(args) : 0;
46970 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
46971 argv[ii] = PyTuple_GET_ITEM(args,ii);
46972 }
46973 if (argc == 0) {
46974 return _wrap_new_IndexHNSW2Level__SWIG_0(self, args);
46975 }
46976 if (argc == 4) {
46977 int _v;
46978 void *vptr = 0;
46979 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
46980 _v = SWIG_CheckState(res);
46981 if (_v) {
46982 {
46983 int res = SWIG_AsVal_size_t(argv[1], NULL);
46984 _v = SWIG_CheckState(res);
46985 }
46986 if (_v) {
46987 {
46988 int res = SWIG_AsVal_int(argv[2], NULL);
46989 _v = SWIG_CheckState(res);
46990 }
46991 if (_v) {
46992 {
46993 int res = SWIG_AsVal_int(argv[3], NULL);
46994 _v = SWIG_CheckState(res);
46995 }
46996 if (_v) {
46997 return _wrap_new_IndexHNSW2Level__SWIG_1(self, args);
46998 }
46999 }
47000 }
47001 }
47002 }
47003
47004 fail:
47005 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexHNSW2Level'.\n"
47006 " Possible C/C++ prototypes are:\n"
47007 " faiss::IndexHNSW2Level::IndexHNSW2Level()\n"
47008 " faiss::IndexHNSW2Level::IndexHNSW2Level(faiss::Index *,size_t,int,int)\n");
47009 return 0;
47010 }
47011
47012
47013 SWIGINTERN PyObject *_wrap_IndexHNSW2Level_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47014 PyObject *resultobj = 0;
47015 faiss::IndexHNSW2Level *arg1 = (faiss::IndexHNSW2Level *) 0 ;
47016 void *argp1 = 0 ;
47017 int res1 = 0 ;
47018 PyObject * obj0 = 0 ;
47019 faiss::HNSW::DistanceComputer *result = 0 ;
47020
47021 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW2Level_get_distance_computer",&obj0)) SWIG_fail;
47022 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW2Level, 0 | 0 );
47023 if (!SWIG_IsOK(res1)) {
47024 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW2Level_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexHNSW2Level const *""'");
47025 }
47026 arg1 = reinterpret_cast< faiss::IndexHNSW2Level * >(argp1);
47027 {
47028 Py_BEGIN_ALLOW_THREADS
47029 try {
47030 result = (faiss::HNSW::DistanceComputer *)((faiss::IndexHNSW2Level const *)arg1)->get_distance_computer();
47031 } catch(faiss::FaissException & e) {
47032 PyEval_RestoreThread(_save);
47033 PyErr_SetString(PyExc_RuntimeError, e.what());
47034 SWIG_fail;
47035 }
47036 Py_END_ALLOW_THREADS
47037 }
47038 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
47039 return resultobj;
47040 fail:
47041 return NULL;
47042 }
47043
47044
47045 SWIGINTERN PyObject *_wrap_IndexHNSW2Level_flip_to_ivf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47046 PyObject *resultobj = 0;
47047 faiss::IndexHNSW2Level *arg1 = (faiss::IndexHNSW2Level *) 0 ;
47048 void *argp1 = 0 ;
47049 int res1 = 0 ;
47050 PyObject * obj0 = 0 ;
47051
47052 if (!PyArg_ParseTuple(args,(char *)"O:IndexHNSW2Level_flip_to_ivf",&obj0)) SWIG_fail;
47053 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW2Level, 0 | 0 );
47054 if (!SWIG_IsOK(res1)) {
47055 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW2Level_flip_to_ivf" "', argument " "1"" of type '" "faiss::IndexHNSW2Level *""'");
47056 }
47057 arg1 = reinterpret_cast< faiss::IndexHNSW2Level * >(argp1);
47058 {
47059 Py_BEGIN_ALLOW_THREADS
47060 try {
47061 (arg1)->flip_to_ivf();
47062 } catch(faiss::FaissException & e) {
47063 PyEval_RestoreThread(_save);
47064 PyErr_SetString(PyExc_RuntimeError, e.what());
47065 SWIG_fail;
47066 }
47067 Py_END_ALLOW_THREADS
47068 }
47069 resultobj = SWIG_Py_Void();
47070 return resultobj;
47071 fail:
47072 return NULL;
47073 }
47074
47075
47076 SWIGINTERN PyObject *_wrap_IndexHNSW2Level_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47077 PyObject *resultobj = 0;
47078 faiss::IndexHNSW2Level *arg1 = (faiss::IndexHNSW2Level *) 0 ;
47079 faiss::Index::idx_t arg2 ;
47080 float *arg3 = (float *) 0 ;
47081 faiss::Index::idx_t arg4 ;
47082 float *arg5 = (float *) 0 ;
47083 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
47084 void *argp1 = 0 ;
47085 int res1 = 0 ;
47086 long val2 ;
47087 int ecode2 = 0 ;
47088 void *argp3 = 0 ;
47089 int res3 = 0 ;
47090 long val4 ;
47091 int ecode4 = 0 ;
47092 void *argp5 = 0 ;
47093 int res5 = 0 ;
47094 void *argp6 = 0 ;
47095 int res6 = 0 ;
47096 PyObject * obj0 = 0 ;
47097 PyObject * obj1 = 0 ;
47098 PyObject * obj2 = 0 ;
47099 PyObject * obj3 = 0 ;
47100 PyObject * obj4 = 0 ;
47101 PyObject * obj5 = 0 ;
47102
47103 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexHNSW2Level_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
47104 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW2Level, 0 | 0 );
47105 if (!SWIG_IsOK(res1)) {
47106 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexHNSW2Level_search" "', argument " "1"" of type '" "faiss::IndexHNSW2Level const *""'");
47107 }
47108 arg1 = reinterpret_cast< faiss::IndexHNSW2Level * >(argp1);
47109 ecode2 = SWIG_AsVal_long(obj1, &val2);
47110 if (!SWIG_IsOK(ecode2)) {
47111 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexHNSW2Level_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47112 }
47113 arg2 = static_cast< faiss::Index::idx_t >(val2);
47114 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47115 if (!SWIG_IsOK(res3)) {
47116 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexHNSW2Level_search" "', argument " "3"" of type '" "float const *""'");
47117 }
47118 arg3 = reinterpret_cast< float * >(argp3);
47119 ecode4 = SWIG_AsVal_long(obj3, &val4);
47120 if (!SWIG_IsOK(ecode4)) {
47121 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexHNSW2Level_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
47122 }
47123 arg4 = static_cast< faiss::Index::idx_t >(val4);
47124 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
47125 if (!SWIG_IsOK(res5)) {
47126 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexHNSW2Level_search" "', argument " "5"" of type '" "float *""'");
47127 }
47128 arg5 = reinterpret_cast< float * >(argp5);
47129 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
47130 if (!SWIG_IsOK(res6)) {
47131 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexHNSW2Level_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
47132 }
47133 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
47134 {
47135 Py_BEGIN_ALLOW_THREADS
47136 try {
47137 ((faiss::IndexHNSW2Level const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
47138 } catch(faiss::FaissException & e) {
47139 PyEval_RestoreThread(_save);
47140 PyErr_SetString(PyExc_RuntimeError, e.what());
47141 SWIG_fail;
47142 }
47143 Py_END_ALLOW_THREADS
47144 }
47145 resultobj = SWIG_Py_Void();
47146 return resultobj;
47147 fail:
47148 return NULL;
47149 }
47150
47151
47152 SWIGINTERN PyObject *_wrap_delete_IndexHNSW2Level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47153 PyObject *resultobj = 0;
47154 faiss::IndexHNSW2Level *arg1 = (faiss::IndexHNSW2Level *) 0 ;
47155 void *argp1 = 0 ;
47156 int res1 = 0 ;
47157 PyObject * obj0 = 0 ;
47158
47159 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexHNSW2Level",&obj0)) SWIG_fail;
47160 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexHNSW2Level, SWIG_POINTER_DISOWN | 0 );
47161 if (!SWIG_IsOK(res1)) {
47162 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexHNSW2Level" "', argument " "1"" of type '" "faiss::IndexHNSW2Level *""'");
47163 }
47164 arg1 = reinterpret_cast< faiss::IndexHNSW2Level * >(argp1);
47165 delete arg1;
47166 resultobj = SWIG_Py_Void();
47167 return resultobj;
47168 fail:
47169 return NULL;
47170 }
47171
47172
47173 SWIGINTERN PyObject *IndexHNSW2Level_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47174 PyObject *obj;
47175 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
47176 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexHNSW2Level, SWIG_NewClientData(obj));
47177 return SWIG_Py_Void();
47178 }
47179
47180 SWIGINTERN PyObject *_wrap_new_IndexIVFFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47181 PyObject *resultobj = 0;
47182 faiss::Index *arg1 = (faiss::Index *) 0 ;
47183 size_t arg2 ;
47184 size_t arg3 ;
47185 faiss::MetricType arg4 ;
47186 void *argp1 = 0 ;
47187 int res1 = 0 ;
47188 size_t val2 ;
47189 int ecode2 = 0 ;
47190 size_t val3 ;
47191 int ecode3 = 0 ;
47192 int val4 ;
47193 int ecode4 = 0 ;
47194 PyObject * obj0 = 0 ;
47195 PyObject * obj1 = 0 ;
47196 PyObject * obj2 = 0 ;
47197 PyObject * obj3 = 0 ;
47198 faiss::IndexIVFFlat *result = 0 ;
47199
47200 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexIVFFlat",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
47201 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
47202 if (!SWIG_IsOK(res1)) {
47203 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFFlat" "', argument " "1"" of type '" "faiss::Index *""'");
47204 }
47205 arg1 = reinterpret_cast< faiss::Index * >(argp1);
47206 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
47207 if (!SWIG_IsOK(ecode2)) {
47208 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFFlat" "', argument " "2"" of type '" "size_t""'");
47209 }
47210 arg2 = static_cast< size_t >(val2);
47211 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
47212 if (!SWIG_IsOK(ecode3)) {
47213 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFFlat" "', argument " "3"" of type '" "size_t""'");
47214 }
47215 arg3 = static_cast< size_t >(val3);
47216 ecode4 = SWIG_AsVal_int(obj3, &val4);
47217 if (!SWIG_IsOK(ecode4)) {
47218 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFFlat" "', argument " "4"" of type '" "faiss::MetricType""'");
47219 }
47220 arg4 = static_cast< faiss::MetricType >(val4);
47221 {
47222 Py_BEGIN_ALLOW_THREADS
47223 try {
47224 result = (faiss::IndexIVFFlat *)new faiss::IndexIVFFlat(arg1,arg2,arg3,arg4);
47225 } catch(faiss::FaissException & e) {
47226 PyEval_RestoreThread(_save);
47227 PyErr_SetString(PyExc_RuntimeError, e.what());
47228 SWIG_fail;
47229 }
47230 Py_END_ALLOW_THREADS
47231 }
47232 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_POINTER_NEW | 0 );
47233 return resultobj;
47234 fail:
47235 return NULL;
47236 }
47237
47238
47239 SWIGINTERN PyObject *_wrap_new_IndexIVFFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47240 PyObject *resultobj = 0;
47241 faiss::Index *arg1 = (faiss::Index *) 0 ;
47242 size_t arg2 ;
47243 size_t arg3 ;
47244 void *argp1 = 0 ;
47245 int res1 = 0 ;
47246 size_t val2 ;
47247 int ecode2 = 0 ;
47248 size_t val3 ;
47249 int ecode3 = 0 ;
47250 PyObject * obj0 = 0 ;
47251 PyObject * obj1 = 0 ;
47252 PyObject * obj2 = 0 ;
47253 faiss::IndexIVFFlat *result = 0 ;
47254
47255 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexIVFFlat",&obj0,&obj1,&obj2)) SWIG_fail;
47256 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
47257 if (!SWIG_IsOK(res1)) {
47258 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFFlat" "', argument " "1"" of type '" "faiss::Index *""'");
47259 }
47260 arg1 = reinterpret_cast< faiss::Index * >(argp1);
47261 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
47262 if (!SWIG_IsOK(ecode2)) {
47263 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFFlat" "', argument " "2"" of type '" "size_t""'");
47264 }
47265 arg2 = static_cast< size_t >(val2);
47266 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
47267 if (!SWIG_IsOK(ecode3)) {
47268 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFFlat" "', argument " "3"" of type '" "size_t""'");
47269 }
47270 arg3 = static_cast< size_t >(val3);
47271 {
47272 Py_BEGIN_ALLOW_THREADS
47273 try {
47274 result = (faiss::IndexIVFFlat *)new faiss::IndexIVFFlat(arg1,arg2,arg3);
47275 } catch(faiss::FaissException & e) {
47276 PyEval_RestoreThread(_save);
47277 PyErr_SetString(PyExc_RuntimeError, e.what());
47278 SWIG_fail;
47279 }
47280 Py_END_ALLOW_THREADS
47281 }
47282 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_POINTER_NEW | 0 );
47283 return resultobj;
47284 fail:
47285 return NULL;
47286 }
47287
47288
47289 SWIGINTERN PyObject *_wrap_IndexIVFFlat_add_core(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47290 PyObject *resultobj = 0;
47291 faiss::IndexIVFFlat *arg1 = (faiss::IndexIVFFlat *) 0 ;
47292 faiss::Index::idx_t arg2 ;
47293 float *arg3 = (float *) 0 ;
47294 long *arg4 = (long *) 0 ;
47295 long *arg5 = (long *) 0 ;
47296 void *argp1 = 0 ;
47297 int res1 = 0 ;
47298 long val2 ;
47299 int ecode2 = 0 ;
47300 void *argp3 = 0 ;
47301 int res3 = 0 ;
47302 void *argp4 = 0 ;
47303 int res4 = 0 ;
47304 void *argp5 = 0 ;
47305 int res5 = 0 ;
47306 PyObject * obj0 = 0 ;
47307 PyObject * obj1 = 0 ;
47308 PyObject * obj2 = 0 ;
47309 PyObject * obj3 = 0 ;
47310 PyObject * obj4 = 0 ;
47311
47312 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFFlat_add_core",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
47313 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
47314 if (!SWIG_IsOK(res1)) {
47315 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_add_core" "', argument " "1"" of type '" "faiss::IndexIVFFlat *""'");
47316 }
47317 arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
47318 ecode2 = SWIG_AsVal_long(obj1, &val2);
47319 if (!SWIG_IsOK(ecode2)) {
47320 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_add_core" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47321 }
47322 arg2 = static_cast< faiss::Index::idx_t >(val2);
47323 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47324 if (!SWIG_IsOK(res3)) {
47325 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_add_core" "', argument " "3"" of type '" "float const *""'");
47326 }
47327 arg3 = reinterpret_cast< float * >(argp3);
47328 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
47329 if (!SWIG_IsOK(res4)) {
47330 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_add_core" "', argument " "4"" of type '" "long const *""'");
47331 }
47332 arg4 = reinterpret_cast< long * >(argp4);
47333 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
47334 if (!SWIG_IsOK(res5)) {
47335 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlat_add_core" "', argument " "5"" of type '" "long const *""'");
47336 }
47337 arg5 = reinterpret_cast< long * >(argp5);
47338 {
47339 Py_BEGIN_ALLOW_THREADS
47340 try {
47341 (arg1)->add_core(arg2,(float const *)arg3,(long const *)arg4,(long const *)arg5);
47342 } catch(faiss::FaissException & e) {
47343 PyEval_RestoreThread(_save);
47344 PyErr_SetString(PyExc_RuntimeError, e.what());
47345 SWIG_fail;
47346 }
47347 Py_END_ALLOW_THREADS
47348 }
47349 resultobj = SWIG_Py_Void();
47350 return resultobj;
47351 fail:
47352 return NULL;
47353 }
47354
47355
47356 SWIGINTERN PyObject *_wrap_IndexIVFFlat_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47357 PyObject *resultobj = 0;
47358 faiss::IndexIVFFlat *arg1 = (faiss::IndexIVFFlat *) 0 ;
47359 faiss::Index::idx_t arg2 ;
47360 float *arg3 = (float *) 0 ;
47361 long *arg4 = (long *) 0 ;
47362 void *argp1 = 0 ;
47363 int res1 = 0 ;
47364 long val2 ;
47365 int ecode2 = 0 ;
47366 void *argp3 = 0 ;
47367 int res3 = 0 ;
47368 void *argp4 = 0 ;
47369 int res4 = 0 ;
47370 PyObject * obj0 = 0 ;
47371 PyObject * obj1 = 0 ;
47372 PyObject * obj2 = 0 ;
47373 PyObject * obj3 = 0 ;
47374
47375 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlat_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
47376 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
47377 if (!SWIG_IsOK(res1)) {
47378 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFFlat *""'");
47379 }
47380 arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
47381 ecode2 = SWIG_AsVal_long(obj1, &val2);
47382 if (!SWIG_IsOK(ecode2)) {
47383 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47384 }
47385 arg2 = static_cast< faiss::Index::idx_t >(val2);
47386 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47387 if (!SWIG_IsOK(res3)) {
47388 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_add_with_ids" "', argument " "3"" of type '" "float const *""'");
47389 }
47390 arg3 = reinterpret_cast< float * >(argp3);
47391 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
47392 if (!SWIG_IsOK(res4)) {
47393 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_add_with_ids" "', argument " "4"" of type '" "long const *""'");
47394 }
47395 arg4 = reinterpret_cast< long * >(argp4);
47396 {
47397 Py_BEGIN_ALLOW_THREADS
47398 try {
47399 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
47400 } catch(faiss::FaissException & e) {
47401 PyEval_RestoreThread(_save);
47402 PyErr_SetString(PyExc_RuntimeError, e.what());
47403 SWIG_fail;
47404 }
47405 Py_END_ALLOW_THREADS
47406 }
47407 resultobj = SWIG_Py_Void();
47408 return resultobj;
47409 fail:
47410 return NULL;
47411 }
47412
47413
47414 SWIGINTERN PyObject *_wrap_IndexIVFFlat_encode_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47415 PyObject *resultobj = 0;
47416 faiss::IndexIVFFlat *arg1 = (faiss::IndexIVFFlat *) 0 ;
47417 faiss::Index::idx_t arg2 ;
47418 float *arg3 = (float *) 0 ;
47419 faiss::Index::idx_t *arg4 = (faiss::Index::idx_t *) 0 ;
47420 uint8_t *arg5 = (uint8_t *) 0 ;
47421 void *argp1 = 0 ;
47422 int res1 = 0 ;
47423 long val2 ;
47424 int ecode2 = 0 ;
47425 void *argp3 = 0 ;
47426 int res3 = 0 ;
47427 void *argp4 = 0 ;
47428 int res4 = 0 ;
47429 void *argp5 = 0 ;
47430 int res5 = 0 ;
47431 PyObject * obj0 = 0 ;
47432 PyObject * obj1 = 0 ;
47433 PyObject * obj2 = 0 ;
47434 PyObject * obj3 = 0 ;
47435 PyObject * obj4 = 0 ;
47436
47437 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFFlat_encode_vectors",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
47438 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
47439 if (!SWIG_IsOK(res1)) {
47440 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "1"" of type '" "faiss::IndexIVFFlat const *""'");
47441 }
47442 arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
47443 ecode2 = SWIG_AsVal_long(obj1, &val2);
47444 if (!SWIG_IsOK(ecode2)) {
47445 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47446 }
47447 arg2 = static_cast< faiss::Index::idx_t >(val2);
47448 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47449 if (!SWIG_IsOK(res3)) {
47450 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "3"" of type '" "float const *""'");
47451 }
47452 arg3 = reinterpret_cast< float * >(argp3);
47453 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
47454 if (!SWIG_IsOK(res4)) {
47455 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
47456 }
47457 arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
47458 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
47459 if (!SWIG_IsOK(res5)) {
47460 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlat_encode_vectors" "', argument " "5"" of type '" "uint8_t *""'");
47461 }
47462 arg5 = reinterpret_cast< uint8_t * >(argp5);
47463 {
47464 Py_BEGIN_ALLOW_THREADS
47465 try {
47466 ((faiss::IndexIVFFlat const *)arg1)->encode_vectors(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4,arg5);
47467 } catch(faiss::FaissException & e) {
47468 PyEval_RestoreThread(_save);
47469 PyErr_SetString(PyExc_RuntimeError, e.what());
47470 SWIG_fail;
47471 }
47472 Py_END_ALLOW_THREADS
47473 }
47474 resultobj = SWIG_Py_Void();
47475 return resultobj;
47476 fail:
47477 return NULL;
47478 }
47479
47480
47481 SWIGINTERN PyObject *_wrap_IndexIVFFlat_get_InvertedListScanner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47482 PyObject *resultobj = 0;
47483 faiss::IndexIVFFlat *arg1 = (faiss::IndexIVFFlat *) 0 ;
47484 bool arg2 ;
47485 void *argp1 = 0 ;
47486 int res1 = 0 ;
47487 bool val2 ;
47488 int ecode2 = 0 ;
47489 PyObject * obj0 = 0 ;
47490 PyObject * obj1 = 0 ;
47491 faiss::InvertedListScanner *result = 0 ;
47492
47493 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFFlat_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
47494 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
47495 if (!SWIG_IsOK(res1)) {
47496 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVFFlat const *""'");
47497 }
47498 arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
47499 ecode2 = SWIG_AsVal_bool(obj1, &val2);
47500 if (!SWIG_IsOK(ecode2)) {
47501 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
47502 }
47503 arg2 = static_cast< bool >(val2);
47504 {
47505 Py_BEGIN_ALLOW_THREADS
47506 try {
47507 result = (faiss::InvertedListScanner *)((faiss::IndexIVFFlat const *)arg1)->get_InvertedListScanner(arg2);
47508 } catch(faiss::FaissException & e) {
47509 PyEval_RestoreThread(_save);
47510 PyErr_SetString(PyExc_RuntimeError, e.what());
47511 SWIG_fail;
47512 }
47513 Py_END_ALLOW_THREADS
47514 }
47515 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
47516 return resultobj;
47517 fail:
47518 return NULL;
47519 }
47520
47521
47522 SWIGINTERN PyObject *_wrap_IndexIVFFlat_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47523 PyObject *resultobj = 0;
47524 faiss::IndexIVFFlat *arg1 = (faiss::IndexIVFFlat *) 0 ;
47525 faiss::Index::idx_t arg2 ;
47526 float *arg3 = (float *) 0 ;
47527 float arg4 ;
47528 faiss::RangeSearchResult *arg5 = (faiss::RangeSearchResult *) 0 ;
47529 void *argp1 = 0 ;
47530 int res1 = 0 ;
47531 long val2 ;
47532 int ecode2 = 0 ;
47533 void *argp3 = 0 ;
47534 int res3 = 0 ;
47535 float val4 ;
47536 int ecode4 = 0 ;
47537 void *argp5 = 0 ;
47538 int res5 = 0 ;
47539 PyObject * obj0 = 0 ;
47540 PyObject * obj1 = 0 ;
47541 PyObject * obj2 = 0 ;
47542 PyObject * obj3 = 0 ;
47543 PyObject * obj4 = 0 ;
47544
47545 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFFlat_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
47546 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
47547 if (!SWIG_IsOK(res1)) {
47548 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_range_search" "', argument " "1"" of type '" "faiss::IndexIVFFlat const *""'");
47549 }
47550 arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
47551 ecode2 = SWIG_AsVal_long(obj1, &val2);
47552 if (!SWIG_IsOK(ecode2)) {
47553 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
47554 }
47555 arg2 = static_cast< faiss::Index::idx_t >(val2);
47556 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
47557 if (!SWIG_IsOK(res3)) {
47558 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_range_search" "', argument " "3"" of type '" "float const *""'");
47559 }
47560 arg3 = reinterpret_cast< float * >(argp3);
47561 ecode4 = SWIG_AsVal_float(obj3, &val4);
47562 if (!SWIG_IsOK(ecode4)) {
47563 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFFlat_range_search" "', argument " "4"" of type '" "float""'");
47564 }
47565 arg4 = static_cast< float >(val4);
47566 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
47567 if (!SWIG_IsOK(res5)) {
47568 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlat_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
47569 }
47570 arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
47571 {
47572 Py_BEGIN_ALLOW_THREADS
47573 try {
47574 ((faiss::IndexIVFFlat const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
47575 } catch(faiss::FaissException & e) {
47576 PyEval_RestoreThread(_save);
47577 PyErr_SetString(PyExc_RuntimeError, e.what());
47578 SWIG_fail;
47579 }
47580 Py_END_ALLOW_THREADS
47581 }
47582 resultobj = SWIG_Py_Void();
47583 return resultobj;
47584 fail:
47585 return NULL;
47586 }
47587
47588
47589 SWIGINTERN PyObject *_wrap_IndexIVFFlat_update_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47590 PyObject *resultobj = 0;
47591 faiss::IndexIVFFlat *arg1 = (faiss::IndexIVFFlat *) 0 ;
47592 int arg2 ;
47593 faiss::Index::idx_t *arg3 = (faiss::Index::idx_t *) 0 ;
47594 float *arg4 = (float *) 0 ;
47595 void *argp1 = 0 ;
47596 int res1 = 0 ;
47597 int val2 ;
47598 int ecode2 = 0 ;
47599 void *argp3 = 0 ;
47600 int res3 = 0 ;
47601 void *argp4 = 0 ;
47602 int res4 = 0 ;
47603 PyObject * obj0 = 0 ;
47604 PyObject * obj1 = 0 ;
47605 PyObject * obj2 = 0 ;
47606 PyObject * obj3 = 0 ;
47607
47608 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlat_update_vectors",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
47609 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
47610 if (!SWIG_IsOK(res1)) {
47611 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_update_vectors" "', argument " "1"" of type '" "faiss::IndexIVFFlat *""'");
47612 }
47613 arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
47614 ecode2 = SWIG_AsVal_int(obj1, &val2);
47615 if (!SWIG_IsOK(ecode2)) {
47616 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_update_vectors" "', argument " "2"" of type '" "int""'");
47617 }
47618 arg2 = static_cast< int >(val2);
47619 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
47620 if (!SWIG_IsOK(res3)) {
47621 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlat_update_vectors" "', argument " "3"" of type '" "faiss::Index::idx_t *""'");
47622 }
47623 arg3 = reinterpret_cast< faiss::Index::idx_t * >(argp3);
47624 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
47625 if (!SWIG_IsOK(res4)) {
47626 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_update_vectors" "', argument " "4"" of type '" "float const *""'");
47627 }
47628 arg4 = reinterpret_cast< float * >(argp4);
47629 {
47630 Py_BEGIN_ALLOW_THREADS
47631 try {
47632 (arg1)->update_vectors(arg2,arg3,(float const *)arg4);
47633 } catch(faiss::FaissException & e) {
47634 PyEval_RestoreThread(_save);
47635 PyErr_SetString(PyExc_RuntimeError, e.what());
47636 SWIG_fail;
47637 }
47638 Py_END_ALLOW_THREADS
47639 }
47640 resultobj = SWIG_Py_Void();
47641 return resultobj;
47642 fail:
47643 return NULL;
47644 }
47645
47646
47647 SWIGINTERN PyObject *_wrap_IndexIVFFlat_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47648 PyObject *resultobj = 0;
47649 faiss::IndexIVFFlat *arg1 = (faiss::IndexIVFFlat *) 0 ;
47650 long arg2 ;
47651 long arg3 ;
47652 float *arg4 = (float *) 0 ;
47653 void *argp1 = 0 ;
47654 int res1 = 0 ;
47655 long val2 ;
47656 int ecode2 = 0 ;
47657 long val3 ;
47658 int ecode3 = 0 ;
47659 void *argp4 = 0 ;
47660 int res4 = 0 ;
47661 PyObject * obj0 = 0 ;
47662 PyObject * obj1 = 0 ;
47663 PyObject * obj2 = 0 ;
47664 PyObject * obj3 = 0 ;
47665
47666 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlat_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
47667 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, 0 | 0 );
47668 if (!SWIG_IsOK(res1)) {
47669 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlat_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFFlat const *""'");
47670 }
47671 arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
47672 ecode2 = SWIG_AsVal_long(obj1, &val2);
47673 if (!SWIG_IsOK(ecode2)) {
47674 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlat_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
47675 }
47676 arg2 = static_cast< long >(val2);
47677 ecode3 = SWIG_AsVal_long(obj2, &val3);
47678 if (!SWIG_IsOK(ecode3)) {
47679 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFFlat_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
47680 }
47681 arg3 = static_cast< long >(val3);
47682 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
47683 if (!SWIG_IsOK(res4)) {
47684 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlat_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
47685 }
47686 arg4 = reinterpret_cast< float * >(argp4);
47687 {
47688 Py_BEGIN_ALLOW_THREADS
47689 try {
47690 ((faiss::IndexIVFFlat const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
47691 } catch(faiss::FaissException & e) {
47692 PyEval_RestoreThread(_save);
47693 PyErr_SetString(PyExc_RuntimeError, e.what());
47694 SWIG_fail;
47695 }
47696 Py_END_ALLOW_THREADS
47697 }
47698 resultobj = SWIG_Py_Void();
47699 return resultobj;
47700 fail:
47701 return NULL;
47702 }
47703
47704
47705 SWIGINTERN PyObject *_wrap_new_IndexIVFFlat__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47706 PyObject *resultobj = 0;
47707 faiss::IndexIVFFlat *result = 0 ;
47708
47709 if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFFlat")) SWIG_fail;
47710 {
47711 Py_BEGIN_ALLOW_THREADS
47712 try {
47713 result = (faiss::IndexIVFFlat *)new faiss::IndexIVFFlat();
47714 } catch(faiss::FaissException & e) {
47715 PyEval_RestoreThread(_save);
47716 PyErr_SetString(PyExc_RuntimeError, e.what());
47717 SWIG_fail;
47718 }
47719 Py_END_ALLOW_THREADS
47720 }
47721 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_POINTER_NEW | 0 );
47722 return resultobj;
47723 fail:
47724 return NULL;
47725 }
47726
47727
47728 SWIGINTERN PyObject *_wrap_new_IndexIVFFlat(PyObject *self, PyObject *args) {
47729 Py_ssize_t argc;
47730 PyObject *argv[5] = {
47731 0
47732 };
47733 Py_ssize_t ii;
47734
47735 if (!PyTuple_Check(args)) SWIG_fail;
47736 argc = args ? PyObject_Length(args) : 0;
47737 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
47738 argv[ii] = PyTuple_GET_ITEM(args,ii);
47739 }
47740 if (argc == 0) {
47741 return _wrap_new_IndexIVFFlat__SWIG_2(self, args);
47742 }
47743 if (argc == 3) {
47744 int _v;
47745 void *vptr = 0;
47746 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
47747 _v = SWIG_CheckState(res);
47748 if (_v) {
47749 {
47750 int res = SWIG_AsVal_size_t(argv[1], NULL);
47751 _v = SWIG_CheckState(res);
47752 }
47753 if (_v) {
47754 {
47755 int res = SWIG_AsVal_size_t(argv[2], NULL);
47756 _v = SWIG_CheckState(res);
47757 }
47758 if (_v) {
47759 return _wrap_new_IndexIVFFlat__SWIG_1(self, args);
47760 }
47761 }
47762 }
47763 }
47764 if (argc == 4) {
47765 int _v;
47766 void *vptr = 0;
47767 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
47768 _v = SWIG_CheckState(res);
47769 if (_v) {
47770 {
47771 int res = SWIG_AsVal_size_t(argv[1], NULL);
47772 _v = SWIG_CheckState(res);
47773 }
47774 if (_v) {
47775 {
47776 int res = SWIG_AsVal_size_t(argv[2], NULL);
47777 _v = SWIG_CheckState(res);
47778 }
47779 if (_v) {
47780 {
47781 int res = SWIG_AsVal_int(argv[3], NULL);
47782 _v = SWIG_CheckState(res);
47783 }
47784 if (_v) {
47785 return _wrap_new_IndexIVFFlat__SWIG_0(self, args);
47786 }
47787 }
47788 }
47789 }
47790 }
47791
47792 fail:
47793 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFFlat'.\n"
47794 " Possible C/C++ prototypes are:\n"
47795 " faiss::IndexIVFFlat::IndexIVFFlat(faiss::Index *,size_t,size_t,faiss::MetricType)\n"
47796 " faiss::IndexIVFFlat::IndexIVFFlat(faiss::Index *,size_t,size_t)\n"
47797 " faiss::IndexIVFFlat::IndexIVFFlat()\n");
47798 return 0;
47799 }
47800
47801
47802 SWIGINTERN PyObject *_wrap_delete_IndexIVFFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47803 PyObject *resultobj = 0;
47804 faiss::IndexIVFFlat *arg1 = (faiss::IndexIVFFlat *) 0 ;
47805 void *argp1 = 0 ;
47806 int res1 = 0 ;
47807 PyObject * obj0 = 0 ;
47808
47809 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFFlat",&obj0)) SWIG_fail;
47810 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_POINTER_DISOWN | 0 );
47811 if (!SWIG_IsOK(res1)) {
47812 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFFlat" "', argument " "1"" of type '" "faiss::IndexIVFFlat *""'");
47813 }
47814 arg1 = reinterpret_cast< faiss::IndexIVFFlat * >(argp1);
47815 delete arg1;
47816 resultobj = SWIG_Py_Void();
47817 return resultobj;
47818 fail:
47819 return NULL;
47820 }
47821
47822
47823 SWIGINTERN PyObject *IndexIVFFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47824 PyObject *obj;
47825 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
47826 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFFlat, SWIG_NewClientData(obj));
47827 return SWIG_Py_Void();
47828 }
47829
47830 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_instances_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47831 PyObject *resultobj = 0;
47832 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
47833 std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > arg2 ;
47834 void *argp1 = 0 ;
47835 int res1 = 0 ;
47836 void *argp2 ;
47837 int res2 = 0 ;
47838 PyObject * obj0 = 0 ;
47839 PyObject * obj1 = 0 ;
47840
47841 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFFlatDedup_instances_set",&obj0,&obj1)) SWIG_fail;
47842 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
47843 if (!SWIG_IsOK(res1)) {
47844 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_instances_set" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
47845 }
47846 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
47847 {
47848 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__unordered_multimapT_long_long_t, 0 | 0);
47849 if (!SWIG_IsOK(res2)) {
47850 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFFlatDedup_instances_set" "', argument " "2"" of type '" "std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t >""'");
47851 }
47852 if (!argp2) {
47853 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVFFlatDedup_instances_set" "', argument " "2"" of type '" "std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t >""'");
47854 } else {
47855 std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > * temp = reinterpret_cast< std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > * >(argp2);
47856 arg2 = *temp;
47857 if (SWIG_IsNewObj(res2)) delete temp;
47858 }
47859 }
47860 if (arg1) (arg1)->instances = arg2;
47861 resultobj = SWIG_Py_Void();
47862 return resultobj;
47863 fail:
47864 return NULL;
47865 }
47866
47867
47868 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_instances_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47869 PyObject *resultobj = 0;
47870 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
47871 void *argp1 = 0 ;
47872 int res1 = 0 ;
47873 PyObject * obj0 = 0 ;
47874 std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > result;
47875
47876 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFFlatDedup_instances_get",&obj0)) SWIG_fail;
47877 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
47878 if (!SWIG_IsOK(res1)) {
47879 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_instances_get" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
47880 }
47881 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
47882 result = ((arg1)->instances);
47883 resultobj = SWIG_NewPointerObj((new std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t >(static_cast< const std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t >& >(result))), SWIGTYPE_p_std__unordered_multimapT_long_long_t, SWIG_POINTER_OWN | 0 );
47884 return resultobj;
47885 fail:
47886 return NULL;
47887 }
47888
47889
47890 SWIGINTERN PyObject *_wrap_new_IndexIVFFlatDedup__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47891 PyObject *resultobj = 0;
47892 faiss::Index *arg1 = (faiss::Index *) 0 ;
47893 size_t arg2 ;
47894 size_t arg3 ;
47895 faiss::MetricType arg4 ;
47896 void *argp1 = 0 ;
47897 int res1 = 0 ;
47898 size_t val2 ;
47899 int ecode2 = 0 ;
47900 size_t val3 ;
47901 int ecode3 = 0 ;
47902 int val4 ;
47903 int ecode4 = 0 ;
47904 PyObject * obj0 = 0 ;
47905 PyObject * obj1 = 0 ;
47906 PyObject * obj2 = 0 ;
47907 PyObject * obj3 = 0 ;
47908 faiss::IndexIVFFlatDedup *result = 0 ;
47909
47910 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_IndexIVFFlatDedup",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
47911 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
47912 if (!SWIG_IsOK(res1)) {
47913 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFFlatDedup" "', argument " "1"" of type '" "faiss::Index *""'");
47914 }
47915 arg1 = reinterpret_cast< faiss::Index * >(argp1);
47916 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
47917 if (!SWIG_IsOK(ecode2)) {
47918 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFFlatDedup" "', argument " "2"" of type '" "size_t""'");
47919 }
47920 arg2 = static_cast< size_t >(val2);
47921 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
47922 if (!SWIG_IsOK(ecode3)) {
47923 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFFlatDedup" "', argument " "3"" of type '" "size_t""'");
47924 }
47925 arg3 = static_cast< size_t >(val3);
47926 ecode4 = SWIG_AsVal_int(obj3, &val4);
47927 if (!SWIG_IsOK(ecode4)) {
47928 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFFlatDedup" "', argument " "4"" of type '" "faiss::MetricType""'");
47929 }
47930 arg4 = static_cast< faiss::MetricType >(val4);
47931 {
47932 Py_BEGIN_ALLOW_THREADS
47933 try {
47934 result = (faiss::IndexIVFFlatDedup *)new faiss::IndexIVFFlatDedup(arg1,arg2,arg3,arg4);
47935 } catch(faiss::FaissException & e) {
47936 PyEval_RestoreThread(_save);
47937 PyErr_SetString(PyExc_RuntimeError, e.what());
47938 SWIG_fail;
47939 }
47940 Py_END_ALLOW_THREADS
47941 }
47942 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_POINTER_NEW | 0 );
47943 return resultobj;
47944 fail:
47945 return NULL;
47946 }
47947
47948
47949 SWIGINTERN PyObject *_wrap_new_IndexIVFFlatDedup__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
47950 PyObject *resultobj = 0;
47951 faiss::Index *arg1 = (faiss::Index *) 0 ;
47952 size_t arg2 ;
47953 size_t arg3 ;
47954 void *argp1 = 0 ;
47955 int res1 = 0 ;
47956 size_t val2 ;
47957 int ecode2 = 0 ;
47958 size_t val3 ;
47959 int ecode3 = 0 ;
47960 PyObject * obj0 = 0 ;
47961 PyObject * obj1 = 0 ;
47962 PyObject * obj2 = 0 ;
47963 faiss::IndexIVFFlatDedup *result = 0 ;
47964
47965 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexIVFFlatDedup",&obj0,&obj1,&obj2)) SWIG_fail;
47966 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
47967 if (!SWIG_IsOK(res1)) {
47968 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFFlatDedup" "', argument " "1"" of type '" "faiss::Index *""'");
47969 }
47970 arg1 = reinterpret_cast< faiss::Index * >(argp1);
47971 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
47972 if (!SWIG_IsOK(ecode2)) {
47973 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFFlatDedup" "', argument " "2"" of type '" "size_t""'");
47974 }
47975 arg2 = static_cast< size_t >(val2);
47976 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
47977 if (!SWIG_IsOK(ecode3)) {
47978 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFFlatDedup" "', argument " "3"" of type '" "size_t""'");
47979 }
47980 arg3 = static_cast< size_t >(val3);
47981 {
47982 Py_BEGIN_ALLOW_THREADS
47983 try {
47984 result = (faiss::IndexIVFFlatDedup *)new faiss::IndexIVFFlatDedup(arg1,arg2,arg3);
47985 } catch(faiss::FaissException & e) {
47986 PyEval_RestoreThread(_save);
47987 PyErr_SetString(PyExc_RuntimeError, e.what());
47988 SWIG_fail;
47989 }
47990 Py_END_ALLOW_THREADS
47991 }
47992 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_POINTER_NEW | 0 );
47993 return resultobj;
47994 fail:
47995 return NULL;
47996 }
47997
47998
47999 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48000 PyObject *resultobj = 0;
48001 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48002 faiss::Index::idx_t arg2 ;
48003 float *arg3 = (float *) 0 ;
48004 void *argp1 = 0 ;
48005 int res1 = 0 ;
48006 long val2 ;
48007 int ecode2 = 0 ;
48008 void *argp3 = 0 ;
48009 int res3 = 0 ;
48010 PyObject * obj0 = 0 ;
48011 PyObject * obj1 = 0 ;
48012 PyObject * obj2 = 0 ;
48013
48014 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFFlatDedup_train",&obj0,&obj1,&obj2)) SWIG_fail;
48015 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
48016 if (!SWIG_IsOK(res1)) {
48017 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_train" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
48018 }
48019 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48020 ecode2 = SWIG_AsVal_long(obj1, &val2);
48021 if (!SWIG_IsOK(ecode2)) {
48022 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48023 }
48024 arg2 = static_cast< faiss::Index::idx_t >(val2);
48025 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48026 if (!SWIG_IsOK(res3)) {
48027 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_train" "', argument " "3"" of type '" "float const *""'");
48028 }
48029 arg3 = reinterpret_cast< float * >(argp3);
48030 {
48031 Py_BEGIN_ALLOW_THREADS
48032 try {
48033 (arg1)->train(arg2,(float const *)arg3);
48034 } catch(faiss::FaissException & e) {
48035 PyEval_RestoreThread(_save);
48036 PyErr_SetString(PyExc_RuntimeError, e.what());
48037 SWIG_fail;
48038 }
48039 Py_END_ALLOW_THREADS
48040 }
48041 resultobj = SWIG_Py_Void();
48042 return resultobj;
48043 fail:
48044 return NULL;
48045 }
48046
48047
48048 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48049 PyObject *resultobj = 0;
48050 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48051 faiss::Index::idx_t arg2 ;
48052 float *arg3 = (float *) 0 ;
48053 long *arg4 = (long *) 0 ;
48054 void *argp1 = 0 ;
48055 int res1 = 0 ;
48056 long val2 ;
48057 int ecode2 = 0 ;
48058 void *argp3 = 0 ;
48059 int res3 = 0 ;
48060 void *argp4 = 0 ;
48061 int res4 = 0 ;
48062 PyObject * obj0 = 0 ;
48063 PyObject * obj1 = 0 ;
48064 PyObject * obj2 = 0 ;
48065 PyObject * obj3 = 0 ;
48066
48067 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlatDedup_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
48068 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
48069 if (!SWIG_IsOK(res1)) {
48070 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
48071 }
48072 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48073 ecode2 = SWIG_AsVal_long(obj1, &val2);
48074 if (!SWIG_IsOK(ecode2)) {
48075 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48076 }
48077 arg2 = static_cast< faiss::Index::idx_t >(val2);
48078 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48079 if (!SWIG_IsOK(res3)) {
48080 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_add_with_ids" "', argument " "3"" of type '" "float const *""'");
48081 }
48082 arg3 = reinterpret_cast< float * >(argp3);
48083 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
48084 if (!SWIG_IsOK(res4)) {
48085 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlatDedup_add_with_ids" "', argument " "4"" of type '" "long const *""'");
48086 }
48087 arg4 = reinterpret_cast< long * >(argp4);
48088 {
48089 Py_BEGIN_ALLOW_THREADS
48090 try {
48091 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
48092 } catch(faiss::FaissException & e) {
48093 PyEval_RestoreThread(_save);
48094 PyErr_SetString(PyExc_RuntimeError, e.what());
48095 SWIG_fail;
48096 }
48097 Py_END_ALLOW_THREADS
48098 }
48099 resultobj = SWIG_Py_Void();
48100 return resultobj;
48101 fail:
48102 return NULL;
48103 }
48104
48105
48106 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_search_preassigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48107 PyObject *resultobj = 0;
48108 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48109 faiss::Index::idx_t arg2 ;
48110 float *arg3 = (float *) 0 ;
48111 faiss::Index::idx_t arg4 ;
48112 faiss::Index::idx_t *arg5 = (faiss::Index::idx_t *) 0 ;
48113 float *arg6 = (float *) 0 ;
48114 float *arg7 = (float *) 0 ;
48115 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
48116 bool arg9 ;
48117 faiss::IVFSearchParameters *arg10 = (faiss::IVFSearchParameters *) 0 ;
48118 void *argp1 = 0 ;
48119 int res1 = 0 ;
48120 long val2 ;
48121 int ecode2 = 0 ;
48122 void *argp3 = 0 ;
48123 int res3 = 0 ;
48124 long val4 ;
48125 int ecode4 = 0 ;
48126 void *argp5 = 0 ;
48127 int res5 = 0 ;
48128 void *argp6 = 0 ;
48129 int res6 = 0 ;
48130 void *argp7 = 0 ;
48131 int res7 = 0 ;
48132 void *argp8 = 0 ;
48133 int res8 = 0 ;
48134 bool val9 ;
48135 int ecode9 = 0 ;
48136 void *argp10 = 0 ;
48137 int res10 = 0 ;
48138 PyObject * obj0 = 0 ;
48139 PyObject * obj1 = 0 ;
48140 PyObject * obj2 = 0 ;
48141 PyObject * obj3 = 0 ;
48142 PyObject * obj4 = 0 ;
48143 PyObject * obj5 = 0 ;
48144 PyObject * obj6 = 0 ;
48145 PyObject * obj7 = 0 ;
48146 PyObject * obj8 = 0 ;
48147 PyObject * obj9 = 0 ;
48148
48149 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexIVFFlatDedup_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
48150 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
48151 if (!SWIG_IsOK(res1)) {
48152 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup const *""'");
48153 }
48154 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48155 ecode2 = SWIG_AsVal_long(obj1, &val2);
48156 if (!SWIG_IsOK(ecode2)) {
48157 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48158 }
48159 arg2 = static_cast< faiss::Index::idx_t >(val2);
48160 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48161 if (!SWIG_IsOK(res3)) {
48162 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "3"" of type '" "float const *""'");
48163 }
48164 arg3 = reinterpret_cast< float * >(argp3);
48165 ecode4 = SWIG_AsVal_long(obj3, &val4);
48166 if (!SWIG_IsOK(ecode4)) {
48167 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
48168 }
48169 arg4 = static_cast< faiss::Index::idx_t >(val4);
48170 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
48171 if (!SWIG_IsOK(res5)) {
48172 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
48173 }
48174 arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
48175 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
48176 if (!SWIG_IsOK(res6)) {
48177 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "6"" of type '" "float const *""'");
48178 }
48179 arg6 = reinterpret_cast< float * >(argp6);
48180 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
48181 if (!SWIG_IsOK(res7)) {
48182 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "7"" of type '" "float *""'");
48183 }
48184 arg7 = reinterpret_cast< float * >(argp7);
48185 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
48186 if (!SWIG_IsOK(res8)) {
48187 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
48188 }
48189 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
48190 ecode9 = SWIG_AsVal_bool(obj8, &val9);
48191 if (!SWIG_IsOK(ecode9)) {
48192 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "9"" of type '" "bool""'");
48193 }
48194 arg9 = static_cast< bool >(val9);
48195 res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
48196 if (!SWIG_IsOK(res10)) {
48197 SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "10"" of type '" "faiss::IVFSearchParameters const *""'");
48198 }
48199 arg10 = reinterpret_cast< faiss::IVFSearchParameters * >(argp10);
48200 {
48201 Py_BEGIN_ALLOW_THREADS
48202 try {
48203 ((faiss::IndexIVFFlatDedup const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9,(faiss::IVFSearchParameters const *)arg10);
48204 } catch(faiss::FaissException & e) {
48205 PyEval_RestoreThread(_save);
48206 PyErr_SetString(PyExc_RuntimeError, e.what());
48207 SWIG_fail;
48208 }
48209 Py_END_ALLOW_THREADS
48210 }
48211 resultobj = SWIG_Py_Void();
48212 return resultobj;
48213 fail:
48214 return NULL;
48215 }
48216
48217
48218 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_search_preassigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48219 PyObject *resultobj = 0;
48220 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48221 faiss::Index::idx_t arg2 ;
48222 float *arg3 = (float *) 0 ;
48223 faiss::Index::idx_t arg4 ;
48224 faiss::Index::idx_t *arg5 = (faiss::Index::idx_t *) 0 ;
48225 float *arg6 = (float *) 0 ;
48226 float *arg7 = (float *) 0 ;
48227 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
48228 bool arg9 ;
48229 void *argp1 = 0 ;
48230 int res1 = 0 ;
48231 long val2 ;
48232 int ecode2 = 0 ;
48233 void *argp3 = 0 ;
48234 int res3 = 0 ;
48235 long val4 ;
48236 int ecode4 = 0 ;
48237 void *argp5 = 0 ;
48238 int res5 = 0 ;
48239 void *argp6 = 0 ;
48240 int res6 = 0 ;
48241 void *argp7 = 0 ;
48242 int res7 = 0 ;
48243 void *argp8 = 0 ;
48244 int res8 = 0 ;
48245 bool val9 ;
48246 int ecode9 = 0 ;
48247 PyObject * obj0 = 0 ;
48248 PyObject * obj1 = 0 ;
48249 PyObject * obj2 = 0 ;
48250 PyObject * obj3 = 0 ;
48251 PyObject * obj4 = 0 ;
48252 PyObject * obj5 = 0 ;
48253 PyObject * obj6 = 0 ;
48254 PyObject * obj7 = 0 ;
48255 PyObject * obj8 = 0 ;
48256
48257 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexIVFFlatDedup_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
48258 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
48259 if (!SWIG_IsOK(res1)) {
48260 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup const *""'");
48261 }
48262 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48263 ecode2 = SWIG_AsVal_long(obj1, &val2);
48264 if (!SWIG_IsOK(ecode2)) {
48265 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48266 }
48267 arg2 = static_cast< faiss::Index::idx_t >(val2);
48268 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48269 if (!SWIG_IsOK(res3)) {
48270 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "3"" of type '" "float const *""'");
48271 }
48272 arg3 = reinterpret_cast< float * >(argp3);
48273 ecode4 = SWIG_AsVal_long(obj3, &val4);
48274 if (!SWIG_IsOK(ecode4)) {
48275 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
48276 }
48277 arg4 = static_cast< faiss::Index::idx_t >(val4);
48278 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
48279 if (!SWIG_IsOK(res5)) {
48280 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
48281 }
48282 arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
48283 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
48284 if (!SWIG_IsOK(res6)) {
48285 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "6"" of type '" "float const *""'");
48286 }
48287 arg6 = reinterpret_cast< float * >(argp6);
48288 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
48289 if (!SWIG_IsOK(res7)) {
48290 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "7"" of type '" "float *""'");
48291 }
48292 arg7 = reinterpret_cast< float * >(argp7);
48293 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
48294 if (!SWIG_IsOK(res8)) {
48295 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
48296 }
48297 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
48298 ecode9 = SWIG_AsVal_bool(obj8, &val9);
48299 if (!SWIG_IsOK(ecode9)) {
48300 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVFFlatDedup_search_preassigned" "', argument " "9"" of type '" "bool""'");
48301 }
48302 arg9 = static_cast< bool >(val9);
48303 {
48304 Py_BEGIN_ALLOW_THREADS
48305 try {
48306 ((faiss::IndexIVFFlatDedup const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9);
48307 } catch(faiss::FaissException & e) {
48308 PyEval_RestoreThread(_save);
48309 PyErr_SetString(PyExc_RuntimeError, e.what());
48310 SWIG_fail;
48311 }
48312 Py_END_ALLOW_THREADS
48313 }
48314 resultobj = SWIG_Py_Void();
48315 return resultobj;
48316 fail:
48317 return NULL;
48318 }
48319
48320
48321 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_search_preassigned(PyObject *self, PyObject *args) {
48322 Py_ssize_t argc;
48323 PyObject *argv[11] = {
48324 0
48325 };
48326 Py_ssize_t ii;
48327
48328 if (!PyTuple_Check(args)) SWIG_fail;
48329 argc = args ? PyObject_Length(args) : 0;
48330 for (ii = 0; (ii < 10) && (ii < argc); ii++) {
48331 argv[ii] = PyTuple_GET_ITEM(args,ii);
48332 }
48333 if (argc == 9) {
48334 int _v;
48335 void *vptr = 0;
48336 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0);
48337 _v = SWIG_CheckState(res);
48338 if (_v) {
48339 {
48340 int res = SWIG_AsVal_long(argv[1], NULL);
48341 _v = SWIG_CheckState(res);
48342 }
48343 if (_v) {
48344 void *vptr = 0;
48345 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
48346 _v = SWIG_CheckState(res);
48347 if (_v) {
48348 {
48349 int res = SWIG_AsVal_long(argv[3], NULL);
48350 _v = SWIG_CheckState(res);
48351 }
48352 if (_v) {
48353 void *vptr = 0;
48354 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
48355 _v = SWIG_CheckState(res);
48356 if (_v) {
48357 void *vptr = 0;
48358 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
48359 _v = SWIG_CheckState(res);
48360 if (_v) {
48361 void *vptr = 0;
48362 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
48363 _v = SWIG_CheckState(res);
48364 if (_v) {
48365 void *vptr = 0;
48366 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
48367 _v = SWIG_CheckState(res);
48368 if (_v) {
48369 {
48370 int res = SWIG_AsVal_bool(argv[8], NULL);
48371 _v = SWIG_CheckState(res);
48372 }
48373 if (_v) {
48374 return _wrap_IndexIVFFlatDedup_search_preassigned__SWIG_1(self, args);
48375 }
48376 }
48377 }
48378 }
48379 }
48380 }
48381 }
48382 }
48383 }
48384 }
48385 if (argc == 10) {
48386 int _v;
48387 void *vptr = 0;
48388 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0);
48389 _v = SWIG_CheckState(res);
48390 if (_v) {
48391 {
48392 int res = SWIG_AsVal_long(argv[1], NULL);
48393 _v = SWIG_CheckState(res);
48394 }
48395 if (_v) {
48396 void *vptr = 0;
48397 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
48398 _v = SWIG_CheckState(res);
48399 if (_v) {
48400 {
48401 int res = SWIG_AsVal_long(argv[3], NULL);
48402 _v = SWIG_CheckState(res);
48403 }
48404 if (_v) {
48405 void *vptr = 0;
48406 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
48407 _v = SWIG_CheckState(res);
48408 if (_v) {
48409 void *vptr = 0;
48410 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
48411 _v = SWIG_CheckState(res);
48412 if (_v) {
48413 void *vptr = 0;
48414 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
48415 _v = SWIG_CheckState(res);
48416 if (_v) {
48417 void *vptr = 0;
48418 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
48419 _v = SWIG_CheckState(res);
48420 if (_v) {
48421 {
48422 int res = SWIG_AsVal_bool(argv[8], NULL);
48423 _v = SWIG_CheckState(res);
48424 }
48425 if (_v) {
48426 void *vptr = 0;
48427 int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_faiss__IVFSearchParameters, 0);
48428 _v = SWIG_CheckState(res);
48429 if (_v) {
48430 return _wrap_IndexIVFFlatDedup_search_preassigned__SWIG_0(self, args);
48431 }
48432 }
48433 }
48434 }
48435 }
48436 }
48437 }
48438 }
48439 }
48440 }
48441 }
48442
48443 fail:
48444 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFFlatDedup_search_preassigned'.\n"
48445 " Possible C/C++ prototypes are:\n"
48446 " faiss::IndexIVFFlatDedup::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool,faiss::IVFSearchParameters const *) const\n"
48447 " faiss::IndexIVFFlatDedup::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool) const\n");
48448 return 0;
48449 }
48450
48451
48452 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48453 PyObject *resultobj = 0;
48454 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48455 faiss::IDSelector *arg2 = 0 ;
48456 void *argp1 = 0 ;
48457 int res1 = 0 ;
48458 void *argp2 = 0 ;
48459 int res2 = 0 ;
48460 PyObject * obj0 = 0 ;
48461 PyObject * obj1 = 0 ;
48462 long result;
48463
48464 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFFlatDedup_remove_ids",&obj0,&obj1)) SWIG_fail;
48465 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
48466 if (!SWIG_IsOK(res1)) {
48467 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_remove_ids" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
48468 }
48469 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48470 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
48471 if (!SWIG_IsOK(res2)) {
48472 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFFlatDedup_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
48473 }
48474 if (!argp2) {
48475 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVFFlatDedup_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
48476 }
48477 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
48478 {
48479 Py_BEGIN_ALLOW_THREADS
48480 try {
48481 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
48482 } catch(faiss::FaissException & e) {
48483 PyEval_RestoreThread(_save);
48484 PyErr_SetString(PyExc_RuntimeError, e.what());
48485 SWIG_fail;
48486 }
48487 Py_END_ALLOW_THREADS
48488 }
48489 resultobj = SWIG_From_long(static_cast< long >(result));
48490 return resultobj;
48491 fail:
48492 return NULL;
48493 }
48494
48495
48496 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48497 PyObject *resultobj = 0;
48498 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48499 faiss::Index::idx_t arg2 ;
48500 float *arg3 = (float *) 0 ;
48501 float arg4 ;
48502 faiss::RangeSearchResult *arg5 = (faiss::RangeSearchResult *) 0 ;
48503 void *argp1 = 0 ;
48504 int res1 = 0 ;
48505 long val2 ;
48506 int ecode2 = 0 ;
48507 void *argp3 = 0 ;
48508 int res3 = 0 ;
48509 float val4 ;
48510 int ecode4 = 0 ;
48511 void *argp5 = 0 ;
48512 int res5 = 0 ;
48513 PyObject * obj0 = 0 ;
48514 PyObject * obj1 = 0 ;
48515 PyObject * obj2 = 0 ;
48516 PyObject * obj3 = 0 ;
48517 PyObject * obj4 = 0 ;
48518
48519 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFFlatDedup_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
48520 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
48521 if (!SWIG_IsOK(res1)) {
48522 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup const *""'");
48523 }
48524 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48525 ecode2 = SWIG_AsVal_long(obj1, &val2);
48526 if (!SWIG_IsOK(ecode2)) {
48527 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
48528 }
48529 arg2 = static_cast< faiss::Index::idx_t >(val2);
48530 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
48531 if (!SWIG_IsOK(res3)) {
48532 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "3"" of type '" "float const *""'");
48533 }
48534 arg3 = reinterpret_cast< float * >(argp3);
48535 ecode4 = SWIG_AsVal_float(obj3, &val4);
48536 if (!SWIG_IsOK(ecode4)) {
48537 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "4"" of type '" "float""'");
48538 }
48539 arg4 = static_cast< float >(val4);
48540 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
48541 if (!SWIG_IsOK(res5)) {
48542 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFFlatDedup_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
48543 }
48544 arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
48545 {
48546 Py_BEGIN_ALLOW_THREADS
48547 try {
48548 ((faiss::IndexIVFFlatDedup const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
48549 } catch(faiss::FaissException & e) {
48550 PyEval_RestoreThread(_save);
48551 PyErr_SetString(PyExc_RuntimeError, e.what());
48552 SWIG_fail;
48553 }
48554 Py_END_ALLOW_THREADS
48555 }
48556 resultobj = SWIG_Py_Void();
48557 return resultobj;
48558 fail:
48559 return NULL;
48560 }
48561
48562
48563 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_update_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48564 PyObject *resultobj = 0;
48565 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48566 int arg2 ;
48567 faiss::Index::idx_t *arg3 = (faiss::Index::idx_t *) 0 ;
48568 float *arg4 = (float *) 0 ;
48569 void *argp1 = 0 ;
48570 int res1 = 0 ;
48571 int val2 ;
48572 int ecode2 = 0 ;
48573 void *argp3 = 0 ;
48574 int res3 = 0 ;
48575 void *argp4 = 0 ;
48576 int res4 = 0 ;
48577 PyObject * obj0 = 0 ;
48578 PyObject * obj1 = 0 ;
48579 PyObject * obj2 = 0 ;
48580 PyObject * obj3 = 0 ;
48581
48582 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlatDedup_update_vectors",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
48583 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
48584 if (!SWIG_IsOK(res1)) {
48585 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_update_vectors" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
48586 }
48587 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48588 ecode2 = SWIG_AsVal_int(obj1, &val2);
48589 if (!SWIG_IsOK(ecode2)) {
48590 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_update_vectors" "', argument " "2"" of type '" "int""'");
48591 }
48592 arg2 = static_cast< int >(val2);
48593 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
48594 if (!SWIG_IsOK(res3)) {
48595 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFFlatDedup_update_vectors" "', argument " "3"" of type '" "faiss::Index::idx_t *""'");
48596 }
48597 arg3 = reinterpret_cast< faiss::Index::idx_t * >(argp3);
48598 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
48599 if (!SWIG_IsOK(res4)) {
48600 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlatDedup_update_vectors" "', argument " "4"" of type '" "float const *""'");
48601 }
48602 arg4 = reinterpret_cast< float * >(argp4);
48603 {
48604 Py_BEGIN_ALLOW_THREADS
48605 try {
48606 (arg1)->update_vectors(arg2,arg3,(float const *)arg4);
48607 } catch(faiss::FaissException & e) {
48608 PyEval_RestoreThread(_save);
48609 PyErr_SetString(PyExc_RuntimeError, e.what());
48610 SWIG_fail;
48611 }
48612 Py_END_ALLOW_THREADS
48613 }
48614 resultobj = SWIG_Py_Void();
48615 return resultobj;
48616 fail:
48617 return NULL;
48618 }
48619
48620
48621 SWIGINTERN PyObject *_wrap_IndexIVFFlatDedup_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48622 PyObject *resultobj = 0;
48623 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48624 long arg2 ;
48625 long arg3 ;
48626 float *arg4 = (float *) 0 ;
48627 void *argp1 = 0 ;
48628 int res1 = 0 ;
48629 long val2 ;
48630 int ecode2 = 0 ;
48631 long val3 ;
48632 int ecode3 = 0 ;
48633 void *argp4 = 0 ;
48634 int res4 = 0 ;
48635 PyObject * obj0 = 0 ;
48636 PyObject * obj1 = 0 ;
48637 PyObject * obj2 = 0 ;
48638 PyObject * obj3 = 0 ;
48639
48640 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFFlatDedup_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
48641 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, 0 | 0 );
48642 if (!SWIG_IsOK(res1)) {
48643 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFFlatDedup_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup const *""'");
48644 }
48645 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48646 ecode2 = SWIG_AsVal_long(obj1, &val2);
48647 if (!SWIG_IsOK(ecode2)) {
48648 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFFlatDedup_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
48649 }
48650 arg2 = static_cast< long >(val2);
48651 ecode3 = SWIG_AsVal_long(obj2, &val3);
48652 if (!SWIG_IsOK(ecode3)) {
48653 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFFlatDedup_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
48654 }
48655 arg3 = static_cast< long >(val3);
48656 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
48657 if (!SWIG_IsOK(res4)) {
48658 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFFlatDedup_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
48659 }
48660 arg4 = reinterpret_cast< float * >(argp4);
48661 {
48662 Py_BEGIN_ALLOW_THREADS
48663 try {
48664 ((faiss::IndexIVFFlatDedup const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
48665 } catch(faiss::FaissException & e) {
48666 PyEval_RestoreThread(_save);
48667 PyErr_SetString(PyExc_RuntimeError, e.what());
48668 SWIG_fail;
48669 }
48670 Py_END_ALLOW_THREADS
48671 }
48672 resultobj = SWIG_Py_Void();
48673 return resultobj;
48674 fail:
48675 return NULL;
48676 }
48677
48678
48679 SWIGINTERN PyObject *_wrap_new_IndexIVFFlatDedup__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48680 PyObject *resultobj = 0;
48681 faiss::IndexIVFFlatDedup *result = 0 ;
48682
48683 if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFFlatDedup")) SWIG_fail;
48684 {
48685 Py_BEGIN_ALLOW_THREADS
48686 try {
48687 result = (faiss::IndexIVFFlatDedup *)new faiss::IndexIVFFlatDedup();
48688 } catch(faiss::FaissException & e) {
48689 PyEval_RestoreThread(_save);
48690 PyErr_SetString(PyExc_RuntimeError, e.what());
48691 SWIG_fail;
48692 }
48693 Py_END_ALLOW_THREADS
48694 }
48695 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_POINTER_NEW | 0 );
48696 return resultobj;
48697 fail:
48698 return NULL;
48699 }
48700
48701
48702 SWIGINTERN PyObject *_wrap_new_IndexIVFFlatDedup(PyObject *self, PyObject *args) {
48703 Py_ssize_t argc;
48704 PyObject *argv[5] = {
48705 0
48706 };
48707 Py_ssize_t ii;
48708
48709 if (!PyTuple_Check(args)) SWIG_fail;
48710 argc = args ? PyObject_Length(args) : 0;
48711 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
48712 argv[ii] = PyTuple_GET_ITEM(args,ii);
48713 }
48714 if (argc == 0) {
48715 return _wrap_new_IndexIVFFlatDedup__SWIG_2(self, args);
48716 }
48717 if (argc == 3) {
48718 int _v;
48719 void *vptr = 0;
48720 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
48721 _v = SWIG_CheckState(res);
48722 if (_v) {
48723 {
48724 int res = SWIG_AsVal_size_t(argv[1], NULL);
48725 _v = SWIG_CheckState(res);
48726 }
48727 if (_v) {
48728 {
48729 int res = SWIG_AsVal_size_t(argv[2], NULL);
48730 _v = SWIG_CheckState(res);
48731 }
48732 if (_v) {
48733 return _wrap_new_IndexIVFFlatDedup__SWIG_1(self, args);
48734 }
48735 }
48736 }
48737 }
48738 if (argc == 4) {
48739 int _v;
48740 void *vptr = 0;
48741 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
48742 _v = SWIG_CheckState(res);
48743 if (_v) {
48744 {
48745 int res = SWIG_AsVal_size_t(argv[1], NULL);
48746 _v = SWIG_CheckState(res);
48747 }
48748 if (_v) {
48749 {
48750 int res = SWIG_AsVal_size_t(argv[2], NULL);
48751 _v = SWIG_CheckState(res);
48752 }
48753 if (_v) {
48754 {
48755 int res = SWIG_AsVal_int(argv[3], NULL);
48756 _v = SWIG_CheckState(res);
48757 }
48758 if (_v) {
48759 return _wrap_new_IndexIVFFlatDedup__SWIG_0(self, args);
48760 }
48761 }
48762 }
48763 }
48764 }
48765
48766 fail:
48767 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFFlatDedup'.\n"
48768 " Possible C/C++ prototypes are:\n"
48769 " faiss::IndexIVFFlatDedup::IndexIVFFlatDedup(faiss::Index *,size_t,size_t,faiss::MetricType)\n"
48770 " faiss::IndexIVFFlatDedup::IndexIVFFlatDedup(faiss::Index *,size_t,size_t)\n"
48771 " faiss::IndexIVFFlatDedup::IndexIVFFlatDedup()\n");
48772 return 0;
48773 }
48774
48775
48776 SWIGINTERN PyObject *_wrap_delete_IndexIVFFlatDedup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48777 PyObject *resultobj = 0;
48778 faiss::IndexIVFFlatDedup *arg1 = (faiss::IndexIVFFlatDedup *) 0 ;
48779 void *argp1 = 0 ;
48780 int res1 = 0 ;
48781 PyObject * obj0 = 0 ;
48782
48783 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFFlatDedup",&obj0)) SWIG_fail;
48784 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_POINTER_DISOWN | 0 );
48785 if (!SWIG_IsOK(res1)) {
48786 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFFlatDedup" "', argument " "1"" of type '" "faiss::IndexIVFFlatDedup *""'");
48787 }
48788 arg1 = reinterpret_cast< faiss::IndexIVFFlatDedup * >(argp1);
48789 delete arg1;
48790 resultobj = SWIG_Py_Void();
48791 return resultobj;
48792 fail:
48793 return NULL;
48794 }
48795
48796
48797 SWIGINTERN PyObject *IndexIVFFlatDedup_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48798 PyObject *obj;
48799 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
48800 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFFlatDedup, SWIG_NewClientData(obj));
48801 return SWIG_Py_Void();
48802 }
48803
48804 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_lists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48805 PyObject *resultobj = 0;
48806 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
48807 std::vector< faiss::OnDiskInvertedLists::List > *arg2 = (std::vector< faiss::OnDiskInvertedLists::List > *) 0 ;
48808 void *argp1 = 0 ;
48809 int res1 = 0 ;
48810 void *argp2 = 0 ;
48811 int res2 = 0 ;
48812 PyObject * obj0 = 0 ;
48813 PyObject * obj1 = 0 ;
48814
48815 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_lists_set",&obj0,&obj1)) SWIG_fail;
48816 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
48817 if (!SWIG_IsOK(res1)) {
48818 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_lists_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
48819 }
48820 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
48821 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__OnDiskInvertedLists__List_t, 0 | 0 );
48822 if (!SWIG_IsOK(res2)) {
48823 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_lists_set" "', argument " "2"" of type '" "std::vector< faiss::OnDiskInvertedLists::List > *""'");
48824 }
48825 arg2 = reinterpret_cast< std::vector< faiss::OnDiskInvertedLists::List > * >(argp2);
48826 if (arg1) (arg1)->lists = *arg2;
48827 resultobj = SWIG_Py_Void();
48828 return resultobj;
48829 fail:
48830 return NULL;
48831 }
48832
48833
48834 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_lists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48835 PyObject *resultobj = 0;
48836 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
48837 void *argp1 = 0 ;
48838 int res1 = 0 ;
48839 PyObject * obj0 = 0 ;
48840 std::vector< faiss::OnDiskInvertedLists::List > *result = 0 ;
48841
48842 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_lists_get",&obj0)) SWIG_fail;
48843 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
48844 if (!SWIG_IsOK(res1)) {
48845 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_lists_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
48846 }
48847 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
48848 result = (std::vector< faiss::OnDiskInvertedLists::List > *)& ((arg1)->lists);
48849 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OnDiskInvertedLists__List_t, 0 | 0 );
48850 return resultobj;
48851 fail:
48852 return NULL;
48853 }
48854
48855
48856 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_slots_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48857 PyObject *resultobj = 0;
48858 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
48859 std::list< faiss::OnDiskInvertedLists::Slot > *arg2 = (std::list< faiss::OnDiskInvertedLists::Slot > *) 0 ;
48860 void *argp1 = 0 ;
48861 int res1 = 0 ;
48862 void *argp2 = 0 ;
48863 int res2 = 0 ;
48864 PyObject * obj0 = 0 ;
48865 PyObject * obj1 = 0 ;
48866
48867 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_slots_set",&obj0,&obj1)) SWIG_fail;
48868 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
48869 if (!SWIG_IsOK(res1)) {
48870 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_slots_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
48871 }
48872 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
48873 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t, 0 | 0 );
48874 if (!SWIG_IsOK(res2)) {
48875 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_slots_set" "', argument " "2"" of type '" "std::list< faiss::OnDiskInvertedLists::Slot > *""'");
48876 }
48877 arg2 = reinterpret_cast< std::list< faiss::OnDiskInvertedLists::Slot > * >(argp2);
48878 if (arg1) (arg1)->slots = *arg2;
48879 resultobj = SWIG_Py_Void();
48880 return resultobj;
48881 fail:
48882 return NULL;
48883 }
48884
48885
48886 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_slots_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48887 PyObject *resultobj = 0;
48888 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
48889 void *argp1 = 0 ;
48890 int res1 = 0 ;
48891 PyObject * obj0 = 0 ;
48892 std::list< faiss::OnDiskInvertedLists::Slot > *result = 0 ;
48893
48894 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_slots_get",&obj0)) SWIG_fail;
48895 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
48896 if (!SWIG_IsOK(res1)) {
48897 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_slots_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
48898 }
48899 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
48900 result = (std::list< faiss::OnDiskInvertedLists::Slot > *)& ((arg1)->slots);
48901 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__listT_faiss__OnDiskInvertedLists__Slot_t, 0 | 0 );
48902 return resultobj;
48903 fail:
48904 return NULL;
48905 }
48906
48907
48908 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_filename_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48909 PyObject *resultobj = 0;
48910 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
48911 std::string *arg2 = 0 ;
48912 void *argp1 = 0 ;
48913 int res1 = 0 ;
48914 int res2 = SWIG_OLDOBJ ;
48915 PyObject * obj0 = 0 ;
48916 PyObject * obj1 = 0 ;
48917
48918 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_filename_set",&obj0,&obj1)) SWIG_fail;
48919 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
48920 if (!SWIG_IsOK(res1)) {
48921 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_filename_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
48922 }
48923 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
48924 {
48925 std::string *ptr = (std::string *)0;
48926 res2 = SWIG_AsPtr_std_string(obj1, &ptr);
48927 if (!SWIG_IsOK(res2)) {
48928 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_filename_set" "', argument " "2"" of type '" "std::string const &""'");
48929 }
48930 if (!ptr) {
48931 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OnDiskInvertedLists_filename_set" "', argument " "2"" of type '" "std::string const &""'");
48932 }
48933 arg2 = ptr;
48934 }
48935 if (arg1) (arg1)->filename = *arg2;
48936 resultobj = SWIG_Py_Void();
48937 if (SWIG_IsNewObj(res2)) delete arg2;
48938 return resultobj;
48939 fail:
48940 if (SWIG_IsNewObj(res2)) delete arg2;
48941 return NULL;
48942 }
48943
48944
48945 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_filename_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48946 PyObject *resultobj = 0;
48947 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
48948 void *argp1 = 0 ;
48949 int res1 = 0 ;
48950 PyObject * obj0 = 0 ;
48951 std::string *result = 0 ;
48952
48953 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_filename_get",&obj0)) SWIG_fail;
48954 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
48955 if (!SWIG_IsOK(res1)) {
48956 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_filename_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
48957 }
48958 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
48959 result = (std::string *) & ((arg1)->filename);
48960 resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
48961 return resultobj;
48962 fail:
48963 return NULL;
48964 }
48965
48966
48967 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_totsize_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48968 PyObject *resultobj = 0;
48969 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
48970 size_t arg2 ;
48971 void *argp1 = 0 ;
48972 int res1 = 0 ;
48973 size_t val2 ;
48974 int ecode2 = 0 ;
48975 PyObject * obj0 = 0 ;
48976 PyObject * obj1 = 0 ;
48977
48978 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_totsize_set",&obj0,&obj1)) SWIG_fail;
48979 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
48980 if (!SWIG_IsOK(res1)) {
48981 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_totsize_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
48982 }
48983 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
48984 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
48985 if (!SWIG_IsOK(ecode2)) {
48986 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_totsize_set" "', argument " "2"" of type '" "size_t""'");
48987 }
48988 arg2 = static_cast< size_t >(val2);
48989 if (arg1) (arg1)->totsize = arg2;
48990 resultobj = SWIG_Py_Void();
48991 return resultobj;
48992 fail:
48993 return NULL;
48994 }
48995
48996
48997 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_totsize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
48998 PyObject *resultobj = 0;
48999 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49000 void *argp1 = 0 ;
49001 int res1 = 0 ;
49002 PyObject * obj0 = 0 ;
49003 size_t result;
49004
49005 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_totsize_get",&obj0)) SWIG_fail;
49006 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49007 if (!SWIG_IsOK(res1)) {
49008 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_totsize_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49009 }
49010 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49011 result = (size_t) ((arg1)->totsize);
49012 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
49013 return resultobj;
49014 fail:
49015 return NULL;
49016 }
49017
49018
49019 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_ptr_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49020 PyObject *resultobj = 0;
49021 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49022 uint8_t *arg2 = (uint8_t *) 0 ;
49023 void *argp1 = 0 ;
49024 int res1 = 0 ;
49025 void *argp2 = 0 ;
49026 int res2 = 0 ;
49027 PyObject * obj0 = 0 ;
49028 PyObject * obj1 = 0 ;
49029
49030 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_ptr_set",&obj0,&obj1)) SWIG_fail;
49031 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49032 if (!SWIG_IsOK(res1)) {
49033 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_ptr_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49034 }
49035 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49036 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_char, SWIG_POINTER_DISOWN | 0 );
49037 if (!SWIG_IsOK(res2)) {
49038 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_ptr_set" "', argument " "2"" of type '" "uint8_t *""'");
49039 }
49040 arg2 = reinterpret_cast< uint8_t * >(argp2);
49041 if (arg1) (arg1)->ptr = arg2;
49042 resultobj = SWIG_Py_Void();
49043 return resultobj;
49044 fail:
49045 return NULL;
49046 }
49047
49048
49049 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_ptr_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49050 PyObject *resultobj = 0;
49051 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49052 void *argp1 = 0 ;
49053 int res1 = 0 ;
49054 PyObject * obj0 = 0 ;
49055 uint8_t *result = 0 ;
49056
49057 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_ptr_get",&obj0)) SWIG_fail;
49058 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49059 if (!SWIG_IsOK(res1)) {
49060 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_ptr_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49061 }
49062 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49063 result = (uint8_t *) ((arg1)->ptr);
49064 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
49065 return resultobj;
49066 fail:
49067 return NULL;
49068 }
49069
49070
49071 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_read_only_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49072 PyObject *resultobj = 0;
49073 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49074 bool arg2 ;
49075 void *argp1 = 0 ;
49076 int res1 = 0 ;
49077 bool val2 ;
49078 int ecode2 = 0 ;
49079 PyObject * obj0 = 0 ;
49080 PyObject * obj1 = 0 ;
49081
49082 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_read_only_set",&obj0,&obj1)) SWIG_fail;
49083 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49084 if (!SWIG_IsOK(res1)) {
49085 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_read_only_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49086 }
49087 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49088 ecode2 = SWIG_AsVal_bool(obj1, &val2);
49089 if (!SWIG_IsOK(ecode2)) {
49090 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_read_only_set" "', argument " "2"" of type '" "bool""'");
49091 }
49092 arg2 = static_cast< bool >(val2);
49093 if (arg1) (arg1)->read_only = arg2;
49094 resultobj = SWIG_Py_Void();
49095 return resultobj;
49096 fail:
49097 return NULL;
49098 }
49099
49100
49101 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_read_only_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49102 PyObject *resultobj = 0;
49103 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49104 void *argp1 = 0 ;
49105 int res1 = 0 ;
49106 PyObject * obj0 = 0 ;
49107 bool result;
49108
49109 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_read_only_get",&obj0)) SWIG_fail;
49110 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49111 if (!SWIG_IsOK(res1)) {
49112 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_read_only_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49113 }
49114 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49115 result = (bool) ((arg1)->read_only);
49116 resultobj = SWIG_From_bool(static_cast< bool >(result));
49117 return resultobj;
49118 fail:
49119 return NULL;
49120 }
49121
49122
49123 SWIGINTERN PyObject *_wrap_new_OnDiskInvertedLists__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49124 PyObject *resultobj = 0;
49125 size_t arg1 ;
49126 size_t arg2 ;
49127 char *arg3 = (char *) 0 ;
49128 size_t val1 ;
49129 int ecode1 = 0 ;
49130 size_t val2 ;
49131 int ecode2 = 0 ;
49132 int res3 ;
49133 char *buf3 = 0 ;
49134 int alloc3 = 0 ;
49135 PyObject * obj0 = 0 ;
49136 PyObject * obj1 = 0 ;
49137 PyObject * obj2 = 0 ;
49138 faiss::OnDiskInvertedLists *result = 0 ;
49139
49140 if (!PyArg_ParseTuple(args,(char *)"OOO:new_OnDiskInvertedLists",&obj0,&obj1,&obj2)) SWIG_fail;
49141 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
49142 if (!SWIG_IsOK(ecode1)) {
49143 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OnDiskInvertedLists" "', argument " "1"" of type '" "size_t""'");
49144 }
49145 arg1 = static_cast< size_t >(val1);
49146 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49147 if (!SWIG_IsOK(ecode2)) {
49148 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OnDiskInvertedLists" "', argument " "2"" of type '" "size_t""'");
49149 }
49150 arg2 = static_cast< size_t >(val2);
49151 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
49152 if (!SWIG_IsOK(res3)) {
49153 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "new_OnDiskInvertedLists" "', argument " "3"" of type '" "char const *""'");
49154 }
49155 arg3 = reinterpret_cast< char * >(buf3);
49156 {
49157 Py_BEGIN_ALLOW_THREADS
49158 try {
49159 result = (faiss::OnDiskInvertedLists *)new faiss::OnDiskInvertedLists(arg1,arg2,(char const *)arg3);
49160 } catch(faiss::FaissException & e) {
49161 PyEval_RestoreThread(_save);
49162 PyErr_SetString(PyExc_RuntimeError, e.what());
49163 SWIG_fail;
49164 }
49165 Py_END_ALLOW_THREADS
49166 }
49167 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OnDiskInvertedLists, SWIG_POINTER_NEW | 0 );
49168 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
49169 return resultobj;
49170 fail:
49171 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
49172 return NULL;
49173 }
49174
49175
49176 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49177 PyObject *resultobj = 0;
49178 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49179 size_t arg2 ;
49180 void *argp1 = 0 ;
49181 int res1 = 0 ;
49182 size_t val2 ;
49183 int ecode2 = 0 ;
49184 PyObject * obj0 = 0 ;
49185 PyObject * obj1 = 0 ;
49186 size_t result;
49187
49188 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_list_size",&obj0,&obj1)) SWIG_fail;
49189 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49190 if (!SWIG_IsOK(res1)) {
49191 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_list_size" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists const *""'");
49192 }
49193 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49194 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49195 if (!SWIG_IsOK(ecode2)) {
49196 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_list_size" "', argument " "2"" of type '" "size_t""'");
49197 }
49198 arg2 = static_cast< size_t >(val2);
49199 {
49200 Py_BEGIN_ALLOW_THREADS
49201 try {
49202 result = (size_t)((faiss::OnDiskInvertedLists const *)arg1)->list_size(arg2);
49203 } catch(faiss::FaissException & e) {
49204 PyEval_RestoreThread(_save);
49205 PyErr_SetString(PyExc_RuntimeError, e.what());
49206 SWIG_fail;
49207 }
49208 Py_END_ALLOW_THREADS
49209 }
49210 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
49211 return resultobj;
49212 fail:
49213 return NULL;
49214 }
49215
49216
49217 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_get_codes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49218 PyObject *resultobj = 0;
49219 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49220 size_t arg2 ;
49221 void *argp1 = 0 ;
49222 int res1 = 0 ;
49223 size_t val2 ;
49224 int ecode2 = 0 ;
49225 PyObject * obj0 = 0 ;
49226 PyObject * obj1 = 0 ;
49227 uint8_t *result = 0 ;
49228
49229 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_get_codes",&obj0,&obj1)) SWIG_fail;
49230 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49231 if (!SWIG_IsOK(res1)) {
49232 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_get_codes" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists const *""'");
49233 }
49234 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49235 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49236 if (!SWIG_IsOK(ecode2)) {
49237 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_get_codes" "', argument " "2"" of type '" "size_t""'");
49238 }
49239 arg2 = static_cast< size_t >(val2);
49240 {
49241 Py_BEGIN_ALLOW_THREADS
49242 try {
49243 result = (uint8_t *)((faiss::OnDiskInvertedLists const *)arg1)->get_codes(arg2);
49244 } catch(faiss::FaissException & e) {
49245 PyEval_RestoreThread(_save);
49246 PyErr_SetString(PyExc_RuntimeError, e.what());
49247 SWIG_fail;
49248 }
49249 Py_END_ALLOW_THREADS
49250 }
49251 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_char, 0 | 0 );
49252 return resultobj;
49253 fail:
49254 return NULL;
49255 }
49256
49257
49258 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49259 PyObject *resultobj = 0;
49260 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49261 size_t arg2 ;
49262 void *argp1 = 0 ;
49263 int res1 = 0 ;
49264 size_t val2 ;
49265 int ecode2 = 0 ;
49266 PyObject * obj0 = 0 ;
49267 PyObject * obj1 = 0 ;
49268 faiss::InvertedLists::idx_t *result = 0 ;
49269
49270 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_get_ids",&obj0,&obj1)) SWIG_fail;
49271 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49272 if (!SWIG_IsOK(res1)) {
49273 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_get_ids" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists const *""'");
49274 }
49275 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49276 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49277 if (!SWIG_IsOK(ecode2)) {
49278 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_get_ids" "', argument " "2"" of type '" "size_t""'");
49279 }
49280 arg2 = static_cast< size_t >(val2);
49281 {
49282 Py_BEGIN_ALLOW_THREADS
49283 try {
49284 result = (faiss::InvertedLists::idx_t *)((faiss::OnDiskInvertedLists const *)arg1)->get_ids(arg2);
49285 } catch(faiss::FaissException & e) {
49286 PyEval_RestoreThread(_save);
49287 PyErr_SetString(PyExc_RuntimeError, e.what());
49288 SWIG_fail;
49289 }
49290 Py_END_ALLOW_THREADS
49291 }
49292 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
49293 return resultobj;
49294 fail:
49295 return NULL;
49296 }
49297
49298
49299 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_add_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49300 PyObject *resultobj = 0;
49301 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49302 size_t arg2 ;
49303 size_t arg3 ;
49304 faiss::InvertedLists::idx_t *arg4 = (faiss::InvertedLists::idx_t *) 0 ;
49305 uint8_t *arg5 = (uint8_t *) 0 ;
49306 void *argp1 = 0 ;
49307 int res1 = 0 ;
49308 size_t val2 ;
49309 int ecode2 = 0 ;
49310 size_t val3 ;
49311 int ecode3 = 0 ;
49312 void *argp4 = 0 ;
49313 int res4 = 0 ;
49314 void *argp5 = 0 ;
49315 int res5 = 0 ;
49316 PyObject * obj0 = 0 ;
49317 PyObject * obj1 = 0 ;
49318 PyObject * obj2 = 0 ;
49319 PyObject * obj3 = 0 ;
49320 PyObject * obj4 = 0 ;
49321 size_t result;
49322
49323 if (!PyArg_ParseTuple(args,(char *)"OOOOO:OnDiskInvertedLists_add_entries",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
49324 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49325 if (!SWIG_IsOK(res1)) {
49326 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49327 }
49328 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49329 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49330 if (!SWIG_IsOK(ecode2)) {
49331 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "2"" of type '" "size_t""'");
49332 }
49333 arg2 = static_cast< size_t >(val2);
49334 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
49335 if (!SWIG_IsOK(ecode3)) {
49336 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "3"" of type '" "size_t""'");
49337 }
49338 arg3 = static_cast< size_t >(val3);
49339 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
49340 if (!SWIG_IsOK(res4)) {
49341 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "4"" of type '" "faiss::InvertedLists::idx_t const *""'");
49342 }
49343 arg4 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp4);
49344 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
49345 if (!SWIG_IsOK(res5)) {
49346 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "OnDiskInvertedLists_add_entries" "', argument " "5"" of type '" "uint8_t const *""'");
49347 }
49348 arg5 = reinterpret_cast< uint8_t * >(argp5);
49349 {
49350 Py_BEGIN_ALLOW_THREADS
49351 try {
49352 result = (size_t)(arg1)->add_entries(arg2,arg3,(faiss::InvertedLists::idx_t const *)arg4,(uint8_t const *)arg5);
49353 } catch(faiss::FaissException & e) {
49354 PyEval_RestoreThread(_save);
49355 PyErr_SetString(PyExc_RuntimeError, e.what());
49356 SWIG_fail;
49357 }
49358 Py_END_ALLOW_THREADS
49359 }
49360 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
49361 return resultobj;
49362 fail:
49363 return NULL;
49364 }
49365
49366
49367 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_update_entries(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49368 PyObject *resultobj = 0;
49369 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49370 size_t arg2 ;
49371 size_t arg3 ;
49372 size_t arg4 ;
49373 faiss::InvertedLists::idx_t *arg5 = (faiss::InvertedLists::idx_t *) 0 ;
49374 uint8_t *arg6 = (uint8_t *) 0 ;
49375 void *argp1 = 0 ;
49376 int res1 = 0 ;
49377 size_t val2 ;
49378 int ecode2 = 0 ;
49379 size_t val3 ;
49380 int ecode3 = 0 ;
49381 size_t val4 ;
49382 int ecode4 = 0 ;
49383 void *argp5 = 0 ;
49384 int res5 = 0 ;
49385 void *argp6 = 0 ;
49386 int res6 = 0 ;
49387 PyObject * obj0 = 0 ;
49388 PyObject * obj1 = 0 ;
49389 PyObject * obj2 = 0 ;
49390 PyObject * obj3 = 0 ;
49391 PyObject * obj4 = 0 ;
49392 PyObject * obj5 = 0 ;
49393
49394 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:OnDiskInvertedLists_update_entries",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
49395 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49396 if (!SWIG_IsOK(res1)) {
49397 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49398 }
49399 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49400 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49401 if (!SWIG_IsOK(ecode2)) {
49402 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "2"" of type '" "size_t""'");
49403 }
49404 arg2 = static_cast< size_t >(val2);
49405 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
49406 if (!SWIG_IsOK(ecode3)) {
49407 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "3"" of type '" "size_t""'");
49408 }
49409 arg3 = static_cast< size_t >(val3);
49410 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
49411 if (!SWIG_IsOK(ecode4)) {
49412 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "4"" of type '" "size_t""'");
49413 }
49414 arg4 = static_cast< size_t >(val4);
49415 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
49416 if (!SWIG_IsOK(res5)) {
49417 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "5"" of type '" "faiss::InvertedLists::idx_t const *""'");
49418 }
49419 arg5 = reinterpret_cast< faiss::InvertedLists::idx_t * >(argp5);
49420 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_unsigned_char, 0 | 0 );
49421 if (!SWIG_IsOK(res6)) {
49422 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "OnDiskInvertedLists_update_entries" "', argument " "6"" of type '" "uint8_t const *""'");
49423 }
49424 arg6 = reinterpret_cast< uint8_t * >(argp6);
49425 {
49426 Py_BEGIN_ALLOW_THREADS
49427 try {
49428 (arg1)->update_entries(arg2,arg3,arg4,(faiss::InvertedLists::idx_t const *)arg5,(uint8_t const *)arg6);
49429 } catch(faiss::FaissException & e) {
49430 PyEval_RestoreThread(_save);
49431 PyErr_SetString(PyExc_RuntimeError, e.what());
49432 SWIG_fail;
49433 }
49434 Py_END_ALLOW_THREADS
49435 }
49436 resultobj = SWIG_Py_Void();
49437 return resultobj;
49438 fail:
49439 return NULL;
49440 }
49441
49442
49443 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_resize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49444 PyObject *resultobj = 0;
49445 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49446 size_t arg2 ;
49447 size_t arg3 ;
49448 void *argp1 = 0 ;
49449 int res1 = 0 ;
49450 size_t val2 ;
49451 int ecode2 = 0 ;
49452 size_t val3 ;
49453 int ecode3 = 0 ;
49454 PyObject * obj0 = 0 ;
49455 PyObject * obj1 = 0 ;
49456 PyObject * obj2 = 0 ;
49457
49458 if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_resize",&obj0,&obj1,&obj2)) SWIG_fail;
49459 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49460 if (!SWIG_IsOK(res1)) {
49461 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_resize" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49462 }
49463 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49464 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49465 if (!SWIG_IsOK(ecode2)) {
49466 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_resize" "', argument " "2"" of type '" "size_t""'");
49467 }
49468 arg2 = static_cast< size_t >(val2);
49469 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
49470 if (!SWIG_IsOK(ecode3)) {
49471 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_resize" "', argument " "3"" of type '" "size_t""'");
49472 }
49473 arg3 = static_cast< size_t >(val3);
49474 {
49475 Py_BEGIN_ALLOW_THREADS
49476 try {
49477 (arg1)->resize(arg2,arg3);
49478 } catch(faiss::FaissException & e) {
49479 PyEval_RestoreThread(_save);
49480 PyErr_SetString(PyExc_RuntimeError, e.what());
49481 SWIG_fail;
49482 }
49483 Py_END_ALLOW_THREADS
49484 }
49485 resultobj = SWIG_Py_Void();
49486 return resultobj;
49487 fail:
49488 return NULL;
49489 }
49490
49491
49492 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49493 PyObject *resultobj = 0;
49494 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49495 faiss::InvertedLists **arg2 = (faiss::InvertedLists **) 0 ;
49496 int arg3 ;
49497 void *argp1 = 0 ;
49498 int res1 = 0 ;
49499 void *argp2 = 0 ;
49500 int res2 = 0 ;
49501 int val3 ;
49502 int ecode3 = 0 ;
49503 PyObject * obj0 = 0 ;
49504 PyObject * obj1 = 0 ;
49505 PyObject * obj2 = 0 ;
49506 size_t result;
49507
49508 if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
49509 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49510 if (!SWIG_IsOK(res1)) {
49511 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_merge_from" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49512 }
49513 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49514 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_p_faiss__InvertedLists, 0 | 0 );
49515 if (!SWIG_IsOK(res2)) {
49516 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_merge_from" "', argument " "2"" of type '" "faiss::InvertedLists const **""'");
49517 }
49518 arg2 = reinterpret_cast< faiss::InvertedLists ** >(argp2);
49519 ecode3 = SWIG_AsVal_int(obj2, &val3);
49520 if (!SWIG_IsOK(ecode3)) {
49521 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_merge_from" "', argument " "3"" of type '" "int""'");
49522 }
49523 arg3 = static_cast< int >(val3);
49524 {
49525 Py_BEGIN_ALLOW_THREADS
49526 try {
49527 result = (size_t)(arg1)->merge_from((faiss::InvertedLists const **)arg2,arg3);
49528 } catch(faiss::FaissException & e) {
49529 PyEval_RestoreThread(_save);
49530 PyErr_SetString(PyExc_RuntimeError, e.what());
49531 SWIG_fail;
49532 }
49533 Py_END_ALLOW_THREADS
49534 }
49535 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
49536 return resultobj;
49537 fail:
49538 return NULL;
49539 }
49540
49541
49542 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_prefetch_lists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49543 PyObject *resultobj = 0;
49544 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49545 long *arg2 = (long *) 0 ;
49546 int arg3 ;
49547 void *argp1 = 0 ;
49548 int res1 = 0 ;
49549 void *argp2 = 0 ;
49550 int res2 = 0 ;
49551 int val3 ;
49552 int ecode3 = 0 ;
49553 PyObject * obj0 = 0 ;
49554 PyObject * obj1 = 0 ;
49555 PyObject * obj2 = 0 ;
49556
49557 if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_prefetch_lists",&obj0,&obj1,&obj2)) SWIG_fail;
49558 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49559 if (!SWIG_IsOK(res1)) {
49560 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_prefetch_lists" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists const *""'");
49561 }
49562 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49563 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
49564 if (!SWIG_IsOK(res2)) {
49565 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_prefetch_lists" "', argument " "2"" of type '" "long const *""'");
49566 }
49567 arg2 = reinterpret_cast< long * >(argp2);
49568 ecode3 = SWIG_AsVal_int(obj2, &val3);
49569 if (!SWIG_IsOK(ecode3)) {
49570 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_prefetch_lists" "', argument " "3"" of type '" "int""'");
49571 }
49572 arg3 = static_cast< int >(val3);
49573 {
49574 Py_BEGIN_ALLOW_THREADS
49575 try {
49576 ((faiss::OnDiskInvertedLists const *)arg1)->prefetch_lists((long const *)arg2,arg3);
49577 } catch(faiss::FaissException & e) {
49578 PyEval_RestoreThread(_save);
49579 PyErr_SetString(PyExc_RuntimeError, e.what());
49580 SWIG_fail;
49581 }
49582 Py_END_ALLOW_THREADS
49583 }
49584 resultobj = SWIG_Py_Void();
49585 return resultobj;
49586 fail:
49587 return NULL;
49588 }
49589
49590
49591 SWIGINTERN PyObject *_wrap_delete_OnDiskInvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49592 PyObject *resultobj = 0;
49593 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49594 void *argp1 = 0 ;
49595 int res1 = 0 ;
49596 PyObject * obj0 = 0 ;
49597
49598 if (!PyArg_ParseTuple(args,(char *)"O:delete_OnDiskInvertedLists",&obj0)) SWIG_fail;
49599 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, SWIG_POINTER_DISOWN | 0 );
49600 if (!SWIG_IsOK(res1)) {
49601 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OnDiskInvertedLists" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49602 }
49603 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49604 {
49605 Py_BEGIN_ALLOW_THREADS
49606 try {
49607 delete arg1;
49608 } catch(faiss::FaissException & e) {
49609 PyEval_RestoreThread(_save);
49610 PyErr_SetString(PyExc_RuntimeError, e.what());
49611 SWIG_fail;
49612 }
49613 Py_END_ALLOW_THREADS
49614 }
49615 resultobj = SWIG_Py_Void();
49616 return resultobj;
49617 fail:
49618 return NULL;
49619 }
49620
49621
49622 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_locks_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49623 PyObject *resultobj = 0;
49624 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49625 faiss::LockLevels *arg2 = (faiss::LockLevels *) 0 ;
49626 void *argp1 = 0 ;
49627 int res1 = 0 ;
49628 void *argp2 = 0 ;
49629 int res2 = 0 ;
49630 PyObject * obj0 = 0 ;
49631 PyObject * obj1 = 0 ;
49632
49633 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_locks_set",&obj0,&obj1)) SWIG_fail;
49634 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49635 if (!SWIG_IsOK(res1)) {
49636 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_locks_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49637 }
49638 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49639 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__LockLevels, SWIG_POINTER_DISOWN | 0 );
49640 if (!SWIG_IsOK(res2)) {
49641 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_locks_set" "', argument " "2"" of type '" "faiss::LockLevels *""'");
49642 }
49643 arg2 = reinterpret_cast< faiss::LockLevels * >(argp2);
49644 if (arg1) (arg1)->locks = arg2;
49645 resultobj = SWIG_Py_Void();
49646 return resultobj;
49647 fail:
49648 return NULL;
49649 }
49650
49651
49652 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_locks_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49653 PyObject *resultobj = 0;
49654 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49655 void *argp1 = 0 ;
49656 int res1 = 0 ;
49657 PyObject * obj0 = 0 ;
49658 faiss::LockLevels *result = 0 ;
49659
49660 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_locks_get",&obj0)) SWIG_fail;
49661 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49662 if (!SWIG_IsOK(res1)) {
49663 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_locks_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49664 }
49665 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49666 result = (faiss::LockLevels *) ((arg1)->locks);
49667 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__LockLevels, 0 | 0 );
49668 return resultobj;
49669 fail:
49670 return NULL;
49671 }
49672
49673
49674 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_pf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49675 PyObject *resultobj = 0;
49676 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49677 faiss::OnDiskInvertedLists::OngoingPrefetch *arg2 = (faiss::OnDiskInvertedLists::OngoingPrefetch *) 0 ;
49678 void *argp1 = 0 ;
49679 int res1 = 0 ;
49680 void *argp2 = 0 ;
49681 int res2 = 0 ;
49682 PyObject * obj0 = 0 ;
49683 PyObject * obj1 = 0 ;
49684
49685 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_pf_set",&obj0,&obj1)) SWIG_fail;
49686 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49687 if (!SWIG_IsOK(res1)) {
49688 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_pf_set" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49689 }
49690 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49691 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch, SWIG_POINTER_DISOWN | 0 );
49692 if (!SWIG_IsOK(res2)) {
49693 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OnDiskInvertedLists_pf_set" "', argument " "2"" of type '" "faiss::OnDiskInvertedLists::OngoingPrefetch *""'");
49694 }
49695 arg2 = reinterpret_cast< faiss::OnDiskInvertedLists::OngoingPrefetch * >(argp2);
49696 if (arg1) (arg1)->pf = arg2;
49697 resultobj = SWIG_Py_Void();
49698 return resultobj;
49699 fail:
49700 return NULL;
49701 }
49702
49703
49704 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_pf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49705 PyObject *resultobj = 0;
49706 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49707 void *argp1 = 0 ;
49708 int res1 = 0 ;
49709 PyObject * obj0 = 0 ;
49710 faiss::OnDiskInvertedLists::OngoingPrefetch *result = 0 ;
49711
49712 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_pf_get",&obj0)) SWIG_fail;
49713 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49714 if (!SWIG_IsOK(res1)) {
49715 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_pf_get" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49716 }
49717 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49718 result = (faiss::OnDiskInvertedLists::OngoingPrefetch *) ((arg1)->pf);
49719 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OnDiskInvertedLists__OngoingPrefetch, 0 | 0 );
49720 return resultobj;
49721 fail:
49722 return NULL;
49723 }
49724
49725
49726 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_do_mmap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49727 PyObject *resultobj = 0;
49728 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49729 void *argp1 = 0 ;
49730 int res1 = 0 ;
49731 PyObject * obj0 = 0 ;
49732
49733 if (!PyArg_ParseTuple(args,(char *)"O:OnDiskInvertedLists_do_mmap",&obj0)) SWIG_fail;
49734 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49735 if (!SWIG_IsOK(res1)) {
49736 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_do_mmap" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49737 }
49738 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49739 {
49740 Py_BEGIN_ALLOW_THREADS
49741 try {
49742 (arg1)->do_mmap();
49743 } catch(faiss::FaissException & e) {
49744 PyEval_RestoreThread(_save);
49745 PyErr_SetString(PyExc_RuntimeError, e.what());
49746 SWIG_fail;
49747 }
49748 Py_END_ALLOW_THREADS
49749 }
49750 resultobj = SWIG_Py_Void();
49751 return resultobj;
49752 fail:
49753 return NULL;
49754 }
49755
49756
49757 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_update_totsize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49758 PyObject *resultobj = 0;
49759 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49760 size_t arg2 ;
49761 void *argp1 = 0 ;
49762 int res1 = 0 ;
49763 size_t val2 ;
49764 int ecode2 = 0 ;
49765 PyObject * obj0 = 0 ;
49766 PyObject * obj1 = 0 ;
49767
49768 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_update_totsize",&obj0,&obj1)) SWIG_fail;
49769 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49770 if (!SWIG_IsOK(res1)) {
49771 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_update_totsize" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49772 }
49773 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49774 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49775 if (!SWIG_IsOK(ecode2)) {
49776 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_update_totsize" "', argument " "2"" of type '" "size_t""'");
49777 }
49778 arg2 = static_cast< size_t >(val2);
49779 {
49780 Py_BEGIN_ALLOW_THREADS
49781 try {
49782 (arg1)->update_totsize(arg2);
49783 } catch(faiss::FaissException & e) {
49784 PyEval_RestoreThread(_save);
49785 PyErr_SetString(PyExc_RuntimeError, e.what());
49786 SWIG_fail;
49787 }
49788 Py_END_ALLOW_THREADS
49789 }
49790 resultobj = SWIG_Py_Void();
49791 return resultobj;
49792 fail:
49793 return NULL;
49794 }
49795
49796
49797 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_resize_locked(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49798 PyObject *resultobj = 0;
49799 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49800 size_t arg2 ;
49801 size_t arg3 ;
49802 void *argp1 = 0 ;
49803 int res1 = 0 ;
49804 size_t val2 ;
49805 int ecode2 = 0 ;
49806 size_t val3 ;
49807 int ecode3 = 0 ;
49808 PyObject * obj0 = 0 ;
49809 PyObject * obj1 = 0 ;
49810 PyObject * obj2 = 0 ;
49811
49812 if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_resize_locked",&obj0,&obj1,&obj2)) SWIG_fail;
49813 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49814 if (!SWIG_IsOK(res1)) {
49815 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_resize_locked" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49816 }
49817 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49818 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49819 if (!SWIG_IsOK(ecode2)) {
49820 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_resize_locked" "', argument " "2"" of type '" "size_t""'");
49821 }
49822 arg2 = static_cast< size_t >(val2);
49823 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
49824 if (!SWIG_IsOK(ecode3)) {
49825 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_resize_locked" "', argument " "3"" of type '" "size_t""'");
49826 }
49827 arg3 = static_cast< size_t >(val3);
49828 {
49829 Py_BEGIN_ALLOW_THREADS
49830 try {
49831 (arg1)->resize_locked(arg2,arg3);
49832 } catch(faiss::FaissException & e) {
49833 PyEval_RestoreThread(_save);
49834 PyErr_SetString(PyExc_RuntimeError, e.what());
49835 SWIG_fail;
49836 }
49837 Py_END_ALLOW_THREADS
49838 }
49839 resultobj = SWIG_Py_Void();
49840 return resultobj;
49841 fail:
49842 return NULL;
49843 }
49844
49845
49846 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_allocate_slot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49847 PyObject *resultobj = 0;
49848 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49849 size_t arg2 ;
49850 void *argp1 = 0 ;
49851 int res1 = 0 ;
49852 size_t val2 ;
49853 int ecode2 = 0 ;
49854 PyObject * obj0 = 0 ;
49855 PyObject * obj1 = 0 ;
49856 size_t result;
49857
49858 if (!PyArg_ParseTuple(args,(char *)"OO:OnDiskInvertedLists_allocate_slot",&obj0,&obj1)) SWIG_fail;
49859 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49860 if (!SWIG_IsOK(res1)) {
49861 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_allocate_slot" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49862 }
49863 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49864 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49865 if (!SWIG_IsOK(ecode2)) {
49866 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_allocate_slot" "', argument " "2"" of type '" "size_t""'");
49867 }
49868 arg2 = static_cast< size_t >(val2);
49869 {
49870 Py_BEGIN_ALLOW_THREADS
49871 try {
49872 result = (size_t)(arg1)->allocate_slot(arg2);
49873 } catch(faiss::FaissException & e) {
49874 PyEval_RestoreThread(_save);
49875 PyErr_SetString(PyExc_RuntimeError, e.what());
49876 SWIG_fail;
49877 }
49878 Py_END_ALLOW_THREADS
49879 }
49880 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
49881 return resultobj;
49882 fail:
49883 return NULL;
49884 }
49885
49886
49887 SWIGINTERN PyObject *_wrap_OnDiskInvertedLists_free_slot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49888 PyObject *resultobj = 0;
49889 faiss::OnDiskInvertedLists *arg1 = (faiss::OnDiskInvertedLists *) 0 ;
49890 size_t arg2 ;
49891 size_t arg3 ;
49892 void *argp1 = 0 ;
49893 int res1 = 0 ;
49894 size_t val2 ;
49895 int ecode2 = 0 ;
49896 size_t val3 ;
49897 int ecode3 = 0 ;
49898 PyObject * obj0 = 0 ;
49899 PyObject * obj1 = 0 ;
49900 PyObject * obj2 = 0 ;
49901
49902 if (!PyArg_ParseTuple(args,(char *)"OOO:OnDiskInvertedLists_free_slot",&obj0,&obj1,&obj2)) SWIG_fail;
49903 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OnDiskInvertedLists, 0 | 0 );
49904 if (!SWIG_IsOK(res1)) {
49905 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OnDiskInvertedLists_free_slot" "', argument " "1"" of type '" "faiss::OnDiskInvertedLists *""'");
49906 }
49907 arg1 = reinterpret_cast< faiss::OnDiskInvertedLists * >(argp1);
49908 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
49909 if (!SWIG_IsOK(ecode2)) {
49910 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OnDiskInvertedLists_free_slot" "', argument " "2"" of type '" "size_t""'");
49911 }
49912 arg2 = static_cast< size_t >(val2);
49913 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
49914 if (!SWIG_IsOK(ecode3)) {
49915 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OnDiskInvertedLists_free_slot" "', argument " "3"" of type '" "size_t""'");
49916 }
49917 arg3 = static_cast< size_t >(val3);
49918 {
49919 Py_BEGIN_ALLOW_THREADS
49920 try {
49921 (arg1)->free_slot(arg2,arg3);
49922 } catch(faiss::FaissException & e) {
49923 PyEval_RestoreThread(_save);
49924 PyErr_SetString(PyExc_RuntimeError, e.what());
49925 SWIG_fail;
49926 }
49927 Py_END_ALLOW_THREADS
49928 }
49929 resultobj = SWIG_Py_Void();
49930 return resultobj;
49931 fail:
49932 return NULL;
49933 }
49934
49935
49936 SWIGINTERN PyObject *_wrap_new_OnDiskInvertedLists__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
49937 PyObject *resultobj = 0;
49938 faiss::OnDiskInvertedLists *result = 0 ;
49939
49940 if (!PyArg_ParseTuple(args,(char *)":new_OnDiskInvertedLists")) SWIG_fail;
49941 {
49942 Py_BEGIN_ALLOW_THREADS
49943 try {
49944 result = (faiss::OnDiskInvertedLists *)new faiss::OnDiskInvertedLists();
49945 } catch(faiss::FaissException & e) {
49946 PyEval_RestoreThread(_save);
49947 PyErr_SetString(PyExc_RuntimeError, e.what());
49948 SWIG_fail;
49949 }
49950 Py_END_ALLOW_THREADS
49951 }
49952 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OnDiskInvertedLists, SWIG_POINTER_NEW | 0 );
49953 return resultobj;
49954 fail:
49955 return NULL;
49956 }
49957
49958
49959 SWIGINTERN PyObject *_wrap_new_OnDiskInvertedLists(PyObject *self, PyObject *args) {
49960 Py_ssize_t argc;
49961 PyObject *argv[4] = {
49962 0
49963 };
49964 Py_ssize_t ii;
49965
49966 if (!PyTuple_Check(args)) SWIG_fail;
49967 argc = args ? PyObject_Length(args) : 0;
49968 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
49969 argv[ii] = PyTuple_GET_ITEM(args,ii);
49970 }
49971 if (argc == 0) {
49972 return _wrap_new_OnDiskInvertedLists__SWIG_1(self, args);
49973 }
49974 if (argc == 3) {
49975 int _v;
49976 {
49977 int res = SWIG_AsVal_size_t(argv[0], NULL);
49978 _v = SWIG_CheckState(res);
49979 }
49980 if (_v) {
49981 {
49982 int res = SWIG_AsVal_size_t(argv[1], NULL);
49983 _v = SWIG_CheckState(res);
49984 }
49985 if (_v) {
49986 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
49987 _v = SWIG_CheckState(res);
49988 if (_v) {
49989 return _wrap_new_OnDiskInvertedLists__SWIG_0(self, args);
49990 }
49991 }
49992 }
49993 }
49994
49995 fail:
49996 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_OnDiskInvertedLists'.\n"
49997 " Possible C/C++ prototypes are:\n"
49998 " faiss::OnDiskInvertedLists::OnDiskInvertedLists(size_t,size_t,char const *)\n"
49999 " faiss::OnDiskInvertedLists::OnDiskInvertedLists()\n");
50000 return 0;
50001 }
50002
50003
50004 SWIGINTERN PyObject *OnDiskInvertedLists_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50005 PyObject *obj;
50006 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
50007 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OnDiskInvertedLists, SWIG_NewClientData(obj));
50008 return SWIG_Py_Void();
50009 }
50010
50011 SWIGINTERN PyObject *_wrap_IVFPQSearchParameters_scan_table_threshold_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50012 PyObject *resultobj = 0;
50013 faiss::IVFPQSearchParameters *arg1 = (faiss::IVFPQSearchParameters *) 0 ;
50014 size_t arg2 ;
50015 void *argp1 = 0 ;
50016 int res1 = 0 ;
50017 size_t val2 ;
50018 int ecode2 = 0 ;
50019 PyObject * obj0 = 0 ;
50020 PyObject * obj1 = 0 ;
50021
50022 if (!PyArg_ParseTuple(args,(char *)"OO:IVFPQSearchParameters_scan_table_threshold_set",&obj0,&obj1)) SWIG_fail;
50023 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, 0 | 0 );
50024 if (!SWIG_IsOK(res1)) {
50025 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFPQSearchParameters_scan_table_threshold_set" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
50026 }
50027 arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
50028 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50029 if (!SWIG_IsOK(ecode2)) {
50030 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVFPQSearchParameters_scan_table_threshold_set" "', argument " "2"" of type '" "size_t""'");
50031 }
50032 arg2 = static_cast< size_t >(val2);
50033 if (arg1) (arg1)->scan_table_threshold = arg2;
50034 resultobj = SWIG_Py_Void();
50035 return resultobj;
50036 fail:
50037 return NULL;
50038 }
50039
50040
50041 SWIGINTERN PyObject *_wrap_IVFPQSearchParameters_scan_table_threshold_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50042 PyObject *resultobj = 0;
50043 faiss::IVFPQSearchParameters *arg1 = (faiss::IVFPQSearchParameters *) 0 ;
50044 void *argp1 = 0 ;
50045 int res1 = 0 ;
50046 PyObject * obj0 = 0 ;
50047 size_t result;
50048
50049 if (!PyArg_ParseTuple(args,(char *)"O:IVFPQSearchParameters_scan_table_threshold_get",&obj0)) SWIG_fail;
50050 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, 0 | 0 );
50051 if (!SWIG_IsOK(res1)) {
50052 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFPQSearchParameters_scan_table_threshold_get" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
50053 }
50054 arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
50055 result = (size_t) ((arg1)->scan_table_threshold);
50056 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
50057 return resultobj;
50058 fail:
50059 return NULL;
50060 }
50061
50062
50063 SWIGINTERN PyObject *_wrap_IVFPQSearchParameters_polysemous_ht_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50064 PyObject *resultobj = 0;
50065 faiss::IVFPQSearchParameters *arg1 = (faiss::IVFPQSearchParameters *) 0 ;
50066 int arg2 ;
50067 void *argp1 = 0 ;
50068 int res1 = 0 ;
50069 int val2 ;
50070 int ecode2 = 0 ;
50071 PyObject * obj0 = 0 ;
50072 PyObject * obj1 = 0 ;
50073
50074 if (!PyArg_ParseTuple(args,(char *)"OO:IVFPQSearchParameters_polysemous_ht_set",&obj0,&obj1)) SWIG_fail;
50075 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, 0 | 0 );
50076 if (!SWIG_IsOK(res1)) {
50077 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFPQSearchParameters_polysemous_ht_set" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
50078 }
50079 arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
50080 ecode2 = SWIG_AsVal_int(obj1, &val2);
50081 if (!SWIG_IsOK(ecode2)) {
50082 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IVFPQSearchParameters_polysemous_ht_set" "', argument " "2"" of type '" "int""'");
50083 }
50084 arg2 = static_cast< int >(val2);
50085 if (arg1) (arg1)->polysemous_ht = arg2;
50086 resultobj = SWIG_Py_Void();
50087 return resultobj;
50088 fail:
50089 return NULL;
50090 }
50091
50092
50093 SWIGINTERN PyObject *_wrap_IVFPQSearchParameters_polysemous_ht_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50094 PyObject *resultobj = 0;
50095 faiss::IVFPQSearchParameters *arg1 = (faiss::IVFPQSearchParameters *) 0 ;
50096 void *argp1 = 0 ;
50097 int res1 = 0 ;
50098 PyObject * obj0 = 0 ;
50099 int result;
50100
50101 if (!PyArg_ParseTuple(args,(char *)"O:IVFPQSearchParameters_polysemous_ht_get",&obj0)) SWIG_fail;
50102 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, 0 | 0 );
50103 if (!SWIG_IsOK(res1)) {
50104 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IVFPQSearchParameters_polysemous_ht_get" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
50105 }
50106 arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
50107 result = (int) ((arg1)->polysemous_ht);
50108 resultobj = SWIG_From_int(static_cast< int >(result));
50109 return resultobj;
50110 fail:
50111 return NULL;
50112 }
50113
50114
50115 SWIGINTERN PyObject *_wrap_delete_IVFPQSearchParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50116 PyObject *resultobj = 0;
50117 faiss::IVFPQSearchParameters *arg1 = (faiss::IVFPQSearchParameters *) 0 ;
50118 void *argp1 = 0 ;
50119 int res1 = 0 ;
50120 PyObject * obj0 = 0 ;
50121
50122 if (!PyArg_ParseTuple(args,(char *)"O:delete_IVFPQSearchParameters",&obj0)) SWIG_fail;
50123 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IVFPQSearchParameters, SWIG_POINTER_DISOWN | 0 );
50124 if (!SWIG_IsOK(res1)) {
50125 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IVFPQSearchParameters" "', argument " "1"" of type '" "faiss::IVFPQSearchParameters *""'");
50126 }
50127 arg1 = reinterpret_cast< faiss::IVFPQSearchParameters * >(argp1);
50128 {
50129 Py_BEGIN_ALLOW_THREADS
50130 try {
50131 delete arg1;
50132 } catch(faiss::FaissException & e) {
50133 PyEval_RestoreThread(_save);
50134 PyErr_SetString(PyExc_RuntimeError, e.what());
50135 SWIG_fail;
50136 }
50137 Py_END_ALLOW_THREADS
50138 }
50139 resultobj = SWIG_Py_Void();
50140 return resultobj;
50141 fail:
50142 return NULL;
50143 }
50144
50145
50146 SWIGINTERN PyObject *_wrap_new_IVFPQSearchParameters(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50147 PyObject *resultobj = 0;
50148 faiss::IVFPQSearchParameters *result = 0 ;
50149
50150 if (!PyArg_ParseTuple(args,(char *)":new_IVFPQSearchParameters")) SWIG_fail;
50151 result = (faiss::IVFPQSearchParameters *)new faiss::IVFPQSearchParameters();
50152 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IVFPQSearchParameters, SWIG_POINTER_NEW | 0 );
50153 return resultobj;
50154 fail:
50155 return NULL;
50156 }
50157
50158
50159 SWIGINTERN PyObject *IVFPQSearchParameters_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50160 PyObject *obj;
50161 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
50162 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IVFPQSearchParameters, SWIG_NewClientData(obj));
50163 return SWIG_Py_Void();
50164 }
50165
50166 SWIGINTERN PyObject *_wrap_IndexIVFPQ_by_residual_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50167 PyObject *resultobj = 0;
50168 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50169 bool arg2 ;
50170 void *argp1 = 0 ;
50171 int res1 = 0 ;
50172 bool val2 ;
50173 int ecode2 = 0 ;
50174 PyObject * obj0 = 0 ;
50175 PyObject * obj1 = 0 ;
50176
50177 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_by_residual_set",&obj0,&obj1)) SWIG_fail;
50178 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50179 if (!SWIG_IsOK(res1)) {
50180 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_by_residual_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50181 }
50182 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50183 ecode2 = SWIG_AsVal_bool(obj1, &val2);
50184 if (!SWIG_IsOK(ecode2)) {
50185 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_by_residual_set" "', argument " "2"" of type '" "bool""'");
50186 }
50187 arg2 = static_cast< bool >(val2);
50188 if (arg1) (arg1)->by_residual = arg2;
50189 resultobj = SWIG_Py_Void();
50190 return resultobj;
50191 fail:
50192 return NULL;
50193 }
50194
50195
50196 SWIGINTERN PyObject *_wrap_IndexIVFPQ_by_residual_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50197 PyObject *resultobj = 0;
50198 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50199 void *argp1 = 0 ;
50200 int res1 = 0 ;
50201 PyObject * obj0 = 0 ;
50202 bool result;
50203
50204 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_by_residual_get",&obj0)) SWIG_fail;
50205 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50206 if (!SWIG_IsOK(res1)) {
50207 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_by_residual_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50208 }
50209 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50210 result = (bool) ((arg1)->by_residual);
50211 resultobj = SWIG_From_bool(static_cast< bool >(result));
50212 return resultobj;
50213 fail:
50214 return NULL;
50215 }
50216
50217
50218 SWIGINTERN PyObject *_wrap_IndexIVFPQ_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50219 PyObject *resultobj = 0;
50220 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50221 faiss::ProductQuantizer *arg2 = (faiss::ProductQuantizer *) 0 ;
50222 void *argp1 = 0 ;
50223 int res1 = 0 ;
50224 void *argp2 = 0 ;
50225 int res2 = 0 ;
50226 PyObject * obj0 = 0 ;
50227 PyObject * obj1 = 0 ;
50228
50229 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_pq_set",&obj0,&obj1)) SWIG_fail;
50230 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50231 if (!SWIG_IsOK(res1)) {
50232 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_pq_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50233 }
50234 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50235 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
50236 if (!SWIG_IsOK(res2)) {
50237 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQ_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
50238 }
50239 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
50240 if (arg1) (arg1)->pq = *arg2;
50241 resultobj = SWIG_Py_Void();
50242 return resultobj;
50243 fail:
50244 return NULL;
50245 }
50246
50247
50248 SWIGINTERN PyObject *_wrap_IndexIVFPQ_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50249 PyObject *resultobj = 0;
50250 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50251 void *argp1 = 0 ;
50252 int res1 = 0 ;
50253 PyObject * obj0 = 0 ;
50254 faiss::ProductQuantizer *result = 0 ;
50255
50256 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_pq_get",&obj0)) SWIG_fail;
50257 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50258 if (!SWIG_IsOK(res1)) {
50259 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_pq_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50260 }
50261 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50262 result = (faiss::ProductQuantizer *)& ((arg1)->pq);
50263 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
50264 return resultobj;
50265 fail:
50266 return NULL;
50267 }
50268
50269
50270 SWIGINTERN PyObject *_wrap_IndexIVFPQ_do_polysemous_training_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50271 PyObject *resultobj = 0;
50272 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50273 bool arg2 ;
50274 void *argp1 = 0 ;
50275 int res1 = 0 ;
50276 bool val2 ;
50277 int ecode2 = 0 ;
50278 PyObject * obj0 = 0 ;
50279 PyObject * obj1 = 0 ;
50280
50281 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_do_polysemous_training_set",&obj0,&obj1)) SWIG_fail;
50282 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50283 if (!SWIG_IsOK(res1)) {
50284 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_do_polysemous_training_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50285 }
50286 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50287 ecode2 = SWIG_AsVal_bool(obj1, &val2);
50288 if (!SWIG_IsOK(ecode2)) {
50289 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_do_polysemous_training_set" "', argument " "2"" of type '" "bool""'");
50290 }
50291 arg2 = static_cast< bool >(val2);
50292 if (arg1) (arg1)->do_polysemous_training = arg2;
50293 resultobj = SWIG_Py_Void();
50294 return resultobj;
50295 fail:
50296 return NULL;
50297 }
50298
50299
50300 SWIGINTERN PyObject *_wrap_IndexIVFPQ_do_polysemous_training_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50301 PyObject *resultobj = 0;
50302 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50303 void *argp1 = 0 ;
50304 int res1 = 0 ;
50305 PyObject * obj0 = 0 ;
50306 bool result;
50307
50308 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_do_polysemous_training_get",&obj0)) SWIG_fail;
50309 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50310 if (!SWIG_IsOK(res1)) {
50311 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_do_polysemous_training_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50312 }
50313 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50314 result = (bool) ((arg1)->do_polysemous_training);
50315 resultobj = SWIG_From_bool(static_cast< bool >(result));
50316 return resultobj;
50317 fail:
50318 return NULL;
50319 }
50320
50321
50322 SWIGINTERN PyObject *_wrap_IndexIVFPQ_polysemous_training_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50323 PyObject *resultobj = 0;
50324 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50325 faiss::PolysemousTraining *arg2 = (faiss::PolysemousTraining *) 0 ;
50326 void *argp1 = 0 ;
50327 int res1 = 0 ;
50328 void *argp2 = 0 ;
50329 int res2 = 0 ;
50330 PyObject * obj0 = 0 ;
50331 PyObject * obj1 = 0 ;
50332
50333 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_polysemous_training_set",&obj0,&obj1)) SWIG_fail;
50334 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50335 if (!SWIG_IsOK(res1)) {
50336 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_polysemous_training_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50337 }
50338 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50339 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__PolysemousTraining, SWIG_POINTER_DISOWN | 0 );
50340 if (!SWIG_IsOK(res2)) {
50341 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQ_polysemous_training_set" "', argument " "2"" of type '" "faiss::PolysemousTraining *""'");
50342 }
50343 arg2 = reinterpret_cast< faiss::PolysemousTraining * >(argp2);
50344 if (arg1) (arg1)->polysemous_training = arg2;
50345 resultobj = SWIG_Py_Void();
50346 return resultobj;
50347 fail:
50348 return NULL;
50349 }
50350
50351
50352 SWIGINTERN PyObject *_wrap_IndexIVFPQ_polysemous_training_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50353 PyObject *resultobj = 0;
50354 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50355 void *argp1 = 0 ;
50356 int res1 = 0 ;
50357 PyObject * obj0 = 0 ;
50358 faiss::PolysemousTraining *result = 0 ;
50359
50360 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_polysemous_training_get",&obj0)) SWIG_fail;
50361 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50362 if (!SWIG_IsOK(res1)) {
50363 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_polysemous_training_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50364 }
50365 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50366 result = (faiss::PolysemousTraining *) ((arg1)->polysemous_training);
50367 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__PolysemousTraining, 0 | 0 );
50368 return resultobj;
50369 fail:
50370 return NULL;
50371 }
50372
50373
50374 SWIGINTERN PyObject *_wrap_IndexIVFPQ_scan_table_threshold_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50375 PyObject *resultobj = 0;
50376 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50377 size_t arg2 ;
50378 void *argp1 = 0 ;
50379 int res1 = 0 ;
50380 size_t val2 ;
50381 int ecode2 = 0 ;
50382 PyObject * obj0 = 0 ;
50383 PyObject * obj1 = 0 ;
50384
50385 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_scan_table_threshold_set",&obj0,&obj1)) SWIG_fail;
50386 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50387 if (!SWIG_IsOK(res1)) {
50388 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_scan_table_threshold_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50389 }
50390 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50391 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50392 if (!SWIG_IsOK(ecode2)) {
50393 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_scan_table_threshold_set" "', argument " "2"" of type '" "size_t""'");
50394 }
50395 arg2 = static_cast< size_t >(val2);
50396 if (arg1) (arg1)->scan_table_threshold = arg2;
50397 resultobj = SWIG_Py_Void();
50398 return resultobj;
50399 fail:
50400 return NULL;
50401 }
50402
50403
50404 SWIGINTERN PyObject *_wrap_IndexIVFPQ_scan_table_threshold_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50405 PyObject *resultobj = 0;
50406 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50407 void *argp1 = 0 ;
50408 int res1 = 0 ;
50409 PyObject * obj0 = 0 ;
50410 size_t result;
50411
50412 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_scan_table_threshold_get",&obj0)) SWIG_fail;
50413 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50414 if (!SWIG_IsOK(res1)) {
50415 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_scan_table_threshold_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50416 }
50417 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50418 result = (size_t) ((arg1)->scan_table_threshold);
50419 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
50420 return resultobj;
50421 fail:
50422 return NULL;
50423 }
50424
50425
50426 SWIGINTERN PyObject *_wrap_IndexIVFPQ_polysemous_ht_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50427 PyObject *resultobj = 0;
50428 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50429 int arg2 ;
50430 void *argp1 = 0 ;
50431 int res1 = 0 ;
50432 int val2 ;
50433 int ecode2 = 0 ;
50434 PyObject * obj0 = 0 ;
50435 PyObject * obj1 = 0 ;
50436
50437 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_polysemous_ht_set",&obj0,&obj1)) SWIG_fail;
50438 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50439 if (!SWIG_IsOK(res1)) {
50440 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_polysemous_ht_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50441 }
50442 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50443 ecode2 = SWIG_AsVal_int(obj1, &val2);
50444 if (!SWIG_IsOK(ecode2)) {
50445 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_polysemous_ht_set" "', argument " "2"" of type '" "int""'");
50446 }
50447 arg2 = static_cast< int >(val2);
50448 if (arg1) (arg1)->polysemous_ht = arg2;
50449 resultobj = SWIG_Py_Void();
50450 return resultobj;
50451 fail:
50452 return NULL;
50453 }
50454
50455
50456 SWIGINTERN PyObject *_wrap_IndexIVFPQ_polysemous_ht_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50457 PyObject *resultobj = 0;
50458 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50459 void *argp1 = 0 ;
50460 int res1 = 0 ;
50461 PyObject * obj0 = 0 ;
50462 int result;
50463
50464 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_polysemous_ht_get",&obj0)) SWIG_fail;
50465 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50466 if (!SWIG_IsOK(res1)) {
50467 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_polysemous_ht_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50468 }
50469 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50470 result = (int) ((arg1)->polysemous_ht);
50471 resultobj = SWIG_From_int(static_cast< int >(result));
50472 return resultobj;
50473 fail:
50474 return NULL;
50475 }
50476
50477
50478 SWIGINTERN PyObject *_wrap_IndexIVFPQ_use_precomputed_table_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50479 PyObject *resultobj = 0;
50480 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50481 int arg2 ;
50482 void *argp1 = 0 ;
50483 int res1 = 0 ;
50484 int val2 ;
50485 int ecode2 = 0 ;
50486 PyObject * obj0 = 0 ;
50487 PyObject * obj1 = 0 ;
50488
50489 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_use_precomputed_table_set",&obj0,&obj1)) SWIG_fail;
50490 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50491 if (!SWIG_IsOK(res1)) {
50492 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_use_precomputed_table_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50493 }
50494 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50495 ecode2 = SWIG_AsVal_int(obj1, &val2);
50496 if (!SWIG_IsOK(ecode2)) {
50497 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_use_precomputed_table_set" "', argument " "2"" of type '" "int""'");
50498 }
50499 arg2 = static_cast< int >(val2);
50500 if (arg1) (arg1)->use_precomputed_table = arg2;
50501 resultobj = SWIG_Py_Void();
50502 return resultobj;
50503 fail:
50504 return NULL;
50505 }
50506
50507
50508 SWIGINTERN PyObject *_wrap_IndexIVFPQ_use_precomputed_table_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50509 PyObject *resultobj = 0;
50510 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50511 void *argp1 = 0 ;
50512 int res1 = 0 ;
50513 PyObject * obj0 = 0 ;
50514 int result;
50515
50516 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_use_precomputed_table_get",&obj0)) SWIG_fail;
50517 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50518 if (!SWIG_IsOK(res1)) {
50519 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_use_precomputed_table_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50520 }
50521 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50522 result = (int) ((arg1)->use_precomputed_table);
50523 resultobj = SWIG_From_int(static_cast< int >(result));
50524 return resultobj;
50525 fail:
50526 return NULL;
50527 }
50528
50529
50530 SWIGINTERN int Swig_var_IndexIVFPQ_precomputed_table_max_bytes_set(PyObject *_val) {
50531 {
50532 size_t val;
50533 int res = SWIG_AsVal_size_t(_val, &val);
50534 if (!SWIG_IsOK(res)) {
50535 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::IndexIVFPQ::precomputed_table_max_bytes""' of type '""size_t""'");
50536 }
50537 faiss::IndexIVFPQ::precomputed_table_max_bytes = static_cast< size_t >(val);
50538 }
50539 return 0;
50540 fail:
50541 return 1;
50542 }
50543
50544
50545 SWIGINTERN PyObject *Swig_var_IndexIVFPQ_precomputed_table_max_bytes_get(void) {
50546 PyObject *pyobj = 0;
50547
50548 pyobj = SWIG_From_size_t(static_cast< size_t >(faiss::IndexIVFPQ::precomputed_table_max_bytes));
50549 return pyobj;
50550 }
50551
50552
50553 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precomputed_table_max_bytes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *SWIGUNUSEDPARM(args)) {
50554 return Swig_var_IndexIVFPQ_precomputed_table_max_bytes_get();
50555 }
50556
50557
50558 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precomputed_table_max_bytes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50559 int res;
50560 PyObject *value;
50561
50562 if (!PyArg_ParseTuple(args,(char *)"O:set",&value)) return NULL;
50563 res = Swig_var_IndexIVFPQ_precomputed_table_max_bytes_set(value);
50564 return !res ? SWIG_Py_Void() : NULL;
50565 }
50566
50567
50568 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precomputed_table_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50569 PyObject *resultobj = 0;
50570 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50571 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
50572 void *argp1 = 0 ;
50573 int res1 = 0 ;
50574 void *argp2 = 0 ;
50575 int res2 = 0 ;
50576 PyObject * obj0 = 0 ;
50577 PyObject * obj1 = 0 ;
50578
50579 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_precomputed_table_set",&obj0,&obj1)) SWIG_fail;
50580 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50581 if (!SWIG_IsOK(res1)) {
50582 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_precomputed_table_set" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50583 }
50584 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50585 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
50586 if (!SWIG_IsOK(res2)) {
50587 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQ_precomputed_table_set" "', argument " "2"" of type '" "std::vector< float > *""'");
50588 }
50589 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
50590 if (arg1) (arg1)->precomputed_table = *arg2;
50591 resultobj = SWIG_Py_Void();
50592 return resultobj;
50593 fail:
50594 return NULL;
50595 }
50596
50597
50598 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precomputed_table_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50599 PyObject *resultobj = 0;
50600 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50601 void *argp1 = 0 ;
50602 int res1 = 0 ;
50603 PyObject * obj0 = 0 ;
50604 std::vector< float > *result = 0 ;
50605
50606 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_precomputed_table_get",&obj0)) SWIG_fail;
50607 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50608 if (!SWIG_IsOK(res1)) {
50609 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_precomputed_table_get" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50610 }
50611 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50612 result = (std::vector< float > *)& ((arg1)->precomputed_table);
50613 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
50614 return resultobj;
50615 fail:
50616 return NULL;
50617 }
50618
50619
50620 SWIGINTERN PyObject *_wrap_new_IndexIVFPQ__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50621 PyObject *resultobj = 0;
50622 faiss::Index *arg1 = (faiss::Index *) 0 ;
50623 size_t arg2 ;
50624 size_t arg3 ;
50625 size_t arg4 ;
50626 size_t arg5 ;
50627 void *argp1 = 0 ;
50628 int res1 = 0 ;
50629 size_t val2 ;
50630 int ecode2 = 0 ;
50631 size_t val3 ;
50632 int ecode3 = 0 ;
50633 size_t val4 ;
50634 int ecode4 = 0 ;
50635 size_t val5 ;
50636 int ecode5 = 0 ;
50637 PyObject * obj0 = 0 ;
50638 PyObject * obj1 = 0 ;
50639 PyObject * obj2 = 0 ;
50640 PyObject * obj3 = 0 ;
50641 PyObject * obj4 = 0 ;
50642 faiss::IndexIVFPQ *result = 0 ;
50643
50644 if (!PyArg_ParseTuple(args,(char *)"OOOOO:new_IndexIVFPQ",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
50645 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
50646 if (!SWIG_IsOK(res1)) {
50647 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFPQ" "', argument " "1"" of type '" "faiss::Index *""'");
50648 }
50649 arg1 = reinterpret_cast< faiss::Index * >(argp1);
50650 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
50651 if (!SWIG_IsOK(ecode2)) {
50652 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFPQ" "', argument " "2"" of type '" "size_t""'");
50653 }
50654 arg2 = static_cast< size_t >(val2);
50655 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
50656 if (!SWIG_IsOK(ecode3)) {
50657 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFPQ" "', argument " "3"" of type '" "size_t""'");
50658 }
50659 arg3 = static_cast< size_t >(val3);
50660 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
50661 if (!SWIG_IsOK(ecode4)) {
50662 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFPQ" "', argument " "4"" of type '" "size_t""'");
50663 }
50664 arg4 = static_cast< size_t >(val4);
50665 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
50666 if (!SWIG_IsOK(ecode5)) {
50667 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IndexIVFPQ" "', argument " "5"" of type '" "size_t""'");
50668 }
50669 arg5 = static_cast< size_t >(val5);
50670 {
50671 Py_BEGIN_ALLOW_THREADS
50672 try {
50673 result = (faiss::IndexIVFPQ *)new faiss::IndexIVFPQ(arg1,arg2,arg3,arg4,arg5);
50674 } catch(faiss::FaissException & e) {
50675 PyEval_RestoreThread(_save);
50676 PyErr_SetString(PyExc_RuntimeError, e.what());
50677 SWIG_fail;
50678 }
50679 Py_END_ALLOW_THREADS
50680 }
50681 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQ, SWIG_POINTER_NEW | 0 );
50682 return resultobj;
50683 fail:
50684 return NULL;
50685 }
50686
50687
50688 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50689 PyObject *resultobj = 0;
50690 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50691 faiss::Index::idx_t arg2 ;
50692 float *arg3 = (float *) 0 ;
50693 long *arg4 = (long *) 0 ;
50694 void *argp1 = 0 ;
50695 int res1 = 0 ;
50696 long val2 ;
50697 int ecode2 = 0 ;
50698 void *argp3 = 0 ;
50699 int res3 = 0 ;
50700 void *argp4 = 0 ;
50701 int res4 = 0 ;
50702 PyObject * obj0 = 0 ;
50703 PyObject * obj1 = 0 ;
50704 PyObject * obj2 = 0 ;
50705 PyObject * obj3 = 0 ;
50706
50707 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQ_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
50708 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50709 if (!SWIG_IsOK(res1)) {
50710 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50711 }
50712 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50713 ecode2 = SWIG_AsVal_long(obj1, &val2);
50714 if (!SWIG_IsOK(ecode2)) {
50715 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
50716 }
50717 arg2 = static_cast< faiss::Index::idx_t >(val2);
50718 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
50719 if (!SWIG_IsOK(res3)) {
50720 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "3"" of type '" "float const *""'");
50721 }
50722 arg3 = reinterpret_cast< float * >(argp3);
50723 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
50724 if (!SWIG_IsOK(res4)) {
50725 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "4"" of type '" "long const *""'");
50726 }
50727 arg4 = reinterpret_cast< long * >(argp4);
50728 {
50729 Py_BEGIN_ALLOW_THREADS
50730 try {
50731 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
50732 } catch(faiss::FaissException & e) {
50733 PyEval_RestoreThread(_save);
50734 PyErr_SetString(PyExc_RuntimeError, e.what());
50735 SWIG_fail;
50736 }
50737 Py_END_ALLOW_THREADS
50738 }
50739 resultobj = SWIG_Py_Void();
50740 return resultobj;
50741 fail:
50742 return NULL;
50743 }
50744
50745
50746 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50747 PyObject *resultobj = 0;
50748 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50749 faiss::Index::idx_t arg2 ;
50750 float *arg3 = (float *) 0 ;
50751 void *argp1 = 0 ;
50752 int res1 = 0 ;
50753 long val2 ;
50754 int ecode2 = 0 ;
50755 void *argp3 = 0 ;
50756 int res3 = 0 ;
50757 PyObject * obj0 = 0 ;
50758 PyObject * obj1 = 0 ;
50759 PyObject * obj2 = 0 ;
50760
50761 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQ_add_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
50762 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50763 if (!SWIG_IsOK(res1)) {
50764 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50765 }
50766 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50767 ecode2 = SWIG_AsVal_long(obj1, &val2);
50768 if (!SWIG_IsOK(ecode2)) {
50769 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
50770 }
50771 arg2 = static_cast< faiss::Index::idx_t >(val2);
50772 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
50773 if (!SWIG_IsOK(res3)) {
50774 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_add_with_ids" "', argument " "3"" of type '" "float const *""'");
50775 }
50776 arg3 = reinterpret_cast< float * >(argp3);
50777 {
50778 Py_BEGIN_ALLOW_THREADS
50779 try {
50780 (arg1)->add_with_ids(arg2,(float const *)arg3);
50781 } catch(faiss::FaissException & e) {
50782 PyEval_RestoreThread(_save);
50783 PyErr_SetString(PyExc_RuntimeError, e.what());
50784 SWIG_fail;
50785 }
50786 Py_END_ALLOW_THREADS
50787 }
50788 resultobj = SWIG_Py_Void();
50789 return resultobj;
50790 fail:
50791 return NULL;
50792 }
50793
50794
50795 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_with_ids(PyObject *self, PyObject *args) {
50796 Py_ssize_t argc;
50797 PyObject *argv[5] = {
50798 0
50799 };
50800 Py_ssize_t ii;
50801
50802 if (!PyTuple_Check(args)) SWIG_fail;
50803 argc = args ? PyObject_Length(args) : 0;
50804 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
50805 argv[ii] = PyTuple_GET_ITEM(args,ii);
50806 }
50807 if (argc == 3) {
50808 int _v;
50809 void *vptr = 0;
50810 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
50811 _v = SWIG_CheckState(res);
50812 if (_v) {
50813 {
50814 int res = SWIG_AsVal_long(argv[1], NULL);
50815 _v = SWIG_CheckState(res);
50816 }
50817 if (_v) {
50818 void *vptr = 0;
50819 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
50820 _v = SWIG_CheckState(res);
50821 if (_v) {
50822 return _wrap_IndexIVFPQ_add_with_ids__SWIG_1(self, args);
50823 }
50824 }
50825 }
50826 }
50827 if (argc == 4) {
50828 int _v;
50829 void *vptr = 0;
50830 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
50831 _v = SWIG_CheckState(res);
50832 if (_v) {
50833 {
50834 int res = SWIG_AsVal_long(argv[1], NULL);
50835 _v = SWIG_CheckState(res);
50836 }
50837 if (_v) {
50838 void *vptr = 0;
50839 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
50840 _v = SWIG_CheckState(res);
50841 if (_v) {
50842 void *vptr = 0;
50843 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
50844 _v = SWIG_CheckState(res);
50845 if (_v) {
50846 return _wrap_IndexIVFPQ_add_with_ids__SWIG_0(self, args);
50847 }
50848 }
50849 }
50850 }
50851 }
50852
50853 fail:
50854 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQ_add_with_ids'.\n"
50855 " Possible C/C++ prototypes are:\n"
50856 " faiss::IndexIVFPQ::add_with_ids(faiss::Index::idx_t,float const *,long const *)\n"
50857 " faiss::IndexIVFPQ::add_with_ids(faiss::Index::idx_t,float const *)\n");
50858 return 0;
50859 }
50860
50861
50862 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode_vectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50863 PyObject *resultobj = 0;
50864 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50865 faiss::Index::idx_t arg2 ;
50866 float *arg3 = (float *) 0 ;
50867 faiss::Index::idx_t *arg4 = (faiss::Index::idx_t *) 0 ;
50868 uint8_t *arg5 = (uint8_t *) 0 ;
50869 void *argp1 = 0 ;
50870 int res1 = 0 ;
50871 long val2 ;
50872 int ecode2 = 0 ;
50873 void *argp3 = 0 ;
50874 int res3 = 0 ;
50875 void *argp4 = 0 ;
50876 int res4 = 0 ;
50877 void *argp5 = 0 ;
50878 int res5 = 0 ;
50879 PyObject * obj0 = 0 ;
50880 PyObject * obj1 = 0 ;
50881 PyObject * obj2 = 0 ;
50882 PyObject * obj3 = 0 ;
50883 PyObject * obj4 = 0 ;
50884
50885 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQ_encode_vectors",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
50886 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50887 if (!SWIG_IsOK(res1)) {
50888 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
50889 }
50890 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50891 ecode2 = SWIG_AsVal_long(obj1, &val2);
50892 if (!SWIG_IsOK(ecode2)) {
50893 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
50894 }
50895 arg2 = static_cast< faiss::Index::idx_t >(val2);
50896 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
50897 if (!SWIG_IsOK(res3)) {
50898 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "3"" of type '" "float const *""'");
50899 }
50900 arg3 = reinterpret_cast< float * >(argp3);
50901 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
50902 if (!SWIG_IsOK(res4)) {
50903 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "4"" of type '" "faiss::Index::idx_t const *""'");
50904 }
50905 arg4 = reinterpret_cast< faiss::Index::idx_t * >(argp4);
50906 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
50907 if (!SWIG_IsOK(res5)) {
50908 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_encode_vectors" "', argument " "5"" of type '" "uint8_t *""'");
50909 }
50910 arg5 = reinterpret_cast< uint8_t * >(argp5);
50911 {
50912 Py_BEGIN_ALLOW_THREADS
50913 try {
50914 ((faiss::IndexIVFPQ const *)arg1)->encode_vectors(arg2,(float const *)arg3,(faiss::Index::idx_t const *)arg4,arg5);
50915 } catch(faiss::FaissException & e) {
50916 PyEval_RestoreThread(_save);
50917 PyErr_SetString(PyExc_RuntimeError, e.what());
50918 SWIG_fail;
50919 }
50920 Py_END_ALLOW_THREADS
50921 }
50922 resultobj = SWIG_Py_Void();
50923 return resultobj;
50924 fail:
50925 return NULL;
50926 }
50927
50928
50929 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_core_o__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
50930 PyObject *resultobj = 0;
50931 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
50932 faiss::Index::idx_t arg2 ;
50933 float *arg3 = (float *) 0 ;
50934 long *arg4 = (long *) 0 ;
50935 float *arg5 = (float *) 0 ;
50936 long *arg6 = (long *) 0 ;
50937 void *argp1 = 0 ;
50938 int res1 = 0 ;
50939 long val2 ;
50940 int ecode2 = 0 ;
50941 void *argp3 = 0 ;
50942 int res3 = 0 ;
50943 void *argp4 = 0 ;
50944 int res4 = 0 ;
50945 void *argp5 = 0 ;
50946 int res5 = 0 ;
50947 void *argp6 = 0 ;
50948 int res6 = 0 ;
50949 PyObject * obj0 = 0 ;
50950 PyObject * obj1 = 0 ;
50951 PyObject * obj2 = 0 ;
50952 PyObject * obj3 = 0 ;
50953 PyObject * obj4 = 0 ;
50954 PyObject * obj5 = 0 ;
50955
50956 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexIVFPQ_add_core_o",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
50957 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
50958 if (!SWIG_IsOK(res1)) {
50959 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_add_core_o" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
50960 }
50961 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
50962 ecode2 = SWIG_AsVal_long(obj1, &val2);
50963 if (!SWIG_IsOK(ecode2)) {
50964 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_add_core_o" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
50965 }
50966 arg2 = static_cast< faiss::Index::idx_t >(val2);
50967 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
50968 if (!SWIG_IsOK(res3)) {
50969 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_add_core_o" "', argument " "3"" of type '" "float const *""'");
50970 }
50971 arg3 = reinterpret_cast< float * >(argp3);
50972 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
50973 if (!SWIG_IsOK(res4)) {
50974 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_add_core_o" "', argument " "4"" of type '" "long const *""'");
50975 }
50976 arg4 = reinterpret_cast< long * >(argp4);
50977 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
50978 if (!SWIG_IsOK(res5)) {
50979 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_add_core_o" "', argument " "5"" of type '" "float *""'");
50980 }
50981 arg5 = reinterpret_cast< float * >(argp5);
50982 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
50983 if (!SWIG_IsOK(res6)) {
50984 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFPQ_add_core_o" "', argument " "6"" of type '" "long const *""'");
50985 }
50986 arg6 = reinterpret_cast< long * >(argp6);
50987 {
50988 Py_BEGIN_ALLOW_THREADS
50989 try {
50990 (arg1)->add_core_o(arg2,(float const *)arg3,(long const *)arg4,arg5,(long const *)arg6);
50991 } catch(faiss::FaissException & e) {
50992 PyEval_RestoreThread(_save);
50993 PyErr_SetString(PyExc_RuntimeError, e.what());
50994 SWIG_fail;
50995 }
50996 Py_END_ALLOW_THREADS
50997 }
50998 resultobj = SWIG_Py_Void();
50999 return resultobj;
51000 fail:
51001 return NULL;
51002 }
51003
51004
51005 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_core_o__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51006 PyObject *resultobj = 0;
51007 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51008 faiss::Index::idx_t arg2 ;
51009 float *arg3 = (float *) 0 ;
51010 long *arg4 = (long *) 0 ;
51011 float *arg5 = (float *) 0 ;
51012 void *argp1 = 0 ;
51013 int res1 = 0 ;
51014 long val2 ;
51015 int ecode2 = 0 ;
51016 void *argp3 = 0 ;
51017 int res3 = 0 ;
51018 void *argp4 = 0 ;
51019 int res4 = 0 ;
51020 void *argp5 = 0 ;
51021 int res5 = 0 ;
51022 PyObject * obj0 = 0 ;
51023 PyObject * obj1 = 0 ;
51024 PyObject * obj2 = 0 ;
51025 PyObject * obj3 = 0 ;
51026 PyObject * obj4 = 0 ;
51027
51028 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQ_add_core_o",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
51029 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51030 if (!SWIG_IsOK(res1)) {
51031 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_add_core_o" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51032 }
51033 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51034 ecode2 = SWIG_AsVal_long(obj1, &val2);
51035 if (!SWIG_IsOK(ecode2)) {
51036 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_add_core_o" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
51037 }
51038 arg2 = static_cast< faiss::Index::idx_t >(val2);
51039 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
51040 if (!SWIG_IsOK(res3)) {
51041 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_add_core_o" "', argument " "3"" of type '" "float const *""'");
51042 }
51043 arg3 = reinterpret_cast< float * >(argp3);
51044 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
51045 if (!SWIG_IsOK(res4)) {
51046 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_add_core_o" "', argument " "4"" of type '" "long const *""'");
51047 }
51048 arg4 = reinterpret_cast< long * >(argp4);
51049 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
51050 if (!SWIG_IsOK(res5)) {
51051 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_add_core_o" "', argument " "5"" of type '" "float *""'");
51052 }
51053 arg5 = reinterpret_cast< float * >(argp5);
51054 {
51055 Py_BEGIN_ALLOW_THREADS
51056 try {
51057 (arg1)->add_core_o(arg2,(float const *)arg3,(long const *)arg4,arg5);
51058 } catch(faiss::FaissException & e) {
51059 PyEval_RestoreThread(_save);
51060 PyErr_SetString(PyExc_RuntimeError, e.what());
51061 SWIG_fail;
51062 }
51063 Py_END_ALLOW_THREADS
51064 }
51065 resultobj = SWIG_Py_Void();
51066 return resultobj;
51067 fail:
51068 return NULL;
51069 }
51070
51071
51072 SWIGINTERN PyObject *_wrap_IndexIVFPQ_add_core_o(PyObject *self, PyObject *args) {
51073 Py_ssize_t argc;
51074 PyObject *argv[7] = {
51075 0
51076 };
51077 Py_ssize_t ii;
51078
51079 if (!PyTuple_Check(args)) SWIG_fail;
51080 argc = args ? PyObject_Length(args) : 0;
51081 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
51082 argv[ii] = PyTuple_GET_ITEM(args,ii);
51083 }
51084 if (argc == 5) {
51085 int _v;
51086 void *vptr = 0;
51087 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
51088 _v = SWIG_CheckState(res);
51089 if (_v) {
51090 {
51091 int res = SWIG_AsVal_long(argv[1], NULL);
51092 _v = SWIG_CheckState(res);
51093 }
51094 if (_v) {
51095 void *vptr = 0;
51096 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
51097 _v = SWIG_CheckState(res);
51098 if (_v) {
51099 void *vptr = 0;
51100 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
51101 _v = SWIG_CheckState(res);
51102 if (_v) {
51103 void *vptr = 0;
51104 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
51105 _v = SWIG_CheckState(res);
51106 if (_v) {
51107 return _wrap_IndexIVFPQ_add_core_o__SWIG_1(self, args);
51108 }
51109 }
51110 }
51111 }
51112 }
51113 }
51114 if (argc == 6) {
51115 int _v;
51116 void *vptr = 0;
51117 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
51118 _v = SWIG_CheckState(res);
51119 if (_v) {
51120 {
51121 int res = SWIG_AsVal_long(argv[1], NULL);
51122 _v = SWIG_CheckState(res);
51123 }
51124 if (_v) {
51125 void *vptr = 0;
51126 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
51127 _v = SWIG_CheckState(res);
51128 if (_v) {
51129 void *vptr = 0;
51130 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
51131 _v = SWIG_CheckState(res);
51132 if (_v) {
51133 void *vptr = 0;
51134 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_float, 0);
51135 _v = SWIG_CheckState(res);
51136 if (_v) {
51137 void *vptr = 0;
51138 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_long, 0);
51139 _v = SWIG_CheckState(res);
51140 if (_v) {
51141 return _wrap_IndexIVFPQ_add_core_o__SWIG_0(self, args);
51142 }
51143 }
51144 }
51145 }
51146 }
51147 }
51148 }
51149
51150 fail:
51151 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQ_add_core_o'.\n"
51152 " Possible C/C++ prototypes are:\n"
51153 " faiss::IndexIVFPQ::add_core_o(faiss::Index::idx_t,float const *,long const *,float *,long const *)\n"
51154 " faiss::IndexIVFPQ::add_core_o(faiss::Index::idx_t,float const *,long const *,float *)\n");
51155 return 0;
51156 }
51157
51158
51159 SWIGINTERN PyObject *_wrap_IndexIVFPQ_train_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51160 PyObject *resultobj = 0;
51161 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51162 faiss::Index::idx_t arg2 ;
51163 float *arg3 = (float *) 0 ;
51164 void *argp1 = 0 ;
51165 int res1 = 0 ;
51166 long val2 ;
51167 int ecode2 = 0 ;
51168 void *argp3 = 0 ;
51169 int res3 = 0 ;
51170 PyObject * obj0 = 0 ;
51171 PyObject * obj1 = 0 ;
51172 PyObject * obj2 = 0 ;
51173
51174 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQ_train_residual",&obj0,&obj1,&obj2)) SWIG_fail;
51175 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51176 if (!SWIG_IsOK(res1)) {
51177 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_train_residual" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51178 }
51179 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51180 ecode2 = SWIG_AsVal_long(obj1, &val2);
51181 if (!SWIG_IsOK(ecode2)) {
51182 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_train_residual" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
51183 }
51184 arg2 = static_cast< faiss::Index::idx_t >(val2);
51185 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
51186 if (!SWIG_IsOK(res3)) {
51187 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_train_residual" "', argument " "3"" of type '" "float const *""'");
51188 }
51189 arg3 = reinterpret_cast< float * >(argp3);
51190 {
51191 Py_BEGIN_ALLOW_THREADS
51192 try {
51193 (arg1)->train_residual(arg2,(float const *)arg3);
51194 } catch(faiss::FaissException & e) {
51195 PyEval_RestoreThread(_save);
51196 PyErr_SetString(PyExc_RuntimeError, e.what());
51197 SWIG_fail;
51198 }
51199 Py_END_ALLOW_THREADS
51200 }
51201 resultobj = SWIG_Py_Void();
51202 return resultobj;
51203 fail:
51204 return NULL;
51205 }
51206
51207
51208 SWIGINTERN PyObject *_wrap_IndexIVFPQ_train_residual_o(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51209 PyObject *resultobj = 0;
51210 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51211 faiss::Index::idx_t arg2 ;
51212 float *arg3 = (float *) 0 ;
51213 float *arg4 = (float *) 0 ;
51214 void *argp1 = 0 ;
51215 int res1 = 0 ;
51216 long val2 ;
51217 int ecode2 = 0 ;
51218 void *argp3 = 0 ;
51219 int res3 = 0 ;
51220 void *argp4 = 0 ;
51221 int res4 = 0 ;
51222 PyObject * obj0 = 0 ;
51223 PyObject * obj1 = 0 ;
51224 PyObject * obj2 = 0 ;
51225 PyObject * obj3 = 0 ;
51226
51227 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQ_train_residual_o",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
51228 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51229 if (!SWIG_IsOK(res1)) {
51230 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_train_residual_o" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51231 }
51232 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51233 ecode2 = SWIG_AsVal_long(obj1, &val2);
51234 if (!SWIG_IsOK(ecode2)) {
51235 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_train_residual_o" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
51236 }
51237 arg2 = static_cast< faiss::Index::idx_t >(val2);
51238 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
51239 if (!SWIG_IsOK(res3)) {
51240 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_train_residual_o" "', argument " "3"" of type '" "float const *""'");
51241 }
51242 arg3 = reinterpret_cast< float * >(argp3);
51243 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
51244 if (!SWIG_IsOK(res4)) {
51245 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_train_residual_o" "', argument " "4"" of type '" "float *""'");
51246 }
51247 arg4 = reinterpret_cast< float * >(argp4);
51248 {
51249 Py_BEGIN_ALLOW_THREADS
51250 try {
51251 (arg1)->train_residual_o(arg2,(float const *)arg3,arg4);
51252 } catch(faiss::FaissException & e) {
51253 PyEval_RestoreThread(_save);
51254 PyErr_SetString(PyExc_RuntimeError, e.what());
51255 SWIG_fail;
51256 }
51257 Py_END_ALLOW_THREADS
51258 }
51259 resultobj = SWIG_Py_Void();
51260 return resultobj;
51261 fail:
51262 return NULL;
51263 }
51264
51265
51266 SWIGINTERN PyObject *_wrap_IndexIVFPQ_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51267 PyObject *resultobj = 0;
51268 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51269 long arg2 ;
51270 long arg3 ;
51271 float *arg4 = (float *) 0 ;
51272 void *argp1 = 0 ;
51273 int res1 = 0 ;
51274 long val2 ;
51275 int ecode2 = 0 ;
51276 long val3 ;
51277 int ecode3 = 0 ;
51278 void *argp4 = 0 ;
51279 int res4 = 0 ;
51280 PyObject * obj0 = 0 ;
51281 PyObject * obj1 = 0 ;
51282 PyObject * obj2 = 0 ;
51283 PyObject * obj3 = 0 ;
51284
51285 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQ_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
51286 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51287 if (!SWIG_IsOK(res1)) {
51288 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
51289 }
51290 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51291 ecode2 = SWIG_AsVal_long(obj1, &val2);
51292 if (!SWIG_IsOK(ecode2)) {
51293 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
51294 }
51295 arg2 = static_cast< long >(val2);
51296 ecode3 = SWIG_AsVal_long(obj2, &val3);
51297 if (!SWIG_IsOK(ecode3)) {
51298 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFPQ_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
51299 }
51300 arg3 = static_cast< long >(val3);
51301 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
51302 if (!SWIG_IsOK(res4)) {
51303 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
51304 }
51305 arg4 = reinterpret_cast< float * >(argp4);
51306 {
51307 Py_BEGIN_ALLOW_THREADS
51308 try {
51309 ((faiss::IndexIVFPQ const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
51310 } catch(faiss::FaissException & e) {
51311 PyEval_RestoreThread(_save);
51312 PyErr_SetString(PyExc_RuntimeError, e.what());
51313 SWIG_fail;
51314 }
51315 Py_END_ALLOW_THREADS
51316 }
51317 resultobj = SWIG_Py_Void();
51318 return resultobj;
51319 fail:
51320 return NULL;
51321 }
51322
51323
51324 SWIGINTERN PyObject *_wrap_IndexIVFPQ_find_duplicates(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51325 PyObject *resultobj = 0;
51326 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51327 faiss::Index::idx_t *arg2 = (faiss::Index::idx_t *) 0 ;
51328 size_t *arg3 = (size_t *) 0 ;
51329 void *argp1 = 0 ;
51330 int res1 = 0 ;
51331 void *argp2 = 0 ;
51332 int res2 = 0 ;
51333 void *argp3 = 0 ;
51334 int res3 = 0 ;
51335 PyObject * obj0 = 0 ;
51336 PyObject * obj1 = 0 ;
51337 PyObject * obj2 = 0 ;
51338 size_t result;
51339
51340 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQ_find_duplicates",&obj0,&obj1,&obj2)) SWIG_fail;
51341 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51342 if (!SWIG_IsOK(res1)) {
51343 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_find_duplicates" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
51344 }
51345 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51346 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
51347 if (!SWIG_IsOK(res2)) {
51348 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQ_find_duplicates" "', argument " "2"" of type '" "faiss::Index::idx_t *""'");
51349 }
51350 arg2 = reinterpret_cast< faiss::Index::idx_t * >(argp2);
51351 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_long, 0 | 0 );
51352 if (!SWIG_IsOK(res3)) {
51353 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_find_duplicates" "', argument " "3"" of type '" "size_t *""'");
51354 }
51355 arg3 = reinterpret_cast< size_t * >(argp3);
51356 {
51357 Py_BEGIN_ALLOW_THREADS
51358 try {
51359 result = (size_t)((faiss::IndexIVFPQ const *)arg1)->find_duplicates(arg2,arg3);
51360 } catch(faiss::FaissException & e) {
51361 PyEval_RestoreThread(_save);
51362 PyErr_SetString(PyExc_RuntimeError, e.what());
51363 SWIG_fail;
51364 }
51365 Py_END_ALLOW_THREADS
51366 }
51367 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
51368 return resultobj;
51369 fail:
51370 return NULL;
51371 }
51372
51373
51374 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51375 PyObject *resultobj = 0;
51376 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51377 long arg2 ;
51378 float *arg3 = (float *) 0 ;
51379 uint8_t *arg4 = (uint8_t *) 0 ;
51380 void *argp1 = 0 ;
51381 int res1 = 0 ;
51382 long val2 ;
51383 int ecode2 = 0 ;
51384 void *argp3 = 0 ;
51385 int res3 = 0 ;
51386 void *argp4 = 0 ;
51387 int res4 = 0 ;
51388 PyObject * obj0 = 0 ;
51389 PyObject * obj1 = 0 ;
51390 PyObject * obj2 = 0 ;
51391 PyObject * obj3 = 0 ;
51392
51393 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQ_encode",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
51394 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51395 if (!SWIG_IsOK(res1)) {
51396 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_encode" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
51397 }
51398 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51399 ecode2 = SWIG_AsVal_long(obj1, &val2);
51400 if (!SWIG_IsOK(ecode2)) {
51401 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_encode" "', argument " "2"" of type '" "long""'");
51402 }
51403 arg2 = static_cast< long >(val2);
51404 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
51405 if (!SWIG_IsOK(res3)) {
51406 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_encode" "', argument " "3"" of type '" "float const *""'");
51407 }
51408 arg3 = reinterpret_cast< float * >(argp3);
51409 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
51410 if (!SWIG_IsOK(res4)) {
51411 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_encode" "', argument " "4"" of type '" "uint8_t *""'");
51412 }
51413 arg4 = reinterpret_cast< uint8_t * >(argp4);
51414 {
51415 Py_BEGIN_ALLOW_THREADS
51416 try {
51417 ((faiss::IndexIVFPQ const *)arg1)->encode(arg2,(float const *)arg3,arg4);
51418 } catch(faiss::FaissException & e) {
51419 PyEval_RestoreThread(_save);
51420 PyErr_SetString(PyExc_RuntimeError, e.what());
51421 SWIG_fail;
51422 }
51423 Py_END_ALLOW_THREADS
51424 }
51425 resultobj = SWIG_Py_Void();
51426 return resultobj;
51427 fail:
51428 return NULL;
51429 }
51430
51431
51432 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode_multiple__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51433 PyObject *resultobj = 0;
51434 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51435 size_t arg2 ;
51436 long *arg3 = (long *) 0 ;
51437 float *arg4 = (float *) 0 ;
51438 uint8_t *arg5 = (uint8_t *) 0 ;
51439 bool arg6 ;
51440 void *argp1 = 0 ;
51441 int res1 = 0 ;
51442 size_t val2 ;
51443 int ecode2 = 0 ;
51444 void *argp3 = 0 ;
51445 int res3 = 0 ;
51446 void *argp4 = 0 ;
51447 int res4 = 0 ;
51448 void *argp5 = 0 ;
51449 int res5 = 0 ;
51450 bool val6 ;
51451 int ecode6 = 0 ;
51452 PyObject * obj0 = 0 ;
51453 PyObject * obj1 = 0 ;
51454 PyObject * obj2 = 0 ;
51455 PyObject * obj3 = 0 ;
51456 PyObject * obj4 = 0 ;
51457 PyObject * obj5 = 0 ;
51458
51459 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexIVFPQ_encode_multiple",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
51460 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51461 if (!SWIG_IsOK(res1)) {
51462 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
51463 }
51464 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51465 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51466 if (!SWIG_IsOK(ecode2)) {
51467 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "2"" of type '" "size_t""'");
51468 }
51469 arg2 = static_cast< size_t >(val2);
51470 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
51471 if (!SWIG_IsOK(res3)) {
51472 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "3"" of type '" "long *""'");
51473 }
51474 arg3 = reinterpret_cast< long * >(argp3);
51475 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
51476 if (!SWIG_IsOK(res4)) {
51477 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "4"" of type '" "float const *""'");
51478 }
51479 arg4 = reinterpret_cast< float * >(argp4);
51480 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
51481 if (!SWIG_IsOK(res5)) {
51482 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "5"" of type '" "uint8_t *""'");
51483 }
51484 arg5 = reinterpret_cast< uint8_t * >(argp5);
51485 ecode6 = SWIG_AsVal_bool(obj5, &val6);
51486 if (!SWIG_IsOK(ecode6)) {
51487 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "6"" of type '" "bool""'");
51488 }
51489 arg6 = static_cast< bool >(val6);
51490 {
51491 Py_BEGIN_ALLOW_THREADS
51492 try {
51493 ((faiss::IndexIVFPQ const *)arg1)->encode_multiple(arg2,arg3,(float const *)arg4,arg5,arg6);
51494 } catch(faiss::FaissException & e) {
51495 PyEval_RestoreThread(_save);
51496 PyErr_SetString(PyExc_RuntimeError, e.what());
51497 SWIG_fail;
51498 }
51499 Py_END_ALLOW_THREADS
51500 }
51501 resultobj = SWIG_Py_Void();
51502 return resultobj;
51503 fail:
51504 return NULL;
51505 }
51506
51507
51508 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode_multiple__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51509 PyObject *resultobj = 0;
51510 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51511 size_t arg2 ;
51512 long *arg3 = (long *) 0 ;
51513 float *arg4 = (float *) 0 ;
51514 uint8_t *arg5 = (uint8_t *) 0 ;
51515 void *argp1 = 0 ;
51516 int res1 = 0 ;
51517 size_t val2 ;
51518 int ecode2 = 0 ;
51519 void *argp3 = 0 ;
51520 int res3 = 0 ;
51521 void *argp4 = 0 ;
51522 int res4 = 0 ;
51523 void *argp5 = 0 ;
51524 int res5 = 0 ;
51525 PyObject * obj0 = 0 ;
51526 PyObject * obj1 = 0 ;
51527 PyObject * obj2 = 0 ;
51528 PyObject * obj3 = 0 ;
51529 PyObject * obj4 = 0 ;
51530
51531 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQ_encode_multiple",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
51532 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51533 if (!SWIG_IsOK(res1)) {
51534 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
51535 }
51536 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51537 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51538 if (!SWIG_IsOK(ecode2)) {
51539 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "2"" of type '" "size_t""'");
51540 }
51541 arg2 = static_cast< size_t >(val2);
51542 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
51543 if (!SWIG_IsOK(res3)) {
51544 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "3"" of type '" "long *""'");
51545 }
51546 arg3 = reinterpret_cast< long * >(argp3);
51547 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
51548 if (!SWIG_IsOK(res4)) {
51549 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "4"" of type '" "float const *""'");
51550 }
51551 arg4 = reinterpret_cast< float * >(argp4);
51552 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_unsigned_char, 0 | 0 );
51553 if (!SWIG_IsOK(res5)) {
51554 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_encode_multiple" "', argument " "5"" of type '" "uint8_t *""'");
51555 }
51556 arg5 = reinterpret_cast< uint8_t * >(argp5);
51557 {
51558 Py_BEGIN_ALLOW_THREADS
51559 try {
51560 ((faiss::IndexIVFPQ const *)arg1)->encode_multiple(arg2,arg3,(float const *)arg4,arg5);
51561 } catch(faiss::FaissException & e) {
51562 PyEval_RestoreThread(_save);
51563 PyErr_SetString(PyExc_RuntimeError, e.what());
51564 SWIG_fail;
51565 }
51566 Py_END_ALLOW_THREADS
51567 }
51568 resultobj = SWIG_Py_Void();
51569 return resultobj;
51570 fail:
51571 return NULL;
51572 }
51573
51574
51575 SWIGINTERN PyObject *_wrap_IndexIVFPQ_encode_multiple(PyObject *self, PyObject *args) {
51576 Py_ssize_t argc;
51577 PyObject *argv[7] = {
51578 0
51579 };
51580 Py_ssize_t ii;
51581
51582 if (!PyTuple_Check(args)) SWIG_fail;
51583 argc = args ? PyObject_Length(args) : 0;
51584 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
51585 argv[ii] = PyTuple_GET_ITEM(args,ii);
51586 }
51587 if (argc == 5) {
51588 int _v;
51589 void *vptr = 0;
51590 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
51591 _v = SWIG_CheckState(res);
51592 if (_v) {
51593 {
51594 int res = SWIG_AsVal_size_t(argv[1], NULL);
51595 _v = SWIG_CheckState(res);
51596 }
51597 if (_v) {
51598 void *vptr = 0;
51599 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
51600 _v = SWIG_CheckState(res);
51601 if (_v) {
51602 void *vptr = 0;
51603 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
51604 _v = SWIG_CheckState(res);
51605 if (_v) {
51606 void *vptr = 0;
51607 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_unsigned_char, 0);
51608 _v = SWIG_CheckState(res);
51609 if (_v) {
51610 return _wrap_IndexIVFPQ_encode_multiple__SWIG_1(self, args);
51611 }
51612 }
51613 }
51614 }
51615 }
51616 }
51617 if (argc == 6) {
51618 int _v;
51619 void *vptr = 0;
51620 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQ, 0);
51621 _v = SWIG_CheckState(res);
51622 if (_v) {
51623 {
51624 int res = SWIG_AsVal_size_t(argv[1], NULL);
51625 _v = SWIG_CheckState(res);
51626 }
51627 if (_v) {
51628 void *vptr = 0;
51629 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_long, 0);
51630 _v = SWIG_CheckState(res);
51631 if (_v) {
51632 void *vptr = 0;
51633 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_float, 0);
51634 _v = SWIG_CheckState(res);
51635 if (_v) {
51636 void *vptr = 0;
51637 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_unsigned_char, 0);
51638 _v = SWIG_CheckState(res);
51639 if (_v) {
51640 {
51641 int res = SWIG_AsVal_bool(argv[5], NULL);
51642 _v = SWIG_CheckState(res);
51643 }
51644 if (_v) {
51645 return _wrap_IndexIVFPQ_encode_multiple__SWIG_0(self, args);
51646 }
51647 }
51648 }
51649 }
51650 }
51651 }
51652 }
51653
51654 fail:
51655 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQ_encode_multiple'.\n"
51656 " Possible C/C++ prototypes are:\n"
51657 " faiss::IndexIVFPQ::encode_multiple(size_t,long *,float const *,uint8_t *,bool) const\n"
51658 " faiss::IndexIVFPQ::encode_multiple(size_t,long *,float const *,uint8_t *) const\n");
51659 return 0;
51660 }
51661
51662
51663 SWIGINTERN PyObject *_wrap_IndexIVFPQ_decode_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51664 PyObject *resultobj = 0;
51665 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51666 size_t arg2 ;
51667 long *arg3 = (long *) 0 ;
51668 uint8_t *arg4 = (uint8_t *) 0 ;
51669 float *arg5 = (float *) 0 ;
51670 void *argp1 = 0 ;
51671 int res1 = 0 ;
51672 size_t val2 ;
51673 int ecode2 = 0 ;
51674 void *argp3 = 0 ;
51675 int res3 = 0 ;
51676 void *argp4 = 0 ;
51677 int res4 = 0 ;
51678 void *argp5 = 0 ;
51679 int res5 = 0 ;
51680 PyObject * obj0 = 0 ;
51681 PyObject * obj1 = 0 ;
51682 PyObject * obj2 = 0 ;
51683 PyObject * obj3 = 0 ;
51684 PyObject * obj4 = 0 ;
51685
51686 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQ_decode_multiple",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
51687 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51688 if (!SWIG_IsOK(res1)) {
51689 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
51690 }
51691 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51692 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51693 if (!SWIG_IsOK(ecode2)) {
51694 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "2"" of type '" "size_t""'");
51695 }
51696 arg2 = static_cast< size_t >(val2);
51697 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
51698 if (!SWIG_IsOK(res3)) {
51699 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "3"" of type '" "long const *""'");
51700 }
51701 arg3 = reinterpret_cast< long * >(argp3);
51702 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
51703 if (!SWIG_IsOK(res4)) {
51704 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "4"" of type '" "uint8_t const *""'");
51705 }
51706 arg4 = reinterpret_cast< uint8_t * >(argp4);
51707 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
51708 if (!SWIG_IsOK(res5)) {
51709 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQ_decode_multiple" "', argument " "5"" of type '" "float *""'");
51710 }
51711 arg5 = reinterpret_cast< float * >(argp5);
51712 {
51713 Py_BEGIN_ALLOW_THREADS
51714 try {
51715 ((faiss::IndexIVFPQ const *)arg1)->decode_multiple(arg2,(long const *)arg3,(uint8_t const *)arg4,arg5);
51716 } catch(faiss::FaissException & e) {
51717 PyEval_RestoreThread(_save);
51718 PyErr_SetString(PyExc_RuntimeError, e.what());
51719 SWIG_fail;
51720 }
51721 Py_END_ALLOW_THREADS
51722 }
51723 resultobj = SWIG_Py_Void();
51724 return resultobj;
51725 fail:
51726 return NULL;
51727 }
51728
51729
51730 SWIGINTERN PyObject *_wrap_IndexIVFPQ_get_InvertedListScanner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51731 PyObject *resultobj = 0;
51732 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51733 bool arg2 ;
51734 void *argp1 = 0 ;
51735 int res1 = 0 ;
51736 bool val2 ;
51737 int ecode2 = 0 ;
51738 PyObject * obj0 = 0 ;
51739 PyObject * obj1 = 0 ;
51740 faiss::InvertedListScanner *result = 0 ;
51741
51742 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQ_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
51743 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51744 if (!SWIG_IsOK(res1)) {
51745 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexIVFPQ const *""'");
51746 }
51747 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51748 ecode2 = SWIG_AsVal_bool(obj1, &val2);
51749 if (!SWIG_IsOK(ecode2)) {
51750 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQ_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
51751 }
51752 arg2 = static_cast< bool >(val2);
51753 {
51754 Py_BEGIN_ALLOW_THREADS
51755 try {
51756 result = (faiss::InvertedListScanner *)((faiss::IndexIVFPQ const *)arg1)->get_InvertedListScanner(arg2);
51757 } catch(faiss::FaissException & e) {
51758 PyEval_RestoreThread(_save);
51759 PyErr_SetString(PyExc_RuntimeError, e.what());
51760 SWIG_fail;
51761 }
51762 Py_END_ALLOW_THREADS
51763 }
51764 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedListScanner, 0 | 0 );
51765 return resultobj;
51766 fail:
51767 return NULL;
51768 }
51769
51770
51771 SWIGINTERN PyObject *_wrap_IndexIVFPQ_precompute_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51772 PyObject *resultobj = 0;
51773 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51774 void *argp1 = 0 ;
51775 int res1 = 0 ;
51776 PyObject * obj0 = 0 ;
51777
51778 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQ_precompute_table",&obj0)) SWIG_fail;
51779 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, 0 | 0 );
51780 if (!SWIG_IsOK(res1)) {
51781 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQ_precompute_table" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51782 }
51783 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51784 {
51785 Py_BEGIN_ALLOW_THREADS
51786 try {
51787 (arg1)->precompute_table();
51788 } catch(faiss::FaissException & e) {
51789 PyEval_RestoreThread(_save);
51790 PyErr_SetString(PyExc_RuntimeError, e.what());
51791 SWIG_fail;
51792 }
51793 Py_END_ALLOW_THREADS
51794 }
51795 resultobj = SWIG_Py_Void();
51796 return resultobj;
51797 fail:
51798 return NULL;
51799 }
51800
51801
51802 SWIGINTERN PyObject *_wrap_new_IndexIVFPQ__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51803 PyObject *resultobj = 0;
51804 faiss::IndexIVFPQ *result = 0 ;
51805
51806 if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFPQ")) SWIG_fail;
51807 {
51808 Py_BEGIN_ALLOW_THREADS
51809 try {
51810 result = (faiss::IndexIVFPQ *)new faiss::IndexIVFPQ();
51811 } catch(faiss::FaissException & e) {
51812 PyEval_RestoreThread(_save);
51813 PyErr_SetString(PyExc_RuntimeError, e.what());
51814 SWIG_fail;
51815 }
51816 Py_END_ALLOW_THREADS
51817 }
51818 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQ, SWIG_POINTER_NEW | 0 );
51819 return resultobj;
51820 fail:
51821 return NULL;
51822 }
51823
51824
51825 SWIGINTERN PyObject *_wrap_new_IndexIVFPQ(PyObject *self, PyObject *args) {
51826 Py_ssize_t argc;
51827 PyObject *argv[6] = {
51828 0
51829 };
51830 Py_ssize_t ii;
51831
51832 if (!PyTuple_Check(args)) SWIG_fail;
51833 argc = args ? PyObject_Length(args) : 0;
51834 for (ii = 0; (ii < 5) && (ii < argc); ii++) {
51835 argv[ii] = PyTuple_GET_ITEM(args,ii);
51836 }
51837 if (argc == 0) {
51838 return _wrap_new_IndexIVFPQ__SWIG_1(self, args);
51839 }
51840 if (argc == 5) {
51841 int _v;
51842 void *vptr = 0;
51843 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
51844 _v = SWIG_CheckState(res);
51845 if (_v) {
51846 {
51847 int res = SWIG_AsVal_size_t(argv[1], NULL);
51848 _v = SWIG_CheckState(res);
51849 }
51850 if (_v) {
51851 {
51852 int res = SWIG_AsVal_size_t(argv[2], NULL);
51853 _v = SWIG_CheckState(res);
51854 }
51855 if (_v) {
51856 {
51857 int res = SWIG_AsVal_size_t(argv[3], NULL);
51858 _v = SWIG_CheckState(res);
51859 }
51860 if (_v) {
51861 {
51862 int res = SWIG_AsVal_size_t(argv[4], NULL);
51863 _v = SWIG_CheckState(res);
51864 }
51865 if (_v) {
51866 return _wrap_new_IndexIVFPQ__SWIG_0(self, args);
51867 }
51868 }
51869 }
51870 }
51871 }
51872 }
51873
51874 fail:
51875 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFPQ'.\n"
51876 " Possible C/C++ prototypes are:\n"
51877 " faiss::IndexIVFPQ::IndexIVFPQ(faiss::Index *,size_t,size_t,size_t,size_t)\n"
51878 " faiss::IndexIVFPQ::IndexIVFPQ()\n");
51879 return 0;
51880 }
51881
51882
51883 SWIGINTERN PyObject *_wrap_delete_IndexIVFPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51884 PyObject *resultobj = 0;
51885 faiss::IndexIVFPQ *arg1 = (faiss::IndexIVFPQ *) 0 ;
51886 void *argp1 = 0 ;
51887 int res1 = 0 ;
51888 PyObject * obj0 = 0 ;
51889
51890 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFPQ",&obj0)) SWIG_fail;
51891 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQ, SWIG_POINTER_DISOWN | 0 );
51892 if (!SWIG_IsOK(res1)) {
51893 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFPQ" "', argument " "1"" of type '" "faiss::IndexIVFPQ *""'");
51894 }
51895 arg1 = reinterpret_cast< faiss::IndexIVFPQ * >(argp1);
51896 delete arg1;
51897 resultobj = SWIG_Py_Void();
51898 return resultobj;
51899 fail:
51900 return NULL;
51901 }
51902
51903
51904 SWIGINTERN PyObject *IndexIVFPQ_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51905 PyObject *obj;
51906 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
51907 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFPQ, SWIG_NewClientData(obj));
51908 return SWIG_Py_Void();
51909 }
51910
51911 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_nrefine_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51912 PyObject *resultobj = 0;
51913 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
51914 size_t arg2 ;
51915 void *argp1 = 0 ;
51916 int res1 = 0 ;
51917 size_t val2 ;
51918 int ecode2 = 0 ;
51919 PyObject * obj0 = 0 ;
51920 PyObject * obj1 = 0 ;
51921
51922 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQStats_nrefine_set",&obj0,&obj1)) SWIG_fail;
51923 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
51924 if (!SWIG_IsOK(res1)) {
51925 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_nrefine_set" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
51926 }
51927 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
51928 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51929 if (!SWIG_IsOK(ecode2)) {
51930 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQStats_nrefine_set" "', argument " "2"" of type '" "size_t""'");
51931 }
51932 arg2 = static_cast< size_t >(val2);
51933 if (arg1) (arg1)->nrefine = arg2;
51934 resultobj = SWIG_Py_Void();
51935 return resultobj;
51936 fail:
51937 return NULL;
51938 }
51939
51940
51941 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_nrefine_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51942 PyObject *resultobj = 0;
51943 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
51944 void *argp1 = 0 ;
51945 int res1 = 0 ;
51946 PyObject * obj0 = 0 ;
51947 size_t result;
51948
51949 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_nrefine_get",&obj0)) SWIG_fail;
51950 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
51951 if (!SWIG_IsOK(res1)) {
51952 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_nrefine_get" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
51953 }
51954 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
51955 result = (size_t) ((arg1)->nrefine);
51956 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
51957 return resultobj;
51958 fail:
51959 return NULL;
51960 }
51961
51962
51963 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_n_hamming_pass_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51964 PyObject *resultobj = 0;
51965 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
51966 size_t arg2 ;
51967 void *argp1 = 0 ;
51968 int res1 = 0 ;
51969 size_t val2 ;
51970 int ecode2 = 0 ;
51971 PyObject * obj0 = 0 ;
51972 PyObject * obj1 = 0 ;
51973
51974 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQStats_n_hamming_pass_set",&obj0,&obj1)) SWIG_fail;
51975 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
51976 if (!SWIG_IsOK(res1)) {
51977 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_n_hamming_pass_set" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
51978 }
51979 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
51980 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
51981 if (!SWIG_IsOK(ecode2)) {
51982 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQStats_n_hamming_pass_set" "', argument " "2"" of type '" "size_t""'");
51983 }
51984 arg2 = static_cast< size_t >(val2);
51985 if (arg1) (arg1)->n_hamming_pass = arg2;
51986 resultobj = SWIG_Py_Void();
51987 return resultobj;
51988 fail:
51989 return NULL;
51990 }
51991
51992
51993 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_n_hamming_pass_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
51994 PyObject *resultobj = 0;
51995 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
51996 void *argp1 = 0 ;
51997 int res1 = 0 ;
51998 PyObject * obj0 = 0 ;
51999 size_t result;
52000
52001 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_n_hamming_pass_get",&obj0)) SWIG_fail;
52002 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
52003 if (!SWIG_IsOK(res1)) {
52004 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_n_hamming_pass_get" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
52005 }
52006 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
52007 result = (size_t) ((arg1)->n_hamming_pass);
52008 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
52009 return resultobj;
52010 fail:
52011 return NULL;
52012 }
52013
52014
52015 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_search_cycles_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52016 PyObject *resultobj = 0;
52017 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
52018 size_t arg2 ;
52019 void *argp1 = 0 ;
52020 int res1 = 0 ;
52021 size_t val2 ;
52022 int ecode2 = 0 ;
52023 PyObject * obj0 = 0 ;
52024 PyObject * obj1 = 0 ;
52025
52026 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQStats_search_cycles_set",&obj0,&obj1)) SWIG_fail;
52027 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
52028 if (!SWIG_IsOK(res1)) {
52029 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_search_cycles_set" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
52030 }
52031 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
52032 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
52033 if (!SWIG_IsOK(ecode2)) {
52034 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQStats_search_cycles_set" "', argument " "2"" of type '" "size_t""'");
52035 }
52036 arg2 = static_cast< size_t >(val2);
52037 if (arg1) (arg1)->search_cycles = arg2;
52038 resultobj = SWIG_Py_Void();
52039 return resultobj;
52040 fail:
52041 return NULL;
52042 }
52043
52044
52045 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_search_cycles_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52046 PyObject *resultobj = 0;
52047 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
52048 void *argp1 = 0 ;
52049 int res1 = 0 ;
52050 PyObject * obj0 = 0 ;
52051 size_t result;
52052
52053 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_search_cycles_get",&obj0)) SWIG_fail;
52054 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
52055 if (!SWIG_IsOK(res1)) {
52056 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_search_cycles_get" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
52057 }
52058 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
52059 result = (size_t) ((arg1)->search_cycles);
52060 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
52061 return resultobj;
52062 fail:
52063 return NULL;
52064 }
52065
52066
52067 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_refine_cycles_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52068 PyObject *resultobj = 0;
52069 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
52070 size_t arg2 ;
52071 void *argp1 = 0 ;
52072 int res1 = 0 ;
52073 size_t val2 ;
52074 int ecode2 = 0 ;
52075 PyObject * obj0 = 0 ;
52076 PyObject * obj1 = 0 ;
52077
52078 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQStats_refine_cycles_set",&obj0,&obj1)) SWIG_fail;
52079 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
52080 if (!SWIG_IsOK(res1)) {
52081 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_refine_cycles_set" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
52082 }
52083 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
52084 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
52085 if (!SWIG_IsOK(ecode2)) {
52086 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQStats_refine_cycles_set" "', argument " "2"" of type '" "size_t""'");
52087 }
52088 arg2 = static_cast< size_t >(val2);
52089 if (arg1) (arg1)->refine_cycles = arg2;
52090 resultobj = SWIG_Py_Void();
52091 return resultobj;
52092 fail:
52093 return NULL;
52094 }
52095
52096
52097 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_refine_cycles_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52098 PyObject *resultobj = 0;
52099 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
52100 void *argp1 = 0 ;
52101 int res1 = 0 ;
52102 PyObject * obj0 = 0 ;
52103 size_t result;
52104
52105 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_refine_cycles_get",&obj0)) SWIG_fail;
52106 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
52107 if (!SWIG_IsOK(res1)) {
52108 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_refine_cycles_get" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
52109 }
52110 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
52111 result = (size_t) ((arg1)->refine_cycles);
52112 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
52113 return resultobj;
52114 fail:
52115 return NULL;
52116 }
52117
52118
52119 SWIGINTERN PyObject *_wrap_new_IndexIVFPQStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52120 PyObject *resultobj = 0;
52121 faiss::IndexIVFPQStats *result = 0 ;
52122
52123 if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFPQStats")) SWIG_fail;
52124 {
52125 Py_BEGIN_ALLOW_THREADS
52126 try {
52127 result = (faiss::IndexIVFPQStats *)new faiss::IndexIVFPQStats();
52128 } catch(faiss::FaissException & e) {
52129 PyEval_RestoreThread(_save);
52130 PyErr_SetString(PyExc_RuntimeError, e.what());
52131 SWIG_fail;
52132 }
52133 Py_END_ALLOW_THREADS
52134 }
52135 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQStats, SWIG_POINTER_NEW | 0 );
52136 return resultobj;
52137 fail:
52138 return NULL;
52139 }
52140
52141
52142 SWIGINTERN PyObject *_wrap_IndexIVFPQStats_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52143 PyObject *resultobj = 0;
52144 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
52145 void *argp1 = 0 ;
52146 int res1 = 0 ;
52147 PyObject * obj0 = 0 ;
52148
52149 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQStats_reset",&obj0)) SWIG_fail;
52150 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0 );
52151 if (!SWIG_IsOK(res1)) {
52152 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQStats_reset" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
52153 }
52154 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
52155 {
52156 Py_BEGIN_ALLOW_THREADS
52157 try {
52158 (arg1)->reset();
52159 } catch(faiss::FaissException & e) {
52160 PyEval_RestoreThread(_save);
52161 PyErr_SetString(PyExc_RuntimeError, e.what());
52162 SWIG_fail;
52163 }
52164 Py_END_ALLOW_THREADS
52165 }
52166 resultobj = SWIG_Py_Void();
52167 return resultobj;
52168 fail:
52169 return NULL;
52170 }
52171
52172
52173 SWIGINTERN PyObject *_wrap_delete_IndexIVFPQStats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52174 PyObject *resultobj = 0;
52175 faiss::IndexIVFPQStats *arg1 = (faiss::IndexIVFPQStats *) 0 ;
52176 void *argp1 = 0 ;
52177 int res1 = 0 ;
52178 PyObject * obj0 = 0 ;
52179
52180 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFPQStats",&obj0)) SWIG_fail;
52181 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQStats, SWIG_POINTER_DISOWN | 0 );
52182 if (!SWIG_IsOK(res1)) {
52183 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFPQStats" "', argument " "1"" of type '" "faiss::IndexIVFPQStats *""'");
52184 }
52185 arg1 = reinterpret_cast< faiss::IndexIVFPQStats * >(argp1);
52186 delete arg1;
52187 resultobj = SWIG_Py_Void();
52188 return resultobj;
52189 fail:
52190 return NULL;
52191 }
52192
52193
52194 SWIGINTERN PyObject *IndexIVFPQStats_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52195 PyObject *obj;
52196 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
52197 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFPQStats, SWIG_NewClientData(obj));
52198 return SWIG_Py_Void();
52199 }
52200
52201 SWIGINTERN int Swig_var_indexIVFPQ_stats_set(PyObject *_val) {
52202 {
52203 void *argp = 0;
52204 int res = SWIG_ConvertPtr(_val, &argp, SWIGTYPE_p_faiss__IndexIVFPQStats, 0 | 0);
52205 if (!SWIG_IsOK(res)) {
52206 SWIG_exception_fail(SWIG_ArgError(res), "in variable '""faiss::indexIVFPQ_stats""' of type '""faiss::IndexIVFPQStats""'");
52207 }
52208 if (!argp) {
52209 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""faiss::indexIVFPQ_stats""' of type '""faiss::IndexIVFPQStats""'");
52210 } else {
52211 faiss::IndexIVFPQStats * temp;
52212 temp = reinterpret_cast< faiss::IndexIVFPQStats * >(argp);
52213 faiss::indexIVFPQ_stats = *temp;
52214 if (SWIG_IsNewObj(res)) delete temp;
52215 }
52216 }
52217 return 0;
52218 fail:
52219 return 1;
52220 }
52221
52222
52223 SWIGINTERN PyObject *Swig_var_indexIVFPQ_stats_get(void) {
52224 PyObject *pyobj = 0;
52225
52226 pyobj = SWIG_NewPointerObj(SWIG_as_voidptr(&faiss::indexIVFPQ_stats), SWIGTYPE_p_faiss__IndexIVFPQStats, 0 );
52227 return pyobj;
52228 }
52229
52230
52231 SWIGINTERN PyObject *_wrap_IndexIVFPQR_refine_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52232 PyObject *resultobj = 0;
52233 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52234 faiss::ProductQuantizer *arg2 = (faiss::ProductQuantizer *) 0 ;
52235 void *argp1 = 0 ;
52236 int res1 = 0 ;
52237 void *argp2 = 0 ;
52238 int res2 = 0 ;
52239 PyObject * obj0 = 0 ;
52240 PyObject * obj1 = 0 ;
52241
52242 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQR_refine_pq_set",&obj0,&obj1)) SWIG_fail;
52243 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52244 if (!SWIG_IsOK(res1)) {
52245 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_refine_pq_set" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52246 }
52247 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52248 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
52249 if (!SWIG_IsOK(res2)) {
52250 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQR_refine_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
52251 }
52252 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
52253 if (arg1) (arg1)->refine_pq = *arg2;
52254 resultobj = SWIG_Py_Void();
52255 return resultobj;
52256 fail:
52257 return NULL;
52258 }
52259
52260
52261 SWIGINTERN PyObject *_wrap_IndexIVFPQR_refine_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52262 PyObject *resultobj = 0;
52263 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52264 void *argp1 = 0 ;
52265 int res1 = 0 ;
52266 PyObject * obj0 = 0 ;
52267 faiss::ProductQuantizer *result = 0 ;
52268
52269 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQR_refine_pq_get",&obj0)) SWIG_fail;
52270 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52271 if (!SWIG_IsOK(res1)) {
52272 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_refine_pq_get" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52273 }
52274 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52275 result = (faiss::ProductQuantizer *)& ((arg1)->refine_pq);
52276 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
52277 return resultobj;
52278 fail:
52279 return NULL;
52280 }
52281
52282
52283 SWIGINTERN PyObject *_wrap_IndexIVFPQR_refine_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52284 PyObject *resultobj = 0;
52285 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52286 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
52287 void *argp1 = 0 ;
52288 int res1 = 0 ;
52289 void *argp2 = 0 ;
52290 int res2 = 0 ;
52291 PyObject * obj0 = 0 ;
52292 PyObject * obj1 = 0 ;
52293
52294 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQR_refine_codes_set",&obj0,&obj1)) SWIG_fail;
52295 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52296 if (!SWIG_IsOK(res1)) {
52297 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_refine_codes_set" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52298 }
52299 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52300 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
52301 if (!SWIG_IsOK(res2)) {
52302 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQR_refine_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
52303 }
52304 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
52305 if (arg1) (arg1)->refine_codes = *arg2;
52306 resultobj = SWIG_Py_Void();
52307 return resultobj;
52308 fail:
52309 return NULL;
52310 }
52311
52312
52313 SWIGINTERN PyObject *_wrap_IndexIVFPQR_refine_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52314 PyObject *resultobj = 0;
52315 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52316 void *argp1 = 0 ;
52317 int res1 = 0 ;
52318 PyObject * obj0 = 0 ;
52319 std::vector< uint8_t > *result = 0 ;
52320
52321 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQR_refine_codes_get",&obj0)) SWIG_fail;
52322 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52323 if (!SWIG_IsOK(res1)) {
52324 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_refine_codes_get" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52325 }
52326 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52327 result = (std::vector< uint8_t > *)& ((arg1)->refine_codes);
52328 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
52329 return resultobj;
52330 fail:
52331 return NULL;
52332 }
52333
52334
52335 SWIGINTERN PyObject *_wrap_IndexIVFPQR_k_factor_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52336 PyObject *resultobj = 0;
52337 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52338 float arg2 ;
52339 void *argp1 = 0 ;
52340 int res1 = 0 ;
52341 float val2 ;
52342 int ecode2 = 0 ;
52343 PyObject * obj0 = 0 ;
52344 PyObject * obj1 = 0 ;
52345
52346 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQR_k_factor_set",&obj0,&obj1)) SWIG_fail;
52347 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52348 if (!SWIG_IsOK(res1)) {
52349 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_k_factor_set" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52350 }
52351 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52352 ecode2 = SWIG_AsVal_float(obj1, &val2);
52353 if (!SWIG_IsOK(ecode2)) {
52354 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_k_factor_set" "', argument " "2"" of type '" "float""'");
52355 }
52356 arg2 = static_cast< float >(val2);
52357 if (arg1) (arg1)->k_factor = arg2;
52358 resultobj = SWIG_Py_Void();
52359 return resultobj;
52360 fail:
52361 return NULL;
52362 }
52363
52364
52365 SWIGINTERN PyObject *_wrap_IndexIVFPQR_k_factor_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52366 PyObject *resultobj = 0;
52367 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52368 void *argp1 = 0 ;
52369 int res1 = 0 ;
52370 PyObject * obj0 = 0 ;
52371 float result;
52372
52373 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQR_k_factor_get",&obj0)) SWIG_fail;
52374 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52375 if (!SWIG_IsOK(res1)) {
52376 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_k_factor_get" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52377 }
52378 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52379 result = (float) ((arg1)->k_factor);
52380 resultobj = SWIG_From_float(static_cast< float >(result));
52381 return resultobj;
52382 fail:
52383 return NULL;
52384 }
52385
52386
52387 SWIGINTERN PyObject *_wrap_new_IndexIVFPQR__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52388 PyObject *resultobj = 0;
52389 faiss::Index *arg1 = (faiss::Index *) 0 ;
52390 size_t arg2 ;
52391 size_t arg3 ;
52392 size_t arg4 ;
52393 size_t arg5 ;
52394 size_t arg6 ;
52395 size_t arg7 ;
52396 void *argp1 = 0 ;
52397 int res1 = 0 ;
52398 size_t val2 ;
52399 int ecode2 = 0 ;
52400 size_t val3 ;
52401 int ecode3 = 0 ;
52402 size_t val4 ;
52403 int ecode4 = 0 ;
52404 size_t val5 ;
52405 int ecode5 = 0 ;
52406 size_t val6 ;
52407 int ecode6 = 0 ;
52408 size_t val7 ;
52409 int ecode7 = 0 ;
52410 PyObject * obj0 = 0 ;
52411 PyObject * obj1 = 0 ;
52412 PyObject * obj2 = 0 ;
52413 PyObject * obj3 = 0 ;
52414 PyObject * obj4 = 0 ;
52415 PyObject * obj5 = 0 ;
52416 PyObject * obj6 = 0 ;
52417 faiss::IndexIVFPQR *result = 0 ;
52418
52419 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:new_IndexIVFPQR",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
52420 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
52421 if (!SWIG_IsOK(res1)) {
52422 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIVFPQR" "', argument " "1"" of type '" "faiss::Index *""'");
52423 }
52424 arg1 = reinterpret_cast< faiss::Index * >(argp1);
52425 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
52426 if (!SWIG_IsOK(ecode2)) {
52427 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexIVFPQR" "', argument " "2"" of type '" "size_t""'");
52428 }
52429 arg2 = static_cast< size_t >(val2);
52430 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
52431 if (!SWIG_IsOK(ecode3)) {
52432 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexIVFPQR" "', argument " "3"" of type '" "size_t""'");
52433 }
52434 arg3 = static_cast< size_t >(val3);
52435 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
52436 if (!SWIG_IsOK(ecode4)) {
52437 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_IndexIVFPQR" "', argument " "4"" of type '" "size_t""'");
52438 }
52439 arg4 = static_cast< size_t >(val4);
52440 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
52441 if (!SWIG_IsOK(ecode5)) {
52442 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_IndexIVFPQR" "', argument " "5"" of type '" "size_t""'");
52443 }
52444 arg5 = static_cast< size_t >(val5);
52445 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
52446 if (!SWIG_IsOK(ecode6)) {
52447 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_IndexIVFPQR" "', argument " "6"" of type '" "size_t""'");
52448 }
52449 arg6 = static_cast< size_t >(val6);
52450 ecode7 = SWIG_AsVal_size_t(obj6, &val7);
52451 if (!SWIG_IsOK(ecode7)) {
52452 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_IndexIVFPQR" "', argument " "7"" of type '" "size_t""'");
52453 }
52454 arg7 = static_cast< size_t >(val7);
52455 {
52456 Py_BEGIN_ALLOW_THREADS
52457 try {
52458 result = (faiss::IndexIVFPQR *)new faiss::IndexIVFPQR(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
52459 } catch(faiss::FaissException & e) {
52460 PyEval_RestoreThread(_save);
52461 PyErr_SetString(PyExc_RuntimeError, e.what());
52462 SWIG_fail;
52463 }
52464 Py_END_ALLOW_THREADS
52465 }
52466 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQR, SWIG_POINTER_NEW | 0 );
52467 return resultobj;
52468 fail:
52469 return NULL;
52470 }
52471
52472
52473 SWIGINTERN PyObject *_wrap_IndexIVFPQR_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52474 PyObject *resultobj = 0;
52475 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52476 void *argp1 = 0 ;
52477 int res1 = 0 ;
52478 PyObject * obj0 = 0 ;
52479
52480 if (!PyArg_ParseTuple(args,(char *)"O:IndexIVFPQR_reset",&obj0)) SWIG_fail;
52481 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52482 if (!SWIG_IsOK(res1)) {
52483 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_reset" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52484 }
52485 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52486 {
52487 Py_BEGIN_ALLOW_THREADS
52488 try {
52489 (arg1)->reset();
52490 } catch(faiss::FaissException & e) {
52491 PyEval_RestoreThread(_save);
52492 PyErr_SetString(PyExc_RuntimeError, e.what());
52493 SWIG_fail;
52494 }
52495 Py_END_ALLOW_THREADS
52496 }
52497 resultobj = SWIG_Py_Void();
52498 return resultobj;
52499 fail:
52500 return NULL;
52501 }
52502
52503
52504 SWIGINTERN PyObject *_wrap_IndexIVFPQR_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52505 PyObject *resultobj = 0;
52506 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52507 faiss::IDSelector *arg2 = 0 ;
52508 void *argp1 = 0 ;
52509 int res1 = 0 ;
52510 void *argp2 = 0 ;
52511 int res2 = 0 ;
52512 PyObject * obj0 = 0 ;
52513 PyObject * obj1 = 0 ;
52514 long result;
52515
52516 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIVFPQR_remove_ids",&obj0,&obj1)) SWIG_fail;
52517 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52518 if (!SWIG_IsOK(res1)) {
52519 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_remove_ids" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52520 }
52521 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52522 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
52523 if (!SWIG_IsOK(res2)) {
52524 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQR_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
52525 }
52526 if (!argp2) {
52527 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVFPQR_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
52528 }
52529 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
52530 {
52531 Py_BEGIN_ALLOW_THREADS
52532 try {
52533 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
52534 } catch(faiss::FaissException & e) {
52535 PyEval_RestoreThread(_save);
52536 PyErr_SetString(PyExc_RuntimeError, e.what());
52537 SWIG_fail;
52538 }
52539 Py_END_ALLOW_THREADS
52540 }
52541 resultobj = SWIG_From_long(static_cast< long >(result));
52542 return resultobj;
52543 fail:
52544 return NULL;
52545 }
52546
52547
52548 SWIGINTERN PyObject *_wrap_IndexIVFPQR_train_residual(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52549 PyObject *resultobj = 0;
52550 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52551 faiss::Index::idx_t arg2 ;
52552 float *arg3 = (float *) 0 ;
52553 void *argp1 = 0 ;
52554 int res1 = 0 ;
52555 long val2 ;
52556 int ecode2 = 0 ;
52557 void *argp3 = 0 ;
52558 int res3 = 0 ;
52559 PyObject * obj0 = 0 ;
52560 PyObject * obj1 = 0 ;
52561 PyObject * obj2 = 0 ;
52562
52563 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQR_train_residual",&obj0,&obj1,&obj2)) SWIG_fail;
52564 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52565 if (!SWIG_IsOK(res1)) {
52566 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_train_residual" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52567 }
52568 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52569 ecode2 = SWIG_AsVal_long(obj1, &val2);
52570 if (!SWIG_IsOK(ecode2)) {
52571 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_train_residual" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52572 }
52573 arg2 = static_cast< faiss::Index::idx_t >(val2);
52574 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52575 if (!SWIG_IsOK(res3)) {
52576 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_train_residual" "', argument " "3"" of type '" "float const *""'");
52577 }
52578 arg3 = reinterpret_cast< float * >(argp3);
52579 {
52580 Py_BEGIN_ALLOW_THREADS
52581 try {
52582 (arg1)->train_residual(arg2,(float const *)arg3);
52583 } catch(faiss::FaissException & e) {
52584 PyEval_RestoreThread(_save);
52585 PyErr_SetString(PyExc_RuntimeError, e.what());
52586 SWIG_fail;
52587 }
52588 Py_END_ALLOW_THREADS
52589 }
52590 resultobj = SWIG_Py_Void();
52591 return resultobj;
52592 fail:
52593 return NULL;
52594 }
52595
52596
52597 SWIGINTERN PyObject *_wrap_IndexIVFPQR_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52598 PyObject *resultobj = 0;
52599 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52600 faiss::Index::idx_t arg2 ;
52601 float *arg3 = (float *) 0 ;
52602 long *arg4 = (long *) 0 ;
52603 void *argp1 = 0 ;
52604 int res1 = 0 ;
52605 long val2 ;
52606 int ecode2 = 0 ;
52607 void *argp3 = 0 ;
52608 int res3 = 0 ;
52609 void *argp4 = 0 ;
52610 int res4 = 0 ;
52611 PyObject * obj0 = 0 ;
52612 PyObject * obj1 = 0 ;
52613 PyObject * obj2 = 0 ;
52614 PyObject * obj3 = 0 ;
52615
52616 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQR_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
52617 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52618 if (!SWIG_IsOK(res1)) {
52619 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52620 }
52621 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52622 ecode2 = SWIG_AsVal_long(obj1, &val2);
52623 if (!SWIG_IsOK(ecode2)) {
52624 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52625 }
52626 arg2 = static_cast< faiss::Index::idx_t >(val2);
52627 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52628 if (!SWIG_IsOK(res3)) {
52629 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_add_with_ids" "', argument " "3"" of type '" "float const *""'");
52630 }
52631 arg3 = reinterpret_cast< float * >(argp3);
52632 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
52633 if (!SWIG_IsOK(res4)) {
52634 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQR_add_with_ids" "', argument " "4"" of type '" "long const *""'");
52635 }
52636 arg4 = reinterpret_cast< long * >(argp4);
52637 {
52638 Py_BEGIN_ALLOW_THREADS
52639 try {
52640 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
52641 } catch(faiss::FaissException & e) {
52642 PyEval_RestoreThread(_save);
52643 PyErr_SetString(PyExc_RuntimeError, e.what());
52644 SWIG_fail;
52645 }
52646 Py_END_ALLOW_THREADS
52647 }
52648 resultobj = SWIG_Py_Void();
52649 return resultobj;
52650 fail:
52651 return NULL;
52652 }
52653
52654
52655 SWIGINTERN PyObject *_wrap_IndexIVFPQR_add_core__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52656 PyObject *resultobj = 0;
52657 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52658 faiss::Index::idx_t arg2 ;
52659 float *arg3 = (float *) 0 ;
52660 long *arg4 = (long *) 0 ;
52661 long *arg5 = (long *) 0 ;
52662 void *argp1 = 0 ;
52663 int res1 = 0 ;
52664 long val2 ;
52665 int ecode2 = 0 ;
52666 void *argp3 = 0 ;
52667 int res3 = 0 ;
52668 void *argp4 = 0 ;
52669 int res4 = 0 ;
52670 void *argp5 = 0 ;
52671 int res5 = 0 ;
52672 PyObject * obj0 = 0 ;
52673 PyObject * obj1 = 0 ;
52674 PyObject * obj2 = 0 ;
52675 PyObject * obj3 = 0 ;
52676 PyObject * obj4 = 0 ;
52677
52678 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIVFPQR_add_core",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
52679 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52680 if (!SWIG_IsOK(res1)) {
52681 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_add_core" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52682 }
52683 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52684 ecode2 = SWIG_AsVal_long(obj1, &val2);
52685 if (!SWIG_IsOK(ecode2)) {
52686 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_add_core" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52687 }
52688 arg2 = static_cast< faiss::Index::idx_t >(val2);
52689 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52690 if (!SWIG_IsOK(res3)) {
52691 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_add_core" "', argument " "3"" of type '" "float const *""'");
52692 }
52693 arg3 = reinterpret_cast< float * >(argp3);
52694 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
52695 if (!SWIG_IsOK(res4)) {
52696 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQR_add_core" "', argument " "4"" of type '" "long const *""'");
52697 }
52698 arg4 = reinterpret_cast< long * >(argp4);
52699 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
52700 if (!SWIG_IsOK(res5)) {
52701 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQR_add_core" "', argument " "5"" of type '" "long const *""'");
52702 }
52703 arg5 = reinterpret_cast< long * >(argp5);
52704 {
52705 Py_BEGIN_ALLOW_THREADS
52706 try {
52707 (arg1)->add_core(arg2,(float const *)arg3,(long const *)arg4,(long const *)arg5);
52708 } catch(faiss::FaissException & e) {
52709 PyEval_RestoreThread(_save);
52710 PyErr_SetString(PyExc_RuntimeError, e.what());
52711 SWIG_fail;
52712 }
52713 Py_END_ALLOW_THREADS
52714 }
52715 resultobj = SWIG_Py_Void();
52716 return resultobj;
52717 fail:
52718 return NULL;
52719 }
52720
52721
52722 SWIGINTERN PyObject *_wrap_IndexIVFPQR_add_core__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52723 PyObject *resultobj = 0;
52724 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52725 faiss::Index::idx_t arg2 ;
52726 float *arg3 = (float *) 0 ;
52727 long *arg4 = (long *) 0 ;
52728 void *argp1 = 0 ;
52729 int res1 = 0 ;
52730 long val2 ;
52731 int ecode2 = 0 ;
52732 void *argp3 = 0 ;
52733 int res3 = 0 ;
52734 void *argp4 = 0 ;
52735 int res4 = 0 ;
52736 PyObject * obj0 = 0 ;
52737 PyObject * obj1 = 0 ;
52738 PyObject * obj2 = 0 ;
52739 PyObject * obj3 = 0 ;
52740
52741 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQR_add_core",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
52742 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52743 if (!SWIG_IsOK(res1)) {
52744 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_add_core" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52745 }
52746 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52747 ecode2 = SWIG_AsVal_long(obj1, &val2);
52748 if (!SWIG_IsOK(ecode2)) {
52749 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_add_core" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
52750 }
52751 arg2 = static_cast< faiss::Index::idx_t >(val2);
52752 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
52753 if (!SWIG_IsOK(res3)) {
52754 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_add_core" "', argument " "3"" of type '" "float const *""'");
52755 }
52756 arg3 = reinterpret_cast< float * >(argp3);
52757 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
52758 if (!SWIG_IsOK(res4)) {
52759 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQR_add_core" "', argument " "4"" of type '" "long const *""'");
52760 }
52761 arg4 = reinterpret_cast< long * >(argp4);
52762 {
52763 Py_BEGIN_ALLOW_THREADS
52764 try {
52765 (arg1)->add_core(arg2,(float const *)arg3,(long const *)arg4);
52766 } catch(faiss::FaissException & e) {
52767 PyEval_RestoreThread(_save);
52768 PyErr_SetString(PyExc_RuntimeError, e.what());
52769 SWIG_fail;
52770 }
52771 Py_END_ALLOW_THREADS
52772 }
52773 resultobj = SWIG_Py_Void();
52774 return resultobj;
52775 fail:
52776 return NULL;
52777 }
52778
52779
52780 SWIGINTERN PyObject *_wrap_IndexIVFPQR_add_core(PyObject *self, PyObject *args) {
52781 Py_ssize_t argc;
52782 PyObject *argv[6] = {
52783 0
52784 };
52785 Py_ssize_t ii;
52786
52787 if (!PyTuple_Check(args)) SWIG_fail;
52788 argc = args ? PyObject_Length(args) : 0;
52789 for (ii = 0; (ii < 5) && (ii < argc); ii++) {
52790 argv[ii] = PyTuple_GET_ITEM(args,ii);
52791 }
52792 if (argc == 4) {
52793 int _v;
52794 void *vptr = 0;
52795 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQR, 0);
52796 _v = SWIG_CheckState(res);
52797 if (_v) {
52798 {
52799 int res = SWIG_AsVal_long(argv[1], NULL);
52800 _v = SWIG_CheckState(res);
52801 }
52802 if (_v) {
52803 void *vptr = 0;
52804 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
52805 _v = SWIG_CheckState(res);
52806 if (_v) {
52807 void *vptr = 0;
52808 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
52809 _v = SWIG_CheckState(res);
52810 if (_v) {
52811 return _wrap_IndexIVFPQR_add_core__SWIG_1(self, args);
52812 }
52813 }
52814 }
52815 }
52816 }
52817 if (argc == 5) {
52818 int _v;
52819 void *vptr = 0;
52820 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQR, 0);
52821 _v = SWIG_CheckState(res);
52822 if (_v) {
52823 {
52824 int res = SWIG_AsVal_long(argv[1], NULL);
52825 _v = SWIG_CheckState(res);
52826 }
52827 if (_v) {
52828 void *vptr = 0;
52829 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
52830 _v = SWIG_CheckState(res);
52831 if (_v) {
52832 void *vptr = 0;
52833 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
52834 _v = SWIG_CheckState(res);
52835 if (_v) {
52836 void *vptr = 0;
52837 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
52838 _v = SWIG_CheckState(res);
52839 if (_v) {
52840 return _wrap_IndexIVFPQR_add_core__SWIG_0(self, args);
52841 }
52842 }
52843 }
52844 }
52845 }
52846 }
52847
52848 fail:
52849 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQR_add_core'.\n"
52850 " Possible C/C++ prototypes are:\n"
52851 " faiss::IndexIVFPQR::add_core(faiss::Index::idx_t,float const *,long const *,long const *)\n"
52852 " faiss::IndexIVFPQR::add_core(faiss::Index::idx_t,float const *,long const *)\n");
52853 return 0;
52854 }
52855
52856
52857 SWIGINTERN PyObject *_wrap_IndexIVFPQR_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52858 PyObject *resultobj = 0;
52859 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52860 long arg2 ;
52861 long arg3 ;
52862 float *arg4 = (float *) 0 ;
52863 void *argp1 = 0 ;
52864 int res1 = 0 ;
52865 long val2 ;
52866 int ecode2 = 0 ;
52867 long val3 ;
52868 int ecode3 = 0 ;
52869 void *argp4 = 0 ;
52870 int res4 = 0 ;
52871 PyObject * obj0 = 0 ;
52872 PyObject * obj1 = 0 ;
52873 PyObject * obj2 = 0 ;
52874 PyObject * obj3 = 0 ;
52875
52876 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIVFPQR_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
52877 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52878 if (!SWIG_IsOK(res1)) {
52879 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexIVFPQR const *""'");
52880 }
52881 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52882 ecode2 = SWIG_AsVal_long(obj1, &val2);
52883 if (!SWIG_IsOK(ecode2)) {
52884 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
52885 }
52886 arg2 = static_cast< long >(val2);
52887 ecode3 = SWIG_AsVal_long(obj2, &val3);
52888 if (!SWIG_IsOK(ecode3)) {
52889 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFPQR_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
52890 }
52891 arg3 = static_cast< long >(val3);
52892 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
52893 if (!SWIG_IsOK(res4)) {
52894 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIVFPQR_reconstruct_from_offset" "', argument " "4"" of type '" "float *""'");
52895 }
52896 arg4 = reinterpret_cast< float * >(argp4);
52897 {
52898 Py_BEGIN_ALLOW_THREADS
52899 try {
52900 ((faiss::IndexIVFPQR const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
52901 } catch(faiss::FaissException & e) {
52902 PyEval_RestoreThread(_save);
52903 PyErr_SetString(PyExc_RuntimeError, e.what());
52904 SWIG_fail;
52905 }
52906 Py_END_ALLOW_THREADS
52907 }
52908 resultobj = SWIG_Py_Void();
52909 return resultobj;
52910 fail:
52911 return NULL;
52912 }
52913
52914
52915 SWIGINTERN PyObject *_wrap_IndexIVFPQR_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52916 PyObject *resultobj = 0;
52917 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52918 faiss::IndexIVF *arg2 = 0 ;
52919 faiss::Index::idx_t arg3 ;
52920 void *argp1 = 0 ;
52921 int res1 = 0 ;
52922 void *argp2 = 0 ;
52923 int res2 = 0 ;
52924 long val3 ;
52925 int ecode3 = 0 ;
52926 PyObject * obj0 = 0 ;
52927 PyObject * obj1 = 0 ;
52928 PyObject * obj2 = 0 ;
52929
52930 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIVFPQR_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
52931 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
52932 if (!SWIG_IsOK(res1)) {
52933 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_merge_from" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
52934 }
52935 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
52936 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVF, 0 );
52937 if (!SWIG_IsOK(res2)) {
52938 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIVFPQR_merge_from" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
52939 }
52940 if (!argp2) {
52941 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIVFPQR_merge_from" "', argument " "2"" of type '" "faiss::IndexIVF &""'");
52942 }
52943 arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
52944 ecode3 = SWIG_AsVal_long(obj2, &val3);
52945 if (!SWIG_IsOK(ecode3)) {
52946 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexIVFPQR_merge_from" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
52947 }
52948 arg3 = static_cast< faiss::Index::idx_t >(val3);
52949 {
52950 Py_BEGIN_ALLOW_THREADS
52951 try {
52952 (arg1)->merge_from(*arg2,arg3);
52953 } catch(faiss::FaissException & e) {
52954 PyEval_RestoreThread(_save);
52955 PyErr_SetString(PyExc_RuntimeError, e.what());
52956 SWIG_fail;
52957 }
52958 Py_END_ALLOW_THREADS
52959 }
52960 resultobj = SWIG_Py_Void();
52961 return resultobj;
52962 fail:
52963 return NULL;
52964 }
52965
52966
52967 SWIGINTERN PyObject *_wrap_IndexIVFPQR_search_preassigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
52968 PyObject *resultobj = 0;
52969 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
52970 faiss::Index::idx_t arg2 ;
52971 float *arg3 = (float *) 0 ;
52972 faiss::Index::idx_t arg4 ;
52973 faiss::Index::idx_t *arg5 = (faiss::Index::idx_t *) 0 ;
52974 float *arg6 = (float *) 0 ;
52975 float *arg7 = (float *) 0 ;
52976 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
52977 bool arg9 ;
52978 faiss::IVFSearchParameters *arg10 = (faiss::IVFSearchParameters *) 0 ;
52979 void *argp1 = 0 ;
52980 int res1 = 0 ;
52981 long val2 ;
52982 int ecode2 = 0 ;
52983 void *argp3 = 0 ;
52984 int res3 = 0 ;
52985 long val4 ;
52986 int ecode4 = 0 ;
52987 void *argp5 = 0 ;
52988 int res5 = 0 ;
52989 void *argp6 = 0 ;
52990 int res6 = 0 ;
52991 void *argp7 = 0 ;
52992 int res7 = 0 ;
52993 void *argp8 = 0 ;
52994 int res8 = 0 ;
52995 bool val9 ;
52996 int ecode9 = 0 ;
52997 void *argp10 = 0 ;
52998 int res10 = 0 ;
52999 PyObject * obj0 = 0 ;
53000 PyObject * obj1 = 0 ;
53001 PyObject * obj2 = 0 ;
53002 PyObject * obj3 = 0 ;
53003 PyObject * obj4 = 0 ;
53004 PyObject * obj5 = 0 ;
53005 PyObject * obj6 = 0 ;
53006 PyObject * obj7 = 0 ;
53007 PyObject * obj8 = 0 ;
53008 PyObject * obj9 = 0 ;
53009
53010 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexIVFPQR_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
53011 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53012 if (!SWIG_IsOK(res1)) {
53013 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVFPQR const *""'");
53014 }
53015 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53016 ecode2 = SWIG_AsVal_long(obj1, &val2);
53017 if (!SWIG_IsOK(ecode2)) {
53018 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
53019 }
53020 arg2 = static_cast< faiss::Index::idx_t >(val2);
53021 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
53022 if (!SWIG_IsOK(res3)) {
53023 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "3"" of type '" "float const *""'");
53024 }
53025 arg3 = reinterpret_cast< float * >(argp3);
53026 ecode4 = SWIG_AsVal_long(obj3, &val4);
53027 if (!SWIG_IsOK(ecode4)) {
53028 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
53029 }
53030 arg4 = static_cast< faiss::Index::idx_t >(val4);
53031 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
53032 if (!SWIG_IsOK(res5)) {
53033 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
53034 }
53035 arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
53036 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
53037 if (!SWIG_IsOK(res6)) {
53038 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "6"" of type '" "float const *""'");
53039 }
53040 arg6 = reinterpret_cast< float * >(argp6);
53041 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
53042 if (!SWIG_IsOK(res7)) {
53043 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "7"" of type '" "float *""'");
53044 }
53045 arg7 = reinterpret_cast< float * >(argp7);
53046 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
53047 if (!SWIG_IsOK(res8)) {
53048 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
53049 }
53050 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
53051 ecode9 = SWIG_AsVal_bool(obj8, &val9);
53052 if (!SWIG_IsOK(ecode9)) {
53053 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "9"" of type '" "bool""'");
53054 }
53055 arg9 = static_cast< bool >(val9);
53056 res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
53057 if (!SWIG_IsOK(res10)) {
53058 SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "10"" of type '" "faiss::IVFSearchParameters const *""'");
53059 }
53060 arg10 = reinterpret_cast< faiss::IVFSearchParameters * >(argp10);
53061 {
53062 Py_BEGIN_ALLOW_THREADS
53063 try {
53064 ((faiss::IndexIVFPQR const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9,(faiss::IVFSearchParameters const *)arg10);
53065 } catch(faiss::FaissException & e) {
53066 PyEval_RestoreThread(_save);
53067 PyErr_SetString(PyExc_RuntimeError, e.what());
53068 SWIG_fail;
53069 }
53070 Py_END_ALLOW_THREADS
53071 }
53072 resultobj = SWIG_Py_Void();
53073 return resultobj;
53074 fail:
53075 return NULL;
53076 }
53077
53078
53079 SWIGINTERN PyObject *_wrap_IndexIVFPQR_search_preassigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53080 PyObject *resultobj = 0;
53081 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53082 faiss::Index::idx_t arg2 ;
53083 float *arg3 = (float *) 0 ;
53084 faiss::Index::idx_t arg4 ;
53085 faiss::Index::idx_t *arg5 = (faiss::Index::idx_t *) 0 ;
53086 float *arg6 = (float *) 0 ;
53087 float *arg7 = (float *) 0 ;
53088 faiss::Index::idx_t *arg8 = (faiss::Index::idx_t *) 0 ;
53089 bool arg9 ;
53090 void *argp1 = 0 ;
53091 int res1 = 0 ;
53092 long val2 ;
53093 int ecode2 = 0 ;
53094 void *argp3 = 0 ;
53095 int res3 = 0 ;
53096 long val4 ;
53097 int ecode4 = 0 ;
53098 void *argp5 = 0 ;
53099 int res5 = 0 ;
53100 void *argp6 = 0 ;
53101 int res6 = 0 ;
53102 void *argp7 = 0 ;
53103 int res7 = 0 ;
53104 void *argp8 = 0 ;
53105 int res8 = 0 ;
53106 bool val9 ;
53107 int ecode9 = 0 ;
53108 PyObject * obj0 = 0 ;
53109 PyObject * obj1 = 0 ;
53110 PyObject * obj2 = 0 ;
53111 PyObject * obj3 = 0 ;
53112 PyObject * obj4 = 0 ;
53113 PyObject * obj5 = 0 ;
53114 PyObject * obj6 = 0 ;
53115 PyObject * obj7 = 0 ;
53116 PyObject * obj8 = 0 ;
53117
53118 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexIVFPQR_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
53119 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, 0 | 0 );
53120 if (!SWIG_IsOK(res1)) {
53121 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "1"" of type '" "faiss::IndexIVFPQR const *""'");
53122 }
53123 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53124 ecode2 = SWIG_AsVal_long(obj1, &val2);
53125 if (!SWIG_IsOK(ecode2)) {
53126 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
53127 }
53128 arg2 = static_cast< faiss::Index::idx_t >(val2);
53129 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
53130 if (!SWIG_IsOK(res3)) {
53131 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "3"" of type '" "float const *""'");
53132 }
53133 arg3 = reinterpret_cast< float * >(argp3);
53134 ecode4 = SWIG_AsVal_long(obj3, &val4);
53135 if (!SWIG_IsOK(ecode4)) {
53136 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
53137 }
53138 arg4 = static_cast< faiss::Index::idx_t >(val4);
53139 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
53140 if (!SWIG_IsOK(res5)) {
53141 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "5"" of type '" "faiss::Index::idx_t const *""'");
53142 }
53143 arg5 = reinterpret_cast< faiss::Index::idx_t * >(argp5);
53144 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_float, 0 | 0 );
53145 if (!SWIG_IsOK(res6)) {
53146 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "6"" of type '" "float const *""'");
53147 }
53148 arg6 = reinterpret_cast< float * >(argp6);
53149 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_float, 0 | 0 );
53150 if (!SWIG_IsOK(res7)) {
53151 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "7"" of type '" "float *""'");
53152 }
53153 arg7 = reinterpret_cast< float * >(argp7);
53154 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
53155 if (!SWIG_IsOK(res8)) {
53156 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "8"" of type '" "faiss::Index::idx_t *""'");
53157 }
53158 arg8 = reinterpret_cast< faiss::Index::idx_t * >(argp8);
53159 ecode9 = SWIG_AsVal_bool(obj8, &val9);
53160 if (!SWIG_IsOK(ecode9)) {
53161 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexIVFPQR_search_preassigned" "', argument " "9"" of type '" "bool""'");
53162 }
53163 arg9 = static_cast< bool >(val9);
53164 {
53165 Py_BEGIN_ALLOW_THREADS
53166 try {
53167 ((faiss::IndexIVFPQR const *)arg1)->search_preassigned(arg2,(float const *)arg3,arg4,(faiss::Index::idx_t const *)arg5,(float const *)arg6,arg7,arg8,arg9);
53168 } catch(faiss::FaissException & e) {
53169 PyEval_RestoreThread(_save);
53170 PyErr_SetString(PyExc_RuntimeError, e.what());
53171 SWIG_fail;
53172 }
53173 Py_END_ALLOW_THREADS
53174 }
53175 resultobj = SWIG_Py_Void();
53176 return resultobj;
53177 fail:
53178 return NULL;
53179 }
53180
53181
53182 SWIGINTERN PyObject *_wrap_IndexIVFPQR_search_preassigned(PyObject *self, PyObject *args) {
53183 Py_ssize_t argc;
53184 PyObject *argv[11] = {
53185 0
53186 };
53187 Py_ssize_t ii;
53188
53189 if (!PyTuple_Check(args)) SWIG_fail;
53190 argc = args ? PyObject_Length(args) : 0;
53191 for (ii = 0; (ii < 10) && (ii < argc); ii++) {
53192 argv[ii] = PyTuple_GET_ITEM(args,ii);
53193 }
53194 if (argc == 9) {
53195 int _v;
53196 void *vptr = 0;
53197 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQR, 0);
53198 _v = SWIG_CheckState(res);
53199 if (_v) {
53200 {
53201 int res = SWIG_AsVal_long(argv[1], NULL);
53202 _v = SWIG_CheckState(res);
53203 }
53204 if (_v) {
53205 void *vptr = 0;
53206 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
53207 _v = SWIG_CheckState(res);
53208 if (_v) {
53209 {
53210 int res = SWIG_AsVal_long(argv[3], NULL);
53211 _v = SWIG_CheckState(res);
53212 }
53213 if (_v) {
53214 void *vptr = 0;
53215 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
53216 _v = SWIG_CheckState(res);
53217 if (_v) {
53218 void *vptr = 0;
53219 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
53220 _v = SWIG_CheckState(res);
53221 if (_v) {
53222 void *vptr = 0;
53223 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
53224 _v = SWIG_CheckState(res);
53225 if (_v) {
53226 void *vptr = 0;
53227 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
53228 _v = SWIG_CheckState(res);
53229 if (_v) {
53230 {
53231 int res = SWIG_AsVal_bool(argv[8], NULL);
53232 _v = SWIG_CheckState(res);
53233 }
53234 if (_v) {
53235 return _wrap_IndexIVFPQR_search_preassigned__SWIG_1(self, args);
53236 }
53237 }
53238 }
53239 }
53240 }
53241 }
53242 }
53243 }
53244 }
53245 }
53246 if (argc == 10) {
53247 int _v;
53248 void *vptr = 0;
53249 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexIVFPQR, 0);
53250 _v = SWIG_CheckState(res);
53251 if (_v) {
53252 {
53253 int res = SWIG_AsVal_long(argv[1], NULL);
53254 _v = SWIG_CheckState(res);
53255 }
53256 if (_v) {
53257 void *vptr = 0;
53258 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
53259 _v = SWIG_CheckState(res);
53260 if (_v) {
53261 {
53262 int res = SWIG_AsVal_long(argv[3], NULL);
53263 _v = SWIG_CheckState(res);
53264 }
53265 if (_v) {
53266 void *vptr = 0;
53267 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
53268 _v = SWIG_CheckState(res);
53269 if (_v) {
53270 void *vptr = 0;
53271 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_float, 0);
53272 _v = SWIG_CheckState(res);
53273 if (_v) {
53274 void *vptr = 0;
53275 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_float, 0);
53276 _v = SWIG_CheckState(res);
53277 if (_v) {
53278 void *vptr = 0;
53279 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
53280 _v = SWIG_CheckState(res);
53281 if (_v) {
53282 {
53283 int res = SWIG_AsVal_bool(argv[8], NULL);
53284 _v = SWIG_CheckState(res);
53285 }
53286 if (_v) {
53287 void *vptr = 0;
53288 int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_faiss__IVFSearchParameters, 0);
53289 _v = SWIG_CheckState(res);
53290 if (_v) {
53291 return _wrap_IndexIVFPQR_search_preassigned__SWIG_0(self, args);
53292 }
53293 }
53294 }
53295 }
53296 }
53297 }
53298 }
53299 }
53300 }
53301 }
53302 }
53303
53304 fail:
53305 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexIVFPQR_search_preassigned'.\n"
53306 " Possible C/C++ prototypes are:\n"
53307 " faiss::IndexIVFPQR::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool,faiss::IVFSearchParameters const *) const\n"
53308 " faiss::IndexIVFPQR::search_preassigned(faiss::Index::idx_t,float const *,faiss::Index::idx_t,faiss::Index::idx_t const *,float const *,float *,faiss::Index::idx_t *,bool) const\n");
53309 return 0;
53310 }
53311
53312
53313 SWIGINTERN PyObject *_wrap_new_IndexIVFPQR__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53314 PyObject *resultobj = 0;
53315 faiss::IndexIVFPQR *result = 0 ;
53316
53317 if (!PyArg_ParseTuple(args,(char *)":new_IndexIVFPQR")) SWIG_fail;
53318 {
53319 Py_BEGIN_ALLOW_THREADS
53320 try {
53321 result = (faiss::IndexIVFPQR *)new faiss::IndexIVFPQR();
53322 } catch(faiss::FaissException & e) {
53323 PyEval_RestoreThread(_save);
53324 PyErr_SetString(PyExc_RuntimeError, e.what());
53325 SWIG_fail;
53326 }
53327 Py_END_ALLOW_THREADS
53328 }
53329 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVFPQR, SWIG_POINTER_NEW | 0 );
53330 return resultobj;
53331 fail:
53332 return NULL;
53333 }
53334
53335
53336 SWIGINTERN PyObject *_wrap_new_IndexIVFPQR(PyObject *self, PyObject *args) {
53337 Py_ssize_t argc;
53338 PyObject *argv[8] = {
53339 0
53340 };
53341 Py_ssize_t ii;
53342
53343 if (!PyTuple_Check(args)) SWIG_fail;
53344 argc = args ? PyObject_Length(args) : 0;
53345 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
53346 argv[ii] = PyTuple_GET_ITEM(args,ii);
53347 }
53348 if (argc == 0) {
53349 return _wrap_new_IndexIVFPQR__SWIG_1(self, args);
53350 }
53351 if (argc == 7) {
53352 int _v;
53353 void *vptr = 0;
53354 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
53355 _v = SWIG_CheckState(res);
53356 if (_v) {
53357 {
53358 int res = SWIG_AsVal_size_t(argv[1], NULL);
53359 _v = SWIG_CheckState(res);
53360 }
53361 if (_v) {
53362 {
53363 int res = SWIG_AsVal_size_t(argv[2], NULL);
53364 _v = SWIG_CheckState(res);
53365 }
53366 if (_v) {
53367 {
53368 int res = SWIG_AsVal_size_t(argv[3], NULL);
53369 _v = SWIG_CheckState(res);
53370 }
53371 if (_v) {
53372 {
53373 int res = SWIG_AsVal_size_t(argv[4], NULL);
53374 _v = SWIG_CheckState(res);
53375 }
53376 if (_v) {
53377 {
53378 int res = SWIG_AsVal_size_t(argv[5], NULL);
53379 _v = SWIG_CheckState(res);
53380 }
53381 if (_v) {
53382 {
53383 int res = SWIG_AsVal_size_t(argv[6], NULL);
53384 _v = SWIG_CheckState(res);
53385 }
53386 if (_v) {
53387 return _wrap_new_IndexIVFPQR__SWIG_0(self, args);
53388 }
53389 }
53390 }
53391 }
53392 }
53393 }
53394 }
53395 }
53396
53397 fail:
53398 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIVFPQR'.\n"
53399 " Possible C/C++ prototypes are:\n"
53400 " faiss::IndexIVFPQR::IndexIVFPQR(faiss::Index *,size_t,size_t,size_t,size_t,size_t,size_t)\n"
53401 " faiss::IndexIVFPQR::IndexIVFPQR()\n");
53402 return 0;
53403 }
53404
53405
53406 SWIGINTERN PyObject *_wrap_delete_IndexIVFPQR(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53407 PyObject *resultobj = 0;
53408 faiss::IndexIVFPQR *arg1 = (faiss::IndexIVFPQR *) 0 ;
53409 void *argp1 = 0 ;
53410 int res1 = 0 ;
53411 PyObject * obj0 = 0 ;
53412
53413 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIVFPQR",&obj0)) SWIG_fail;
53414 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIVFPQR, SWIG_POINTER_DISOWN | 0 );
53415 if (!SWIG_IsOK(res1)) {
53416 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIVFPQR" "', argument " "1"" of type '" "faiss::IndexIVFPQR *""'");
53417 }
53418 arg1 = reinterpret_cast< faiss::IndexIVFPQR * >(argp1);
53419 delete arg1;
53420 resultobj = SWIG_Py_Void();
53421 return resultobj;
53422 fail:
53423 return NULL;
53424 }
53425
53426
53427 SWIGINTERN PyObject *IndexIVFPQR_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53428 PyObject *obj;
53429 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
53430 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIVFPQR, SWIG_NewClientData(obj));
53431 return SWIG_Py_Void();
53432 }
53433
53434 SWIGINTERN PyObject *_wrap_Index2Layer_q1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53435 PyObject *resultobj = 0;
53436 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53437 faiss::Level1Quantizer *arg2 = (faiss::Level1Quantizer *) 0 ;
53438 void *argp1 = 0 ;
53439 int res1 = 0 ;
53440 void *argp2 = 0 ;
53441 int res2 = 0 ;
53442 PyObject * obj0 = 0 ;
53443 PyObject * obj1 = 0 ;
53444
53445 if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_q1_set",&obj0,&obj1)) SWIG_fail;
53446 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53447 if (!SWIG_IsOK(res1)) {
53448 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_q1_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53449 }
53450 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53451 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
53452 if (!SWIG_IsOK(res2)) {
53453 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index2Layer_q1_set" "', argument " "2"" of type '" "faiss::Level1Quantizer *""'");
53454 }
53455 arg2 = reinterpret_cast< faiss::Level1Quantizer * >(argp2);
53456 if (arg1) (arg1)->q1 = *arg2;
53457 resultobj = SWIG_Py_Void();
53458 return resultobj;
53459 fail:
53460 return NULL;
53461 }
53462
53463
53464 SWIGINTERN PyObject *_wrap_Index2Layer_q1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53465 PyObject *resultobj = 0;
53466 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53467 void *argp1 = 0 ;
53468 int res1 = 0 ;
53469 PyObject * obj0 = 0 ;
53470 faiss::Level1Quantizer *result = 0 ;
53471
53472 if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_q1_get",&obj0)) SWIG_fail;
53473 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53474 if (!SWIG_IsOK(res1)) {
53475 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_q1_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53476 }
53477 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53478 result = (faiss::Level1Quantizer *)& ((arg1)->q1);
53479 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Level1Quantizer, 0 | 0 );
53480 return resultobj;
53481 fail:
53482 return NULL;
53483 }
53484
53485
53486 SWIGINTERN PyObject *_wrap_Index2Layer_pq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53487 PyObject *resultobj = 0;
53488 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53489 faiss::ProductQuantizer *arg2 = (faiss::ProductQuantizer *) 0 ;
53490 void *argp1 = 0 ;
53491 int res1 = 0 ;
53492 void *argp2 = 0 ;
53493 int res2 = 0 ;
53494 PyObject * obj0 = 0 ;
53495 PyObject * obj1 = 0 ;
53496
53497 if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_pq_set",&obj0,&obj1)) SWIG_fail;
53498 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53499 if (!SWIG_IsOK(res1)) {
53500 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_pq_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53501 }
53502 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53503 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
53504 if (!SWIG_IsOK(res2)) {
53505 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index2Layer_pq_set" "', argument " "2"" of type '" "faiss::ProductQuantizer *""'");
53506 }
53507 arg2 = reinterpret_cast< faiss::ProductQuantizer * >(argp2);
53508 if (arg1) (arg1)->pq = *arg2;
53509 resultobj = SWIG_Py_Void();
53510 return resultobj;
53511 fail:
53512 return NULL;
53513 }
53514
53515
53516 SWIGINTERN PyObject *_wrap_Index2Layer_pq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53517 PyObject *resultobj = 0;
53518 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53519 void *argp1 = 0 ;
53520 int res1 = 0 ;
53521 PyObject * obj0 = 0 ;
53522 faiss::ProductQuantizer *result = 0 ;
53523
53524 if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_pq_get",&obj0)) SWIG_fail;
53525 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53526 if (!SWIG_IsOK(res1)) {
53527 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_pq_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53528 }
53529 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53530 result = (faiss::ProductQuantizer *)& ((arg1)->pq);
53531 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
53532 return resultobj;
53533 fail:
53534 return NULL;
53535 }
53536
53537
53538 SWIGINTERN PyObject *_wrap_Index2Layer_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53539 PyObject *resultobj = 0;
53540 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53541 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
53542 void *argp1 = 0 ;
53543 int res1 = 0 ;
53544 void *argp2 = 0 ;
53545 int res2 = 0 ;
53546 PyObject * obj0 = 0 ;
53547 PyObject * obj1 = 0 ;
53548
53549 if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_codes_set",&obj0,&obj1)) SWIG_fail;
53550 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53551 if (!SWIG_IsOK(res1)) {
53552 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_codes_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53553 }
53554 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53555 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
53556 if (!SWIG_IsOK(res2)) {
53557 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index2Layer_codes_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
53558 }
53559 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
53560 if (arg1) (arg1)->codes = *arg2;
53561 resultobj = SWIG_Py_Void();
53562 return resultobj;
53563 fail:
53564 return NULL;
53565 }
53566
53567
53568 SWIGINTERN PyObject *_wrap_Index2Layer_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53569 PyObject *resultobj = 0;
53570 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53571 void *argp1 = 0 ;
53572 int res1 = 0 ;
53573 PyObject * obj0 = 0 ;
53574 std::vector< uint8_t > *result = 0 ;
53575
53576 if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_codes_get",&obj0)) SWIG_fail;
53577 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53578 if (!SWIG_IsOK(res1)) {
53579 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_codes_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53580 }
53581 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53582 result = (std::vector< uint8_t > *)& ((arg1)->codes);
53583 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
53584 return resultobj;
53585 fail:
53586 return NULL;
53587 }
53588
53589
53590 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_1_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53591 PyObject *resultobj = 0;
53592 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53593 size_t arg2 ;
53594 void *argp1 = 0 ;
53595 int res1 = 0 ;
53596 size_t val2 ;
53597 int ecode2 = 0 ;
53598 PyObject * obj0 = 0 ;
53599 PyObject * obj1 = 0 ;
53600
53601 if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_code_size_1_set",&obj0,&obj1)) SWIG_fail;
53602 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53603 if (!SWIG_IsOK(res1)) {
53604 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_1_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53605 }
53606 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53607 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53608 if (!SWIG_IsOK(ecode2)) {
53609 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_code_size_1_set" "', argument " "2"" of type '" "size_t""'");
53610 }
53611 arg2 = static_cast< size_t >(val2);
53612 if (arg1) (arg1)->code_size_1 = arg2;
53613 resultobj = SWIG_Py_Void();
53614 return resultobj;
53615 fail:
53616 return NULL;
53617 }
53618
53619
53620 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_1_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53621 PyObject *resultobj = 0;
53622 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53623 void *argp1 = 0 ;
53624 int res1 = 0 ;
53625 PyObject * obj0 = 0 ;
53626 size_t result;
53627
53628 if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_code_size_1_get",&obj0)) SWIG_fail;
53629 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53630 if (!SWIG_IsOK(res1)) {
53631 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_1_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53632 }
53633 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53634 result = (size_t) ((arg1)->code_size_1);
53635 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
53636 return resultobj;
53637 fail:
53638 return NULL;
53639 }
53640
53641
53642 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_2_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53643 PyObject *resultobj = 0;
53644 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53645 size_t arg2 ;
53646 void *argp1 = 0 ;
53647 int res1 = 0 ;
53648 size_t val2 ;
53649 int ecode2 = 0 ;
53650 PyObject * obj0 = 0 ;
53651 PyObject * obj1 = 0 ;
53652
53653 if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_code_size_2_set",&obj0,&obj1)) SWIG_fail;
53654 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53655 if (!SWIG_IsOK(res1)) {
53656 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_2_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53657 }
53658 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53659 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53660 if (!SWIG_IsOK(ecode2)) {
53661 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_code_size_2_set" "', argument " "2"" of type '" "size_t""'");
53662 }
53663 arg2 = static_cast< size_t >(val2);
53664 if (arg1) (arg1)->code_size_2 = arg2;
53665 resultobj = SWIG_Py_Void();
53666 return resultobj;
53667 fail:
53668 return NULL;
53669 }
53670
53671
53672 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_2_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53673 PyObject *resultobj = 0;
53674 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53675 void *argp1 = 0 ;
53676 int res1 = 0 ;
53677 PyObject * obj0 = 0 ;
53678 size_t result;
53679
53680 if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_code_size_2_get",&obj0)) SWIG_fail;
53681 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53682 if (!SWIG_IsOK(res1)) {
53683 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_2_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53684 }
53685 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53686 result = (size_t) ((arg1)->code_size_2);
53687 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
53688 return resultobj;
53689 fail:
53690 return NULL;
53691 }
53692
53693
53694 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53695 PyObject *resultobj = 0;
53696 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53697 size_t arg2 ;
53698 void *argp1 = 0 ;
53699 int res1 = 0 ;
53700 size_t val2 ;
53701 int ecode2 = 0 ;
53702 PyObject * obj0 = 0 ;
53703 PyObject * obj1 = 0 ;
53704
53705 if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_code_size_set",&obj0,&obj1)) SWIG_fail;
53706 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53707 if (!SWIG_IsOK(res1)) {
53708 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_set" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53709 }
53710 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53711 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53712 if (!SWIG_IsOK(ecode2)) {
53713 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_code_size_set" "', argument " "2"" of type '" "size_t""'");
53714 }
53715 arg2 = static_cast< size_t >(val2);
53716 if (arg1) (arg1)->code_size = arg2;
53717 resultobj = SWIG_Py_Void();
53718 return resultobj;
53719 fail:
53720 return NULL;
53721 }
53722
53723
53724 SWIGINTERN PyObject *_wrap_Index2Layer_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53725 PyObject *resultobj = 0;
53726 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53727 void *argp1 = 0 ;
53728 int res1 = 0 ;
53729 PyObject * obj0 = 0 ;
53730 size_t result;
53731
53732 if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_code_size_get",&obj0)) SWIG_fail;
53733 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
53734 if (!SWIG_IsOK(res1)) {
53735 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_code_size_get" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53736 }
53737 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53738 result = (size_t) ((arg1)->code_size);
53739 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
53740 return resultobj;
53741 fail:
53742 return NULL;
53743 }
53744
53745
53746 SWIGINTERN PyObject *_wrap_new_Index2Layer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53747 PyObject *resultobj = 0;
53748 faiss::Index *arg1 = (faiss::Index *) 0 ;
53749 size_t arg2 ;
53750 int arg3 ;
53751 faiss::MetricType arg4 ;
53752 void *argp1 = 0 ;
53753 int res1 = 0 ;
53754 size_t val2 ;
53755 int ecode2 = 0 ;
53756 int val3 ;
53757 int ecode3 = 0 ;
53758 int val4 ;
53759 int ecode4 = 0 ;
53760 PyObject * obj0 = 0 ;
53761 PyObject * obj1 = 0 ;
53762 PyObject * obj2 = 0 ;
53763 PyObject * obj3 = 0 ;
53764 faiss::Index2Layer *result = 0 ;
53765
53766 if (!PyArg_ParseTuple(args,(char *)"OOOO:new_Index2Layer",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
53767 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
53768 if (!SWIG_IsOK(res1)) {
53769 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Index2Layer" "', argument " "1"" of type '" "faiss::Index *""'");
53770 }
53771 arg1 = reinterpret_cast< faiss::Index * >(argp1);
53772 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53773 if (!SWIG_IsOK(ecode2)) {
53774 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Index2Layer" "', argument " "2"" of type '" "size_t""'");
53775 }
53776 arg2 = static_cast< size_t >(val2);
53777 ecode3 = SWIG_AsVal_int(obj2, &val3);
53778 if (!SWIG_IsOK(ecode3)) {
53779 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Index2Layer" "', argument " "3"" of type '" "int""'");
53780 }
53781 arg3 = static_cast< int >(val3);
53782 ecode4 = SWIG_AsVal_int(obj3, &val4);
53783 if (!SWIG_IsOK(ecode4)) {
53784 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_Index2Layer" "', argument " "4"" of type '" "faiss::MetricType""'");
53785 }
53786 arg4 = static_cast< faiss::MetricType >(val4);
53787 {
53788 Py_BEGIN_ALLOW_THREADS
53789 try {
53790 result = (faiss::Index2Layer *)new faiss::Index2Layer(arg1,arg2,arg3,arg4);
53791 } catch(faiss::FaissException & e) {
53792 PyEval_RestoreThread(_save);
53793 PyErr_SetString(PyExc_RuntimeError, e.what());
53794 SWIG_fail;
53795 }
53796 Py_END_ALLOW_THREADS
53797 }
53798 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index2Layer, SWIG_POINTER_NEW | 0 );
53799 return resultobj;
53800 fail:
53801 return NULL;
53802 }
53803
53804
53805 SWIGINTERN PyObject *_wrap_new_Index2Layer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53806 PyObject *resultobj = 0;
53807 faiss::Index *arg1 = (faiss::Index *) 0 ;
53808 size_t arg2 ;
53809 int arg3 ;
53810 void *argp1 = 0 ;
53811 int res1 = 0 ;
53812 size_t val2 ;
53813 int ecode2 = 0 ;
53814 int val3 ;
53815 int ecode3 = 0 ;
53816 PyObject * obj0 = 0 ;
53817 PyObject * obj1 = 0 ;
53818 PyObject * obj2 = 0 ;
53819 faiss::Index2Layer *result = 0 ;
53820
53821 if (!PyArg_ParseTuple(args,(char *)"OOO:new_Index2Layer",&obj0,&obj1,&obj2)) SWIG_fail;
53822 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
53823 if (!SWIG_IsOK(res1)) {
53824 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_Index2Layer" "', argument " "1"" of type '" "faiss::Index *""'");
53825 }
53826 arg1 = reinterpret_cast< faiss::Index * >(argp1);
53827 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
53828 if (!SWIG_IsOK(ecode2)) {
53829 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_Index2Layer" "', argument " "2"" of type '" "size_t""'");
53830 }
53831 arg2 = static_cast< size_t >(val2);
53832 ecode3 = SWIG_AsVal_int(obj2, &val3);
53833 if (!SWIG_IsOK(ecode3)) {
53834 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_Index2Layer" "', argument " "3"" of type '" "int""'");
53835 }
53836 arg3 = static_cast< int >(val3);
53837 {
53838 Py_BEGIN_ALLOW_THREADS
53839 try {
53840 result = (faiss::Index2Layer *)new faiss::Index2Layer(arg1,arg2,arg3);
53841 } catch(faiss::FaissException & e) {
53842 PyEval_RestoreThread(_save);
53843 PyErr_SetString(PyExc_RuntimeError, e.what());
53844 SWIG_fail;
53845 }
53846 Py_END_ALLOW_THREADS
53847 }
53848 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index2Layer, SWIG_POINTER_NEW | 0 );
53849 return resultobj;
53850 fail:
53851 return NULL;
53852 }
53853
53854
53855 SWIGINTERN PyObject *_wrap_new_Index2Layer__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53856 PyObject *resultobj = 0;
53857 faiss::Index2Layer *result = 0 ;
53858
53859 if (!PyArg_ParseTuple(args,(char *)":new_Index2Layer")) SWIG_fail;
53860 {
53861 Py_BEGIN_ALLOW_THREADS
53862 try {
53863 result = (faiss::Index2Layer *)new faiss::Index2Layer();
53864 } catch(faiss::FaissException & e) {
53865 PyEval_RestoreThread(_save);
53866 PyErr_SetString(PyExc_RuntimeError, e.what());
53867 SWIG_fail;
53868 }
53869 Py_END_ALLOW_THREADS
53870 }
53871 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index2Layer, SWIG_POINTER_NEW | 0 );
53872 return resultobj;
53873 fail:
53874 return NULL;
53875 }
53876
53877
53878 SWIGINTERN PyObject *_wrap_new_Index2Layer(PyObject *self, PyObject *args) {
53879 Py_ssize_t argc;
53880 PyObject *argv[5] = {
53881 0
53882 };
53883 Py_ssize_t ii;
53884
53885 if (!PyTuple_Check(args)) SWIG_fail;
53886 argc = args ? PyObject_Length(args) : 0;
53887 for (ii = 0; (ii < 4) && (ii < argc); ii++) {
53888 argv[ii] = PyTuple_GET_ITEM(args,ii);
53889 }
53890 if (argc == 0) {
53891 return _wrap_new_Index2Layer__SWIG_2(self, args);
53892 }
53893 if (argc == 3) {
53894 int _v;
53895 void *vptr = 0;
53896 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
53897 _v = SWIG_CheckState(res);
53898 if (_v) {
53899 {
53900 int res = SWIG_AsVal_size_t(argv[1], NULL);
53901 _v = SWIG_CheckState(res);
53902 }
53903 if (_v) {
53904 {
53905 int res = SWIG_AsVal_int(argv[2], NULL);
53906 _v = SWIG_CheckState(res);
53907 }
53908 if (_v) {
53909 return _wrap_new_Index2Layer__SWIG_1(self, args);
53910 }
53911 }
53912 }
53913 }
53914 if (argc == 4) {
53915 int _v;
53916 void *vptr = 0;
53917 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
53918 _v = SWIG_CheckState(res);
53919 if (_v) {
53920 {
53921 int res = SWIG_AsVal_size_t(argv[1], NULL);
53922 _v = SWIG_CheckState(res);
53923 }
53924 if (_v) {
53925 {
53926 int res = SWIG_AsVal_int(argv[2], NULL);
53927 _v = SWIG_CheckState(res);
53928 }
53929 if (_v) {
53930 {
53931 int res = SWIG_AsVal_int(argv[3], NULL);
53932 _v = SWIG_CheckState(res);
53933 }
53934 if (_v) {
53935 return _wrap_new_Index2Layer__SWIG_0(self, args);
53936 }
53937 }
53938 }
53939 }
53940 }
53941
53942 fail:
53943 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_Index2Layer'.\n"
53944 " Possible C/C++ prototypes are:\n"
53945 " faiss::Index2Layer::Index2Layer(faiss::Index *,size_t,int,faiss::MetricType)\n"
53946 " faiss::Index2Layer::Index2Layer(faiss::Index *,size_t,int)\n"
53947 " faiss::Index2Layer::Index2Layer()\n");
53948 return 0;
53949 }
53950
53951
53952 SWIGINTERN PyObject *_wrap_delete_Index2Layer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53953 PyObject *resultobj = 0;
53954 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53955 void *argp1 = 0 ;
53956 int res1 = 0 ;
53957 PyObject * obj0 = 0 ;
53958
53959 if (!PyArg_ParseTuple(args,(char *)"O:delete_Index2Layer",&obj0)) SWIG_fail;
53960 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, SWIG_POINTER_DISOWN | 0 );
53961 if (!SWIG_IsOK(res1)) {
53962 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Index2Layer" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
53963 }
53964 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
53965 {
53966 Py_BEGIN_ALLOW_THREADS
53967 try {
53968 delete arg1;
53969 } catch(faiss::FaissException & e) {
53970 PyEval_RestoreThread(_save);
53971 PyErr_SetString(PyExc_RuntimeError, e.what());
53972 SWIG_fail;
53973 }
53974 Py_END_ALLOW_THREADS
53975 }
53976 resultobj = SWIG_Py_Void();
53977 return resultobj;
53978 fail:
53979 return NULL;
53980 }
53981
53982
53983 SWIGINTERN PyObject *_wrap_Index2Layer_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
53984 PyObject *resultobj = 0;
53985 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
53986 faiss::Index::idx_t arg2 ;
53987 float *arg3 = (float *) 0 ;
53988 void *argp1 = 0 ;
53989 int res1 = 0 ;
53990 long val2 ;
53991 int ecode2 = 0 ;
53992 void *argp3 = 0 ;
53993 int res3 = 0 ;
53994 PyObject * obj0 = 0 ;
53995 PyObject * obj1 = 0 ;
53996 PyObject * obj2 = 0 ;
53997
53998 if (!PyArg_ParseTuple(args,(char *)"OOO:Index2Layer_train",&obj0,&obj1,&obj2)) SWIG_fail;
53999 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54000 if (!SWIG_IsOK(res1)) {
54001 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_train" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54002 }
54003 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54004 ecode2 = SWIG_AsVal_long(obj1, &val2);
54005 if (!SWIG_IsOK(ecode2)) {
54006 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54007 }
54008 arg2 = static_cast< faiss::Index::idx_t >(val2);
54009 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
54010 if (!SWIG_IsOK(res3)) {
54011 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index2Layer_train" "', argument " "3"" of type '" "float const *""'");
54012 }
54013 arg3 = reinterpret_cast< float * >(argp3);
54014 {
54015 Py_BEGIN_ALLOW_THREADS
54016 try {
54017 (arg1)->train(arg2,(float const *)arg3);
54018 } catch(faiss::FaissException & e) {
54019 PyEval_RestoreThread(_save);
54020 PyErr_SetString(PyExc_RuntimeError, e.what());
54021 SWIG_fail;
54022 }
54023 Py_END_ALLOW_THREADS
54024 }
54025 resultobj = SWIG_Py_Void();
54026 return resultobj;
54027 fail:
54028 return NULL;
54029 }
54030
54031
54032 SWIGINTERN PyObject *_wrap_Index2Layer_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54033 PyObject *resultobj = 0;
54034 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54035 faiss::Index::idx_t arg2 ;
54036 float *arg3 = (float *) 0 ;
54037 void *argp1 = 0 ;
54038 int res1 = 0 ;
54039 long val2 ;
54040 int ecode2 = 0 ;
54041 void *argp3 = 0 ;
54042 int res3 = 0 ;
54043 PyObject * obj0 = 0 ;
54044 PyObject * obj1 = 0 ;
54045 PyObject * obj2 = 0 ;
54046
54047 if (!PyArg_ParseTuple(args,(char *)"OOO:Index2Layer_add",&obj0,&obj1,&obj2)) SWIG_fail;
54048 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54049 if (!SWIG_IsOK(res1)) {
54050 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_add" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54051 }
54052 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54053 ecode2 = SWIG_AsVal_long(obj1, &val2);
54054 if (!SWIG_IsOK(ecode2)) {
54055 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54056 }
54057 arg2 = static_cast< faiss::Index::idx_t >(val2);
54058 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
54059 if (!SWIG_IsOK(res3)) {
54060 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index2Layer_add" "', argument " "3"" of type '" "float const *""'");
54061 }
54062 arg3 = reinterpret_cast< float * >(argp3);
54063 {
54064 Py_BEGIN_ALLOW_THREADS
54065 try {
54066 (arg1)->add(arg2,(float const *)arg3);
54067 } catch(faiss::FaissException & e) {
54068 PyEval_RestoreThread(_save);
54069 PyErr_SetString(PyExc_RuntimeError, e.what());
54070 SWIG_fail;
54071 }
54072 Py_END_ALLOW_THREADS
54073 }
54074 resultobj = SWIG_Py_Void();
54075 return resultobj;
54076 fail:
54077 return NULL;
54078 }
54079
54080
54081 SWIGINTERN PyObject *_wrap_Index2Layer_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54082 PyObject *resultobj = 0;
54083 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54084 faiss::Index::idx_t arg2 ;
54085 float *arg3 = (float *) 0 ;
54086 faiss::Index::idx_t arg4 ;
54087 float *arg5 = (float *) 0 ;
54088 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
54089 void *argp1 = 0 ;
54090 int res1 = 0 ;
54091 long val2 ;
54092 int ecode2 = 0 ;
54093 void *argp3 = 0 ;
54094 int res3 = 0 ;
54095 long val4 ;
54096 int ecode4 = 0 ;
54097 void *argp5 = 0 ;
54098 int res5 = 0 ;
54099 void *argp6 = 0 ;
54100 int res6 = 0 ;
54101 PyObject * obj0 = 0 ;
54102 PyObject * obj1 = 0 ;
54103 PyObject * obj2 = 0 ;
54104 PyObject * obj3 = 0 ;
54105 PyObject * obj4 = 0 ;
54106 PyObject * obj5 = 0 ;
54107
54108 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:Index2Layer_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
54109 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54110 if (!SWIG_IsOK(res1)) {
54111 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_search" "', argument " "1"" of type '" "faiss::Index2Layer const *""'");
54112 }
54113 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54114 ecode2 = SWIG_AsVal_long(obj1, &val2);
54115 if (!SWIG_IsOK(ecode2)) {
54116 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54117 }
54118 arg2 = static_cast< faiss::Index::idx_t >(val2);
54119 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
54120 if (!SWIG_IsOK(res3)) {
54121 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index2Layer_search" "', argument " "3"" of type '" "float const *""'");
54122 }
54123 arg3 = reinterpret_cast< float * >(argp3);
54124 ecode4 = SWIG_AsVal_long(obj3, &val4);
54125 if (!SWIG_IsOK(ecode4)) {
54126 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "Index2Layer_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
54127 }
54128 arg4 = static_cast< faiss::Index::idx_t >(val4);
54129 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
54130 if (!SWIG_IsOK(res5)) {
54131 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "Index2Layer_search" "', argument " "5"" of type '" "float *""'");
54132 }
54133 arg5 = reinterpret_cast< float * >(argp5);
54134 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
54135 if (!SWIG_IsOK(res6)) {
54136 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "Index2Layer_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
54137 }
54138 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
54139 {
54140 Py_BEGIN_ALLOW_THREADS
54141 try {
54142 ((faiss::Index2Layer const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
54143 } catch(faiss::FaissException & e) {
54144 PyEval_RestoreThread(_save);
54145 PyErr_SetString(PyExc_RuntimeError, e.what());
54146 SWIG_fail;
54147 }
54148 Py_END_ALLOW_THREADS
54149 }
54150 resultobj = SWIG_Py_Void();
54151 return resultobj;
54152 fail:
54153 return NULL;
54154 }
54155
54156
54157 SWIGINTERN PyObject *_wrap_Index2Layer_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54158 PyObject *resultobj = 0;
54159 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54160 faiss::Index::idx_t arg2 ;
54161 faiss::Index::idx_t arg3 ;
54162 float *arg4 = (float *) 0 ;
54163 void *argp1 = 0 ;
54164 int res1 = 0 ;
54165 long val2 ;
54166 int ecode2 = 0 ;
54167 long val3 ;
54168 int ecode3 = 0 ;
54169 void *argp4 = 0 ;
54170 int res4 = 0 ;
54171 PyObject * obj0 = 0 ;
54172 PyObject * obj1 = 0 ;
54173 PyObject * obj2 = 0 ;
54174 PyObject * obj3 = 0 ;
54175
54176 if (!PyArg_ParseTuple(args,(char *)"OOOO:Index2Layer_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
54177 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54178 if (!SWIG_IsOK(res1)) {
54179 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_reconstruct_n" "', argument " "1"" of type '" "faiss::Index2Layer const *""'");
54180 }
54181 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54182 ecode2 = SWIG_AsVal_long(obj1, &val2);
54183 if (!SWIG_IsOK(ecode2)) {
54184 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_reconstruct_n" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54185 }
54186 arg2 = static_cast< faiss::Index::idx_t >(val2);
54187 ecode3 = SWIG_AsVal_long(obj2, &val3);
54188 if (!SWIG_IsOK(ecode3)) {
54189 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "Index2Layer_reconstruct_n" "', argument " "3"" of type '" "faiss::Index::idx_t""'");
54190 }
54191 arg3 = static_cast< faiss::Index::idx_t >(val3);
54192 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
54193 if (!SWIG_IsOK(res4)) {
54194 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "Index2Layer_reconstruct_n" "', argument " "4"" of type '" "float *""'");
54195 }
54196 arg4 = reinterpret_cast< float * >(argp4);
54197 {
54198 Py_BEGIN_ALLOW_THREADS
54199 try {
54200 ((faiss::Index2Layer const *)arg1)->reconstruct_n(arg2,arg3,arg4);
54201 } catch(faiss::FaissException & e) {
54202 PyEval_RestoreThread(_save);
54203 PyErr_SetString(PyExc_RuntimeError, e.what());
54204 SWIG_fail;
54205 }
54206 Py_END_ALLOW_THREADS
54207 }
54208 resultobj = SWIG_Py_Void();
54209 return resultobj;
54210 fail:
54211 return NULL;
54212 }
54213
54214
54215 SWIGINTERN PyObject *_wrap_Index2Layer_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54216 PyObject *resultobj = 0;
54217 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54218 faiss::Index::idx_t arg2 ;
54219 float *arg3 = (float *) 0 ;
54220 void *argp1 = 0 ;
54221 int res1 = 0 ;
54222 long val2 ;
54223 int ecode2 = 0 ;
54224 void *argp3 = 0 ;
54225 int res3 = 0 ;
54226 PyObject * obj0 = 0 ;
54227 PyObject * obj1 = 0 ;
54228 PyObject * obj2 = 0 ;
54229
54230 if (!PyArg_ParseTuple(args,(char *)"OOO:Index2Layer_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
54231 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54232 if (!SWIG_IsOK(res1)) {
54233 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_reconstruct" "', argument " "1"" of type '" "faiss::Index2Layer const *""'");
54234 }
54235 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54236 ecode2 = SWIG_AsVal_long(obj1, &val2);
54237 if (!SWIG_IsOK(ecode2)) {
54238 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "Index2Layer_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
54239 }
54240 arg2 = static_cast< faiss::Index::idx_t >(val2);
54241 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
54242 if (!SWIG_IsOK(res3)) {
54243 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "Index2Layer_reconstruct" "', argument " "3"" of type '" "float *""'");
54244 }
54245 arg3 = reinterpret_cast< float * >(argp3);
54246 {
54247 Py_BEGIN_ALLOW_THREADS
54248 try {
54249 ((faiss::Index2Layer const *)arg1)->reconstruct(arg2,arg3);
54250 } catch(faiss::FaissException & e) {
54251 PyEval_RestoreThread(_save);
54252 PyErr_SetString(PyExc_RuntimeError, e.what());
54253 SWIG_fail;
54254 }
54255 Py_END_ALLOW_THREADS
54256 }
54257 resultobj = SWIG_Py_Void();
54258 return resultobj;
54259 fail:
54260 return NULL;
54261 }
54262
54263
54264 SWIGINTERN PyObject *_wrap_Index2Layer_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54265 PyObject *resultobj = 0;
54266 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54267 void *argp1 = 0 ;
54268 int res1 = 0 ;
54269 PyObject * obj0 = 0 ;
54270
54271 if (!PyArg_ParseTuple(args,(char *)"O:Index2Layer_reset",&obj0)) SWIG_fail;
54272 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54273 if (!SWIG_IsOK(res1)) {
54274 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_reset" "', argument " "1"" of type '" "faiss::Index2Layer *""'");
54275 }
54276 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54277 {
54278 Py_BEGIN_ALLOW_THREADS
54279 try {
54280 (arg1)->reset();
54281 } catch(faiss::FaissException & e) {
54282 PyEval_RestoreThread(_save);
54283 PyErr_SetString(PyExc_RuntimeError, e.what());
54284 SWIG_fail;
54285 }
54286 Py_END_ALLOW_THREADS
54287 }
54288 resultobj = SWIG_Py_Void();
54289 return resultobj;
54290 fail:
54291 return NULL;
54292 }
54293
54294
54295 SWIGINTERN PyObject *_wrap_Index2Layer_transfer_to_IVFPQ(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54296 PyObject *resultobj = 0;
54297 faiss::Index2Layer *arg1 = (faiss::Index2Layer *) 0 ;
54298 faiss::IndexIVFPQ *arg2 = 0 ;
54299 void *argp1 = 0 ;
54300 int res1 = 0 ;
54301 void *argp2 = 0 ;
54302 int res2 = 0 ;
54303 PyObject * obj0 = 0 ;
54304 PyObject * obj1 = 0 ;
54305
54306 if (!PyArg_ParseTuple(args,(char *)"OO:Index2Layer_transfer_to_IVFPQ",&obj0,&obj1)) SWIG_fail;
54307 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index2Layer, 0 | 0 );
54308 if (!SWIG_IsOK(res1)) {
54309 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Index2Layer_transfer_to_IVFPQ" "', argument " "1"" of type '" "faiss::Index2Layer const *""'");
54310 }
54311 arg1 = reinterpret_cast< faiss::Index2Layer * >(argp1);
54312 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexIVFPQ, 0 );
54313 if (!SWIG_IsOK(res2)) {
54314 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Index2Layer_transfer_to_IVFPQ" "', argument " "2"" of type '" "faiss::IndexIVFPQ &""'");
54315 }
54316 if (!argp2) {
54317 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "Index2Layer_transfer_to_IVFPQ" "', argument " "2"" of type '" "faiss::IndexIVFPQ &""'");
54318 }
54319 arg2 = reinterpret_cast< faiss::IndexIVFPQ * >(argp2);
54320 {
54321 Py_BEGIN_ALLOW_THREADS
54322 try {
54323 ((faiss::Index2Layer const *)arg1)->transfer_to_IVFPQ(*arg2);
54324 } catch(faiss::FaissException & e) {
54325 PyEval_RestoreThread(_save);
54326 PyErr_SetString(PyExc_RuntimeError, e.what());
54327 SWIG_fail;
54328 }
54329 Py_END_ALLOW_THREADS
54330 }
54331 resultobj = SWIG_Py_Void();
54332 return resultobj;
54333 fail:
54334 return NULL;
54335 }
54336
54337
54338 SWIGINTERN PyObject *Index2Layer_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54339 PyObject *obj;
54340 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
54341 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Index2Layer, SWIG_NewClientData(obj));
54342 return SWIG_Py_Void();
54343 }
54344
54345 SWIGINTERN PyObject *_wrap_IndexBinary_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54346 PyObject *resultobj = 0;
54347 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54348 int arg2 ;
54349 void *argp1 = 0 ;
54350 int res1 = 0 ;
54351 int val2 ;
54352 int ecode2 = 0 ;
54353 PyObject * obj0 = 0 ;
54354 PyObject * obj1 = 0 ;
54355
54356 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_d_set",&obj0,&obj1)) SWIG_fail;
54357 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54358 if (!SWIG_IsOK(res1)) {
54359 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_d_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54360 }
54361 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54362 ecode2 = SWIG_AsVal_int(obj1, &val2);
54363 if (!SWIG_IsOK(ecode2)) {
54364 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_d_set" "', argument " "2"" of type '" "int""'");
54365 }
54366 arg2 = static_cast< int >(val2);
54367 if (arg1) (arg1)->d = arg2;
54368 resultobj = SWIG_Py_Void();
54369 return resultobj;
54370 fail:
54371 return NULL;
54372 }
54373
54374
54375 SWIGINTERN PyObject *_wrap_IndexBinary_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54376 PyObject *resultobj = 0;
54377 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54378 void *argp1 = 0 ;
54379 int res1 = 0 ;
54380 PyObject * obj0 = 0 ;
54381 int result;
54382
54383 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_d_get",&obj0)) SWIG_fail;
54384 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54385 if (!SWIG_IsOK(res1)) {
54386 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_d_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54387 }
54388 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54389 result = (int) ((arg1)->d);
54390 resultobj = SWIG_From_int(static_cast< int >(result));
54391 return resultobj;
54392 fail:
54393 return NULL;
54394 }
54395
54396
54397 SWIGINTERN PyObject *_wrap_IndexBinary_code_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54398 PyObject *resultobj = 0;
54399 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54400 int arg2 ;
54401 void *argp1 = 0 ;
54402 int res1 = 0 ;
54403 int val2 ;
54404 int ecode2 = 0 ;
54405 PyObject * obj0 = 0 ;
54406 PyObject * obj1 = 0 ;
54407
54408 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_code_size_set",&obj0,&obj1)) SWIG_fail;
54409 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54410 if (!SWIG_IsOK(res1)) {
54411 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_code_size_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54412 }
54413 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54414 ecode2 = SWIG_AsVal_int(obj1, &val2);
54415 if (!SWIG_IsOK(ecode2)) {
54416 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_code_size_set" "', argument " "2"" of type '" "int""'");
54417 }
54418 arg2 = static_cast< int >(val2);
54419 if (arg1) (arg1)->code_size = arg2;
54420 resultobj = SWIG_Py_Void();
54421 return resultobj;
54422 fail:
54423 return NULL;
54424 }
54425
54426
54427 SWIGINTERN PyObject *_wrap_IndexBinary_code_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54428 PyObject *resultobj = 0;
54429 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54430 void *argp1 = 0 ;
54431 int res1 = 0 ;
54432 PyObject * obj0 = 0 ;
54433 int result;
54434
54435 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_code_size_get",&obj0)) SWIG_fail;
54436 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54437 if (!SWIG_IsOK(res1)) {
54438 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_code_size_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54439 }
54440 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54441 result = (int) ((arg1)->code_size);
54442 resultobj = SWIG_From_int(static_cast< int >(result));
54443 return resultobj;
54444 fail:
54445 return NULL;
54446 }
54447
54448
54449 SWIGINTERN PyObject *_wrap_IndexBinary_ntotal_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54450 PyObject *resultobj = 0;
54451 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54452 faiss::IndexBinary::idx_t arg2 ;
54453 void *argp1 = 0 ;
54454 int res1 = 0 ;
54455 long val2 ;
54456 int ecode2 = 0 ;
54457 PyObject * obj0 = 0 ;
54458 PyObject * obj1 = 0 ;
54459
54460 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_ntotal_set",&obj0,&obj1)) SWIG_fail;
54461 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54462 if (!SWIG_IsOK(res1)) {
54463 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_ntotal_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54464 }
54465 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54466 ecode2 = SWIG_AsVal_long(obj1, &val2);
54467 if (!SWIG_IsOK(ecode2)) {
54468 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_ntotal_set" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
54469 }
54470 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
54471 if (arg1) (arg1)->ntotal = arg2;
54472 resultobj = SWIG_Py_Void();
54473 return resultobj;
54474 fail:
54475 return NULL;
54476 }
54477
54478
54479 SWIGINTERN PyObject *_wrap_IndexBinary_ntotal_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54480 PyObject *resultobj = 0;
54481 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54482 void *argp1 = 0 ;
54483 int res1 = 0 ;
54484 PyObject * obj0 = 0 ;
54485 faiss::IndexBinary::idx_t result;
54486
54487 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_ntotal_get",&obj0)) SWIG_fail;
54488 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54489 if (!SWIG_IsOK(res1)) {
54490 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_ntotal_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54491 }
54492 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54493 result = (faiss::IndexBinary::idx_t) ((arg1)->ntotal);
54494 resultobj = SWIG_From_long(static_cast< long >(result));
54495 return resultobj;
54496 fail:
54497 return NULL;
54498 }
54499
54500
54501 SWIGINTERN PyObject *_wrap_IndexBinary_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54502 PyObject *resultobj = 0;
54503 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54504 bool arg2 ;
54505 void *argp1 = 0 ;
54506 int res1 = 0 ;
54507 bool val2 ;
54508 int ecode2 = 0 ;
54509 PyObject * obj0 = 0 ;
54510 PyObject * obj1 = 0 ;
54511
54512 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_verbose_set",&obj0,&obj1)) SWIG_fail;
54513 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54514 if (!SWIG_IsOK(res1)) {
54515 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_verbose_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54516 }
54517 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54518 ecode2 = SWIG_AsVal_bool(obj1, &val2);
54519 if (!SWIG_IsOK(ecode2)) {
54520 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_verbose_set" "', argument " "2"" of type '" "bool""'");
54521 }
54522 arg2 = static_cast< bool >(val2);
54523 if (arg1) (arg1)->verbose = arg2;
54524 resultobj = SWIG_Py_Void();
54525 return resultobj;
54526 fail:
54527 return NULL;
54528 }
54529
54530
54531 SWIGINTERN PyObject *_wrap_IndexBinary_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54532 PyObject *resultobj = 0;
54533 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54534 void *argp1 = 0 ;
54535 int res1 = 0 ;
54536 PyObject * obj0 = 0 ;
54537 bool result;
54538
54539 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_verbose_get",&obj0)) SWIG_fail;
54540 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54541 if (!SWIG_IsOK(res1)) {
54542 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_verbose_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54543 }
54544 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54545 result = (bool) ((arg1)->verbose);
54546 resultobj = SWIG_From_bool(static_cast< bool >(result));
54547 return resultobj;
54548 fail:
54549 return NULL;
54550 }
54551
54552
54553 SWIGINTERN PyObject *_wrap_IndexBinary_is_trained_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54554 PyObject *resultobj = 0;
54555 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54556 bool arg2 ;
54557 void *argp1 = 0 ;
54558 int res1 = 0 ;
54559 bool val2 ;
54560 int ecode2 = 0 ;
54561 PyObject * obj0 = 0 ;
54562 PyObject * obj1 = 0 ;
54563
54564 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_is_trained_set",&obj0,&obj1)) SWIG_fail;
54565 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54566 if (!SWIG_IsOK(res1)) {
54567 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_is_trained_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54568 }
54569 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54570 ecode2 = SWIG_AsVal_bool(obj1, &val2);
54571 if (!SWIG_IsOK(ecode2)) {
54572 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_is_trained_set" "', argument " "2"" of type '" "bool""'");
54573 }
54574 arg2 = static_cast< bool >(val2);
54575 if (arg1) (arg1)->is_trained = arg2;
54576 resultobj = SWIG_Py_Void();
54577 return resultobj;
54578 fail:
54579 return NULL;
54580 }
54581
54582
54583 SWIGINTERN PyObject *_wrap_IndexBinary_is_trained_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54584 PyObject *resultobj = 0;
54585 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54586 void *argp1 = 0 ;
54587 int res1 = 0 ;
54588 PyObject * obj0 = 0 ;
54589 bool result;
54590
54591 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_is_trained_get",&obj0)) SWIG_fail;
54592 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54593 if (!SWIG_IsOK(res1)) {
54594 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_is_trained_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54595 }
54596 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54597 result = (bool) ((arg1)->is_trained);
54598 resultobj = SWIG_From_bool(static_cast< bool >(result));
54599 return resultobj;
54600 fail:
54601 return NULL;
54602 }
54603
54604
54605 SWIGINTERN PyObject *_wrap_IndexBinary_metric_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54606 PyObject *resultobj = 0;
54607 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54608 faiss::MetricType arg2 ;
54609 void *argp1 = 0 ;
54610 int res1 = 0 ;
54611 int val2 ;
54612 int ecode2 = 0 ;
54613 PyObject * obj0 = 0 ;
54614 PyObject * obj1 = 0 ;
54615
54616 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_metric_type_set",&obj0,&obj1)) SWIG_fail;
54617 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54618 if (!SWIG_IsOK(res1)) {
54619 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_metric_type_set" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54620 }
54621 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54622 ecode2 = SWIG_AsVal_int(obj1, &val2);
54623 if (!SWIG_IsOK(ecode2)) {
54624 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_metric_type_set" "', argument " "2"" of type '" "faiss::MetricType""'");
54625 }
54626 arg2 = static_cast< faiss::MetricType >(val2);
54627 if (arg1) (arg1)->metric_type = arg2;
54628 resultobj = SWIG_Py_Void();
54629 return resultobj;
54630 fail:
54631 return NULL;
54632 }
54633
54634
54635 SWIGINTERN PyObject *_wrap_IndexBinary_metric_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54636 PyObject *resultobj = 0;
54637 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54638 void *argp1 = 0 ;
54639 int res1 = 0 ;
54640 PyObject * obj0 = 0 ;
54641 faiss::MetricType result;
54642
54643 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_metric_type_get",&obj0)) SWIG_fail;
54644 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54645 if (!SWIG_IsOK(res1)) {
54646 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_metric_type_get" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54647 }
54648 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54649 result = (faiss::MetricType) ((arg1)->metric_type);
54650 resultobj = SWIG_From_int(static_cast< int >(result));
54651 return resultobj;
54652 fail:
54653 return NULL;
54654 }
54655
54656
54657 SWIGINTERN PyObject *_wrap_delete_IndexBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54658 PyObject *resultobj = 0;
54659 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54660 void *argp1 = 0 ;
54661 int res1 = 0 ;
54662 PyObject * obj0 = 0 ;
54663
54664 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinary",&obj0)) SWIG_fail;
54665 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, SWIG_POINTER_DISOWN | 0 );
54666 if (!SWIG_IsOK(res1)) {
54667 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinary" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54668 }
54669 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54670 {
54671 Py_BEGIN_ALLOW_THREADS
54672 try {
54673 delete arg1;
54674 } catch(faiss::FaissException & e) {
54675 PyEval_RestoreThread(_save);
54676 PyErr_SetString(PyExc_RuntimeError, e.what());
54677 SWIG_fail;
54678 }
54679 Py_END_ALLOW_THREADS
54680 }
54681 resultobj = SWIG_Py_Void();
54682 return resultobj;
54683 fail:
54684 return NULL;
54685 }
54686
54687
54688 SWIGINTERN PyObject *_wrap_IndexBinary_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54689 PyObject *resultobj = 0;
54690 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54691 faiss::IndexBinary::idx_t arg2 ;
54692 uint8_t *arg3 = (uint8_t *) 0 ;
54693 void *argp1 = 0 ;
54694 int res1 = 0 ;
54695 long val2 ;
54696 int ecode2 = 0 ;
54697 void *argp3 = 0 ;
54698 int res3 = 0 ;
54699 PyObject * obj0 = 0 ;
54700 PyObject * obj1 = 0 ;
54701 PyObject * obj2 = 0 ;
54702
54703 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinary_train",&obj0,&obj1,&obj2)) SWIG_fail;
54704 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54705 if (!SWIG_IsOK(res1)) {
54706 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_train" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54707 }
54708 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54709 ecode2 = SWIG_AsVal_long(obj1, &val2);
54710 if (!SWIG_IsOK(ecode2)) {
54711 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_train" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
54712 }
54713 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
54714 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
54715 if (!SWIG_IsOK(res3)) {
54716 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_train" "', argument " "3"" of type '" "uint8_t const *""'");
54717 }
54718 arg3 = reinterpret_cast< uint8_t * >(argp3);
54719 {
54720 Py_BEGIN_ALLOW_THREADS
54721 try {
54722 (arg1)->train(arg2,(uint8_t const *)arg3);
54723 } catch(faiss::FaissException & e) {
54724 PyEval_RestoreThread(_save);
54725 PyErr_SetString(PyExc_RuntimeError, e.what());
54726 SWIG_fail;
54727 }
54728 Py_END_ALLOW_THREADS
54729 }
54730 resultobj = SWIG_Py_Void();
54731 return resultobj;
54732 fail:
54733 return NULL;
54734 }
54735
54736
54737 SWIGINTERN PyObject *_wrap_IndexBinary_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54738 PyObject *resultobj = 0;
54739 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54740 faiss::IndexBinary::idx_t arg2 ;
54741 uint8_t *arg3 = (uint8_t *) 0 ;
54742 void *argp1 = 0 ;
54743 int res1 = 0 ;
54744 long val2 ;
54745 int ecode2 = 0 ;
54746 void *argp3 = 0 ;
54747 int res3 = 0 ;
54748 PyObject * obj0 = 0 ;
54749 PyObject * obj1 = 0 ;
54750 PyObject * obj2 = 0 ;
54751
54752 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinary_add",&obj0,&obj1,&obj2)) SWIG_fail;
54753 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54754 if (!SWIG_IsOK(res1)) {
54755 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_add" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54756 }
54757 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54758 ecode2 = SWIG_AsVal_long(obj1, &val2);
54759 if (!SWIG_IsOK(ecode2)) {
54760 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
54761 }
54762 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
54763 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
54764 if (!SWIG_IsOK(res3)) {
54765 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_add" "', argument " "3"" of type '" "uint8_t const *""'");
54766 }
54767 arg3 = reinterpret_cast< uint8_t * >(argp3);
54768 {
54769 Py_BEGIN_ALLOW_THREADS
54770 try {
54771 (arg1)->add(arg2,(uint8_t const *)arg3);
54772 } catch(faiss::FaissException & e) {
54773 PyEval_RestoreThread(_save);
54774 PyErr_SetString(PyExc_RuntimeError, e.what());
54775 SWIG_fail;
54776 }
54777 Py_END_ALLOW_THREADS
54778 }
54779 resultobj = SWIG_Py_Void();
54780 return resultobj;
54781 fail:
54782 return NULL;
54783 }
54784
54785
54786 SWIGINTERN PyObject *_wrap_IndexBinary_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54787 PyObject *resultobj = 0;
54788 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54789 faiss::IndexBinary::idx_t arg2 ;
54790 uint8_t *arg3 = (uint8_t *) 0 ;
54791 long *arg4 = (long *) 0 ;
54792 void *argp1 = 0 ;
54793 int res1 = 0 ;
54794 long val2 ;
54795 int ecode2 = 0 ;
54796 void *argp3 = 0 ;
54797 int res3 = 0 ;
54798 void *argp4 = 0 ;
54799 int res4 = 0 ;
54800 PyObject * obj0 = 0 ;
54801 PyObject * obj1 = 0 ;
54802 PyObject * obj2 = 0 ;
54803 PyObject * obj3 = 0 ;
54804
54805 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinary_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
54806 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54807 if (!SWIG_IsOK(res1)) {
54808 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_add_with_ids" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
54809 }
54810 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54811 ecode2 = SWIG_AsVal_long(obj1, &val2);
54812 if (!SWIG_IsOK(ecode2)) {
54813 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_add_with_ids" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
54814 }
54815 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
54816 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
54817 if (!SWIG_IsOK(res3)) {
54818 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_add_with_ids" "', argument " "3"" of type '" "uint8_t const *""'");
54819 }
54820 arg3 = reinterpret_cast< uint8_t * >(argp3);
54821 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
54822 if (!SWIG_IsOK(res4)) {
54823 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinary_add_with_ids" "', argument " "4"" of type '" "long const *""'");
54824 }
54825 arg4 = reinterpret_cast< long * >(argp4);
54826 {
54827 Py_BEGIN_ALLOW_THREADS
54828 try {
54829 (arg1)->add_with_ids(arg2,(uint8_t const *)arg3,(long const *)arg4);
54830 } catch(faiss::FaissException & e) {
54831 PyEval_RestoreThread(_save);
54832 PyErr_SetString(PyExc_RuntimeError, e.what());
54833 SWIG_fail;
54834 }
54835 Py_END_ALLOW_THREADS
54836 }
54837 resultobj = SWIG_Py_Void();
54838 return resultobj;
54839 fail:
54840 return NULL;
54841 }
54842
54843
54844 SWIGINTERN PyObject *_wrap_IndexBinary_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54845 PyObject *resultobj = 0;
54846 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54847 faiss::IndexBinary::idx_t arg2 ;
54848 uint8_t *arg3 = (uint8_t *) 0 ;
54849 faiss::IndexBinary::idx_t arg4 ;
54850 int32_t *arg5 = (int32_t *) 0 ;
54851 faiss::IndexBinary::idx_t *arg6 = (faiss::IndexBinary::idx_t *) 0 ;
54852 void *argp1 = 0 ;
54853 int res1 = 0 ;
54854 long val2 ;
54855 int ecode2 = 0 ;
54856 void *argp3 = 0 ;
54857 int res3 = 0 ;
54858 long val4 ;
54859 int ecode4 = 0 ;
54860 void *argp5 = 0 ;
54861 int res5 = 0 ;
54862 void *argp6 = 0 ;
54863 int res6 = 0 ;
54864 PyObject * obj0 = 0 ;
54865 PyObject * obj1 = 0 ;
54866 PyObject * obj2 = 0 ;
54867 PyObject * obj3 = 0 ;
54868 PyObject * obj4 = 0 ;
54869 PyObject * obj5 = 0 ;
54870
54871 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinary_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
54872 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54873 if (!SWIG_IsOK(res1)) {
54874 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_search" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
54875 }
54876 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54877 ecode2 = SWIG_AsVal_long(obj1, &val2);
54878 if (!SWIG_IsOK(ecode2)) {
54879 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
54880 }
54881 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
54882 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
54883 if (!SWIG_IsOK(res3)) {
54884 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_search" "', argument " "3"" of type '" "uint8_t const *""'");
54885 }
54886 arg3 = reinterpret_cast< uint8_t * >(argp3);
54887 ecode4 = SWIG_AsVal_long(obj3, &val4);
54888 if (!SWIG_IsOK(ecode4)) {
54889 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinary_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
54890 }
54891 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
54892 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
54893 if (!SWIG_IsOK(res5)) {
54894 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinary_search" "', argument " "5"" of type '" "int32_t *""'");
54895 }
54896 arg5 = reinterpret_cast< int32_t * >(argp5);
54897 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
54898 if (!SWIG_IsOK(res6)) {
54899 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinary_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
54900 }
54901 arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
54902 {
54903 Py_BEGIN_ALLOW_THREADS
54904 try {
54905 ((faiss::IndexBinary const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
54906 } catch(faiss::FaissException & e) {
54907 PyEval_RestoreThread(_save);
54908 PyErr_SetString(PyExc_RuntimeError, e.what());
54909 SWIG_fail;
54910 }
54911 Py_END_ALLOW_THREADS
54912 }
54913 resultobj = SWIG_Py_Void();
54914 return resultobj;
54915 fail:
54916 return NULL;
54917 }
54918
54919
54920 SWIGINTERN PyObject *_wrap_IndexBinary_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54921 PyObject *resultobj = 0;
54922 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54923 faiss::IndexBinary::idx_t arg2 ;
54924 uint8_t *arg3 = (uint8_t *) 0 ;
54925 int arg4 ;
54926 faiss::RangeSearchResult *arg5 = (faiss::RangeSearchResult *) 0 ;
54927 void *argp1 = 0 ;
54928 int res1 = 0 ;
54929 long val2 ;
54930 int ecode2 = 0 ;
54931 void *argp3 = 0 ;
54932 int res3 = 0 ;
54933 int val4 ;
54934 int ecode4 = 0 ;
54935 void *argp5 = 0 ;
54936 int res5 = 0 ;
54937 PyObject * obj0 = 0 ;
54938 PyObject * obj1 = 0 ;
54939 PyObject * obj2 = 0 ;
54940 PyObject * obj3 = 0 ;
54941 PyObject * obj4 = 0 ;
54942
54943 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexBinary_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
54944 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
54945 if (!SWIG_IsOK(res1)) {
54946 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_range_search" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
54947 }
54948 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
54949 ecode2 = SWIG_AsVal_long(obj1, &val2);
54950 if (!SWIG_IsOK(ecode2)) {
54951 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_range_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
54952 }
54953 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
54954 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
54955 if (!SWIG_IsOK(res3)) {
54956 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_range_search" "', argument " "3"" of type '" "uint8_t const *""'");
54957 }
54958 arg3 = reinterpret_cast< uint8_t * >(argp3);
54959 ecode4 = SWIG_AsVal_int(obj3, &val4);
54960 if (!SWIG_IsOK(ecode4)) {
54961 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinary_range_search" "', argument " "4"" of type '" "int""'");
54962 }
54963 arg4 = static_cast< int >(val4);
54964 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
54965 if (!SWIG_IsOK(res5)) {
54966 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinary_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
54967 }
54968 arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
54969 {
54970 Py_BEGIN_ALLOW_THREADS
54971 try {
54972 ((faiss::IndexBinary const *)arg1)->range_search(arg2,(uint8_t const *)arg3,arg4,arg5);
54973 } catch(faiss::FaissException & e) {
54974 PyEval_RestoreThread(_save);
54975 PyErr_SetString(PyExc_RuntimeError, e.what());
54976 SWIG_fail;
54977 }
54978 Py_END_ALLOW_THREADS
54979 }
54980 resultobj = SWIG_Py_Void();
54981 return resultobj;
54982 fail:
54983 return NULL;
54984 }
54985
54986
54987 SWIGINTERN PyObject *_wrap_IndexBinary_assign__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
54988 PyObject *resultobj = 0;
54989 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
54990 faiss::IndexBinary::idx_t arg2 ;
54991 uint8_t *arg3 = (uint8_t *) 0 ;
54992 faiss::IndexBinary::idx_t *arg4 = (faiss::IndexBinary::idx_t *) 0 ;
54993 faiss::IndexBinary::idx_t arg5 ;
54994 void *argp1 = 0 ;
54995 int res1 = 0 ;
54996 long val2 ;
54997 int ecode2 = 0 ;
54998 void *argp3 = 0 ;
54999 int res3 = 0 ;
55000 void *argp4 = 0 ;
55001 int res4 = 0 ;
55002 long val5 ;
55003 int ecode5 = 0 ;
55004 PyObject * obj0 = 0 ;
55005 PyObject * obj1 = 0 ;
55006 PyObject * obj2 = 0 ;
55007 PyObject * obj3 = 0 ;
55008 PyObject * obj4 = 0 ;
55009
55010 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexBinary_assign",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
55011 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55012 if (!SWIG_IsOK(res1)) {
55013 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_assign" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55014 }
55015 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55016 ecode2 = SWIG_AsVal_long(obj1, &val2);
55017 if (!SWIG_IsOK(ecode2)) {
55018 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_assign" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55019 }
55020 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55021 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
55022 if (!SWIG_IsOK(res3)) {
55023 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_assign" "', argument " "3"" of type '" "uint8_t const *""'");
55024 }
55025 arg3 = reinterpret_cast< uint8_t * >(argp3);
55026 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
55027 if (!SWIG_IsOK(res4)) {
55028 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinary_assign" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t *""'");
55029 }
55030 arg4 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp4);
55031 ecode5 = SWIG_AsVal_long(obj4, &val5);
55032 if (!SWIG_IsOK(ecode5)) {
55033 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "IndexBinary_assign" "', argument " "5"" of type '" "faiss::IndexBinary::idx_t""'");
55034 }
55035 arg5 = static_cast< faiss::IndexBinary::idx_t >(val5);
55036 {
55037 Py_BEGIN_ALLOW_THREADS
55038 try {
55039 (arg1)->assign(arg2,(uint8_t const *)arg3,arg4,arg5);
55040 } catch(faiss::FaissException & e) {
55041 PyEval_RestoreThread(_save);
55042 PyErr_SetString(PyExc_RuntimeError, e.what());
55043 SWIG_fail;
55044 }
55045 Py_END_ALLOW_THREADS
55046 }
55047 resultobj = SWIG_Py_Void();
55048 return resultobj;
55049 fail:
55050 return NULL;
55051 }
55052
55053
55054 SWIGINTERN PyObject *_wrap_IndexBinary_assign__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55055 PyObject *resultobj = 0;
55056 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55057 faiss::IndexBinary::idx_t arg2 ;
55058 uint8_t *arg3 = (uint8_t *) 0 ;
55059 faiss::IndexBinary::idx_t *arg4 = (faiss::IndexBinary::idx_t *) 0 ;
55060 void *argp1 = 0 ;
55061 int res1 = 0 ;
55062 long val2 ;
55063 int ecode2 = 0 ;
55064 void *argp3 = 0 ;
55065 int res3 = 0 ;
55066 void *argp4 = 0 ;
55067 int res4 = 0 ;
55068 PyObject * obj0 = 0 ;
55069 PyObject * obj1 = 0 ;
55070 PyObject * obj2 = 0 ;
55071 PyObject * obj3 = 0 ;
55072
55073 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinary_assign",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
55074 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55075 if (!SWIG_IsOK(res1)) {
55076 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_assign" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55077 }
55078 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55079 ecode2 = SWIG_AsVal_long(obj1, &val2);
55080 if (!SWIG_IsOK(ecode2)) {
55081 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_assign" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55082 }
55083 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55084 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
55085 if (!SWIG_IsOK(res3)) {
55086 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_assign" "', argument " "3"" of type '" "uint8_t const *""'");
55087 }
55088 arg3 = reinterpret_cast< uint8_t * >(argp3);
55089 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
55090 if (!SWIG_IsOK(res4)) {
55091 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinary_assign" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t *""'");
55092 }
55093 arg4 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp4);
55094 {
55095 Py_BEGIN_ALLOW_THREADS
55096 try {
55097 (arg1)->assign(arg2,(uint8_t const *)arg3,arg4);
55098 } catch(faiss::FaissException & e) {
55099 PyEval_RestoreThread(_save);
55100 PyErr_SetString(PyExc_RuntimeError, e.what());
55101 SWIG_fail;
55102 }
55103 Py_END_ALLOW_THREADS
55104 }
55105 resultobj = SWIG_Py_Void();
55106 return resultobj;
55107 fail:
55108 return NULL;
55109 }
55110
55111
55112 SWIGINTERN PyObject *_wrap_IndexBinary_assign(PyObject *self, PyObject *args) {
55113 Py_ssize_t argc;
55114 PyObject *argv[6] = {
55115 0
55116 };
55117 Py_ssize_t ii;
55118
55119 if (!PyTuple_Check(args)) SWIG_fail;
55120 argc = args ? PyObject_Length(args) : 0;
55121 for (ii = 0; (ii < 5) && (ii < argc); ii++) {
55122 argv[ii] = PyTuple_GET_ITEM(args,ii);
55123 }
55124 if (argc == 4) {
55125 int _v;
55126 void *vptr = 0;
55127 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
55128 _v = SWIG_CheckState(res);
55129 if (_v) {
55130 {
55131 int res = SWIG_AsVal_long(argv[1], NULL);
55132 _v = SWIG_CheckState(res);
55133 }
55134 if (_v) {
55135 void *vptr = 0;
55136 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
55137 _v = SWIG_CheckState(res);
55138 if (_v) {
55139 void *vptr = 0;
55140 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
55141 _v = SWIG_CheckState(res);
55142 if (_v) {
55143 return _wrap_IndexBinary_assign__SWIG_1(self, args);
55144 }
55145 }
55146 }
55147 }
55148 }
55149 if (argc == 5) {
55150 int _v;
55151 void *vptr = 0;
55152 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
55153 _v = SWIG_CheckState(res);
55154 if (_v) {
55155 {
55156 int res = SWIG_AsVal_long(argv[1], NULL);
55157 _v = SWIG_CheckState(res);
55158 }
55159 if (_v) {
55160 void *vptr = 0;
55161 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
55162 _v = SWIG_CheckState(res);
55163 if (_v) {
55164 void *vptr = 0;
55165 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
55166 _v = SWIG_CheckState(res);
55167 if (_v) {
55168 {
55169 int res = SWIG_AsVal_long(argv[4], NULL);
55170 _v = SWIG_CheckState(res);
55171 }
55172 if (_v) {
55173 return _wrap_IndexBinary_assign__SWIG_0(self, args);
55174 }
55175 }
55176 }
55177 }
55178 }
55179 }
55180
55181 fail:
55182 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinary_assign'.\n"
55183 " Possible C/C++ prototypes are:\n"
55184 " faiss::IndexBinary::assign(faiss::IndexBinary::idx_t,uint8_t const *,faiss::IndexBinary::idx_t *,faiss::IndexBinary::idx_t)\n"
55185 " faiss::IndexBinary::assign(faiss::IndexBinary::idx_t,uint8_t const *,faiss::IndexBinary::idx_t *)\n");
55186 return 0;
55187 }
55188
55189
55190 SWIGINTERN PyObject *_wrap_IndexBinary_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55191 PyObject *resultobj = 0;
55192 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55193 void *argp1 = 0 ;
55194 int res1 = 0 ;
55195 PyObject * obj0 = 0 ;
55196
55197 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_reset",&obj0)) SWIG_fail;
55198 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55199 if (!SWIG_IsOK(res1)) {
55200 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_reset" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55201 }
55202 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55203 {
55204 Py_BEGIN_ALLOW_THREADS
55205 try {
55206 (arg1)->reset();
55207 } catch(faiss::FaissException & e) {
55208 PyEval_RestoreThread(_save);
55209 PyErr_SetString(PyExc_RuntimeError, e.what());
55210 SWIG_fail;
55211 }
55212 Py_END_ALLOW_THREADS
55213 }
55214 resultobj = SWIG_Py_Void();
55215 return resultobj;
55216 fail:
55217 return NULL;
55218 }
55219
55220
55221 SWIGINTERN PyObject *_wrap_IndexBinary_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55222 PyObject *resultobj = 0;
55223 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55224 faiss::IDSelector *arg2 = 0 ;
55225 void *argp1 = 0 ;
55226 int res1 = 0 ;
55227 void *argp2 = 0 ;
55228 int res2 = 0 ;
55229 PyObject * obj0 = 0 ;
55230 PyObject * obj1 = 0 ;
55231 long result;
55232
55233 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinary_remove_ids",&obj0,&obj1)) SWIG_fail;
55234 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55235 if (!SWIG_IsOK(res1)) {
55236 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_remove_ids" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
55237 }
55238 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55239 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
55240 if (!SWIG_IsOK(res2)) {
55241 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinary_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
55242 }
55243 if (!argp2) {
55244 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexBinary_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
55245 }
55246 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
55247 {
55248 Py_BEGIN_ALLOW_THREADS
55249 try {
55250 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
55251 } catch(faiss::FaissException & e) {
55252 PyEval_RestoreThread(_save);
55253 PyErr_SetString(PyExc_RuntimeError, e.what());
55254 SWIG_fail;
55255 }
55256 Py_END_ALLOW_THREADS
55257 }
55258 resultobj = SWIG_From_long(static_cast< long >(result));
55259 return resultobj;
55260 fail:
55261 return NULL;
55262 }
55263
55264
55265 SWIGINTERN PyObject *_wrap_IndexBinary_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55266 PyObject *resultobj = 0;
55267 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55268 faiss::IndexBinary::idx_t arg2 ;
55269 uint8_t *arg3 = (uint8_t *) 0 ;
55270 void *argp1 = 0 ;
55271 int res1 = 0 ;
55272 long val2 ;
55273 int ecode2 = 0 ;
55274 void *argp3 = 0 ;
55275 int res3 = 0 ;
55276 PyObject * obj0 = 0 ;
55277 PyObject * obj1 = 0 ;
55278 PyObject * obj2 = 0 ;
55279
55280 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinary_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
55281 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55282 if (!SWIG_IsOK(res1)) {
55283 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
55284 }
55285 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55286 ecode2 = SWIG_AsVal_long(obj1, &val2);
55287 if (!SWIG_IsOK(ecode2)) {
55288 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55289 }
55290 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55291 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
55292 if (!SWIG_IsOK(res3)) {
55293 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
55294 }
55295 arg3 = reinterpret_cast< uint8_t * >(argp3);
55296 {
55297 Py_BEGIN_ALLOW_THREADS
55298 try {
55299 ((faiss::IndexBinary const *)arg1)->reconstruct(arg2,arg3);
55300 } catch(faiss::FaissException & e) {
55301 PyEval_RestoreThread(_save);
55302 PyErr_SetString(PyExc_RuntimeError, e.what());
55303 SWIG_fail;
55304 }
55305 Py_END_ALLOW_THREADS
55306 }
55307 resultobj = SWIG_Py_Void();
55308 return resultobj;
55309 fail:
55310 return NULL;
55311 }
55312
55313
55314 SWIGINTERN PyObject *_wrap_IndexBinary_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55315 PyObject *resultobj = 0;
55316 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55317 faiss::IndexBinary::idx_t arg2 ;
55318 faiss::IndexBinary::idx_t arg3 ;
55319 uint8_t *arg4 = (uint8_t *) 0 ;
55320 void *argp1 = 0 ;
55321 int res1 = 0 ;
55322 long val2 ;
55323 int ecode2 = 0 ;
55324 long val3 ;
55325 int ecode3 = 0 ;
55326 void *argp4 = 0 ;
55327 int res4 = 0 ;
55328 PyObject * obj0 = 0 ;
55329 PyObject * obj1 = 0 ;
55330 PyObject * obj2 = 0 ;
55331 PyObject * obj3 = 0 ;
55332
55333 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinary_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
55334 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55335 if (!SWIG_IsOK(res1)) {
55336 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
55337 }
55338 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55339 ecode2 = SWIG_AsVal_long(obj1, &val2);
55340 if (!SWIG_IsOK(ecode2)) {
55341 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_reconstruct_n" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55342 }
55343 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55344 ecode3 = SWIG_AsVal_long(obj2, &val3);
55345 if (!SWIG_IsOK(ecode3)) {
55346 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinary_reconstruct_n" "', argument " "3"" of type '" "faiss::IndexBinary::idx_t""'");
55347 }
55348 arg3 = static_cast< faiss::IndexBinary::idx_t >(val3);
55349 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
55350 if (!SWIG_IsOK(res4)) {
55351 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinary_reconstruct_n" "', argument " "4"" of type '" "uint8_t *""'");
55352 }
55353 arg4 = reinterpret_cast< uint8_t * >(argp4);
55354 {
55355 Py_BEGIN_ALLOW_THREADS
55356 try {
55357 ((faiss::IndexBinary const *)arg1)->reconstruct_n(arg2,arg3,arg4);
55358 } catch(faiss::FaissException & e) {
55359 PyEval_RestoreThread(_save);
55360 PyErr_SetString(PyExc_RuntimeError, e.what());
55361 SWIG_fail;
55362 }
55363 Py_END_ALLOW_THREADS
55364 }
55365 resultobj = SWIG_Py_Void();
55366 return resultobj;
55367 fail:
55368 return NULL;
55369 }
55370
55371
55372 SWIGINTERN PyObject *_wrap_IndexBinary_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55373 PyObject *resultobj = 0;
55374 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55375 faiss::IndexBinary::idx_t arg2 ;
55376 uint8_t *arg3 = (uint8_t *) 0 ;
55377 faiss::IndexBinary::idx_t arg4 ;
55378 int32_t *arg5 = (int32_t *) 0 ;
55379 faiss::IndexBinary::idx_t *arg6 = (faiss::IndexBinary::idx_t *) 0 ;
55380 uint8_t *arg7 = (uint8_t *) 0 ;
55381 void *argp1 = 0 ;
55382 int res1 = 0 ;
55383 long val2 ;
55384 int ecode2 = 0 ;
55385 void *argp3 = 0 ;
55386 int res3 = 0 ;
55387 long val4 ;
55388 int ecode4 = 0 ;
55389 void *argp5 = 0 ;
55390 int res5 = 0 ;
55391 void *argp6 = 0 ;
55392 int res6 = 0 ;
55393 void *argp7 = 0 ;
55394 int res7 = 0 ;
55395 PyObject * obj0 = 0 ;
55396 PyObject * obj1 = 0 ;
55397 PyObject * obj2 = 0 ;
55398 PyObject * obj3 = 0 ;
55399 PyObject * obj4 = 0 ;
55400 PyObject * obj5 = 0 ;
55401 PyObject * obj6 = 0 ;
55402
55403 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:IndexBinary_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
55404 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55405 if (!SWIG_IsOK(res1)) {
55406 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
55407 }
55408 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55409 ecode2 = SWIG_AsVal_long(obj1, &val2);
55410 if (!SWIG_IsOK(ecode2)) {
55411 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55412 }
55413 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55414 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
55415 if (!SWIG_IsOK(res3)) {
55416 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "3"" of type '" "uint8_t const *""'");
55417 }
55418 arg3 = reinterpret_cast< uint8_t * >(argp3);
55419 ecode4 = SWIG_AsVal_long(obj3, &val4);
55420 if (!SWIG_IsOK(ecode4)) {
55421 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
55422 }
55423 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
55424 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
55425 if (!SWIG_IsOK(res5)) {
55426 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "5"" of type '" "int32_t *""'");
55427 }
55428 arg5 = reinterpret_cast< int32_t * >(argp5);
55429 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
55430 if (!SWIG_IsOK(res6)) {
55431 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
55432 }
55433 arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
55434 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_unsigned_char, 0 | 0 );
55435 if (!SWIG_IsOK(res7)) {
55436 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexBinary_search_and_reconstruct" "', argument " "7"" of type '" "uint8_t *""'");
55437 }
55438 arg7 = reinterpret_cast< uint8_t * >(argp7);
55439 {
55440 Py_BEGIN_ALLOW_THREADS
55441 try {
55442 ((faiss::IndexBinary const *)arg1)->search_and_reconstruct(arg2,(uint8_t const *)arg3,arg4,arg5,arg6,arg7);
55443 } catch(faiss::FaissException & e) {
55444 PyEval_RestoreThread(_save);
55445 PyErr_SetString(PyExc_RuntimeError, e.what());
55446 SWIG_fail;
55447 }
55448 Py_END_ALLOW_THREADS
55449 }
55450 resultobj = SWIG_Py_Void();
55451 return resultobj;
55452 fail:
55453 return NULL;
55454 }
55455
55456
55457 SWIGINTERN PyObject *_wrap_IndexBinary_display(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55458 PyObject *resultobj = 0;
55459 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
55460 void *argp1 = 0 ;
55461 int res1 = 0 ;
55462 PyObject * obj0 = 0 ;
55463
55464 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinary_display",&obj0)) SWIG_fail;
55465 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
55466 if (!SWIG_IsOK(res1)) {
55467 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinary_display" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
55468 }
55469 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
55470 {
55471 Py_BEGIN_ALLOW_THREADS
55472 try {
55473 ((faiss::IndexBinary const *)arg1)->display();
55474 } catch(faiss::FaissException & e) {
55475 PyEval_RestoreThread(_save);
55476 PyErr_SetString(PyExc_RuntimeError, e.what());
55477 SWIG_fail;
55478 }
55479 Py_END_ALLOW_THREADS
55480 }
55481 resultobj = SWIG_Py_Void();
55482 return resultobj;
55483 fail:
55484 return NULL;
55485 }
55486
55487
55488 SWIGINTERN PyObject *IndexBinary_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55489 PyObject *obj;
55490 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
55491 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinary, SWIG_NewClientData(obj));
55492 return SWIG_Py_Void();
55493 }
55494
55495 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_xb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55496 PyObject *resultobj = 0;
55497 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55498 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
55499 void *argp1 = 0 ;
55500 int res1 = 0 ;
55501 void *argp2 = 0 ;
55502 int res2 = 0 ;
55503 PyObject * obj0 = 0 ;
55504 PyObject * obj1 = 0 ;
55505
55506 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFlat_xb_set",&obj0,&obj1)) SWIG_fail;
55507 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55508 if (!SWIG_IsOK(res1)) {
55509 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_xb_set" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55510 }
55511 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55512 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
55513 if (!SWIG_IsOK(res2)) {
55514 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryFlat_xb_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
55515 }
55516 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
55517 if (arg1) (arg1)->xb = *arg2;
55518 resultobj = SWIG_Py_Void();
55519 return resultobj;
55520 fail:
55521 return NULL;
55522 }
55523
55524
55525 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_xb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55526 PyObject *resultobj = 0;
55527 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55528 void *argp1 = 0 ;
55529 int res1 = 0 ;
55530 PyObject * obj0 = 0 ;
55531 std::vector< uint8_t > *result = 0 ;
55532
55533 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFlat_xb_get",&obj0)) SWIG_fail;
55534 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55535 if (!SWIG_IsOK(res1)) {
55536 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_xb_get" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55537 }
55538 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55539 result = (std::vector< uint8_t > *)& ((arg1)->xb);
55540 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
55541 return resultobj;
55542 fail:
55543 return NULL;
55544 }
55545
55546
55547 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_use_heap_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55548 PyObject *resultobj = 0;
55549 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55550 bool arg2 ;
55551 void *argp1 = 0 ;
55552 int res1 = 0 ;
55553 bool val2 ;
55554 int ecode2 = 0 ;
55555 PyObject * obj0 = 0 ;
55556 PyObject * obj1 = 0 ;
55557
55558 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFlat_use_heap_set",&obj0,&obj1)) SWIG_fail;
55559 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55560 if (!SWIG_IsOK(res1)) {
55561 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_use_heap_set" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55562 }
55563 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55564 ecode2 = SWIG_AsVal_bool(obj1, &val2);
55565 if (!SWIG_IsOK(ecode2)) {
55566 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_use_heap_set" "', argument " "2"" of type '" "bool""'");
55567 }
55568 arg2 = static_cast< bool >(val2);
55569 if (arg1) (arg1)->use_heap = arg2;
55570 resultobj = SWIG_Py_Void();
55571 return resultobj;
55572 fail:
55573 return NULL;
55574 }
55575
55576
55577 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_use_heap_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55578 PyObject *resultobj = 0;
55579 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55580 void *argp1 = 0 ;
55581 int res1 = 0 ;
55582 PyObject * obj0 = 0 ;
55583 bool result;
55584
55585 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFlat_use_heap_get",&obj0)) SWIG_fail;
55586 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55587 if (!SWIG_IsOK(res1)) {
55588 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_use_heap_get" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55589 }
55590 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55591 result = (bool) ((arg1)->use_heap);
55592 resultobj = SWIG_From_bool(static_cast< bool >(result));
55593 return resultobj;
55594 fail:
55595 return NULL;
55596 }
55597
55598
55599 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_query_batch_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55600 PyObject *resultobj = 0;
55601 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55602 size_t arg2 ;
55603 void *argp1 = 0 ;
55604 int res1 = 0 ;
55605 size_t val2 ;
55606 int ecode2 = 0 ;
55607 PyObject * obj0 = 0 ;
55608 PyObject * obj1 = 0 ;
55609
55610 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFlat_query_batch_size_set",&obj0,&obj1)) SWIG_fail;
55611 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55612 if (!SWIG_IsOK(res1)) {
55613 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_query_batch_size_set" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55614 }
55615 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55616 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
55617 if (!SWIG_IsOK(ecode2)) {
55618 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_query_batch_size_set" "', argument " "2"" of type '" "size_t""'");
55619 }
55620 arg2 = static_cast< size_t >(val2);
55621 if (arg1) (arg1)->query_batch_size = arg2;
55622 resultobj = SWIG_Py_Void();
55623 return resultobj;
55624 fail:
55625 return NULL;
55626 }
55627
55628
55629 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_query_batch_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55630 PyObject *resultobj = 0;
55631 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55632 void *argp1 = 0 ;
55633 int res1 = 0 ;
55634 PyObject * obj0 = 0 ;
55635 size_t result;
55636
55637 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFlat_query_batch_size_get",&obj0)) SWIG_fail;
55638 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55639 if (!SWIG_IsOK(res1)) {
55640 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_query_batch_size_get" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55641 }
55642 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55643 result = (size_t) ((arg1)->query_batch_size);
55644 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
55645 return resultobj;
55646 fail:
55647 return NULL;
55648 }
55649
55650
55651 SWIGINTERN PyObject *_wrap_new_IndexBinaryFlat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55652 PyObject *resultobj = 0;
55653 faiss::IndexBinary::idx_t arg1 ;
55654 long val1 ;
55655 int ecode1 = 0 ;
55656 PyObject * obj0 = 0 ;
55657 faiss::IndexBinaryFlat *result = 0 ;
55658
55659 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexBinaryFlat",&obj0)) SWIG_fail;
55660 ecode1 = SWIG_AsVal_long(obj0, &val1);
55661 if (!SWIG_IsOK(ecode1)) {
55662 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexBinaryFlat" "', argument " "1"" of type '" "faiss::IndexBinary::idx_t""'");
55663 }
55664 arg1 = static_cast< faiss::IndexBinary::idx_t >(val1);
55665 {
55666 Py_BEGIN_ALLOW_THREADS
55667 try {
55668 result = (faiss::IndexBinaryFlat *)new faiss::IndexBinaryFlat(arg1);
55669 } catch(faiss::FaissException & e) {
55670 PyEval_RestoreThread(_save);
55671 PyErr_SetString(PyExc_RuntimeError, e.what());
55672 SWIG_fail;
55673 }
55674 Py_END_ALLOW_THREADS
55675 }
55676 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryFlat, SWIG_POINTER_NEW | 0 );
55677 return resultobj;
55678 fail:
55679 return NULL;
55680 }
55681
55682
55683 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55684 PyObject *resultobj = 0;
55685 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55686 faiss::IndexBinary::idx_t arg2 ;
55687 uint8_t *arg3 = (uint8_t *) 0 ;
55688 void *argp1 = 0 ;
55689 int res1 = 0 ;
55690 long val2 ;
55691 int ecode2 = 0 ;
55692 void *argp3 = 0 ;
55693 int res3 = 0 ;
55694 PyObject * obj0 = 0 ;
55695 PyObject * obj1 = 0 ;
55696 PyObject * obj2 = 0 ;
55697
55698 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryFlat_add",&obj0,&obj1,&obj2)) SWIG_fail;
55699 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55700 if (!SWIG_IsOK(res1)) {
55701 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_add" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55702 }
55703 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55704 ecode2 = SWIG_AsVal_long(obj1, &val2);
55705 if (!SWIG_IsOK(ecode2)) {
55706 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55707 }
55708 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55709 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
55710 if (!SWIG_IsOK(res3)) {
55711 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFlat_add" "', argument " "3"" of type '" "uint8_t const *""'");
55712 }
55713 arg3 = reinterpret_cast< uint8_t * >(argp3);
55714 {
55715 Py_BEGIN_ALLOW_THREADS
55716 try {
55717 (arg1)->add(arg2,(uint8_t const *)arg3);
55718 } catch(faiss::FaissException & e) {
55719 PyEval_RestoreThread(_save);
55720 PyErr_SetString(PyExc_RuntimeError, e.what());
55721 SWIG_fail;
55722 }
55723 Py_END_ALLOW_THREADS
55724 }
55725 resultobj = SWIG_Py_Void();
55726 return resultobj;
55727 fail:
55728 return NULL;
55729 }
55730
55731
55732 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55733 PyObject *resultobj = 0;
55734 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55735 void *argp1 = 0 ;
55736 int res1 = 0 ;
55737 PyObject * obj0 = 0 ;
55738
55739 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFlat_reset",&obj0)) SWIG_fail;
55740 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55741 if (!SWIG_IsOK(res1)) {
55742 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_reset" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55743 }
55744 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55745 {
55746 Py_BEGIN_ALLOW_THREADS
55747 try {
55748 (arg1)->reset();
55749 } catch(faiss::FaissException & e) {
55750 PyEval_RestoreThread(_save);
55751 PyErr_SetString(PyExc_RuntimeError, e.what());
55752 SWIG_fail;
55753 }
55754 Py_END_ALLOW_THREADS
55755 }
55756 resultobj = SWIG_Py_Void();
55757 return resultobj;
55758 fail:
55759 return NULL;
55760 }
55761
55762
55763 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55764 PyObject *resultobj = 0;
55765 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55766 faiss::IndexBinary::idx_t arg2 ;
55767 uint8_t *arg3 = (uint8_t *) 0 ;
55768 faiss::IndexBinary::idx_t arg4 ;
55769 int32_t *arg5 = (int32_t *) 0 ;
55770 faiss::IndexBinary::idx_t *arg6 = (faiss::IndexBinary::idx_t *) 0 ;
55771 void *argp1 = 0 ;
55772 int res1 = 0 ;
55773 long val2 ;
55774 int ecode2 = 0 ;
55775 void *argp3 = 0 ;
55776 int res3 = 0 ;
55777 long val4 ;
55778 int ecode4 = 0 ;
55779 void *argp5 = 0 ;
55780 int res5 = 0 ;
55781 void *argp6 = 0 ;
55782 int res6 = 0 ;
55783 PyObject * obj0 = 0 ;
55784 PyObject * obj1 = 0 ;
55785 PyObject * obj2 = 0 ;
55786 PyObject * obj3 = 0 ;
55787 PyObject * obj4 = 0 ;
55788 PyObject * obj5 = 0 ;
55789
55790 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinaryFlat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
55791 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55792 if (!SWIG_IsOK(res1)) {
55793 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_search" "', argument " "1"" of type '" "faiss::IndexBinaryFlat const *""'");
55794 }
55795 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55796 ecode2 = SWIG_AsVal_long(obj1, &val2);
55797 if (!SWIG_IsOK(ecode2)) {
55798 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55799 }
55800 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55801 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
55802 if (!SWIG_IsOK(res3)) {
55803 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFlat_search" "', argument " "3"" of type '" "uint8_t const *""'");
55804 }
55805 arg3 = reinterpret_cast< uint8_t * >(argp3);
55806 ecode4 = SWIG_AsVal_long(obj3, &val4);
55807 if (!SWIG_IsOK(ecode4)) {
55808 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryFlat_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
55809 }
55810 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
55811 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
55812 if (!SWIG_IsOK(res5)) {
55813 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryFlat_search" "', argument " "5"" of type '" "int32_t *""'");
55814 }
55815 arg5 = reinterpret_cast< int32_t * >(argp5);
55816 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
55817 if (!SWIG_IsOK(res6)) {
55818 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryFlat_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
55819 }
55820 arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
55821 {
55822 Py_BEGIN_ALLOW_THREADS
55823 try {
55824 ((faiss::IndexBinaryFlat const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
55825 } catch(faiss::FaissException & e) {
55826 PyEval_RestoreThread(_save);
55827 PyErr_SetString(PyExc_RuntimeError, e.what());
55828 SWIG_fail;
55829 }
55830 Py_END_ALLOW_THREADS
55831 }
55832 resultobj = SWIG_Py_Void();
55833 return resultobj;
55834 fail:
55835 return NULL;
55836 }
55837
55838
55839 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55840 PyObject *resultobj = 0;
55841 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55842 faiss::IndexBinary::idx_t arg2 ;
55843 uint8_t *arg3 = (uint8_t *) 0 ;
55844 void *argp1 = 0 ;
55845 int res1 = 0 ;
55846 long val2 ;
55847 int ecode2 = 0 ;
55848 void *argp3 = 0 ;
55849 int res3 = 0 ;
55850 PyObject * obj0 = 0 ;
55851 PyObject * obj1 = 0 ;
55852 PyObject * obj2 = 0 ;
55853
55854 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryFlat_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
55855 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55856 if (!SWIG_IsOK(res1)) {
55857 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinaryFlat const *""'");
55858 }
55859 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55860 ecode2 = SWIG_AsVal_long(obj1, &val2);
55861 if (!SWIG_IsOK(ecode2)) {
55862 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFlat_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
55863 }
55864 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
55865 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
55866 if (!SWIG_IsOK(res3)) {
55867 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFlat_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
55868 }
55869 arg3 = reinterpret_cast< uint8_t * >(argp3);
55870 {
55871 Py_BEGIN_ALLOW_THREADS
55872 try {
55873 ((faiss::IndexBinaryFlat const *)arg1)->reconstruct(arg2,arg3);
55874 } catch(faiss::FaissException & e) {
55875 PyEval_RestoreThread(_save);
55876 PyErr_SetString(PyExc_RuntimeError, e.what());
55877 SWIG_fail;
55878 }
55879 Py_END_ALLOW_THREADS
55880 }
55881 resultobj = SWIG_Py_Void();
55882 return resultobj;
55883 fail:
55884 return NULL;
55885 }
55886
55887
55888 SWIGINTERN PyObject *_wrap_IndexBinaryFlat_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55889 PyObject *resultobj = 0;
55890 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55891 faiss::IDSelector *arg2 = 0 ;
55892 void *argp1 = 0 ;
55893 int res1 = 0 ;
55894 void *argp2 = 0 ;
55895 int res2 = 0 ;
55896 PyObject * obj0 = 0 ;
55897 PyObject * obj1 = 0 ;
55898 long result;
55899
55900 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFlat_remove_ids",&obj0,&obj1)) SWIG_fail;
55901 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, 0 | 0 );
55902 if (!SWIG_IsOK(res1)) {
55903 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFlat_remove_ids" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
55904 }
55905 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
55906 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
55907 if (!SWIG_IsOK(res2)) {
55908 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryFlat_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
55909 }
55910 if (!argp2) {
55911 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexBinaryFlat_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
55912 }
55913 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
55914 {
55915 Py_BEGIN_ALLOW_THREADS
55916 try {
55917 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
55918 } catch(faiss::FaissException & e) {
55919 PyEval_RestoreThread(_save);
55920 PyErr_SetString(PyExc_RuntimeError, e.what());
55921 SWIG_fail;
55922 }
55923 Py_END_ALLOW_THREADS
55924 }
55925 resultobj = SWIG_From_long(static_cast< long >(result));
55926 return resultobj;
55927 fail:
55928 return NULL;
55929 }
55930
55931
55932 SWIGINTERN PyObject *_wrap_new_IndexBinaryFlat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55933 PyObject *resultobj = 0;
55934 faiss::IndexBinaryFlat *result = 0 ;
55935
55936 if (!PyArg_ParseTuple(args,(char *)":new_IndexBinaryFlat")) SWIG_fail;
55937 {
55938 Py_BEGIN_ALLOW_THREADS
55939 try {
55940 result = (faiss::IndexBinaryFlat *)new faiss::IndexBinaryFlat();
55941 } catch(faiss::FaissException & e) {
55942 PyEval_RestoreThread(_save);
55943 PyErr_SetString(PyExc_RuntimeError, e.what());
55944 SWIG_fail;
55945 }
55946 Py_END_ALLOW_THREADS
55947 }
55948 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryFlat, SWIG_POINTER_NEW | 0 );
55949 return resultobj;
55950 fail:
55951 return NULL;
55952 }
55953
55954
55955 SWIGINTERN PyObject *_wrap_new_IndexBinaryFlat(PyObject *self, PyObject *args) {
55956 Py_ssize_t argc;
55957 PyObject *argv[2] = {
55958 0
55959 };
55960 Py_ssize_t ii;
55961
55962 if (!PyTuple_Check(args)) SWIG_fail;
55963 argc = args ? PyObject_Length(args) : 0;
55964 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
55965 argv[ii] = PyTuple_GET_ITEM(args,ii);
55966 }
55967 if (argc == 0) {
55968 return _wrap_new_IndexBinaryFlat__SWIG_1(self, args);
55969 }
55970 if (argc == 1) {
55971 int _v;
55972 {
55973 int res = SWIG_AsVal_long(argv[0], NULL);
55974 _v = SWIG_CheckState(res);
55975 }
55976 if (_v) {
55977 return _wrap_new_IndexBinaryFlat__SWIG_0(self, args);
55978 }
55979 }
55980
55981 fail:
55982 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexBinaryFlat'.\n"
55983 " Possible C/C++ prototypes are:\n"
55984 " faiss::IndexBinaryFlat::IndexBinaryFlat(faiss::IndexBinary::idx_t)\n"
55985 " faiss::IndexBinaryFlat::IndexBinaryFlat()\n");
55986 return 0;
55987 }
55988
55989
55990 SWIGINTERN PyObject *_wrap_delete_IndexBinaryFlat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
55991 PyObject *resultobj = 0;
55992 faiss::IndexBinaryFlat *arg1 = (faiss::IndexBinaryFlat *) 0 ;
55993 void *argp1 = 0 ;
55994 int res1 = 0 ;
55995 PyObject * obj0 = 0 ;
55996
55997 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinaryFlat",&obj0)) SWIG_fail;
55998 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFlat, SWIG_POINTER_DISOWN | 0 );
55999 if (!SWIG_IsOK(res1)) {
56000 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinaryFlat" "', argument " "1"" of type '" "faiss::IndexBinaryFlat *""'");
56001 }
56002 arg1 = reinterpret_cast< faiss::IndexBinaryFlat * >(argp1);
56003 delete arg1;
56004 resultobj = SWIG_Py_Void();
56005 return resultobj;
56006 fail:
56007 return NULL;
56008 }
56009
56010
56011 SWIGINTERN PyObject *IndexBinaryFlat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56012 PyObject *obj;
56013 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
56014 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinaryFlat, SWIG_NewClientData(obj));
56015 return SWIG_Py_Void();
56016 }
56017
56018 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_invlists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56019 PyObject *resultobj = 0;
56020 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56021 faiss::InvertedLists *arg2 = (faiss::InvertedLists *) 0 ;
56022 void *argp1 = 0 ;
56023 int res1 = 0 ;
56024 void *argp2 = 0 ;
56025 int res2 = 0 ;
56026 PyObject * obj0 = 0 ;
56027 PyObject * obj1 = 0 ;
56028
56029 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_invlists_set",&obj0,&obj1)) SWIG_fail;
56030 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56031 if (!SWIG_IsOK(res1)) {
56032 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_invlists_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56033 }
56034 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56035 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, SWIG_POINTER_DISOWN | 0 );
56036 if (!SWIG_IsOK(res2)) {
56037 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_invlists_set" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
56038 }
56039 arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
56040 if (arg1) (arg1)->invlists = arg2;
56041 resultobj = SWIG_Py_Void();
56042 return resultobj;
56043 fail:
56044 return NULL;
56045 }
56046
56047
56048 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_invlists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56049 PyObject *resultobj = 0;
56050 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56051 void *argp1 = 0 ;
56052 int res1 = 0 ;
56053 PyObject * obj0 = 0 ;
56054 faiss::InvertedLists *result = 0 ;
56055
56056 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_invlists_get",&obj0)) SWIG_fail;
56057 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56058 if (!SWIG_IsOK(res1)) {
56059 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_invlists_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56060 }
56061 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56062 result = (faiss::InvertedLists *) ((arg1)->invlists);
56063 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
56064 return resultobj;
56065 fail:
56066 return NULL;
56067 }
56068
56069
56070 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_own_invlists_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56071 PyObject *resultobj = 0;
56072 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56073 bool arg2 ;
56074 void *argp1 = 0 ;
56075 int res1 = 0 ;
56076 bool val2 ;
56077 int ecode2 = 0 ;
56078 PyObject * obj0 = 0 ;
56079 PyObject * obj1 = 0 ;
56080
56081 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_own_invlists_set",&obj0,&obj1)) SWIG_fail;
56082 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56083 if (!SWIG_IsOK(res1)) {
56084 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_own_invlists_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56085 }
56086 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56087 ecode2 = SWIG_AsVal_bool(obj1, &val2);
56088 if (!SWIG_IsOK(ecode2)) {
56089 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_own_invlists_set" "', argument " "2"" of type '" "bool""'");
56090 }
56091 arg2 = static_cast< bool >(val2);
56092 if (arg1) (arg1)->own_invlists = arg2;
56093 resultobj = SWIG_Py_Void();
56094 return resultobj;
56095 fail:
56096 return NULL;
56097 }
56098
56099
56100 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_own_invlists_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56101 PyObject *resultobj = 0;
56102 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56103 void *argp1 = 0 ;
56104 int res1 = 0 ;
56105 PyObject * obj0 = 0 ;
56106 bool result;
56107
56108 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_own_invlists_get",&obj0)) SWIG_fail;
56109 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56110 if (!SWIG_IsOK(res1)) {
56111 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_own_invlists_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56112 }
56113 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56114 result = (bool) ((arg1)->own_invlists);
56115 resultobj = SWIG_From_bool(static_cast< bool >(result));
56116 return resultobj;
56117 fail:
56118 return NULL;
56119 }
56120
56121
56122 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_nprobe_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56123 PyObject *resultobj = 0;
56124 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56125 size_t arg2 ;
56126 void *argp1 = 0 ;
56127 int res1 = 0 ;
56128 size_t val2 ;
56129 int ecode2 = 0 ;
56130 PyObject * obj0 = 0 ;
56131 PyObject * obj1 = 0 ;
56132
56133 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_nprobe_set",&obj0,&obj1)) SWIG_fail;
56134 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56135 if (!SWIG_IsOK(res1)) {
56136 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_nprobe_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56137 }
56138 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56139 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56140 if (!SWIG_IsOK(ecode2)) {
56141 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_nprobe_set" "', argument " "2"" of type '" "size_t""'");
56142 }
56143 arg2 = static_cast< size_t >(val2);
56144 if (arg1) (arg1)->nprobe = arg2;
56145 resultobj = SWIG_Py_Void();
56146 return resultobj;
56147 fail:
56148 return NULL;
56149 }
56150
56151
56152 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_nprobe_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56153 PyObject *resultobj = 0;
56154 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56155 void *argp1 = 0 ;
56156 int res1 = 0 ;
56157 PyObject * obj0 = 0 ;
56158 size_t result;
56159
56160 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_nprobe_get",&obj0)) SWIG_fail;
56161 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56162 if (!SWIG_IsOK(res1)) {
56163 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_nprobe_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56164 }
56165 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56166 result = (size_t) ((arg1)->nprobe);
56167 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
56168 return resultobj;
56169 fail:
56170 return NULL;
56171 }
56172
56173
56174 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_max_codes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56175 PyObject *resultobj = 0;
56176 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56177 size_t arg2 ;
56178 void *argp1 = 0 ;
56179 int res1 = 0 ;
56180 size_t val2 ;
56181 int ecode2 = 0 ;
56182 PyObject * obj0 = 0 ;
56183 PyObject * obj1 = 0 ;
56184
56185 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_max_codes_set",&obj0,&obj1)) SWIG_fail;
56186 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56187 if (!SWIG_IsOK(res1)) {
56188 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_max_codes_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56189 }
56190 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56191 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56192 if (!SWIG_IsOK(ecode2)) {
56193 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_max_codes_set" "', argument " "2"" of type '" "size_t""'");
56194 }
56195 arg2 = static_cast< size_t >(val2);
56196 if (arg1) (arg1)->max_codes = arg2;
56197 resultobj = SWIG_Py_Void();
56198 return resultobj;
56199 fail:
56200 return NULL;
56201 }
56202
56203
56204 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_max_codes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56205 PyObject *resultobj = 0;
56206 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56207 void *argp1 = 0 ;
56208 int res1 = 0 ;
56209 PyObject * obj0 = 0 ;
56210 size_t result;
56211
56212 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_max_codes_get",&obj0)) SWIG_fail;
56213 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56214 if (!SWIG_IsOK(res1)) {
56215 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_max_codes_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56216 }
56217 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56218 result = (size_t) ((arg1)->max_codes);
56219 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
56220 return resultobj;
56221 fail:
56222 return NULL;
56223 }
56224
56225
56226 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_use_heap_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56227 PyObject *resultobj = 0;
56228 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56229 bool arg2 ;
56230 void *argp1 = 0 ;
56231 int res1 = 0 ;
56232 bool val2 ;
56233 int ecode2 = 0 ;
56234 PyObject * obj0 = 0 ;
56235 PyObject * obj1 = 0 ;
56236
56237 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_use_heap_set",&obj0,&obj1)) SWIG_fail;
56238 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56239 if (!SWIG_IsOK(res1)) {
56240 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_use_heap_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56241 }
56242 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56243 ecode2 = SWIG_AsVal_bool(obj1, &val2);
56244 if (!SWIG_IsOK(ecode2)) {
56245 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_use_heap_set" "', argument " "2"" of type '" "bool""'");
56246 }
56247 arg2 = static_cast< bool >(val2);
56248 if (arg1) (arg1)->use_heap = arg2;
56249 resultobj = SWIG_Py_Void();
56250 return resultobj;
56251 fail:
56252 return NULL;
56253 }
56254
56255
56256 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_use_heap_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56257 PyObject *resultobj = 0;
56258 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56259 void *argp1 = 0 ;
56260 int res1 = 0 ;
56261 PyObject * obj0 = 0 ;
56262 bool result;
56263
56264 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_use_heap_get",&obj0)) SWIG_fail;
56265 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56266 if (!SWIG_IsOK(res1)) {
56267 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_use_heap_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56268 }
56269 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56270 result = (bool) ((arg1)->use_heap);
56271 resultobj = SWIG_From_bool(static_cast< bool >(result));
56272 return resultobj;
56273 fail:
56274 return NULL;
56275 }
56276
56277
56278 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_maintain_direct_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56279 PyObject *resultobj = 0;
56280 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56281 bool arg2 ;
56282 void *argp1 = 0 ;
56283 int res1 = 0 ;
56284 bool val2 ;
56285 int ecode2 = 0 ;
56286 PyObject * obj0 = 0 ;
56287 PyObject * obj1 = 0 ;
56288
56289 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_maintain_direct_map_set",&obj0,&obj1)) SWIG_fail;
56290 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56291 if (!SWIG_IsOK(res1)) {
56292 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_maintain_direct_map_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56293 }
56294 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56295 ecode2 = SWIG_AsVal_bool(obj1, &val2);
56296 if (!SWIG_IsOK(ecode2)) {
56297 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_maintain_direct_map_set" "', argument " "2"" of type '" "bool""'");
56298 }
56299 arg2 = static_cast< bool >(val2);
56300 if (arg1) (arg1)->maintain_direct_map = arg2;
56301 resultobj = SWIG_Py_Void();
56302 return resultobj;
56303 fail:
56304 return NULL;
56305 }
56306
56307
56308 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_maintain_direct_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56309 PyObject *resultobj = 0;
56310 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56311 void *argp1 = 0 ;
56312 int res1 = 0 ;
56313 PyObject * obj0 = 0 ;
56314 bool result;
56315
56316 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_maintain_direct_map_get",&obj0)) SWIG_fail;
56317 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56318 if (!SWIG_IsOK(res1)) {
56319 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_maintain_direct_map_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56320 }
56321 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56322 result = (bool) ((arg1)->maintain_direct_map);
56323 resultobj = SWIG_From_bool(static_cast< bool >(result));
56324 return resultobj;
56325 fail:
56326 return NULL;
56327 }
56328
56329
56330 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_direct_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56331 PyObject *resultobj = 0;
56332 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56333 std::vector< long > *arg2 = (std::vector< long > *) 0 ;
56334 void *argp1 = 0 ;
56335 int res1 = 0 ;
56336 void *argp2 = 0 ;
56337 int res2 = 0 ;
56338 PyObject * obj0 = 0 ;
56339 PyObject * obj1 = 0 ;
56340
56341 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_direct_map_set",&obj0,&obj1)) SWIG_fail;
56342 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56343 if (!SWIG_IsOK(res1)) {
56344 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_direct_map_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56345 }
56346 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56347 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
56348 if (!SWIG_IsOK(res2)) {
56349 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_direct_map_set" "', argument " "2"" of type '" "std::vector< long > *""'");
56350 }
56351 arg2 = reinterpret_cast< std::vector< long > * >(argp2);
56352 if (arg1) (arg1)->direct_map = *arg2;
56353 resultobj = SWIG_Py_Void();
56354 return resultobj;
56355 fail:
56356 return NULL;
56357 }
56358
56359
56360 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_direct_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56361 PyObject *resultobj = 0;
56362 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56363 void *argp1 = 0 ;
56364 int res1 = 0 ;
56365 PyObject * obj0 = 0 ;
56366 std::vector< long > *result = 0 ;
56367
56368 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_direct_map_get",&obj0)) SWIG_fail;
56369 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56370 if (!SWIG_IsOK(res1)) {
56371 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_direct_map_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56372 }
56373 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56374 result = (std::vector< long > *)& ((arg1)->direct_map);
56375 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
56376 return resultobj;
56377 fail:
56378 return NULL;
56379 }
56380
56381
56382 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_quantizer_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56383 PyObject *resultobj = 0;
56384 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56385 faiss::IndexBinary *arg2 = (faiss::IndexBinary *) 0 ;
56386 void *argp1 = 0 ;
56387 int res1 = 0 ;
56388 void *argp2 = 0 ;
56389 int res2 = 0 ;
56390 PyObject * obj0 = 0 ;
56391 PyObject * obj1 = 0 ;
56392
56393 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_quantizer_set",&obj0,&obj1)) SWIG_fail;
56394 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56395 if (!SWIG_IsOK(res1)) {
56396 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_quantizer_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56397 }
56398 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56399 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexBinary, SWIG_POINTER_DISOWN | 0 );
56400 if (!SWIG_IsOK(res2)) {
56401 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_quantizer_set" "', argument " "2"" of type '" "faiss::IndexBinary *""'");
56402 }
56403 arg2 = reinterpret_cast< faiss::IndexBinary * >(argp2);
56404 if (arg1) (arg1)->quantizer = arg2;
56405 resultobj = SWIG_Py_Void();
56406 return resultobj;
56407 fail:
56408 return NULL;
56409 }
56410
56411
56412 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_quantizer_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56413 PyObject *resultobj = 0;
56414 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56415 void *argp1 = 0 ;
56416 int res1 = 0 ;
56417 PyObject * obj0 = 0 ;
56418 faiss::IndexBinary *result = 0 ;
56419
56420 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_quantizer_get",&obj0)) SWIG_fail;
56421 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56422 if (!SWIG_IsOK(res1)) {
56423 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_quantizer_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56424 }
56425 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56426 result = (faiss::IndexBinary *) ((arg1)->quantizer);
56427 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56428 return resultobj;
56429 fail:
56430 return NULL;
56431 }
56432
56433
56434 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_nlist_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56435 PyObject *resultobj = 0;
56436 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56437 size_t arg2 ;
56438 void *argp1 = 0 ;
56439 int res1 = 0 ;
56440 size_t val2 ;
56441 int ecode2 = 0 ;
56442 PyObject * obj0 = 0 ;
56443 PyObject * obj1 = 0 ;
56444
56445 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_nlist_set",&obj0,&obj1)) SWIG_fail;
56446 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56447 if (!SWIG_IsOK(res1)) {
56448 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_nlist_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56449 }
56450 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56451 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56452 if (!SWIG_IsOK(ecode2)) {
56453 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_nlist_set" "', argument " "2"" of type '" "size_t""'");
56454 }
56455 arg2 = static_cast< size_t >(val2);
56456 if (arg1) (arg1)->nlist = arg2;
56457 resultobj = SWIG_Py_Void();
56458 return resultobj;
56459 fail:
56460 return NULL;
56461 }
56462
56463
56464 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_nlist_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56465 PyObject *resultobj = 0;
56466 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56467 void *argp1 = 0 ;
56468 int res1 = 0 ;
56469 PyObject * obj0 = 0 ;
56470 size_t result;
56471
56472 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_nlist_get",&obj0)) SWIG_fail;
56473 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56474 if (!SWIG_IsOK(res1)) {
56475 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_nlist_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56476 }
56477 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56478 result = (size_t) ((arg1)->nlist);
56479 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
56480 return resultobj;
56481 fail:
56482 return NULL;
56483 }
56484
56485
56486 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56487 PyObject *resultobj = 0;
56488 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56489 bool arg2 ;
56490 void *argp1 = 0 ;
56491 int res1 = 0 ;
56492 bool val2 ;
56493 int ecode2 = 0 ;
56494 PyObject * obj0 = 0 ;
56495 PyObject * obj1 = 0 ;
56496
56497 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_own_fields_set",&obj0,&obj1)) SWIG_fail;
56498 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56499 if (!SWIG_IsOK(res1)) {
56500 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_own_fields_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56501 }
56502 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56503 ecode2 = SWIG_AsVal_bool(obj1, &val2);
56504 if (!SWIG_IsOK(ecode2)) {
56505 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_own_fields_set" "', argument " "2"" of type '" "bool""'");
56506 }
56507 arg2 = static_cast< bool >(val2);
56508 if (arg1) (arg1)->own_fields = arg2;
56509 resultobj = SWIG_Py_Void();
56510 return resultobj;
56511 fail:
56512 return NULL;
56513 }
56514
56515
56516 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56517 PyObject *resultobj = 0;
56518 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56519 void *argp1 = 0 ;
56520 int res1 = 0 ;
56521 PyObject * obj0 = 0 ;
56522 bool result;
56523
56524 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_own_fields_get",&obj0)) SWIG_fail;
56525 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56526 if (!SWIG_IsOK(res1)) {
56527 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_own_fields_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56528 }
56529 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56530 result = (bool) ((arg1)->own_fields);
56531 resultobj = SWIG_From_bool(static_cast< bool >(result));
56532 return resultobj;
56533 fail:
56534 return NULL;
56535 }
56536
56537
56538 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_cp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56539 PyObject *resultobj = 0;
56540 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56541 faiss::ClusteringParameters *arg2 = (faiss::ClusteringParameters *) 0 ;
56542 void *argp1 = 0 ;
56543 int res1 = 0 ;
56544 void *argp2 = 0 ;
56545 int res2 = 0 ;
56546 PyObject * obj0 = 0 ;
56547 PyObject * obj1 = 0 ;
56548
56549 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_cp_set",&obj0,&obj1)) SWIG_fail;
56550 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56551 if (!SWIG_IsOK(res1)) {
56552 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_cp_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56553 }
56554 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56555 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
56556 if (!SWIG_IsOK(res2)) {
56557 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_cp_set" "', argument " "2"" of type '" "faiss::ClusteringParameters *""'");
56558 }
56559 arg2 = reinterpret_cast< faiss::ClusteringParameters * >(argp2);
56560 if (arg1) (arg1)->cp = *arg2;
56561 resultobj = SWIG_Py_Void();
56562 return resultobj;
56563 fail:
56564 return NULL;
56565 }
56566
56567
56568 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_cp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56569 PyObject *resultobj = 0;
56570 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56571 void *argp1 = 0 ;
56572 int res1 = 0 ;
56573 PyObject * obj0 = 0 ;
56574 faiss::ClusteringParameters *result = 0 ;
56575
56576 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_cp_get",&obj0)) SWIG_fail;
56577 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56578 if (!SWIG_IsOK(res1)) {
56579 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_cp_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56580 }
56581 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56582 result = (faiss::ClusteringParameters *)& ((arg1)->cp);
56583 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ClusteringParameters, 0 | 0 );
56584 return resultobj;
56585 fail:
56586 return NULL;
56587 }
56588
56589
56590 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_clustering_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56591 PyObject *resultobj = 0;
56592 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56593 faiss::Index *arg2 = (faiss::Index *) 0 ;
56594 void *argp1 = 0 ;
56595 int res1 = 0 ;
56596 void *argp2 = 0 ;
56597 int res2 = 0 ;
56598 PyObject * obj0 = 0 ;
56599 PyObject * obj1 = 0 ;
56600
56601 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_clustering_index_set",&obj0,&obj1)) SWIG_fail;
56602 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56603 if (!SWIG_IsOK(res1)) {
56604 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_clustering_index_set" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56605 }
56606 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56607 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
56608 if (!SWIG_IsOK(res2)) {
56609 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_clustering_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
56610 }
56611 arg2 = reinterpret_cast< faiss::Index * >(argp2);
56612 if (arg1) (arg1)->clustering_index = arg2;
56613 resultobj = SWIG_Py_Void();
56614 return resultobj;
56615 fail:
56616 return NULL;
56617 }
56618
56619
56620 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_clustering_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56621 PyObject *resultobj = 0;
56622 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56623 void *argp1 = 0 ;
56624 int res1 = 0 ;
56625 PyObject * obj0 = 0 ;
56626 faiss::Index *result = 0 ;
56627
56628 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_clustering_index_get",&obj0)) SWIG_fail;
56629 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56630 if (!SWIG_IsOK(res1)) {
56631 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_clustering_index_get" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56632 }
56633 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56634 result = (faiss::Index *) ((arg1)->clustering_index);
56635 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
56636 return resultobj;
56637 fail:
56638 return NULL;
56639 }
56640
56641
56642 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_train_q1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56643 PyObject *resultobj = 0;
56644 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56645 size_t arg2 ;
56646 uint8_t *arg3 = (uint8_t *) 0 ;
56647 bool arg4 ;
56648 void *argp1 = 0 ;
56649 int res1 = 0 ;
56650 size_t val2 ;
56651 int ecode2 = 0 ;
56652 void *argp3 = 0 ;
56653 int res3 = 0 ;
56654 bool val4 ;
56655 int ecode4 = 0 ;
56656 PyObject * obj0 = 0 ;
56657 PyObject * obj1 = 0 ;
56658 PyObject * obj2 = 0 ;
56659 PyObject * obj3 = 0 ;
56660
56661 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinaryIVF_train_q1",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
56662 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56663 if (!SWIG_IsOK(res1)) {
56664 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_train_q1" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56665 }
56666 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56667 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56668 if (!SWIG_IsOK(ecode2)) {
56669 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_train_q1" "', argument " "2"" of type '" "size_t""'");
56670 }
56671 arg2 = static_cast< size_t >(val2);
56672 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56673 if (!SWIG_IsOK(res3)) {
56674 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_train_q1" "', argument " "3"" of type '" "uint8_t const *""'");
56675 }
56676 arg3 = reinterpret_cast< uint8_t * >(argp3);
56677 ecode4 = SWIG_AsVal_bool(obj3, &val4);
56678 if (!SWIG_IsOK(ecode4)) {
56679 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_train_q1" "', argument " "4"" of type '" "bool""'");
56680 }
56681 arg4 = static_cast< bool >(val4);
56682 {
56683 Py_BEGIN_ALLOW_THREADS
56684 try {
56685 (arg1)->train_q1(arg2,(uint8_t const *)arg3,arg4);
56686 } catch(faiss::FaissException & e) {
56687 PyEval_RestoreThread(_save);
56688 PyErr_SetString(PyExc_RuntimeError, e.what());
56689 SWIG_fail;
56690 }
56691 Py_END_ALLOW_THREADS
56692 }
56693 resultobj = SWIG_Py_Void();
56694 return resultobj;
56695 fail:
56696 return NULL;
56697 }
56698
56699
56700 SWIGINTERN PyObject *_wrap_new_IndexBinaryIVF__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56701 PyObject *resultobj = 0;
56702 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
56703 size_t arg2 ;
56704 size_t arg3 ;
56705 void *argp1 = 0 ;
56706 int res1 = 0 ;
56707 size_t val2 ;
56708 int ecode2 = 0 ;
56709 size_t val3 ;
56710 int ecode3 = 0 ;
56711 PyObject * obj0 = 0 ;
56712 PyObject * obj1 = 0 ;
56713 PyObject * obj2 = 0 ;
56714 faiss::IndexBinaryIVF *result = 0 ;
56715
56716 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexBinaryIVF",&obj0,&obj1,&obj2)) SWIG_fail;
56717 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
56718 if (!SWIG_IsOK(res1)) {
56719 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexBinaryIVF" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
56720 }
56721 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
56722 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
56723 if (!SWIG_IsOK(ecode2)) {
56724 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexBinaryIVF" "', argument " "2"" of type '" "size_t""'");
56725 }
56726 arg2 = static_cast< size_t >(val2);
56727 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
56728 if (!SWIG_IsOK(ecode3)) {
56729 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexBinaryIVF" "', argument " "3"" of type '" "size_t""'");
56730 }
56731 arg3 = static_cast< size_t >(val3);
56732 {
56733 Py_BEGIN_ALLOW_THREADS
56734 try {
56735 result = (faiss::IndexBinaryIVF *)new faiss::IndexBinaryIVF(arg1,arg2,arg3);
56736 } catch(faiss::FaissException & e) {
56737 PyEval_RestoreThread(_save);
56738 PyErr_SetString(PyExc_RuntimeError, e.what());
56739 SWIG_fail;
56740 }
56741 Py_END_ALLOW_THREADS
56742 }
56743 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryIVF, SWIG_POINTER_NEW | 0 );
56744 return resultobj;
56745 fail:
56746 return NULL;
56747 }
56748
56749
56750 SWIGINTERN PyObject *_wrap_new_IndexBinaryIVF__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56751 PyObject *resultobj = 0;
56752 faiss::IndexBinaryIVF *result = 0 ;
56753
56754 if (!PyArg_ParseTuple(args,(char *)":new_IndexBinaryIVF")) SWIG_fail;
56755 {
56756 Py_BEGIN_ALLOW_THREADS
56757 try {
56758 result = (faiss::IndexBinaryIVF *)new faiss::IndexBinaryIVF();
56759 } catch(faiss::FaissException & e) {
56760 PyEval_RestoreThread(_save);
56761 PyErr_SetString(PyExc_RuntimeError, e.what());
56762 SWIG_fail;
56763 }
56764 Py_END_ALLOW_THREADS
56765 }
56766 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryIVF, SWIG_POINTER_NEW | 0 );
56767 return resultobj;
56768 fail:
56769 return NULL;
56770 }
56771
56772
56773 SWIGINTERN PyObject *_wrap_new_IndexBinaryIVF(PyObject *self, PyObject *args) {
56774 Py_ssize_t argc;
56775 PyObject *argv[4] = {
56776 0
56777 };
56778 Py_ssize_t ii;
56779
56780 if (!PyTuple_Check(args)) SWIG_fail;
56781 argc = args ? PyObject_Length(args) : 0;
56782 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
56783 argv[ii] = PyTuple_GET_ITEM(args,ii);
56784 }
56785 if (argc == 0) {
56786 return _wrap_new_IndexBinaryIVF__SWIG_1(self, args);
56787 }
56788 if (argc == 3) {
56789 int _v;
56790 void *vptr = 0;
56791 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
56792 _v = SWIG_CheckState(res);
56793 if (_v) {
56794 {
56795 int res = SWIG_AsVal_size_t(argv[1], NULL);
56796 _v = SWIG_CheckState(res);
56797 }
56798 if (_v) {
56799 {
56800 int res = SWIG_AsVal_size_t(argv[2], NULL);
56801 _v = SWIG_CheckState(res);
56802 }
56803 if (_v) {
56804 return _wrap_new_IndexBinaryIVF__SWIG_0(self, args);
56805 }
56806 }
56807 }
56808 }
56809
56810 fail:
56811 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexBinaryIVF'.\n"
56812 " Possible C/C++ prototypes are:\n"
56813 " faiss::IndexBinaryIVF::IndexBinaryIVF(faiss::IndexBinary *,size_t,size_t)\n"
56814 " faiss::IndexBinaryIVF::IndexBinaryIVF()\n");
56815 return 0;
56816 }
56817
56818
56819 SWIGINTERN PyObject *_wrap_delete_IndexBinaryIVF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56820 PyObject *resultobj = 0;
56821 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56822 void *argp1 = 0 ;
56823 int res1 = 0 ;
56824 PyObject * obj0 = 0 ;
56825
56826 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinaryIVF",&obj0)) SWIG_fail;
56827 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, SWIG_POINTER_DISOWN | 0 );
56828 if (!SWIG_IsOK(res1)) {
56829 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinaryIVF" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56830 }
56831 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56832 {
56833 Py_BEGIN_ALLOW_THREADS
56834 try {
56835 delete arg1;
56836 } catch(faiss::FaissException & e) {
56837 PyEval_RestoreThread(_save);
56838 PyErr_SetString(PyExc_RuntimeError, e.what());
56839 SWIG_fail;
56840 }
56841 Py_END_ALLOW_THREADS
56842 }
56843 resultobj = SWIG_Py_Void();
56844 return resultobj;
56845 fail:
56846 return NULL;
56847 }
56848
56849
56850 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56851 PyObject *resultobj = 0;
56852 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56853 void *argp1 = 0 ;
56854 int res1 = 0 ;
56855 PyObject * obj0 = 0 ;
56856
56857 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_reset",&obj0)) SWIG_fail;
56858 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56859 if (!SWIG_IsOK(res1)) {
56860 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_reset" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56861 }
56862 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56863 {
56864 Py_BEGIN_ALLOW_THREADS
56865 try {
56866 (arg1)->reset();
56867 } catch(faiss::FaissException & e) {
56868 PyEval_RestoreThread(_save);
56869 PyErr_SetString(PyExc_RuntimeError, e.what());
56870 SWIG_fail;
56871 }
56872 Py_END_ALLOW_THREADS
56873 }
56874 resultobj = SWIG_Py_Void();
56875 return resultobj;
56876 fail:
56877 return NULL;
56878 }
56879
56880
56881 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56882 PyObject *resultobj = 0;
56883 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56884 faiss::IndexBinary::idx_t arg2 ;
56885 uint8_t *arg3 = (uint8_t *) 0 ;
56886 void *argp1 = 0 ;
56887 int res1 = 0 ;
56888 long val2 ;
56889 int ecode2 = 0 ;
56890 void *argp3 = 0 ;
56891 int res3 = 0 ;
56892 PyObject * obj0 = 0 ;
56893 PyObject * obj1 = 0 ;
56894 PyObject * obj2 = 0 ;
56895
56896 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_train",&obj0,&obj1,&obj2)) SWIG_fail;
56897 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56898 if (!SWIG_IsOK(res1)) {
56899 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_train" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56900 }
56901 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56902 ecode2 = SWIG_AsVal_long(obj1, &val2);
56903 if (!SWIG_IsOK(ecode2)) {
56904 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_train" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56905 }
56906 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56907 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56908 if (!SWIG_IsOK(res3)) {
56909 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_train" "', argument " "3"" of type '" "uint8_t const *""'");
56910 }
56911 arg3 = reinterpret_cast< uint8_t * >(argp3);
56912 {
56913 Py_BEGIN_ALLOW_THREADS
56914 try {
56915 (arg1)->train(arg2,(uint8_t const *)arg3);
56916 } catch(faiss::FaissException & e) {
56917 PyEval_RestoreThread(_save);
56918 PyErr_SetString(PyExc_RuntimeError, e.what());
56919 SWIG_fail;
56920 }
56921 Py_END_ALLOW_THREADS
56922 }
56923 resultobj = SWIG_Py_Void();
56924 return resultobj;
56925 fail:
56926 return NULL;
56927 }
56928
56929
56930 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56931 PyObject *resultobj = 0;
56932 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56933 faiss::IndexBinary::idx_t arg2 ;
56934 uint8_t *arg3 = (uint8_t *) 0 ;
56935 void *argp1 = 0 ;
56936 int res1 = 0 ;
56937 long val2 ;
56938 int ecode2 = 0 ;
56939 void *argp3 = 0 ;
56940 int res3 = 0 ;
56941 PyObject * obj0 = 0 ;
56942 PyObject * obj1 = 0 ;
56943 PyObject * obj2 = 0 ;
56944
56945 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_add",&obj0,&obj1,&obj2)) SWIG_fail;
56946 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
56947 if (!SWIG_IsOK(res1)) {
56948 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_add" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
56949 }
56950 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
56951 ecode2 = SWIG_AsVal_long(obj1, &val2);
56952 if (!SWIG_IsOK(ecode2)) {
56953 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
56954 }
56955 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
56956 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
56957 if (!SWIG_IsOK(res3)) {
56958 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_add" "', argument " "3"" of type '" "uint8_t const *""'");
56959 }
56960 arg3 = reinterpret_cast< uint8_t * >(argp3);
56961 {
56962 Py_BEGIN_ALLOW_THREADS
56963 try {
56964 (arg1)->add(arg2,(uint8_t const *)arg3);
56965 } catch(faiss::FaissException & e) {
56966 PyEval_RestoreThread(_save);
56967 PyErr_SetString(PyExc_RuntimeError, e.what());
56968 SWIG_fail;
56969 }
56970 Py_END_ALLOW_THREADS
56971 }
56972 resultobj = SWIG_Py_Void();
56973 return resultobj;
56974 fail:
56975 return NULL;
56976 }
56977
56978
56979 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
56980 PyObject *resultobj = 0;
56981 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
56982 faiss::IndexBinary::idx_t arg2 ;
56983 uint8_t *arg3 = (uint8_t *) 0 ;
56984 long *arg4 = (long *) 0 ;
56985 void *argp1 = 0 ;
56986 int res1 = 0 ;
56987 long val2 ;
56988 int ecode2 = 0 ;
56989 void *argp3 = 0 ;
56990 int res3 = 0 ;
56991 void *argp4 = 0 ;
56992 int res4 = 0 ;
56993 PyObject * obj0 = 0 ;
56994 PyObject * obj1 = 0 ;
56995 PyObject * obj2 = 0 ;
56996 PyObject * obj3 = 0 ;
56997
56998 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinaryIVF_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
56999 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57000 if (!SWIG_IsOK(res1)) {
57001 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_add_with_ids" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57002 }
57003 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57004 ecode2 = SWIG_AsVal_long(obj1, &val2);
57005 if (!SWIG_IsOK(ecode2)) {
57006 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_add_with_ids" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57007 }
57008 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57009 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57010 if (!SWIG_IsOK(res3)) {
57011 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_add_with_ids" "', argument " "3"" of type '" "uint8_t const *""'");
57012 }
57013 arg3 = reinterpret_cast< uint8_t * >(argp3);
57014 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
57015 if (!SWIG_IsOK(res4)) {
57016 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinaryIVF_add_with_ids" "', argument " "4"" of type '" "long const *""'");
57017 }
57018 arg4 = reinterpret_cast< long * >(argp4);
57019 {
57020 Py_BEGIN_ALLOW_THREADS
57021 try {
57022 (arg1)->add_with_ids(arg2,(uint8_t const *)arg3,(long const *)arg4);
57023 } catch(faiss::FaissException & e) {
57024 PyEval_RestoreThread(_save);
57025 PyErr_SetString(PyExc_RuntimeError, e.what());
57026 SWIG_fail;
57027 }
57028 Py_END_ALLOW_THREADS
57029 }
57030 resultobj = SWIG_Py_Void();
57031 return resultobj;
57032 fail:
57033 return NULL;
57034 }
57035
57036
57037 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_add_core(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57038 PyObject *resultobj = 0;
57039 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57040 faiss::IndexBinary::idx_t arg2 ;
57041 uint8_t *arg3 = (uint8_t *) 0 ;
57042 long *arg4 = (long *) 0 ;
57043 long *arg5 = (long *) 0 ;
57044 void *argp1 = 0 ;
57045 int res1 = 0 ;
57046 long val2 ;
57047 int ecode2 = 0 ;
57048 void *argp3 = 0 ;
57049 int res3 = 0 ;
57050 void *argp4 = 0 ;
57051 int res4 = 0 ;
57052 void *argp5 = 0 ;
57053 int res5 = 0 ;
57054 PyObject * obj0 = 0 ;
57055 PyObject * obj1 = 0 ;
57056 PyObject * obj2 = 0 ;
57057 PyObject * obj3 = 0 ;
57058 PyObject * obj4 = 0 ;
57059
57060 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexBinaryIVF_add_core",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
57061 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57062 if (!SWIG_IsOK(res1)) {
57063 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_add_core" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57064 }
57065 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57066 ecode2 = SWIG_AsVal_long(obj1, &val2);
57067 if (!SWIG_IsOK(ecode2)) {
57068 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_add_core" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57069 }
57070 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57071 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57072 if (!SWIG_IsOK(res3)) {
57073 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_add_core" "', argument " "3"" of type '" "uint8_t const *""'");
57074 }
57075 arg3 = reinterpret_cast< uint8_t * >(argp3);
57076 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
57077 if (!SWIG_IsOK(res4)) {
57078 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinaryIVF_add_core" "', argument " "4"" of type '" "long const *""'");
57079 }
57080 arg4 = reinterpret_cast< long * >(argp4);
57081 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
57082 if (!SWIG_IsOK(res5)) {
57083 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_add_core" "', argument " "5"" of type '" "long const *""'");
57084 }
57085 arg5 = reinterpret_cast< long * >(argp5);
57086 {
57087 Py_BEGIN_ALLOW_THREADS
57088 try {
57089 (arg1)->add_core(arg2,(uint8_t const *)arg3,(long const *)arg4,(long const *)arg5);
57090 } catch(faiss::FaissException & e) {
57091 PyEval_RestoreThread(_save);
57092 PyErr_SetString(PyExc_RuntimeError, e.what());
57093 SWIG_fail;
57094 }
57095 Py_END_ALLOW_THREADS
57096 }
57097 resultobj = SWIG_Py_Void();
57098 return resultobj;
57099 fail:
57100 return NULL;
57101 }
57102
57103
57104 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search_preassigned__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57105 PyObject *resultobj = 0;
57106 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57107 faiss::IndexBinary::idx_t arg2 ;
57108 uint8_t *arg3 = (uint8_t *) 0 ;
57109 faiss::IndexBinary::idx_t arg4 ;
57110 faiss::IndexBinary::idx_t *arg5 = (faiss::IndexBinary::idx_t *) 0 ;
57111 int32_t *arg6 = (int32_t *) 0 ;
57112 int32_t *arg7 = (int32_t *) 0 ;
57113 faiss::IndexBinary::idx_t *arg8 = (faiss::IndexBinary::idx_t *) 0 ;
57114 bool arg9 ;
57115 faiss::IVFSearchParameters *arg10 = (faiss::IVFSearchParameters *) 0 ;
57116 void *argp1 = 0 ;
57117 int res1 = 0 ;
57118 long val2 ;
57119 int ecode2 = 0 ;
57120 void *argp3 = 0 ;
57121 int res3 = 0 ;
57122 long val4 ;
57123 int ecode4 = 0 ;
57124 void *argp5 = 0 ;
57125 int res5 = 0 ;
57126 void *argp6 = 0 ;
57127 int res6 = 0 ;
57128 void *argp7 = 0 ;
57129 int res7 = 0 ;
57130 void *argp8 = 0 ;
57131 int res8 = 0 ;
57132 bool val9 ;
57133 int ecode9 = 0 ;
57134 void *argp10 = 0 ;
57135 int res10 = 0 ;
57136 PyObject * obj0 = 0 ;
57137 PyObject * obj1 = 0 ;
57138 PyObject * obj2 = 0 ;
57139 PyObject * obj3 = 0 ;
57140 PyObject * obj4 = 0 ;
57141 PyObject * obj5 = 0 ;
57142 PyObject * obj6 = 0 ;
57143 PyObject * obj7 = 0 ;
57144 PyObject * obj8 = 0 ;
57145 PyObject * obj9 = 0 ;
57146
57147 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOOO:IndexBinaryIVF_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8,&obj9)) SWIG_fail;
57148 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57149 if (!SWIG_IsOK(res1)) {
57150 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57151 }
57152 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57153 ecode2 = SWIG_AsVal_long(obj1, &val2);
57154 if (!SWIG_IsOK(ecode2)) {
57155 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57156 }
57157 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57158 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57159 if (!SWIG_IsOK(res3)) {
57160 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "3"" of type '" "uint8_t const *""'");
57161 }
57162 arg3 = reinterpret_cast< uint8_t * >(argp3);
57163 ecode4 = SWIG_AsVal_long(obj3, &val4);
57164 if (!SWIG_IsOK(ecode4)) {
57165 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
57166 }
57167 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
57168 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
57169 if (!SWIG_IsOK(res5)) {
57170 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "5"" of type '" "faiss::IndexBinary::idx_t const *""'");
57171 }
57172 arg5 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp5);
57173 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 | 0 );
57174 if (!SWIG_IsOK(res6)) {
57175 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "6"" of type '" "int32_t const *""'");
57176 }
57177 arg6 = reinterpret_cast< int32_t * >(argp6);
57178 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 | 0 );
57179 if (!SWIG_IsOK(res7)) {
57180 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "7"" of type '" "int32_t *""'");
57181 }
57182 arg7 = reinterpret_cast< int32_t * >(argp7);
57183 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
57184 if (!SWIG_IsOK(res8)) {
57185 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "8"" of type '" "faiss::IndexBinary::idx_t *""'");
57186 }
57187 arg8 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp8);
57188 ecode9 = SWIG_AsVal_bool(obj8, &val9);
57189 if (!SWIG_IsOK(ecode9)) {
57190 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "9"" of type '" "bool""'");
57191 }
57192 arg9 = static_cast< bool >(val9);
57193 res10 = SWIG_ConvertPtr(obj9, &argp10,SWIGTYPE_p_faiss__IVFSearchParameters, 0 | 0 );
57194 if (!SWIG_IsOK(res10)) {
57195 SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "10"" of type '" "faiss::IVFSearchParameters const *""'");
57196 }
57197 arg10 = reinterpret_cast< faiss::IVFSearchParameters * >(argp10);
57198 {
57199 Py_BEGIN_ALLOW_THREADS
57200 try {
57201 ((faiss::IndexBinaryIVF const *)arg1)->search_preassigned(arg2,(uint8_t const *)arg3,arg4,(faiss::IndexBinary::idx_t const *)arg5,(int32_t const *)arg6,arg7,arg8,arg9,(faiss::IVFSearchParameters const *)arg10);
57202 } catch(faiss::FaissException & e) {
57203 PyEval_RestoreThread(_save);
57204 PyErr_SetString(PyExc_RuntimeError, e.what());
57205 SWIG_fail;
57206 }
57207 Py_END_ALLOW_THREADS
57208 }
57209 resultobj = SWIG_Py_Void();
57210 return resultobj;
57211 fail:
57212 return NULL;
57213 }
57214
57215
57216 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search_preassigned__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57217 PyObject *resultobj = 0;
57218 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57219 faiss::IndexBinary::idx_t arg2 ;
57220 uint8_t *arg3 = (uint8_t *) 0 ;
57221 faiss::IndexBinary::idx_t arg4 ;
57222 faiss::IndexBinary::idx_t *arg5 = (faiss::IndexBinary::idx_t *) 0 ;
57223 int32_t *arg6 = (int32_t *) 0 ;
57224 int32_t *arg7 = (int32_t *) 0 ;
57225 faiss::IndexBinary::idx_t *arg8 = (faiss::IndexBinary::idx_t *) 0 ;
57226 bool arg9 ;
57227 void *argp1 = 0 ;
57228 int res1 = 0 ;
57229 long val2 ;
57230 int ecode2 = 0 ;
57231 void *argp3 = 0 ;
57232 int res3 = 0 ;
57233 long val4 ;
57234 int ecode4 = 0 ;
57235 void *argp5 = 0 ;
57236 int res5 = 0 ;
57237 void *argp6 = 0 ;
57238 int res6 = 0 ;
57239 void *argp7 = 0 ;
57240 int res7 = 0 ;
57241 void *argp8 = 0 ;
57242 int res8 = 0 ;
57243 bool val9 ;
57244 int ecode9 = 0 ;
57245 PyObject * obj0 = 0 ;
57246 PyObject * obj1 = 0 ;
57247 PyObject * obj2 = 0 ;
57248 PyObject * obj3 = 0 ;
57249 PyObject * obj4 = 0 ;
57250 PyObject * obj5 = 0 ;
57251 PyObject * obj6 = 0 ;
57252 PyObject * obj7 = 0 ;
57253 PyObject * obj8 = 0 ;
57254
57255 if (!PyArg_ParseTuple(args,(char *)"OOOOOOOOO:IndexBinaryIVF_search_preassigned",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6,&obj7,&obj8)) SWIG_fail;
57256 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57257 if (!SWIG_IsOK(res1)) {
57258 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57259 }
57260 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57261 ecode2 = SWIG_AsVal_long(obj1, &val2);
57262 if (!SWIG_IsOK(ecode2)) {
57263 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57264 }
57265 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57266 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57267 if (!SWIG_IsOK(res3)) {
57268 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "3"" of type '" "uint8_t const *""'");
57269 }
57270 arg3 = reinterpret_cast< uint8_t * >(argp3);
57271 ecode4 = SWIG_AsVal_long(obj3, &val4);
57272 if (!SWIG_IsOK(ecode4)) {
57273 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
57274 }
57275 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
57276 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_long, 0 | 0 );
57277 if (!SWIG_IsOK(res5)) {
57278 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "5"" of type '" "faiss::IndexBinary::idx_t const *""'");
57279 }
57280 arg5 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp5);
57281 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_int, 0 | 0 );
57282 if (!SWIG_IsOK(res6)) {
57283 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "6"" of type '" "int32_t const *""'");
57284 }
57285 arg6 = reinterpret_cast< int32_t * >(argp6);
57286 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_int, 0 | 0 );
57287 if (!SWIG_IsOK(res7)) {
57288 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "7"" of type '" "int32_t *""'");
57289 }
57290 arg7 = reinterpret_cast< int32_t * >(argp7);
57291 res8 = SWIG_ConvertPtr(obj7, &argp8,SWIGTYPE_p_long, 0 | 0 );
57292 if (!SWIG_IsOK(res8)) {
57293 SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "8"" of type '" "faiss::IndexBinary::idx_t *""'");
57294 }
57295 arg8 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp8);
57296 ecode9 = SWIG_AsVal_bool(obj8, &val9);
57297 if (!SWIG_IsOK(ecode9)) {
57298 SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "IndexBinaryIVF_search_preassigned" "', argument " "9"" of type '" "bool""'");
57299 }
57300 arg9 = static_cast< bool >(val9);
57301 {
57302 Py_BEGIN_ALLOW_THREADS
57303 try {
57304 ((faiss::IndexBinaryIVF const *)arg1)->search_preassigned(arg2,(uint8_t const *)arg3,arg4,(faiss::IndexBinary::idx_t const *)arg5,(int32_t const *)arg6,arg7,arg8,arg9);
57305 } catch(faiss::FaissException & e) {
57306 PyEval_RestoreThread(_save);
57307 PyErr_SetString(PyExc_RuntimeError, e.what());
57308 SWIG_fail;
57309 }
57310 Py_END_ALLOW_THREADS
57311 }
57312 resultobj = SWIG_Py_Void();
57313 return resultobj;
57314 fail:
57315 return NULL;
57316 }
57317
57318
57319 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search_preassigned(PyObject *self, PyObject *args) {
57320 Py_ssize_t argc;
57321 PyObject *argv[11] = {
57322 0
57323 };
57324 Py_ssize_t ii;
57325
57326 if (!PyTuple_Check(args)) SWIG_fail;
57327 argc = args ? PyObject_Length(args) : 0;
57328 for (ii = 0; (ii < 10) && (ii < argc); ii++) {
57329 argv[ii] = PyTuple_GET_ITEM(args,ii);
57330 }
57331 if (argc == 9) {
57332 int _v;
57333 void *vptr = 0;
57334 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
57335 _v = SWIG_CheckState(res);
57336 if (_v) {
57337 {
57338 int res = SWIG_AsVal_long(argv[1], NULL);
57339 _v = SWIG_CheckState(res);
57340 }
57341 if (_v) {
57342 void *vptr = 0;
57343 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
57344 _v = SWIG_CheckState(res);
57345 if (_v) {
57346 {
57347 int res = SWIG_AsVal_long(argv[3], NULL);
57348 _v = SWIG_CheckState(res);
57349 }
57350 if (_v) {
57351 void *vptr = 0;
57352 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
57353 _v = SWIG_CheckState(res);
57354 if (_v) {
57355 void *vptr = 0;
57356 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_int, 0);
57357 _v = SWIG_CheckState(res);
57358 if (_v) {
57359 void *vptr = 0;
57360 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_int, 0);
57361 _v = SWIG_CheckState(res);
57362 if (_v) {
57363 void *vptr = 0;
57364 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
57365 _v = SWIG_CheckState(res);
57366 if (_v) {
57367 {
57368 int res = SWIG_AsVal_bool(argv[8], NULL);
57369 _v = SWIG_CheckState(res);
57370 }
57371 if (_v) {
57372 return _wrap_IndexBinaryIVF_search_preassigned__SWIG_1(self, args);
57373 }
57374 }
57375 }
57376 }
57377 }
57378 }
57379 }
57380 }
57381 }
57382 }
57383 if (argc == 10) {
57384 int _v;
57385 void *vptr = 0;
57386 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
57387 _v = SWIG_CheckState(res);
57388 if (_v) {
57389 {
57390 int res = SWIG_AsVal_long(argv[1], NULL);
57391 _v = SWIG_CheckState(res);
57392 }
57393 if (_v) {
57394 void *vptr = 0;
57395 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_unsigned_char, 0);
57396 _v = SWIG_CheckState(res);
57397 if (_v) {
57398 {
57399 int res = SWIG_AsVal_long(argv[3], NULL);
57400 _v = SWIG_CheckState(res);
57401 }
57402 if (_v) {
57403 void *vptr = 0;
57404 int res = SWIG_ConvertPtr(argv[4], &vptr, SWIGTYPE_p_long, 0);
57405 _v = SWIG_CheckState(res);
57406 if (_v) {
57407 void *vptr = 0;
57408 int res = SWIG_ConvertPtr(argv[5], &vptr, SWIGTYPE_p_int, 0);
57409 _v = SWIG_CheckState(res);
57410 if (_v) {
57411 void *vptr = 0;
57412 int res = SWIG_ConvertPtr(argv[6], &vptr, SWIGTYPE_p_int, 0);
57413 _v = SWIG_CheckState(res);
57414 if (_v) {
57415 void *vptr = 0;
57416 int res = SWIG_ConvertPtr(argv[7], &vptr, SWIGTYPE_p_long, 0);
57417 _v = SWIG_CheckState(res);
57418 if (_v) {
57419 {
57420 int res = SWIG_AsVal_bool(argv[8], NULL);
57421 _v = SWIG_CheckState(res);
57422 }
57423 if (_v) {
57424 void *vptr = 0;
57425 int res = SWIG_ConvertPtr(argv[9], &vptr, SWIGTYPE_p_faiss__IVFSearchParameters, 0);
57426 _v = SWIG_CheckState(res);
57427 if (_v) {
57428 return _wrap_IndexBinaryIVF_search_preassigned__SWIG_0(self, args);
57429 }
57430 }
57431 }
57432 }
57433 }
57434 }
57435 }
57436 }
57437 }
57438 }
57439 }
57440
57441 fail:
57442 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinaryIVF_search_preassigned'.\n"
57443 " Possible C/C++ prototypes are:\n"
57444 " faiss::IndexBinaryIVF::search_preassigned(faiss::IndexBinary::idx_t,uint8_t const *,faiss::IndexBinary::idx_t,faiss::IndexBinary::idx_t const *,int32_t const *,int32_t *,faiss::IndexBinary::idx_t *,bool,faiss::IVFSearchParameters const *) const\n"
57445 " faiss::IndexBinaryIVF::search_preassigned(faiss::IndexBinary::idx_t,uint8_t const *,faiss::IndexBinary::idx_t,faiss::IndexBinary::idx_t const *,int32_t const *,int32_t *,faiss::IndexBinary::idx_t *,bool) const\n");
57446 return 0;
57447 }
57448
57449
57450 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_get_InvertedListScanner__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57451 PyObject *resultobj = 0;
57452 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57453 bool arg2 ;
57454 void *argp1 = 0 ;
57455 int res1 = 0 ;
57456 bool val2 ;
57457 int ecode2 = 0 ;
57458 PyObject * obj0 = 0 ;
57459 PyObject * obj1 = 0 ;
57460 faiss::BinaryInvertedListScanner *result = 0 ;
57461
57462 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_get_InvertedListScanner",&obj0,&obj1)) SWIG_fail;
57463 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57464 if (!SWIG_IsOK(res1)) {
57465 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57466 }
57467 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57468 ecode2 = SWIG_AsVal_bool(obj1, &val2);
57469 if (!SWIG_IsOK(ecode2)) {
57470 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_get_InvertedListScanner" "', argument " "2"" of type '" "bool""'");
57471 }
57472 arg2 = static_cast< bool >(val2);
57473 {
57474 Py_BEGIN_ALLOW_THREADS
57475 try {
57476 result = (faiss::BinaryInvertedListScanner *)((faiss::IndexBinaryIVF const *)arg1)->get_InvertedListScanner(arg2);
57477 } catch(faiss::FaissException & e) {
57478 PyEval_RestoreThread(_save);
57479 PyErr_SetString(PyExc_RuntimeError, e.what());
57480 SWIG_fail;
57481 }
57482 Py_END_ALLOW_THREADS
57483 }
57484 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__BinaryInvertedListScanner, 0 | 0 );
57485 return resultobj;
57486 fail:
57487 return NULL;
57488 }
57489
57490
57491 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_get_InvertedListScanner__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57492 PyObject *resultobj = 0;
57493 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57494 void *argp1 = 0 ;
57495 int res1 = 0 ;
57496 PyObject * obj0 = 0 ;
57497 faiss::BinaryInvertedListScanner *result = 0 ;
57498
57499 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_get_InvertedListScanner",&obj0)) SWIG_fail;
57500 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57501 if (!SWIG_IsOK(res1)) {
57502 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_get_InvertedListScanner" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57503 }
57504 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57505 {
57506 Py_BEGIN_ALLOW_THREADS
57507 try {
57508 result = (faiss::BinaryInvertedListScanner *)((faiss::IndexBinaryIVF const *)arg1)->get_InvertedListScanner();
57509 } catch(faiss::FaissException & e) {
57510 PyEval_RestoreThread(_save);
57511 PyErr_SetString(PyExc_RuntimeError, e.what());
57512 SWIG_fail;
57513 }
57514 Py_END_ALLOW_THREADS
57515 }
57516 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__BinaryInvertedListScanner, 0 | 0 );
57517 return resultobj;
57518 fail:
57519 return NULL;
57520 }
57521
57522
57523 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_get_InvertedListScanner(PyObject *self, PyObject *args) {
57524 Py_ssize_t argc;
57525 PyObject *argv[3] = {
57526 0
57527 };
57528 Py_ssize_t ii;
57529
57530 if (!PyTuple_Check(args)) SWIG_fail;
57531 argc = args ? PyObject_Length(args) : 0;
57532 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
57533 argv[ii] = PyTuple_GET_ITEM(args,ii);
57534 }
57535 if (argc == 1) {
57536 int _v;
57537 void *vptr = 0;
57538 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
57539 _v = SWIG_CheckState(res);
57540 if (_v) {
57541 return _wrap_IndexBinaryIVF_get_InvertedListScanner__SWIG_1(self, args);
57542 }
57543 }
57544 if (argc == 2) {
57545 int _v;
57546 void *vptr = 0;
57547 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
57548 _v = SWIG_CheckState(res);
57549 if (_v) {
57550 {
57551 int res = SWIG_AsVal_bool(argv[1], NULL);
57552 _v = SWIG_CheckState(res);
57553 }
57554 if (_v) {
57555 return _wrap_IndexBinaryIVF_get_InvertedListScanner__SWIG_0(self, args);
57556 }
57557 }
57558 }
57559
57560 fail:
57561 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinaryIVF_get_InvertedListScanner'.\n"
57562 " Possible C/C++ prototypes are:\n"
57563 " faiss::IndexBinaryIVF::get_InvertedListScanner(bool) const\n"
57564 " faiss::IndexBinaryIVF::get_InvertedListScanner() const\n");
57565 return 0;
57566 }
57567
57568
57569 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57570 PyObject *resultobj = 0;
57571 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57572 faiss::IndexBinary::idx_t arg2 ;
57573 uint8_t *arg3 = (uint8_t *) 0 ;
57574 faiss::IndexBinary::idx_t arg4 ;
57575 int32_t *arg5 = (int32_t *) 0 ;
57576 faiss::IndexBinary::idx_t *arg6 = (faiss::IndexBinary::idx_t *) 0 ;
57577 void *argp1 = 0 ;
57578 int res1 = 0 ;
57579 long val2 ;
57580 int ecode2 = 0 ;
57581 void *argp3 = 0 ;
57582 int res3 = 0 ;
57583 long val4 ;
57584 int ecode4 = 0 ;
57585 void *argp5 = 0 ;
57586 int res5 = 0 ;
57587 void *argp6 = 0 ;
57588 int res6 = 0 ;
57589 PyObject * obj0 = 0 ;
57590 PyObject * obj1 = 0 ;
57591 PyObject * obj2 = 0 ;
57592 PyObject * obj3 = 0 ;
57593 PyObject * obj4 = 0 ;
57594 PyObject * obj5 = 0 ;
57595
57596 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinaryIVF_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
57597 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57598 if (!SWIG_IsOK(res1)) {
57599 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_search" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57600 }
57601 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57602 ecode2 = SWIG_AsVal_long(obj1, &val2);
57603 if (!SWIG_IsOK(ecode2)) {
57604 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57605 }
57606 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57607 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57608 if (!SWIG_IsOK(res3)) {
57609 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_search" "', argument " "3"" of type '" "uint8_t const *""'");
57610 }
57611 arg3 = reinterpret_cast< uint8_t * >(argp3);
57612 ecode4 = SWIG_AsVal_long(obj3, &val4);
57613 if (!SWIG_IsOK(ecode4)) {
57614 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
57615 }
57616 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
57617 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
57618 if (!SWIG_IsOK(res5)) {
57619 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_search" "', argument " "5"" of type '" "int32_t *""'");
57620 }
57621 arg5 = reinterpret_cast< int32_t * >(argp5);
57622 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
57623 if (!SWIG_IsOK(res6)) {
57624 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryIVF_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
57625 }
57626 arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
57627 {
57628 Py_BEGIN_ALLOW_THREADS
57629 try {
57630 ((faiss::IndexBinaryIVF const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
57631 } catch(faiss::FaissException & e) {
57632 PyEval_RestoreThread(_save);
57633 PyErr_SetString(PyExc_RuntimeError, e.what());
57634 SWIG_fail;
57635 }
57636 Py_END_ALLOW_THREADS
57637 }
57638 resultobj = SWIG_Py_Void();
57639 return resultobj;
57640 fail:
57641 return NULL;
57642 }
57643
57644
57645 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57646 PyObject *resultobj = 0;
57647 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57648 faiss::IndexBinary::idx_t arg2 ;
57649 uint8_t *arg3 = (uint8_t *) 0 ;
57650 void *argp1 = 0 ;
57651 int res1 = 0 ;
57652 long val2 ;
57653 int ecode2 = 0 ;
57654 void *argp3 = 0 ;
57655 int res3 = 0 ;
57656 PyObject * obj0 = 0 ;
57657 PyObject * obj1 = 0 ;
57658 PyObject * obj2 = 0 ;
57659
57660 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
57661 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57662 if (!SWIG_IsOK(res1)) {
57663 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57664 }
57665 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57666 ecode2 = SWIG_AsVal_long(obj1, &val2);
57667 if (!SWIG_IsOK(ecode2)) {
57668 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57669 }
57670 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57671 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57672 if (!SWIG_IsOK(res3)) {
57673 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
57674 }
57675 arg3 = reinterpret_cast< uint8_t * >(argp3);
57676 {
57677 Py_BEGIN_ALLOW_THREADS
57678 try {
57679 ((faiss::IndexBinaryIVF const *)arg1)->reconstruct(arg2,arg3);
57680 } catch(faiss::FaissException & e) {
57681 PyEval_RestoreThread(_save);
57682 PyErr_SetString(PyExc_RuntimeError, e.what());
57683 SWIG_fail;
57684 }
57685 Py_END_ALLOW_THREADS
57686 }
57687 resultobj = SWIG_Py_Void();
57688 return resultobj;
57689 fail:
57690 return NULL;
57691 }
57692
57693
57694 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_reconstruct_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57695 PyObject *resultobj = 0;
57696 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57697 faiss::IndexBinary::idx_t arg2 ;
57698 faiss::IndexBinary::idx_t arg3 ;
57699 uint8_t *arg4 = (uint8_t *) 0 ;
57700 void *argp1 = 0 ;
57701 int res1 = 0 ;
57702 long val2 ;
57703 int ecode2 = 0 ;
57704 long val3 ;
57705 int ecode3 = 0 ;
57706 void *argp4 = 0 ;
57707 int res4 = 0 ;
57708 PyObject * obj0 = 0 ;
57709 PyObject * obj1 = 0 ;
57710 PyObject * obj2 = 0 ;
57711 PyObject * obj3 = 0 ;
57712
57713 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinaryIVF_reconstruct_n",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
57714 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57715 if (!SWIG_IsOK(res1)) {
57716 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_reconstruct_n" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57717 }
57718 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57719 ecode2 = SWIG_AsVal_long(obj1, &val2);
57720 if (!SWIG_IsOK(ecode2)) {
57721 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_reconstruct_n" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57722 }
57723 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57724 ecode3 = SWIG_AsVal_long(obj2, &val3);
57725 if (!SWIG_IsOK(ecode3)) {
57726 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinaryIVF_reconstruct_n" "', argument " "3"" of type '" "faiss::IndexBinary::idx_t""'");
57727 }
57728 arg3 = static_cast< faiss::IndexBinary::idx_t >(val3);
57729 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
57730 if (!SWIG_IsOK(res4)) {
57731 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinaryIVF_reconstruct_n" "', argument " "4"" of type '" "uint8_t *""'");
57732 }
57733 arg4 = reinterpret_cast< uint8_t * >(argp4);
57734 {
57735 Py_BEGIN_ALLOW_THREADS
57736 try {
57737 ((faiss::IndexBinaryIVF const *)arg1)->reconstruct_n(arg2,arg3,arg4);
57738 } catch(faiss::FaissException & e) {
57739 PyEval_RestoreThread(_save);
57740 PyErr_SetString(PyExc_RuntimeError, e.what());
57741 SWIG_fail;
57742 }
57743 Py_END_ALLOW_THREADS
57744 }
57745 resultobj = SWIG_Py_Void();
57746 return resultobj;
57747 fail:
57748 return NULL;
57749 }
57750
57751
57752 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_search_and_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57753 PyObject *resultobj = 0;
57754 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57755 faiss::IndexBinary::idx_t arg2 ;
57756 uint8_t *arg3 = (uint8_t *) 0 ;
57757 faiss::IndexBinary::idx_t arg4 ;
57758 int32_t *arg5 = (int32_t *) 0 ;
57759 faiss::IndexBinary::idx_t *arg6 = (faiss::IndexBinary::idx_t *) 0 ;
57760 uint8_t *arg7 = (uint8_t *) 0 ;
57761 void *argp1 = 0 ;
57762 int res1 = 0 ;
57763 long val2 ;
57764 int ecode2 = 0 ;
57765 void *argp3 = 0 ;
57766 int res3 = 0 ;
57767 long val4 ;
57768 int ecode4 = 0 ;
57769 void *argp5 = 0 ;
57770 int res5 = 0 ;
57771 void *argp6 = 0 ;
57772 int res6 = 0 ;
57773 void *argp7 = 0 ;
57774 int res7 = 0 ;
57775 PyObject * obj0 = 0 ;
57776 PyObject * obj1 = 0 ;
57777 PyObject * obj2 = 0 ;
57778 PyObject * obj3 = 0 ;
57779 PyObject * obj4 = 0 ;
57780 PyObject * obj5 = 0 ;
57781 PyObject * obj6 = 0 ;
57782
57783 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:IndexBinaryIVF_search_and_reconstruct",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
57784 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57785 if (!SWIG_IsOK(res1)) {
57786 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57787 }
57788 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57789 ecode2 = SWIG_AsVal_long(obj1, &val2);
57790 if (!SWIG_IsOK(ecode2)) {
57791 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
57792 }
57793 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
57794 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
57795 if (!SWIG_IsOK(res3)) {
57796 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "3"" of type '" "uint8_t const *""'");
57797 }
57798 arg3 = reinterpret_cast< uint8_t * >(argp3);
57799 ecode4 = SWIG_AsVal_long(obj3, &val4);
57800 if (!SWIG_IsOK(ecode4)) {
57801 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
57802 }
57803 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
57804 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
57805 if (!SWIG_IsOK(res5)) {
57806 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "5"" of type '" "int32_t *""'");
57807 }
57808 arg5 = reinterpret_cast< int32_t * >(argp5);
57809 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
57810 if (!SWIG_IsOK(res6)) {
57811 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
57812 }
57813 arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
57814 res7 = SWIG_ConvertPtr(obj6, &argp7,SWIGTYPE_p_unsigned_char, 0 | 0 );
57815 if (!SWIG_IsOK(res7)) {
57816 SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "IndexBinaryIVF_search_and_reconstruct" "', argument " "7"" of type '" "uint8_t *""'");
57817 }
57818 arg7 = reinterpret_cast< uint8_t * >(argp7);
57819 {
57820 Py_BEGIN_ALLOW_THREADS
57821 try {
57822 ((faiss::IndexBinaryIVF const *)arg1)->search_and_reconstruct(arg2,(uint8_t const *)arg3,arg4,arg5,arg6,arg7);
57823 } catch(faiss::FaissException & e) {
57824 PyEval_RestoreThread(_save);
57825 PyErr_SetString(PyExc_RuntimeError, e.what());
57826 SWIG_fail;
57827 }
57828 Py_END_ALLOW_THREADS
57829 }
57830 resultobj = SWIG_Py_Void();
57831 return resultobj;
57832 fail:
57833 return NULL;
57834 }
57835
57836
57837 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_reconstruct_from_offset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57838 PyObject *resultobj = 0;
57839 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57840 long arg2 ;
57841 long arg3 ;
57842 uint8_t *arg4 = (uint8_t *) 0 ;
57843 void *argp1 = 0 ;
57844 int res1 = 0 ;
57845 long val2 ;
57846 int ecode2 = 0 ;
57847 long val3 ;
57848 int ecode3 = 0 ;
57849 void *argp4 = 0 ;
57850 int res4 = 0 ;
57851 PyObject * obj0 = 0 ;
57852 PyObject * obj1 = 0 ;
57853 PyObject * obj2 = 0 ;
57854 PyObject * obj3 = 0 ;
57855
57856 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexBinaryIVF_reconstruct_from_offset",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
57857 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57858 if (!SWIG_IsOK(res1)) {
57859 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_reconstruct_from_offset" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
57860 }
57861 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57862 ecode2 = SWIG_AsVal_long(obj1, &val2);
57863 if (!SWIG_IsOK(ecode2)) {
57864 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_reconstruct_from_offset" "', argument " "2"" of type '" "long""'");
57865 }
57866 arg2 = static_cast< long >(val2);
57867 ecode3 = SWIG_AsVal_long(obj2, &val3);
57868 if (!SWIG_IsOK(ecode3)) {
57869 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinaryIVF_reconstruct_from_offset" "', argument " "3"" of type '" "long""'");
57870 }
57871 arg3 = static_cast< long >(val3);
57872 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_unsigned_char, 0 | 0 );
57873 if (!SWIG_IsOK(res4)) {
57874 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexBinaryIVF_reconstruct_from_offset" "', argument " "4"" of type '" "uint8_t *""'");
57875 }
57876 arg4 = reinterpret_cast< uint8_t * >(argp4);
57877 {
57878 Py_BEGIN_ALLOW_THREADS
57879 try {
57880 ((faiss::IndexBinaryIVF const *)arg1)->reconstruct_from_offset(arg2,arg3,arg4);
57881 } catch(faiss::FaissException & e) {
57882 PyEval_RestoreThread(_save);
57883 PyErr_SetString(PyExc_RuntimeError, e.what());
57884 SWIG_fail;
57885 }
57886 Py_END_ALLOW_THREADS
57887 }
57888 resultobj = SWIG_Py_Void();
57889 return resultobj;
57890 fail:
57891 return NULL;
57892 }
57893
57894
57895 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57896 PyObject *resultobj = 0;
57897 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57898 faiss::IDSelector *arg2 = 0 ;
57899 void *argp1 = 0 ;
57900 int res1 = 0 ;
57901 void *argp2 = 0 ;
57902 int res2 = 0 ;
57903 PyObject * obj0 = 0 ;
57904 PyObject * obj1 = 0 ;
57905 long result;
57906
57907 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_remove_ids",&obj0,&obj1)) SWIG_fail;
57908 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57909 if (!SWIG_IsOK(res1)) {
57910 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_remove_ids" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57911 }
57912 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57913 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
57914 if (!SWIG_IsOK(res2)) {
57915 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
57916 }
57917 if (!argp2) {
57918 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexBinaryIVF_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
57919 }
57920 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
57921 {
57922 Py_BEGIN_ALLOW_THREADS
57923 try {
57924 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
57925 } catch(faiss::FaissException & e) {
57926 PyEval_RestoreThread(_save);
57927 PyErr_SetString(PyExc_RuntimeError, e.what());
57928 SWIG_fail;
57929 }
57930 Py_END_ALLOW_THREADS
57931 }
57932 resultobj = SWIG_From_long(static_cast< long >(result));
57933 return resultobj;
57934 fail:
57935 return NULL;
57936 }
57937
57938
57939 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_merge_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57940 PyObject *resultobj = 0;
57941 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57942 faiss::IndexBinaryIVF *arg2 = 0 ;
57943 faiss::IndexBinary::idx_t arg3 ;
57944 void *argp1 = 0 ;
57945 int res1 = 0 ;
57946 void *argp2 = 0 ;
57947 int res2 = 0 ;
57948 long val3 ;
57949 int ecode3 = 0 ;
57950 PyObject * obj0 = 0 ;
57951 PyObject * obj1 = 0 ;
57952 PyObject * obj2 = 0 ;
57953
57954 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_merge_from",&obj0,&obj1,&obj2)) SWIG_fail;
57955 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
57956 if (!SWIG_IsOK(res1)) {
57957 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_merge_from" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
57958 }
57959 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
57960 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IndexBinaryIVF, 0 );
57961 if (!SWIG_IsOK(res2)) {
57962 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_merge_from" "', argument " "2"" of type '" "faiss::IndexBinaryIVF &""'");
57963 }
57964 if (!argp2) {
57965 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexBinaryIVF_merge_from" "', argument " "2"" of type '" "faiss::IndexBinaryIVF &""'");
57966 }
57967 arg2 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp2);
57968 ecode3 = SWIG_AsVal_long(obj2, &val3);
57969 if (!SWIG_IsOK(ecode3)) {
57970 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinaryIVF_merge_from" "', argument " "3"" of type '" "faiss::IndexBinary::idx_t""'");
57971 }
57972 arg3 = static_cast< faiss::IndexBinary::idx_t >(val3);
57973 {
57974 Py_BEGIN_ALLOW_THREADS
57975 try {
57976 (arg1)->merge_from(*arg2,arg3);
57977 } catch(faiss::FaissException & e) {
57978 PyEval_RestoreThread(_save);
57979 PyErr_SetString(PyExc_RuntimeError, e.what());
57980 SWIG_fail;
57981 }
57982 Py_END_ALLOW_THREADS
57983 }
57984 resultobj = SWIG_Py_Void();
57985 return resultobj;
57986 fail:
57987 return NULL;
57988 }
57989
57990
57991 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_get_list_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
57992 PyObject *resultobj = 0;
57993 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
57994 size_t arg2 ;
57995 void *argp1 = 0 ;
57996 int res1 = 0 ;
57997 size_t val2 ;
57998 int ecode2 = 0 ;
57999 PyObject * obj0 = 0 ;
58000 PyObject * obj1 = 0 ;
58001 size_t result;
58002
58003 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_get_list_size",&obj0,&obj1)) SWIG_fail;
58004 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58005 if (!SWIG_IsOK(res1)) {
58006 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_get_list_size" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58007 }
58008 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58009 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
58010 if (!SWIG_IsOK(ecode2)) {
58011 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_get_list_size" "', argument " "2"" of type '" "size_t""'");
58012 }
58013 arg2 = static_cast< size_t >(val2);
58014 {
58015 Py_BEGIN_ALLOW_THREADS
58016 try {
58017 result = (size_t)((faiss::IndexBinaryIVF const *)arg1)->get_list_size(arg2);
58018 } catch(faiss::FaissException & e) {
58019 PyEval_RestoreThread(_save);
58020 PyErr_SetString(PyExc_RuntimeError, e.what());
58021 SWIG_fail;
58022 }
58023 Py_END_ALLOW_THREADS
58024 }
58025 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
58026 return resultobj;
58027 fail:
58028 return NULL;
58029 }
58030
58031
58032 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_make_direct_map__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58033 PyObject *resultobj = 0;
58034 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
58035 bool arg2 ;
58036 void *argp1 = 0 ;
58037 int res1 = 0 ;
58038 bool val2 ;
58039 int ecode2 = 0 ;
58040 PyObject * obj0 = 0 ;
58041 PyObject * obj1 = 0 ;
58042
58043 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_make_direct_map",&obj0,&obj1)) SWIG_fail;
58044 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58045 if (!SWIG_IsOK(res1)) {
58046 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_make_direct_map" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58047 }
58048 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58049 ecode2 = SWIG_AsVal_bool(obj1, &val2);
58050 if (!SWIG_IsOK(ecode2)) {
58051 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryIVF_make_direct_map" "', argument " "2"" of type '" "bool""'");
58052 }
58053 arg2 = static_cast< bool >(val2);
58054 {
58055 Py_BEGIN_ALLOW_THREADS
58056 try {
58057 (arg1)->make_direct_map(arg2);
58058 } catch(faiss::FaissException & e) {
58059 PyEval_RestoreThread(_save);
58060 PyErr_SetString(PyExc_RuntimeError, e.what());
58061 SWIG_fail;
58062 }
58063 Py_END_ALLOW_THREADS
58064 }
58065 resultobj = SWIG_Py_Void();
58066 return resultobj;
58067 fail:
58068 return NULL;
58069 }
58070
58071
58072 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_make_direct_map__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58073 PyObject *resultobj = 0;
58074 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
58075 void *argp1 = 0 ;
58076 int res1 = 0 ;
58077 PyObject * obj0 = 0 ;
58078
58079 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_make_direct_map",&obj0)) SWIG_fail;
58080 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58081 if (!SWIG_IsOK(res1)) {
58082 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_make_direct_map" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58083 }
58084 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58085 {
58086 Py_BEGIN_ALLOW_THREADS
58087 try {
58088 (arg1)->make_direct_map();
58089 } catch(faiss::FaissException & e) {
58090 PyEval_RestoreThread(_save);
58091 PyErr_SetString(PyExc_RuntimeError, e.what());
58092 SWIG_fail;
58093 }
58094 Py_END_ALLOW_THREADS
58095 }
58096 resultobj = SWIG_Py_Void();
58097 return resultobj;
58098 fail:
58099 return NULL;
58100 }
58101
58102
58103 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_make_direct_map(PyObject *self, PyObject *args) {
58104 Py_ssize_t argc;
58105 PyObject *argv[3] = {
58106 0
58107 };
58108 Py_ssize_t ii;
58109
58110 if (!PyTuple_Check(args)) SWIG_fail;
58111 argc = args ? PyObject_Length(args) : 0;
58112 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
58113 argv[ii] = PyTuple_GET_ITEM(args,ii);
58114 }
58115 if (argc == 1) {
58116 int _v;
58117 void *vptr = 0;
58118 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
58119 _v = SWIG_CheckState(res);
58120 if (_v) {
58121 return _wrap_IndexBinaryIVF_make_direct_map__SWIG_1(self, args);
58122 }
58123 }
58124 if (argc == 2) {
58125 int _v;
58126 void *vptr = 0;
58127 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
58128 _v = SWIG_CheckState(res);
58129 if (_v) {
58130 {
58131 int res = SWIG_AsVal_bool(argv[1], NULL);
58132 _v = SWIG_CheckState(res);
58133 }
58134 if (_v) {
58135 return _wrap_IndexBinaryIVF_make_direct_map__SWIG_0(self, args);
58136 }
58137 }
58138 }
58139
58140 fail:
58141 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinaryIVF_make_direct_map'.\n"
58142 " Possible C/C++ prototypes are:\n"
58143 " faiss::IndexBinaryIVF::make_direct_map(bool)\n"
58144 " faiss::IndexBinaryIVF::make_direct_map()\n");
58145 return 0;
58146 }
58147
58148
58149 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_imbalance_factor(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58150 PyObject *resultobj = 0;
58151 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
58152 void *argp1 = 0 ;
58153 int res1 = 0 ;
58154 PyObject * obj0 = 0 ;
58155 double result;
58156
58157 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_imbalance_factor",&obj0)) SWIG_fail;
58158 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58159 if (!SWIG_IsOK(res1)) {
58160 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_imbalance_factor" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58161 }
58162 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58163 {
58164 Py_BEGIN_ALLOW_THREADS
58165 try {
58166 result = (double)((faiss::IndexBinaryIVF const *)arg1)->imbalance_factor();
58167 } catch(faiss::FaissException & e) {
58168 PyEval_RestoreThread(_save);
58169 PyErr_SetString(PyExc_RuntimeError, e.what());
58170 SWIG_fail;
58171 }
58172 Py_END_ALLOW_THREADS
58173 }
58174 resultobj = SWIG_From_double(static_cast< double >(result));
58175 return resultobj;
58176 fail:
58177 return NULL;
58178 }
58179
58180
58181 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_print_stats(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58182 PyObject *resultobj = 0;
58183 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
58184 void *argp1 = 0 ;
58185 int res1 = 0 ;
58186 PyObject * obj0 = 0 ;
58187
58188 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryIVF_print_stats",&obj0)) SWIG_fail;
58189 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58190 if (!SWIG_IsOK(res1)) {
58191 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_print_stats" "', argument " "1"" of type '" "faiss::IndexBinaryIVF const *""'");
58192 }
58193 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58194 {
58195 Py_BEGIN_ALLOW_THREADS
58196 try {
58197 ((faiss::IndexBinaryIVF const *)arg1)->print_stats();
58198 } catch(faiss::FaissException & e) {
58199 PyEval_RestoreThread(_save);
58200 PyErr_SetString(PyExc_RuntimeError, e.what());
58201 SWIG_fail;
58202 }
58203 Py_END_ALLOW_THREADS
58204 }
58205 resultobj = SWIG_Py_Void();
58206 return resultobj;
58207 fail:
58208 return NULL;
58209 }
58210
58211
58212 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_replace_invlists__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58213 PyObject *resultobj = 0;
58214 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
58215 faiss::InvertedLists *arg2 = (faiss::InvertedLists *) 0 ;
58216 bool arg3 ;
58217 void *argp1 = 0 ;
58218 int res1 = 0 ;
58219 void *argp2 = 0 ;
58220 int res2 = 0 ;
58221 bool val3 ;
58222 int ecode3 = 0 ;
58223 PyObject * obj0 = 0 ;
58224 PyObject * obj1 = 0 ;
58225 PyObject * obj2 = 0 ;
58226
58227 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryIVF_replace_invlists",&obj0,&obj1,&obj2)) SWIG_fail;
58228 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58229 if (!SWIG_IsOK(res1)) {
58230 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58231 }
58232 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58233 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
58234 if (!SWIG_IsOK(res2)) {
58235 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
58236 }
58237 arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
58238 ecode3 = SWIG_AsVal_bool(obj2, &val3);
58239 if (!SWIG_IsOK(ecode3)) {
58240 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "3"" of type '" "bool""'");
58241 }
58242 arg3 = static_cast< bool >(val3);
58243 {
58244 Py_BEGIN_ALLOW_THREADS
58245 try {
58246 (arg1)->replace_invlists(arg2,arg3);
58247 } catch(faiss::FaissException & e) {
58248 PyEval_RestoreThread(_save);
58249 PyErr_SetString(PyExc_RuntimeError, e.what());
58250 SWIG_fail;
58251 }
58252 Py_END_ALLOW_THREADS
58253 }
58254 resultobj = SWIG_Py_Void();
58255 return resultobj;
58256 fail:
58257 return NULL;
58258 }
58259
58260
58261 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_replace_invlists__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58262 PyObject *resultobj = 0;
58263 faiss::IndexBinaryIVF *arg1 = (faiss::IndexBinaryIVF *) 0 ;
58264 faiss::InvertedLists *arg2 = (faiss::InvertedLists *) 0 ;
58265 void *argp1 = 0 ;
58266 int res1 = 0 ;
58267 void *argp2 = 0 ;
58268 int res2 = 0 ;
58269 PyObject * obj0 = 0 ;
58270 PyObject * obj1 = 0 ;
58271
58272 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryIVF_replace_invlists",&obj0,&obj1)) SWIG_fail;
58273 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryIVF, 0 | 0 );
58274 if (!SWIG_IsOK(res1)) {
58275 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "1"" of type '" "faiss::IndexBinaryIVF *""'");
58276 }
58277 arg1 = reinterpret_cast< faiss::IndexBinaryIVF * >(argp1);
58278 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
58279 if (!SWIG_IsOK(res2)) {
58280 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryIVF_replace_invlists" "', argument " "2"" of type '" "faiss::InvertedLists *""'");
58281 }
58282 arg2 = reinterpret_cast< faiss::InvertedLists * >(argp2);
58283 {
58284 Py_BEGIN_ALLOW_THREADS
58285 try {
58286 (arg1)->replace_invlists(arg2);
58287 } catch(faiss::FaissException & e) {
58288 PyEval_RestoreThread(_save);
58289 PyErr_SetString(PyExc_RuntimeError, e.what());
58290 SWIG_fail;
58291 }
58292 Py_END_ALLOW_THREADS
58293 }
58294 resultobj = SWIG_Py_Void();
58295 return resultobj;
58296 fail:
58297 return NULL;
58298 }
58299
58300
58301 SWIGINTERN PyObject *_wrap_IndexBinaryIVF_replace_invlists(PyObject *self, PyObject *args) {
58302 Py_ssize_t argc;
58303 PyObject *argv[4] = {
58304 0
58305 };
58306 Py_ssize_t ii;
58307
58308 if (!PyTuple_Check(args)) SWIG_fail;
58309 argc = args ? PyObject_Length(args) : 0;
58310 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
58311 argv[ii] = PyTuple_GET_ITEM(args,ii);
58312 }
58313 if (argc == 2) {
58314 int _v;
58315 void *vptr = 0;
58316 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
58317 _v = SWIG_CheckState(res);
58318 if (_v) {
58319 void *vptr = 0;
58320 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__InvertedLists, 0);
58321 _v = SWIG_CheckState(res);
58322 if (_v) {
58323 return _wrap_IndexBinaryIVF_replace_invlists__SWIG_1(self, args);
58324 }
58325 }
58326 }
58327 if (argc == 3) {
58328 int _v;
58329 void *vptr = 0;
58330 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinaryIVF, 0);
58331 _v = SWIG_CheckState(res);
58332 if (_v) {
58333 void *vptr = 0;
58334 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__InvertedLists, 0);
58335 _v = SWIG_CheckState(res);
58336 if (_v) {
58337 {
58338 int res = SWIG_AsVal_bool(argv[2], NULL);
58339 _v = SWIG_CheckState(res);
58340 }
58341 if (_v) {
58342 return _wrap_IndexBinaryIVF_replace_invlists__SWIG_0(self, args);
58343 }
58344 }
58345 }
58346 }
58347
58348 fail:
58349 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'IndexBinaryIVF_replace_invlists'.\n"
58350 " Possible C/C++ prototypes are:\n"
58351 " faiss::IndexBinaryIVF::replace_invlists(faiss::InvertedLists *,bool)\n"
58352 " faiss::IndexBinaryIVF::replace_invlists(faiss::InvertedLists *)\n");
58353 return 0;
58354 }
58355
58356
58357 SWIGINTERN PyObject *IndexBinaryIVF_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58358 PyObject *obj;
58359 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
58360 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinaryIVF, SWIG_NewClientData(obj));
58361 return SWIG_Py_Void();
58362 }
58363
58364 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58365 PyObject *resultobj = 0;
58366 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58367 faiss::Index *arg2 = (faiss::Index *) 0 ;
58368 void *argp1 = 0 ;
58369 int res1 = 0 ;
58370 void *argp2 = 0 ;
58371 int res2 = 0 ;
58372 PyObject * obj0 = 0 ;
58373 PyObject * obj1 = 0 ;
58374
58375 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFromFloat_index_set",&obj0,&obj1)) SWIG_fail;
58376 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
58377 if (!SWIG_IsOK(res1)) {
58378 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_index_set" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
58379 }
58380 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58381 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
58382 if (!SWIG_IsOK(res2)) {
58383 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryFromFloat_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
58384 }
58385 arg2 = reinterpret_cast< faiss::Index * >(argp2);
58386 if (arg1) (arg1)->index = arg2;
58387 resultobj = SWIG_Py_Void();
58388 return resultobj;
58389 fail:
58390 return NULL;
58391 }
58392
58393
58394 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58395 PyObject *resultobj = 0;
58396 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58397 void *argp1 = 0 ;
58398 int res1 = 0 ;
58399 PyObject * obj0 = 0 ;
58400 faiss::Index *result = 0 ;
58401
58402 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFromFloat_index_get",&obj0)) SWIG_fail;
58403 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
58404 if (!SWIG_IsOK(res1)) {
58405 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_index_get" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
58406 }
58407 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58408 result = (faiss::Index *) ((arg1)->index);
58409 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
58410 return resultobj;
58411 fail:
58412 return NULL;
58413 }
58414
58415
58416 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58417 PyObject *resultobj = 0;
58418 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58419 bool arg2 ;
58420 void *argp1 = 0 ;
58421 int res1 = 0 ;
58422 bool val2 ;
58423 int ecode2 = 0 ;
58424 PyObject * obj0 = 0 ;
58425 PyObject * obj1 = 0 ;
58426
58427 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryFromFloat_own_fields_set",&obj0,&obj1)) SWIG_fail;
58428 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
58429 if (!SWIG_IsOK(res1)) {
58430 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_own_fields_set" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
58431 }
58432 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58433 ecode2 = SWIG_AsVal_bool(obj1, &val2);
58434 if (!SWIG_IsOK(ecode2)) {
58435 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFromFloat_own_fields_set" "', argument " "2"" of type '" "bool""'");
58436 }
58437 arg2 = static_cast< bool >(val2);
58438 if (arg1) (arg1)->own_fields = arg2;
58439 resultobj = SWIG_Py_Void();
58440 return resultobj;
58441 fail:
58442 return NULL;
58443 }
58444
58445
58446 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58447 PyObject *resultobj = 0;
58448 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58449 void *argp1 = 0 ;
58450 int res1 = 0 ;
58451 PyObject * obj0 = 0 ;
58452 bool result;
58453
58454 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFromFloat_own_fields_get",&obj0)) SWIG_fail;
58455 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
58456 if (!SWIG_IsOK(res1)) {
58457 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_own_fields_get" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
58458 }
58459 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58460 result = (bool) ((arg1)->own_fields);
58461 resultobj = SWIG_From_bool(static_cast< bool >(result));
58462 return resultobj;
58463 fail:
58464 return NULL;
58465 }
58466
58467
58468 SWIGINTERN PyObject *_wrap_new_IndexBinaryFromFloat__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58469 PyObject *resultobj = 0;
58470 faiss::IndexBinaryFromFloat *result = 0 ;
58471
58472 if (!PyArg_ParseTuple(args,(char *)":new_IndexBinaryFromFloat")) SWIG_fail;
58473 {
58474 Py_BEGIN_ALLOW_THREADS
58475 try {
58476 result = (faiss::IndexBinaryFromFloat *)new faiss::IndexBinaryFromFloat();
58477 } catch(faiss::FaissException & e) {
58478 PyEval_RestoreThread(_save);
58479 PyErr_SetString(PyExc_RuntimeError, e.what());
58480 SWIG_fail;
58481 }
58482 Py_END_ALLOW_THREADS
58483 }
58484 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryFromFloat, SWIG_POINTER_NEW | 0 );
58485 return resultobj;
58486 fail:
58487 return NULL;
58488 }
58489
58490
58491 SWIGINTERN PyObject *_wrap_new_IndexBinaryFromFloat__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58492 PyObject *resultobj = 0;
58493 faiss::Index *arg1 = (faiss::Index *) 0 ;
58494 void *argp1 = 0 ;
58495 int res1 = 0 ;
58496 PyObject * obj0 = 0 ;
58497 faiss::IndexBinaryFromFloat *result = 0 ;
58498
58499 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexBinaryFromFloat",&obj0)) SWIG_fail;
58500 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
58501 if (!SWIG_IsOK(res1)) {
58502 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexBinaryFromFloat" "', argument " "1"" of type '" "faiss::Index *""'");
58503 }
58504 arg1 = reinterpret_cast< faiss::Index * >(argp1);
58505 {
58506 Py_BEGIN_ALLOW_THREADS
58507 try {
58508 result = (faiss::IndexBinaryFromFloat *)new faiss::IndexBinaryFromFloat(arg1);
58509 } catch(faiss::FaissException & e) {
58510 PyEval_RestoreThread(_save);
58511 PyErr_SetString(PyExc_RuntimeError, e.what());
58512 SWIG_fail;
58513 }
58514 Py_END_ALLOW_THREADS
58515 }
58516 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryFromFloat, SWIG_POINTER_NEW | 0 );
58517 return resultobj;
58518 fail:
58519 return NULL;
58520 }
58521
58522
58523 SWIGINTERN PyObject *_wrap_new_IndexBinaryFromFloat(PyObject *self, PyObject *args) {
58524 Py_ssize_t argc;
58525 PyObject *argv[2] = {
58526 0
58527 };
58528 Py_ssize_t ii;
58529
58530 if (!PyTuple_Check(args)) SWIG_fail;
58531 argc = args ? PyObject_Length(args) : 0;
58532 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
58533 argv[ii] = PyTuple_GET_ITEM(args,ii);
58534 }
58535 if (argc == 0) {
58536 return _wrap_new_IndexBinaryFromFloat__SWIG_0(self, args);
58537 }
58538 if (argc == 1) {
58539 int _v;
58540 void *vptr = 0;
58541 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
58542 _v = SWIG_CheckState(res);
58543 if (_v) {
58544 return _wrap_new_IndexBinaryFromFloat__SWIG_1(self, args);
58545 }
58546 }
58547
58548 fail:
58549 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexBinaryFromFloat'.\n"
58550 " Possible C/C++ prototypes are:\n"
58551 " faiss::IndexBinaryFromFloat::IndexBinaryFromFloat()\n"
58552 " faiss::IndexBinaryFromFloat::IndexBinaryFromFloat(faiss::Index *)\n");
58553 return 0;
58554 }
58555
58556
58557 SWIGINTERN PyObject *_wrap_delete_IndexBinaryFromFloat(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58558 PyObject *resultobj = 0;
58559 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58560 void *argp1 = 0 ;
58561 int res1 = 0 ;
58562 PyObject * obj0 = 0 ;
58563
58564 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinaryFromFloat",&obj0)) SWIG_fail;
58565 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, SWIG_POINTER_DISOWN | 0 );
58566 if (!SWIG_IsOK(res1)) {
58567 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinaryFromFloat" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
58568 }
58569 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58570 {
58571 Py_BEGIN_ALLOW_THREADS
58572 try {
58573 delete arg1;
58574 } catch(faiss::FaissException & e) {
58575 PyEval_RestoreThread(_save);
58576 PyErr_SetString(PyExc_RuntimeError, e.what());
58577 SWIG_fail;
58578 }
58579 Py_END_ALLOW_THREADS
58580 }
58581 resultobj = SWIG_Py_Void();
58582 return resultobj;
58583 fail:
58584 return NULL;
58585 }
58586
58587
58588 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58589 PyObject *resultobj = 0;
58590 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58591 faiss::IndexBinary::idx_t arg2 ;
58592 uint8_t *arg3 = (uint8_t *) 0 ;
58593 void *argp1 = 0 ;
58594 int res1 = 0 ;
58595 long val2 ;
58596 int ecode2 = 0 ;
58597 void *argp3 = 0 ;
58598 int res3 = 0 ;
58599 PyObject * obj0 = 0 ;
58600 PyObject * obj1 = 0 ;
58601 PyObject * obj2 = 0 ;
58602
58603 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryFromFloat_add",&obj0,&obj1,&obj2)) SWIG_fail;
58604 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
58605 if (!SWIG_IsOK(res1)) {
58606 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_add" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
58607 }
58608 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58609 ecode2 = SWIG_AsVal_long(obj1, &val2);
58610 if (!SWIG_IsOK(ecode2)) {
58611 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFromFloat_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58612 }
58613 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58614 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58615 if (!SWIG_IsOK(res3)) {
58616 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFromFloat_add" "', argument " "3"" of type '" "uint8_t const *""'");
58617 }
58618 arg3 = reinterpret_cast< uint8_t * >(argp3);
58619 {
58620 Py_BEGIN_ALLOW_THREADS
58621 try {
58622 (arg1)->add(arg2,(uint8_t const *)arg3);
58623 } catch(faiss::FaissException & e) {
58624 PyEval_RestoreThread(_save);
58625 PyErr_SetString(PyExc_RuntimeError, e.what());
58626 SWIG_fail;
58627 }
58628 Py_END_ALLOW_THREADS
58629 }
58630 resultobj = SWIG_Py_Void();
58631 return resultobj;
58632 fail:
58633 return NULL;
58634 }
58635
58636
58637 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58638 PyObject *resultobj = 0;
58639 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58640 void *argp1 = 0 ;
58641 int res1 = 0 ;
58642 PyObject * obj0 = 0 ;
58643
58644 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryFromFloat_reset",&obj0)) SWIG_fail;
58645 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
58646 if (!SWIG_IsOK(res1)) {
58647 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_reset" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
58648 }
58649 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58650 {
58651 Py_BEGIN_ALLOW_THREADS
58652 try {
58653 (arg1)->reset();
58654 } catch(faiss::FaissException & e) {
58655 PyEval_RestoreThread(_save);
58656 PyErr_SetString(PyExc_RuntimeError, e.what());
58657 SWIG_fail;
58658 }
58659 Py_END_ALLOW_THREADS
58660 }
58661 resultobj = SWIG_Py_Void();
58662 return resultobj;
58663 fail:
58664 return NULL;
58665 }
58666
58667
58668 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58669 PyObject *resultobj = 0;
58670 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58671 faiss::IndexBinary::idx_t arg2 ;
58672 uint8_t *arg3 = (uint8_t *) 0 ;
58673 faiss::IndexBinary::idx_t arg4 ;
58674 int32_t *arg5 = (int32_t *) 0 ;
58675 faiss::IndexBinary::idx_t *arg6 = (faiss::IndexBinary::idx_t *) 0 ;
58676 void *argp1 = 0 ;
58677 int res1 = 0 ;
58678 long val2 ;
58679 int ecode2 = 0 ;
58680 void *argp3 = 0 ;
58681 int res3 = 0 ;
58682 long val4 ;
58683 int ecode4 = 0 ;
58684 void *argp5 = 0 ;
58685 int res5 = 0 ;
58686 void *argp6 = 0 ;
58687 int res6 = 0 ;
58688 PyObject * obj0 = 0 ;
58689 PyObject * obj1 = 0 ;
58690 PyObject * obj2 = 0 ;
58691 PyObject * obj3 = 0 ;
58692 PyObject * obj4 = 0 ;
58693 PyObject * obj5 = 0 ;
58694
58695 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinaryFromFloat_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
58696 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
58697 if (!SWIG_IsOK(res1)) {
58698 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_search" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat const *""'");
58699 }
58700 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58701 ecode2 = SWIG_AsVal_long(obj1, &val2);
58702 if (!SWIG_IsOK(ecode2)) {
58703 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFromFloat_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58704 }
58705 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58706 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58707 if (!SWIG_IsOK(res3)) {
58708 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFromFloat_search" "', argument " "3"" of type '" "uint8_t const *""'");
58709 }
58710 arg3 = reinterpret_cast< uint8_t * >(argp3);
58711 ecode4 = SWIG_AsVal_long(obj3, &val4);
58712 if (!SWIG_IsOK(ecode4)) {
58713 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryFromFloat_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
58714 }
58715 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
58716 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
58717 if (!SWIG_IsOK(res5)) {
58718 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryFromFloat_search" "', argument " "5"" of type '" "int32_t *""'");
58719 }
58720 arg5 = reinterpret_cast< int32_t * >(argp5);
58721 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
58722 if (!SWIG_IsOK(res6)) {
58723 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryFromFloat_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
58724 }
58725 arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
58726 {
58727 Py_BEGIN_ALLOW_THREADS
58728 try {
58729 ((faiss::IndexBinaryFromFloat const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
58730 } catch(faiss::FaissException & e) {
58731 PyEval_RestoreThread(_save);
58732 PyErr_SetString(PyExc_RuntimeError, e.what());
58733 SWIG_fail;
58734 }
58735 Py_END_ALLOW_THREADS
58736 }
58737 resultobj = SWIG_Py_Void();
58738 return resultobj;
58739 fail:
58740 return NULL;
58741 }
58742
58743
58744 SWIGINTERN PyObject *_wrap_IndexBinaryFromFloat_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58745 PyObject *resultobj = 0;
58746 faiss::IndexBinaryFromFloat *arg1 = (faiss::IndexBinaryFromFloat *) 0 ;
58747 faiss::IndexBinary::idx_t arg2 ;
58748 uint8_t *arg3 = (uint8_t *) 0 ;
58749 void *argp1 = 0 ;
58750 int res1 = 0 ;
58751 long val2 ;
58752 int ecode2 = 0 ;
58753 void *argp3 = 0 ;
58754 int res3 = 0 ;
58755 PyObject * obj0 = 0 ;
58756 PyObject * obj1 = 0 ;
58757 PyObject * obj2 = 0 ;
58758
58759 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryFromFloat_train",&obj0,&obj1,&obj2)) SWIG_fail;
58760 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryFromFloat, 0 | 0 );
58761 if (!SWIG_IsOK(res1)) {
58762 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryFromFloat_train" "', argument " "1"" of type '" "faiss::IndexBinaryFromFloat *""'");
58763 }
58764 arg1 = reinterpret_cast< faiss::IndexBinaryFromFloat * >(argp1);
58765 ecode2 = SWIG_AsVal_long(obj1, &val2);
58766 if (!SWIG_IsOK(ecode2)) {
58767 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryFromFloat_train" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
58768 }
58769 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
58770 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
58771 if (!SWIG_IsOK(res3)) {
58772 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryFromFloat_train" "', argument " "3"" of type '" "uint8_t const *""'");
58773 }
58774 arg3 = reinterpret_cast< uint8_t * >(argp3);
58775 {
58776 Py_BEGIN_ALLOW_THREADS
58777 try {
58778 (arg1)->train(arg2,(uint8_t const *)arg3);
58779 } catch(faiss::FaissException & e) {
58780 PyEval_RestoreThread(_save);
58781 PyErr_SetString(PyExc_RuntimeError, e.what());
58782 SWIG_fail;
58783 }
58784 Py_END_ALLOW_THREADS
58785 }
58786 resultobj = SWIG_Py_Void();
58787 return resultobj;
58788 fail:
58789 return NULL;
58790 }
58791
58792
58793 SWIGINTERN PyObject *IndexBinaryFromFloat_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58794 PyObject *obj;
58795 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
58796 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinaryFromFloat, SWIG_NewClientData(obj));
58797 return SWIG_Py_Void();
58798 }
58799
58800 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_hnsw_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58801 PyObject *resultobj = 0;
58802 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
58803 faiss::HNSW *arg2 = (faiss::HNSW *) 0 ;
58804 void *argp1 = 0 ;
58805 int res1 = 0 ;
58806 void *argp2 = 0 ;
58807 int res2 = 0 ;
58808 PyObject * obj0 = 0 ;
58809 PyObject * obj1 = 0 ;
58810
58811 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryHNSW_hnsw_set",&obj0,&obj1)) SWIG_fail;
58812 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
58813 if (!SWIG_IsOK(res1)) {
58814 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_hnsw_set" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
58815 }
58816 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
58817 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__HNSW, 0 | 0 );
58818 if (!SWIG_IsOK(res2)) {
58819 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryHNSW_hnsw_set" "', argument " "2"" of type '" "faiss::HNSW *""'");
58820 }
58821 arg2 = reinterpret_cast< faiss::HNSW * >(argp2);
58822 if (arg1) (arg1)->hnsw = *arg2;
58823 resultobj = SWIG_Py_Void();
58824 return resultobj;
58825 fail:
58826 return NULL;
58827 }
58828
58829
58830 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_hnsw_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58831 PyObject *resultobj = 0;
58832 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
58833 void *argp1 = 0 ;
58834 int res1 = 0 ;
58835 PyObject * obj0 = 0 ;
58836 faiss::HNSW *result = 0 ;
58837
58838 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_hnsw_get",&obj0)) SWIG_fail;
58839 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
58840 if (!SWIG_IsOK(res1)) {
58841 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_hnsw_get" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
58842 }
58843 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
58844 result = (faiss::HNSW *)& ((arg1)->hnsw);
58845 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW, 0 | 0 );
58846 return resultobj;
58847 fail:
58848 return NULL;
58849 }
58850
58851
58852 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58853 PyObject *resultobj = 0;
58854 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
58855 bool arg2 ;
58856 void *argp1 = 0 ;
58857 int res1 = 0 ;
58858 bool val2 ;
58859 int ecode2 = 0 ;
58860 PyObject * obj0 = 0 ;
58861 PyObject * obj1 = 0 ;
58862
58863 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryHNSW_own_fields_set",&obj0,&obj1)) SWIG_fail;
58864 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
58865 if (!SWIG_IsOK(res1)) {
58866 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_own_fields_set" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
58867 }
58868 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
58869 ecode2 = SWIG_AsVal_bool(obj1, &val2);
58870 if (!SWIG_IsOK(ecode2)) {
58871 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_own_fields_set" "', argument " "2"" of type '" "bool""'");
58872 }
58873 arg2 = static_cast< bool >(val2);
58874 if (arg1) (arg1)->own_fields = arg2;
58875 resultobj = SWIG_Py_Void();
58876 return resultobj;
58877 fail:
58878 return NULL;
58879 }
58880
58881
58882 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58883 PyObject *resultobj = 0;
58884 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
58885 void *argp1 = 0 ;
58886 int res1 = 0 ;
58887 PyObject * obj0 = 0 ;
58888 bool result;
58889
58890 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_own_fields_get",&obj0)) SWIG_fail;
58891 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
58892 if (!SWIG_IsOK(res1)) {
58893 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_own_fields_get" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
58894 }
58895 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
58896 result = (bool) ((arg1)->own_fields);
58897 resultobj = SWIG_From_bool(static_cast< bool >(result));
58898 return resultobj;
58899 fail:
58900 return NULL;
58901 }
58902
58903
58904 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_storage_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58905 PyObject *resultobj = 0;
58906 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
58907 faiss::IndexBinary *arg2 = (faiss::IndexBinary *) 0 ;
58908 void *argp1 = 0 ;
58909 int res1 = 0 ;
58910 void *argp2 = 0 ;
58911 int res2 = 0 ;
58912 PyObject * obj0 = 0 ;
58913 PyObject * obj1 = 0 ;
58914
58915 if (!PyArg_ParseTuple(args,(char *)"OO:IndexBinaryHNSW_storage_set",&obj0,&obj1)) SWIG_fail;
58916 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
58917 if (!SWIG_IsOK(res1)) {
58918 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_storage_set" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
58919 }
58920 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
58921 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexBinary, SWIG_POINTER_DISOWN | 0 );
58922 if (!SWIG_IsOK(res2)) {
58923 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexBinaryHNSW_storage_set" "', argument " "2"" of type '" "faiss::IndexBinary *""'");
58924 }
58925 arg2 = reinterpret_cast< faiss::IndexBinary * >(argp2);
58926 if (arg1) (arg1)->storage = arg2;
58927 resultobj = SWIG_Py_Void();
58928 return resultobj;
58929 fail:
58930 return NULL;
58931 }
58932
58933
58934 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_storage_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58935 PyObject *resultobj = 0;
58936 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
58937 void *argp1 = 0 ;
58938 int res1 = 0 ;
58939 PyObject * obj0 = 0 ;
58940 faiss::IndexBinary *result = 0 ;
58941
58942 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_storage_get",&obj0)) SWIG_fail;
58943 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
58944 if (!SWIG_IsOK(res1)) {
58945 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_storage_get" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
58946 }
58947 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
58948 result = (faiss::IndexBinary *) ((arg1)->storage);
58949 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
58950 return resultobj;
58951 fail:
58952 return NULL;
58953 }
58954
58955
58956 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58957 PyObject *resultobj = 0;
58958 faiss::IndexBinaryHNSW *result = 0 ;
58959
58960 if (!PyArg_ParseTuple(args,(char *)":new_IndexBinaryHNSW")) SWIG_fail;
58961 {
58962 Py_BEGIN_ALLOW_THREADS
58963 try {
58964 result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW();
58965 } catch(faiss::FaissException & e) {
58966 PyEval_RestoreThread(_save);
58967 PyErr_SetString(PyExc_RuntimeError, e.what());
58968 SWIG_fail;
58969 }
58970 Py_END_ALLOW_THREADS
58971 }
58972 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
58973 return resultobj;
58974 fail:
58975 return NULL;
58976 }
58977
58978
58979 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
58980 PyObject *resultobj = 0;
58981 int arg1 ;
58982 int arg2 ;
58983 int val1 ;
58984 int ecode1 = 0 ;
58985 int val2 ;
58986 int ecode2 = 0 ;
58987 PyObject * obj0 = 0 ;
58988 PyObject * obj1 = 0 ;
58989 faiss::IndexBinaryHNSW *result = 0 ;
58990
58991 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexBinaryHNSW",&obj0,&obj1)) SWIG_fail;
58992 ecode1 = SWIG_AsVal_int(obj0, &val1);
58993 if (!SWIG_IsOK(ecode1)) {
58994 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexBinaryHNSW" "', argument " "1"" of type '" "int""'");
58995 }
58996 arg1 = static_cast< int >(val1);
58997 ecode2 = SWIG_AsVal_int(obj1, &val2);
58998 if (!SWIG_IsOK(ecode2)) {
58999 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexBinaryHNSW" "', argument " "2"" of type '" "int""'");
59000 }
59001 arg2 = static_cast< int >(val2);
59002 {
59003 Py_BEGIN_ALLOW_THREADS
59004 try {
59005 result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW(arg1,arg2);
59006 } catch(faiss::FaissException & e) {
59007 PyEval_RestoreThread(_save);
59008 PyErr_SetString(PyExc_RuntimeError, e.what());
59009 SWIG_fail;
59010 }
59011 Py_END_ALLOW_THREADS
59012 }
59013 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
59014 return resultobj;
59015 fail:
59016 return NULL;
59017 }
59018
59019
59020 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59021 PyObject *resultobj = 0;
59022 int arg1 ;
59023 int val1 ;
59024 int ecode1 = 0 ;
59025 PyObject * obj0 = 0 ;
59026 faiss::IndexBinaryHNSW *result = 0 ;
59027
59028 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexBinaryHNSW",&obj0)) SWIG_fail;
59029 ecode1 = SWIG_AsVal_int(obj0, &val1);
59030 if (!SWIG_IsOK(ecode1)) {
59031 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexBinaryHNSW" "', argument " "1"" of type '" "int""'");
59032 }
59033 arg1 = static_cast< int >(val1);
59034 {
59035 Py_BEGIN_ALLOW_THREADS
59036 try {
59037 result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW(arg1);
59038 } catch(faiss::FaissException & e) {
59039 PyEval_RestoreThread(_save);
59040 PyErr_SetString(PyExc_RuntimeError, e.what());
59041 SWIG_fail;
59042 }
59043 Py_END_ALLOW_THREADS
59044 }
59045 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
59046 return resultobj;
59047 fail:
59048 return NULL;
59049 }
59050
59051
59052 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59053 PyObject *resultobj = 0;
59054 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
59055 int arg2 ;
59056 void *argp1 = 0 ;
59057 int res1 = 0 ;
59058 int val2 ;
59059 int ecode2 = 0 ;
59060 PyObject * obj0 = 0 ;
59061 PyObject * obj1 = 0 ;
59062 faiss::IndexBinaryHNSW *result = 0 ;
59063
59064 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexBinaryHNSW",&obj0,&obj1)) SWIG_fail;
59065 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
59066 if (!SWIG_IsOK(res1)) {
59067 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexBinaryHNSW" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
59068 }
59069 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
59070 ecode2 = SWIG_AsVal_int(obj1, &val2);
59071 if (!SWIG_IsOK(ecode2)) {
59072 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexBinaryHNSW" "', argument " "2"" of type '" "int""'");
59073 }
59074 arg2 = static_cast< int >(val2);
59075 {
59076 Py_BEGIN_ALLOW_THREADS
59077 try {
59078 result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW(arg1,arg2);
59079 } catch(faiss::FaissException & e) {
59080 PyEval_RestoreThread(_save);
59081 PyErr_SetString(PyExc_RuntimeError, e.what());
59082 SWIG_fail;
59083 }
59084 Py_END_ALLOW_THREADS
59085 }
59086 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
59087 return resultobj;
59088 fail:
59089 return NULL;
59090 }
59091
59092
59093 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59094 PyObject *resultobj = 0;
59095 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
59096 void *argp1 = 0 ;
59097 int res1 = 0 ;
59098 PyObject * obj0 = 0 ;
59099 faiss::IndexBinaryHNSW *result = 0 ;
59100
59101 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexBinaryHNSW",&obj0)) SWIG_fail;
59102 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
59103 if (!SWIG_IsOK(res1)) {
59104 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexBinaryHNSW" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
59105 }
59106 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
59107 {
59108 Py_BEGIN_ALLOW_THREADS
59109 try {
59110 result = (faiss::IndexBinaryHNSW *)new faiss::IndexBinaryHNSW(arg1);
59111 } catch(faiss::FaissException & e) {
59112 PyEval_RestoreThread(_save);
59113 PyErr_SetString(PyExc_RuntimeError, e.what());
59114 SWIG_fail;
59115 }
59116 Py_END_ALLOW_THREADS
59117 }
59118 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_NEW | 0 );
59119 return resultobj;
59120 fail:
59121 return NULL;
59122 }
59123
59124
59125 SWIGINTERN PyObject *_wrap_new_IndexBinaryHNSW(PyObject *self, PyObject *args) {
59126 Py_ssize_t argc;
59127 PyObject *argv[3] = {
59128 0
59129 };
59130 Py_ssize_t ii;
59131
59132 if (!PyTuple_Check(args)) SWIG_fail;
59133 argc = args ? PyObject_Length(args) : 0;
59134 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
59135 argv[ii] = PyTuple_GET_ITEM(args,ii);
59136 }
59137 if (argc == 0) {
59138 return _wrap_new_IndexBinaryHNSW__SWIG_0(self, args);
59139 }
59140 if (argc == 1) {
59141 int _v;
59142 void *vptr = 0;
59143 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
59144 _v = SWIG_CheckState(res);
59145 if (_v) {
59146 return _wrap_new_IndexBinaryHNSW__SWIG_4(self, args);
59147 }
59148 }
59149 if (argc == 1) {
59150 int _v;
59151 {
59152 int res = SWIG_AsVal_int(argv[0], NULL);
59153 _v = SWIG_CheckState(res);
59154 }
59155 if (_v) {
59156 return _wrap_new_IndexBinaryHNSW__SWIG_2(self, args);
59157 }
59158 }
59159 if (argc == 2) {
59160 int _v;
59161 void *vptr = 0;
59162 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
59163 _v = SWIG_CheckState(res);
59164 if (_v) {
59165 {
59166 int res = SWIG_AsVal_int(argv[1], NULL);
59167 _v = SWIG_CheckState(res);
59168 }
59169 if (_v) {
59170 return _wrap_new_IndexBinaryHNSW__SWIG_3(self, args);
59171 }
59172 }
59173 }
59174 if (argc == 2) {
59175 int _v;
59176 {
59177 int res = SWIG_AsVal_int(argv[0], NULL);
59178 _v = SWIG_CheckState(res);
59179 }
59180 if (_v) {
59181 {
59182 int res = SWIG_AsVal_int(argv[1], NULL);
59183 _v = SWIG_CheckState(res);
59184 }
59185 if (_v) {
59186 return _wrap_new_IndexBinaryHNSW__SWIG_1(self, args);
59187 }
59188 }
59189 }
59190
59191 fail:
59192 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexBinaryHNSW'.\n"
59193 " Possible C/C++ prototypes are:\n"
59194 " faiss::IndexBinaryHNSW::IndexBinaryHNSW()\n"
59195 " faiss::IndexBinaryHNSW::IndexBinaryHNSW(int,int)\n"
59196 " faiss::IndexBinaryHNSW::IndexBinaryHNSW(int)\n"
59197 " faiss::IndexBinaryHNSW::IndexBinaryHNSW(faiss::IndexBinary *,int)\n"
59198 " faiss::IndexBinaryHNSW::IndexBinaryHNSW(faiss::IndexBinary *)\n");
59199 return 0;
59200 }
59201
59202
59203 SWIGINTERN PyObject *_wrap_delete_IndexBinaryHNSW(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59204 PyObject *resultobj = 0;
59205 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
59206 void *argp1 = 0 ;
59207 int res1 = 0 ;
59208 PyObject * obj0 = 0 ;
59209
59210 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexBinaryHNSW",&obj0)) SWIG_fail;
59211 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_POINTER_DISOWN | 0 );
59212 if (!SWIG_IsOK(res1)) {
59213 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexBinaryHNSW" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
59214 }
59215 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
59216 {
59217 Py_BEGIN_ALLOW_THREADS
59218 try {
59219 delete arg1;
59220 } catch(faiss::FaissException & e) {
59221 PyEval_RestoreThread(_save);
59222 PyErr_SetString(PyExc_RuntimeError, e.what());
59223 SWIG_fail;
59224 }
59225 Py_END_ALLOW_THREADS
59226 }
59227 resultobj = SWIG_Py_Void();
59228 return resultobj;
59229 fail:
59230 return NULL;
59231 }
59232
59233
59234 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_get_distance_computer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59235 PyObject *resultobj = 0;
59236 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
59237 void *argp1 = 0 ;
59238 int res1 = 0 ;
59239 PyObject * obj0 = 0 ;
59240 faiss::HNSW::DistanceComputer *result = 0 ;
59241
59242 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_get_distance_computer",&obj0)) SWIG_fail;
59243 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
59244 if (!SWIG_IsOK(res1)) {
59245 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_get_distance_computer" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW const *""'");
59246 }
59247 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
59248 {
59249 Py_BEGIN_ALLOW_THREADS
59250 try {
59251 result = (faiss::HNSW::DistanceComputer *)((faiss::IndexBinaryHNSW const *)arg1)->get_distance_computer();
59252 } catch(faiss::FaissException & e) {
59253 PyEval_RestoreThread(_save);
59254 PyErr_SetString(PyExc_RuntimeError, e.what());
59255 SWIG_fail;
59256 }
59257 Py_END_ALLOW_THREADS
59258 }
59259 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HNSW__DistanceComputer, 0 | 0 );
59260 return resultobj;
59261 fail:
59262 return NULL;
59263 }
59264
59265
59266 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59267 PyObject *resultobj = 0;
59268 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
59269 faiss::IndexBinary::idx_t arg2 ;
59270 uint8_t *arg3 = (uint8_t *) 0 ;
59271 void *argp1 = 0 ;
59272 int res1 = 0 ;
59273 long val2 ;
59274 int ecode2 = 0 ;
59275 void *argp3 = 0 ;
59276 int res3 = 0 ;
59277 PyObject * obj0 = 0 ;
59278 PyObject * obj1 = 0 ;
59279 PyObject * obj2 = 0 ;
59280
59281 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryHNSW_add",&obj0,&obj1,&obj2)) SWIG_fail;
59282 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
59283 if (!SWIG_IsOK(res1)) {
59284 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_add" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
59285 }
59286 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
59287 ecode2 = SWIG_AsVal_long(obj1, &val2);
59288 if (!SWIG_IsOK(ecode2)) {
59289 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_add" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
59290 }
59291 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
59292 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
59293 if (!SWIG_IsOK(res3)) {
59294 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryHNSW_add" "', argument " "3"" of type '" "uint8_t const *""'");
59295 }
59296 arg3 = reinterpret_cast< uint8_t * >(argp3);
59297 {
59298 Py_BEGIN_ALLOW_THREADS
59299 try {
59300 (arg1)->add(arg2,(uint8_t const *)arg3);
59301 } catch(faiss::FaissException & e) {
59302 PyEval_RestoreThread(_save);
59303 PyErr_SetString(PyExc_RuntimeError, e.what());
59304 SWIG_fail;
59305 }
59306 Py_END_ALLOW_THREADS
59307 }
59308 resultobj = SWIG_Py_Void();
59309 return resultobj;
59310 fail:
59311 return NULL;
59312 }
59313
59314
59315 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59316 PyObject *resultobj = 0;
59317 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
59318 faiss::IndexBinary::idx_t arg2 ;
59319 uint8_t *arg3 = (uint8_t *) 0 ;
59320 void *argp1 = 0 ;
59321 int res1 = 0 ;
59322 long val2 ;
59323 int ecode2 = 0 ;
59324 void *argp3 = 0 ;
59325 int res3 = 0 ;
59326 PyObject * obj0 = 0 ;
59327 PyObject * obj1 = 0 ;
59328 PyObject * obj2 = 0 ;
59329
59330 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryHNSW_train",&obj0,&obj1,&obj2)) SWIG_fail;
59331 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
59332 if (!SWIG_IsOK(res1)) {
59333 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_train" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
59334 }
59335 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
59336 ecode2 = SWIG_AsVal_long(obj1, &val2);
59337 if (!SWIG_IsOK(ecode2)) {
59338 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_train" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
59339 }
59340 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
59341 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
59342 if (!SWIG_IsOK(res3)) {
59343 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryHNSW_train" "', argument " "3"" of type '" "uint8_t const *""'");
59344 }
59345 arg3 = reinterpret_cast< uint8_t * >(argp3);
59346 {
59347 Py_BEGIN_ALLOW_THREADS
59348 try {
59349 (arg1)->train(arg2,(uint8_t const *)arg3);
59350 } catch(faiss::FaissException & e) {
59351 PyEval_RestoreThread(_save);
59352 PyErr_SetString(PyExc_RuntimeError, e.what());
59353 SWIG_fail;
59354 }
59355 Py_END_ALLOW_THREADS
59356 }
59357 resultobj = SWIG_Py_Void();
59358 return resultobj;
59359 fail:
59360 return NULL;
59361 }
59362
59363
59364 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59365 PyObject *resultobj = 0;
59366 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
59367 faiss::IndexBinary::idx_t arg2 ;
59368 uint8_t *arg3 = (uint8_t *) 0 ;
59369 faiss::IndexBinary::idx_t arg4 ;
59370 int32_t *arg5 = (int32_t *) 0 ;
59371 faiss::IndexBinary::idx_t *arg6 = (faiss::IndexBinary::idx_t *) 0 ;
59372 void *argp1 = 0 ;
59373 int res1 = 0 ;
59374 long val2 ;
59375 int ecode2 = 0 ;
59376 void *argp3 = 0 ;
59377 int res3 = 0 ;
59378 long val4 ;
59379 int ecode4 = 0 ;
59380 void *argp5 = 0 ;
59381 int res5 = 0 ;
59382 void *argp6 = 0 ;
59383 int res6 = 0 ;
59384 PyObject * obj0 = 0 ;
59385 PyObject * obj1 = 0 ;
59386 PyObject * obj2 = 0 ;
59387 PyObject * obj3 = 0 ;
59388 PyObject * obj4 = 0 ;
59389 PyObject * obj5 = 0 ;
59390
59391 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexBinaryHNSW_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
59392 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
59393 if (!SWIG_IsOK(res1)) {
59394 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_search" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW const *""'");
59395 }
59396 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
59397 ecode2 = SWIG_AsVal_long(obj1, &val2);
59398 if (!SWIG_IsOK(ecode2)) {
59399 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_search" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
59400 }
59401 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
59402 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
59403 if (!SWIG_IsOK(res3)) {
59404 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryHNSW_search" "', argument " "3"" of type '" "uint8_t const *""'");
59405 }
59406 arg3 = reinterpret_cast< uint8_t * >(argp3);
59407 ecode4 = SWIG_AsVal_long(obj3, &val4);
59408 if (!SWIG_IsOK(ecode4)) {
59409 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexBinaryHNSW_search" "', argument " "4"" of type '" "faiss::IndexBinary::idx_t""'");
59410 }
59411 arg4 = static_cast< faiss::IndexBinary::idx_t >(val4);
59412 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_int, 0 | 0 );
59413 if (!SWIG_IsOK(res5)) {
59414 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexBinaryHNSW_search" "', argument " "5"" of type '" "int32_t *""'");
59415 }
59416 arg5 = reinterpret_cast< int32_t * >(argp5);
59417 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
59418 if (!SWIG_IsOK(res6)) {
59419 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexBinaryHNSW_search" "', argument " "6"" of type '" "faiss::IndexBinary::idx_t *""'");
59420 }
59421 arg6 = reinterpret_cast< faiss::IndexBinary::idx_t * >(argp6);
59422 {
59423 Py_BEGIN_ALLOW_THREADS
59424 try {
59425 ((faiss::IndexBinaryHNSW const *)arg1)->search(arg2,(uint8_t const *)arg3,arg4,arg5,arg6);
59426 } catch(faiss::FaissException & e) {
59427 PyEval_RestoreThread(_save);
59428 PyErr_SetString(PyExc_RuntimeError, e.what());
59429 SWIG_fail;
59430 }
59431 Py_END_ALLOW_THREADS
59432 }
59433 resultobj = SWIG_Py_Void();
59434 return resultobj;
59435 fail:
59436 return NULL;
59437 }
59438
59439
59440 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59441 PyObject *resultobj = 0;
59442 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
59443 faiss::IndexBinary::idx_t arg2 ;
59444 uint8_t *arg3 = (uint8_t *) 0 ;
59445 void *argp1 = 0 ;
59446 int res1 = 0 ;
59447 long val2 ;
59448 int ecode2 = 0 ;
59449 void *argp3 = 0 ;
59450 int res3 = 0 ;
59451 PyObject * obj0 = 0 ;
59452 PyObject * obj1 = 0 ;
59453 PyObject * obj2 = 0 ;
59454
59455 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexBinaryHNSW_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
59456 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
59457 if (!SWIG_IsOK(res1)) {
59458 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_reconstruct" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW const *""'");
59459 }
59460 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
59461 ecode2 = SWIG_AsVal_long(obj1, &val2);
59462 if (!SWIG_IsOK(ecode2)) {
59463 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexBinaryHNSW_reconstruct" "', argument " "2"" of type '" "faiss::IndexBinary::idx_t""'");
59464 }
59465 arg2 = static_cast< faiss::IndexBinary::idx_t >(val2);
59466 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_unsigned_char, 0 | 0 );
59467 if (!SWIG_IsOK(res3)) {
59468 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexBinaryHNSW_reconstruct" "', argument " "3"" of type '" "uint8_t *""'");
59469 }
59470 arg3 = reinterpret_cast< uint8_t * >(argp3);
59471 {
59472 Py_BEGIN_ALLOW_THREADS
59473 try {
59474 ((faiss::IndexBinaryHNSW const *)arg1)->reconstruct(arg2,arg3);
59475 } catch(faiss::FaissException & e) {
59476 PyEval_RestoreThread(_save);
59477 PyErr_SetString(PyExc_RuntimeError, e.what());
59478 SWIG_fail;
59479 }
59480 Py_END_ALLOW_THREADS
59481 }
59482 resultobj = SWIG_Py_Void();
59483 return resultobj;
59484 fail:
59485 return NULL;
59486 }
59487
59488
59489 SWIGINTERN PyObject *_wrap_IndexBinaryHNSW_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59490 PyObject *resultobj = 0;
59491 faiss::IndexBinaryHNSW *arg1 = (faiss::IndexBinaryHNSW *) 0 ;
59492 void *argp1 = 0 ;
59493 int res1 = 0 ;
59494 PyObject * obj0 = 0 ;
59495
59496 if (!PyArg_ParseTuple(args,(char *)"O:IndexBinaryHNSW_reset",&obj0)) SWIG_fail;
59497 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinaryHNSW, 0 | 0 );
59498 if (!SWIG_IsOK(res1)) {
59499 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexBinaryHNSW_reset" "', argument " "1"" of type '" "faiss::IndexBinaryHNSW *""'");
59500 }
59501 arg1 = reinterpret_cast< faiss::IndexBinaryHNSW * >(argp1);
59502 {
59503 Py_BEGIN_ALLOW_THREADS
59504 try {
59505 (arg1)->reset();
59506 } catch(faiss::FaissException & e) {
59507 PyEval_RestoreThread(_save);
59508 PyErr_SetString(PyExc_RuntimeError, e.what());
59509 SWIG_fail;
59510 }
59511 Py_END_ALLOW_THREADS
59512 }
59513 resultobj = SWIG_Py_Void();
59514 return resultobj;
59515 fail:
59516 return NULL;
59517 }
59518
59519
59520 SWIGINTERN PyObject *IndexBinaryHNSW_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59521 PyObject *obj;
59522 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
59523 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexBinaryHNSW, SWIG_NewClientData(obj));
59524 return SWIG_Py_Void();
59525 }
59526
59527 SWIGINTERN PyObject *_wrap_IndexIDMap_index_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59528 PyObject *resultobj = 0;
59529 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59530 faiss::Index *arg2 = (faiss::Index *) 0 ;
59531 void *argp1 = 0 ;
59532 int res1 = 0 ;
59533 void *argp2 = 0 ;
59534 int res2 = 0 ;
59535 PyObject * obj0 = 0 ;
59536 PyObject * obj1 = 0 ;
59537
59538 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap_index_set",&obj0,&obj1)) SWIG_fail;
59539 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59540 if (!SWIG_IsOK(res1)) {
59541 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_index_set" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59542 }
59543 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59544 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, SWIG_POINTER_DISOWN | 0 );
59545 if (!SWIG_IsOK(res2)) {
59546 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap_index_set" "', argument " "2"" of type '" "faiss::Index *""'");
59547 }
59548 arg2 = reinterpret_cast< faiss::Index * >(argp2);
59549 if (arg1) (arg1)->index = arg2;
59550 resultobj = SWIG_Py_Void();
59551 return resultobj;
59552 fail:
59553 return NULL;
59554 }
59555
59556
59557 SWIGINTERN PyObject *_wrap_IndexIDMap_index_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59558 PyObject *resultobj = 0;
59559 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59560 void *argp1 = 0 ;
59561 int res1 = 0 ;
59562 PyObject * obj0 = 0 ;
59563 faiss::Index *result = 0 ;
59564
59565 if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap_index_get",&obj0)) SWIG_fail;
59566 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59567 if (!SWIG_IsOK(res1)) {
59568 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_index_get" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59569 }
59570 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59571 result = (faiss::Index *) ((arg1)->index);
59572 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
59573 return resultobj;
59574 fail:
59575 return NULL;
59576 }
59577
59578
59579 SWIGINTERN PyObject *_wrap_IndexIDMap_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59580 PyObject *resultobj = 0;
59581 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59582 bool arg2 ;
59583 void *argp1 = 0 ;
59584 int res1 = 0 ;
59585 bool val2 ;
59586 int ecode2 = 0 ;
59587 PyObject * obj0 = 0 ;
59588 PyObject * obj1 = 0 ;
59589
59590 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap_own_fields_set",&obj0,&obj1)) SWIG_fail;
59591 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59592 if (!SWIG_IsOK(res1)) {
59593 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_own_fields_set" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59594 }
59595 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59596 ecode2 = SWIG_AsVal_bool(obj1, &val2);
59597 if (!SWIG_IsOK(ecode2)) {
59598 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_own_fields_set" "', argument " "2"" of type '" "bool""'");
59599 }
59600 arg2 = static_cast< bool >(val2);
59601 if (arg1) (arg1)->own_fields = arg2;
59602 resultobj = SWIG_Py_Void();
59603 return resultobj;
59604 fail:
59605 return NULL;
59606 }
59607
59608
59609 SWIGINTERN PyObject *_wrap_IndexIDMap_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59610 PyObject *resultobj = 0;
59611 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59612 void *argp1 = 0 ;
59613 int res1 = 0 ;
59614 PyObject * obj0 = 0 ;
59615 bool result;
59616
59617 if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap_own_fields_get",&obj0)) SWIG_fail;
59618 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59619 if (!SWIG_IsOK(res1)) {
59620 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_own_fields_get" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59621 }
59622 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59623 result = (bool) ((arg1)->own_fields);
59624 resultobj = SWIG_From_bool(static_cast< bool >(result));
59625 return resultobj;
59626 fail:
59627 return NULL;
59628 }
59629
59630
59631 SWIGINTERN PyObject *_wrap_IndexIDMap_id_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59632 PyObject *resultobj = 0;
59633 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59634 std::vector< long > *arg2 = (std::vector< long > *) 0 ;
59635 void *argp1 = 0 ;
59636 int res1 = 0 ;
59637 void *argp2 = 0 ;
59638 int res2 = 0 ;
59639 PyObject * obj0 = 0 ;
59640 PyObject * obj1 = 0 ;
59641
59642 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap_id_map_set",&obj0,&obj1)) SWIG_fail;
59643 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59644 if (!SWIG_IsOK(res1)) {
59645 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_id_map_set" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59646 }
59647 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59648 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
59649 if (!SWIG_IsOK(res2)) {
59650 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap_id_map_set" "', argument " "2"" of type '" "std::vector< long > *""'");
59651 }
59652 arg2 = reinterpret_cast< std::vector< long > * >(argp2);
59653 if (arg1) (arg1)->id_map = *arg2;
59654 resultobj = SWIG_Py_Void();
59655 return resultobj;
59656 fail:
59657 return NULL;
59658 }
59659
59660
59661 SWIGINTERN PyObject *_wrap_IndexIDMap_id_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59662 PyObject *resultobj = 0;
59663 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59664 void *argp1 = 0 ;
59665 int res1 = 0 ;
59666 PyObject * obj0 = 0 ;
59667 std::vector< long > *result = 0 ;
59668
59669 if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap_id_map_get",&obj0)) SWIG_fail;
59670 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59671 if (!SWIG_IsOK(res1)) {
59672 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_id_map_get" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59673 }
59674 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59675 result = (std::vector< long > *)& ((arg1)->id_map);
59676 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
59677 return resultobj;
59678 fail:
59679 return NULL;
59680 }
59681
59682
59683 SWIGINTERN PyObject *_wrap_new_IndexIDMap__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59684 PyObject *resultobj = 0;
59685 faiss::Index *arg1 = (faiss::Index *) 0 ;
59686 void *argp1 = 0 ;
59687 int res1 = 0 ;
59688 PyObject * obj0 = 0 ;
59689 faiss::IndexIDMap *result = 0 ;
59690
59691 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexIDMap",&obj0)) SWIG_fail;
59692 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
59693 if (!SWIG_IsOK(res1)) {
59694 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIDMap" "', argument " "1"" of type '" "faiss::Index *""'");
59695 }
59696 arg1 = reinterpret_cast< faiss::Index * >(argp1);
59697 {
59698 Py_BEGIN_ALLOW_THREADS
59699 try {
59700 result = (faiss::IndexIDMap *)new faiss::IndexIDMap(arg1);
59701 } catch(faiss::FaissException & e) {
59702 PyEval_RestoreThread(_save);
59703 PyErr_SetString(PyExc_RuntimeError, e.what());
59704 SWIG_fail;
59705 }
59706 Py_END_ALLOW_THREADS
59707 }
59708 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIDMap, SWIG_POINTER_NEW | 0 );
59709 return resultobj;
59710 fail:
59711 return NULL;
59712 }
59713
59714
59715 SWIGINTERN PyObject *_wrap_IndexIDMap_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59716 PyObject *resultobj = 0;
59717 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59718 faiss::Index::idx_t arg2 ;
59719 float *arg3 = (float *) 0 ;
59720 long *arg4 = (long *) 0 ;
59721 void *argp1 = 0 ;
59722 int res1 = 0 ;
59723 long val2 ;
59724 int ecode2 = 0 ;
59725 void *argp3 = 0 ;
59726 int res3 = 0 ;
59727 void *argp4 = 0 ;
59728 int res4 = 0 ;
59729 PyObject * obj0 = 0 ;
59730 PyObject * obj1 = 0 ;
59731 PyObject * obj2 = 0 ;
59732 PyObject * obj3 = 0 ;
59733
59734 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIDMap_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
59735 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59736 if (!SWIG_IsOK(res1)) {
59737 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59738 }
59739 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59740 ecode2 = SWIG_AsVal_long(obj1, &val2);
59741 if (!SWIG_IsOK(ecode2)) {
59742 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
59743 }
59744 arg2 = static_cast< faiss::Index::idx_t >(val2);
59745 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
59746 if (!SWIG_IsOK(res3)) {
59747 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_add_with_ids" "', argument " "3"" of type '" "float const *""'");
59748 }
59749 arg3 = reinterpret_cast< float * >(argp3);
59750 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
59751 if (!SWIG_IsOK(res4)) {
59752 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIDMap_add_with_ids" "', argument " "4"" of type '" "long const *""'");
59753 }
59754 arg4 = reinterpret_cast< long * >(argp4);
59755 {
59756 Py_BEGIN_ALLOW_THREADS
59757 try {
59758 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
59759 } catch(faiss::FaissException & e) {
59760 PyEval_RestoreThread(_save);
59761 PyErr_SetString(PyExc_RuntimeError, e.what());
59762 SWIG_fail;
59763 }
59764 Py_END_ALLOW_THREADS
59765 }
59766 resultobj = SWIG_Py_Void();
59767 return resultobj;
59768 fail:
59769 return NULL;
59770 }
59771
59772
59773 SWIGINTERN PyObject *_wrap_IndexIDMap_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59774 PyObject *resultobj = 0;
59775 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59776 faiss::Index::idx_t arg2 ;
59777 float *arg3 = (float *) 0 ;
59778 void *argp1 = 0 ;
59779 int res1 = 0 ;
59780 long val2 ;
59781 int ecode2 = 0 ;
59782 void *argp3 = 0 ;
59783 int res3 = 0 ;
59784 PyObject * obj0 = 0 ;
59785 PyObject * obj1 = 0 ;
59786 PyObject * obj2 = 0 ;
59787
59788 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIDMap_add",&obj0,&obj1,&obj2)) SWIG_fail;
59789 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59790 if (!SWIG_IsOK(res1)) {
59791 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_add" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59792 }
59793 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59794 ecode2 = SWIG_AsVal_long(obj1, &val2);
59795 if (!SWIG_IsOK(ecode2)) {
59796 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
59797 }
59798 arg2 = static_cast< faiss::Index::idx_t >(val2);
59799 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
59800 if (!SWIG_IsOK(res3)) {
59801 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_add" "', argument " "3"" of type '" "float const *""'");
59802 }
59803 arg3 = reinterpret_cast< float * >(argp3);
59804 {
59805 Py_BEGIN_ALLOW_THREADS
59806 try {
59807 (arg1)->add(arg2,(float const *)arg3);
59808 } catch(faiss::FaissException & e) {
59809 PyEval_RestoreThread(_save);
59810 PyErr_SetString(PyExc_RuntimeError, e.what());
59811 SWIG_fail;
59812 }
59813 Py_END_ALLOW_THREADS
59814 }
59815 resultobj = SWIG_Py_Void();
59816 return resultobj;
59817 fail:
59818 return NULL;
59819 }
59820
59821
59822 SWIGINTERN PyObject *_wrap_IndexIDMap_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59823 PyObject *resultobj = 0;
59824 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59825 faiss::Index::idx_t arg2 ;
59826 float *arg3 = (float *) 0 ;
59827 faiss::Index::idx_t arg4 ;
59828 float *arg5 = (float *) 0 ;
59829 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
59830 void *argp1 = 0 ;
59831 int res1 = 0 ;
59832 long val2 ;
59833 int ecode2 = 0 ;
59834 void *argp3 = 0 ;
59835 int res3 = 0 ;
59836 long val4 ;
59837 int ecode4 = 0 ;
59838 void *argp5 = 0 ;
59839 int res5 = 0 ;
59840 void *argp6 = 0 ;
59841 int res6 = 0 ;
59842 PyObject * obj0 = 0 ;
59843 PyObject * obj1 = 0 ;
59844 PyObject * obj2 = 0 ;
59845 PyObject * obj3 = 0 ;
59846 PyObject * obj4 = 0 ;
59847 PyObject * obj5 = 0 ;
59848
59849 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexIDMap_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
59850 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59851 if (!SWIG_IsOK(res1)) {
59852 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_search" "', argument " "1"" of type '" "faiss::IndexIDMap const *""'");
59853 }
59854 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59855 ecode2 = SWIG_AsVal_long(obj1, &val2);
59856 if (!SWIG_IsOK(ecode2)) {
59857 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
59858 }
59859 arg2 = static_cast< faiss::Index::idx_t >(val2);
59860 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
59861 if (!SWIG_IsOK(res3)) {
59862 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_search" "', argument " "3"" of type '" "float const *""'");
59863 }
59864 arg3 = reinterpret_cast< float * >(argp3);
59865 ecode4 = SWIG_AsVal_long(obj3, &val4);
59866 if (!SWIG_IsOK(ecode4)) {
59867 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIDMap_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
59868 }
59869 arg4 = static_cast< faiss::Index::idx_t >(val4);
59870 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
59871 if (!SWIG_IsOK(res5)) {
59872 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIDMap_search" "', argument " "5"" of type '" "float *""'");
59873 }
59874 arg5 = reinterpret_cast< float * >(argp5);
59875 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
59876 if (!SWIG_IsOK(res6)) {
59877 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexIDMap_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
59878 }
59879 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
59880 {
59881 Py_BEGIN_ALLOW_THREADS
59882 try {
59883 ((faiss::IndexIDMap const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
59884 } catch(faiss::FaissException & e) {
59885 PyEval_RestoreThread(_save);
59886 PyErr_SetString(PyExc_RuntimeError, e.what());
59887 SWIG_fail;
59888 }
59889 Py_END_ALLOW_THREADS
59890 }
59891 resultobj = SWIG_Py_Void();
59892 return resultobj;
59893 fail:
59894 return NULL;
59895 }
59896
59897
59898 SWIGINTERN PyObject *_wrap_IndexIDMap_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59899 PyObject *resultobj = 0;
59900 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59901 faiss::Index::idx_t arg2 ;
59902 float *arg3 = (float *) 0 ;
59903 void *argp1 = 0 ;
59904 int res1 = 0 ;
59905 long val2 ;
59906 int ecode2 = 0 ;
59907 void *argp3 = 0 ;
59908 int res3 = 0 ;
59909 PyObject * obj0 = 0 ;
59910 PyObject * obj1 = 0 ;
59911 PyObject * obj2 = 0 ;
59912
59913 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIDMap_train",&obj0,&obj1,&obj2)) SWIG_fail;
59914 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59915 if (!SWIG_IsOK(res1)) {
59916 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_train" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59917 }
59918 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59919 ecode2 = SWIG_AsVal_long(obj1, &val2);
59920 if (!SWIG_IsOK(ecode2)) {
59921 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
59922 }
59923 arg2 = static_cast< faiss::Index::idx_t >(val2);
59924 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
59925 if (!SWIG_IsOK(res3)) {
59926 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_train" "', argument " "3"" of type '" "float const *""'");
59927 }
59928 arg3 = reinterpret_cast< float * >(argp3);
59929 {
59930 Py_BEGIN_ALLOW_THREADS
59931 try {
59932 (arg1)->train(arg2,(float const *)arg3);
59933 } catch(faiss::FaissException & e) {
59934 PyEval_RestoreThread(_save);
59935 PyErr_SetString(PyExc_RuntimeError, e.what());
59936 SWIG_fail;
59937 }
59938 Py_END_ALLOW_THREADS
59939 }
59940 resultobj = SWIG_Py_Void();
59941 return resultobj;
59942 fail:
59943 return NULL;
59944 }
59945
59946
59947 SWIGINTERN PyObject *_wrap_IndexIDMap_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59948 PyObject *resultobj = 0;
59949 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59950 void *argp1 = 0 ;
59951 int res1 = 0 ;
59952 PyObject * obj0 = 0 ;
59953
59954 if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap_reset",&obj0)) SWIG_fail;
59955 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59956 if (!SWIG_IsOK(res1)) {
59957 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_reset" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59958 }
59959 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59960 {
59961 Py_BEGIN_ALLOW_THREADS
59962 try {
59963 (arg1)->reset();
59964 } catch(faiss::FaissException & e) {
59965 PyEval_RestoreThread(_save);
59966 PyErr_SetString(PyExc_RuntimeError, e.what());
59967 SWIG_fail;
59968 }
59969 Py_END_ALLOW_THREADS
59970 }
59971 resultobj = SWIG_Py_Void();
59972 return resultobj;
59973 fail:
59974 return NULL;
59975 }
59976
59977
59978 SWIGINTERN PyObject *_wrap_IndexIDMap_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
59979 PyObject *resultobj = 0;
59980 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
59981 faiss::IDSelector *arg2 = 0 ;
59982 void *argp1 = 0 ;
59983 int res1 = 0 ;
59984 void *argp2 = 0 ;
59985 int res2 = 0 ;
59986 PyObject * obj0 = 0 ;
59987 PyObject * obj1 = 0 ;
59988 long result;
59989
59990 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap_remove_ids",&obj0,&obj1)) SWIG_fail;
59991 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
59992 if (!SWIG_IsOK(res1)) {
59993 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_remove_ids" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
59994 }
59995 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
59996 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
59997 if (!SWIG_IsOK(res2)) {
59998 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
59999 }
60000 if (!argp2) {
60001 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIDMap_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
60002 }
60003 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
60004 {
60005 Py_BEGIN_ALLOW_THREADS
60006 try {
60007 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
60008 } catch(faiss::FaissException & e) {
60009 PyEval_RestoreThread(_save);
60010 PyErr_SetString(PyExc_RuntimeError, e.what());
60011 SWIG_fail;
60012 }
60013 Py_END_ALLOW_THREADS
60014 }
60015 resultobj = SWIG_From_long(static_cast< long >(result));
60016 return resultobj;
60017 fail:
60018 return NULL;
60019 }
60020
60021
60022 SWIGINTERN PyObject *_wrap_IndexIDMap_range_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60023 PyObject *resultobj = 0;
60024 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
60025 faiss::Index::idx_t arg2 ;
60026 float *arg3 = (float *) 0 ;
60027 float arg4 ;
60028 faiss::RangeSearchResult *arg5 = (faiss::RangeSearchResult *) 0 ;
60029 void *argp1 = 0 ;
60030 int res1 = 0 ;
60031 long val2 ;
60032 int ecode2 = 0 ;
60033 void *argp3 = 0 ;
60034 int res3 = 0 ;
60035 float val4 ;
60036 int ecode4 = 0 ;
60037 void *argp5 = 0 ;
60038 int res5 = 0 ;
60039 PyObject * obj0 = 0 ;
60040 PyObject * obj1 = 0 ;
60041 PyObject * obj2 = 0 ;
60042 PyObject * obj3 = 0 ;
60043 PyObject * obj4 = 0 ;
60044
60045 if (!PyArg_ParseTuple(args,(char *)"OOOOO:IndexIDMap_range_search",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
60046 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, 0 | 0 );
60047 if (!SWIG_IsOK(res1)) {
60048 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap_range_search" "', argument " "1"" of type '" "faiss::IndexIDMap const *""'");
60049 }
60050 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
60051 ecode2 = SWIG_AsVal_long(obj1, &val2);
60052 if (!SWIG_IsOK(ecode2)) {
60053 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap_range_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
60054 }
60055 arg2 = static_cast< faiss::Index::idx_t >(val2);
60056 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
60057 if (!SWIG_IsOK(res3)) {
60058 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap_range_search" "', argument " "3"" of type '" "float const *""'");
60059 }
60060 arg3 = reinterpret_cast< float * >(argp3);
60061 ecode4 = SWIG_AsVal_float(obj3, &val4);
60062 if (!SWIG_IsOK(ecode4)) {
60063 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexIDMap_range_search" "', argument " "4"" of type '" "float""'");
60064 }
60065 arg4 = static_cast< float >(val4);
60066 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
60067 if (!SWIG_IsOK(res5)) {
60068 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexIDMap_range_search" "', argument " "5"" of type '" "faiss::RangeSearchResult *""'");
60069 }
60070 arg5 = reinterpret_cast< faiss::RangeSearchResult * >(argp5);
60071 {
60072 Py_BEGIN_ALLOW_THREADS
60073 try {
60074 ((faiss::IndexIDMap const *)arg1)->range_search(arg2,(float const *)arg3,arg4,arg5);
60075 } catch(faiss::FaissException & e) {
60076 PyEval_RestoreThread(_save);
60077 PyErr_SetString(PyExc_RuntimeError, e.what());
60078 SWIG_fail;
60079 }
60080 Py_END_ALLOW_THREADS
60081 }
60082 resultobj = SWIG_Py_Void();
60083 return resultobj;
60084 fail:
60085 return NULL;
60086 }
60087
60088
60089 SWIGINTERN PyObject *_wrap_delete_IndexIDMap(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60090 PyObject *resultobj = 0;
60091 faiss::IndexIDMap *arg1 = (faiss::IndexIDMap *) 0 ;
60092 void *argp1 = 0 ;
60093 int res1 = 0 ;
60094 PyObject * obj0 = 0 ;
60095
60096 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIDMap",&obj0)) SWIG_fail;
60097 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap, SWIG_POINTER_DISOWN | 0 );
60098 if (!SWIG_IsOK(res1)) {
60099 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIDMap" "', argument " "1"" of type '" "faiss::IndexIDMap *""'");
60100 }
60101 arg1 = reinterpret_cast< faiss::IndexIDMap * >(argp1);
60102 {
60103 Py_BEGIN_ALLOW_THREADS
60104 try {
60105 delete arg1;
60106 } catch(faiss::FaissException & e) {
60107 PyEval_RestoreThread(_save);
60108 PyErr_SetString(PyExc_RuntimeError, e.what());
60109 SWIG_fail;
60110 }
60111 Py_END_ALLOW_THREADS
60112 }
60113 resultobj = SWIG_Py_Void();
60114 return resultobj;
60115 fail:
60116 return NULL;
60117 }
60118
60119
60120 SWIGINTERN PyObject *_wrap_new_IndexIDMap__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60121 PyObject *resultobj = 0;
60122 faiss::IndexIDMap *result = 0 ;
60123
60124 if (!PyArg_ParseTuple(args,(char *)":new_IndexIDMap")) SWIG_fail;
60125 {
60126 Py_BEGIN_ALLOW_THREADS
60127 try {
60128 result = (faiss::IndexIDMap *)new faiss::IndexIDMap();
60129 } catch(faiss::FaissException & e) {
60130 PyEval_RestoreThread(_save);
60131 PyErr_SetString(PyExc_RuntimeError, e.what());
60132 SWIG_fail;
60133 }
60134 Py_END_ALLOW_THREADS
60135 }
60136 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIDMap, SWIG_POINTER_NEW | 0 );
60137 return resultobj;
60138 fail:
60139 return NULL;
60140 }
60141
60142
60143 SWIGINTERN PyObject *_wrap_new_IndexIDMap(PyObject *self, PyObject *args) {
60144 Py_ssize_t argc;
60145 PyObject *argv[2] = {
60146 0
60147 };
60148 Py_ssize_t ii;
60149
60150 if (!PyTuple_Check(args)) SWIG_fail;
60151 argc = args ? PyObject_Length(args) : 0;
60152 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
60153 argv[ii] = PyTuple_GET_ITEM(args,ii);
60154 }
60155 if (argc == 0) {
60156 return _wrap_new_IndexIDMap__SWIG_1(self, args);
60157 }
60158 if (argc == 1) {
60159 int _v;
60160 void *vptr = 0;
60161 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
60162 _v = SWIG_CheckState(res);
60163 if (_v) {
60164 return _wrap_new_IndexIDMap__SWIG_0(self, args);
60165 }
60166 }
60167
60168 fail:
60169 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIDMap'.\n"
60170 " Possible C/C++ prototypes are:\n"
60171 " faiss::IndexIDMap::IndexIDMap(faiss::Index *)\n"
60172 " faiss::IndexIDMap::IndexIDMap()\n");
60173 return 0;
60174 }
60175
60176
60177 SWIGINTERN PyObject *IndexIDMap_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60178 PyObject *obj;
60179 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
60180 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIDMap, SWIG_NewClientData(obj));
60181 return SWIG_Py_Void();
60182 }
60183
60184 SWIGINTERN PyObject *_wrap_IndexIDMap2_rev_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60185 PyObject *resultobj = 0;
60186 faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
60187 std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > arg2 ;
60188 void *argp1 = 0 ;
60189 int res1 = 0 ;
60190 void *argp2 ;
60191 int res2 = 0 ;
60192 PyObject * obj0 = 0 ;
60193 PyObject * obj1 = 0 ;
60194
60195 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap2_rev_map_set",&obj0,&obj1)) SWIG_fail;
60196 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
60197 if (!SWIG_IsOK(res1)) {
60198 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_rev_map_set" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
60199 }
60200 arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
60201 {
60202 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__unordered_mapT_long_long_t, 0 | 0);
60203 if (!SWIG_IsOK(res2)) {
60204 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap2_rev_map_set" "', argument " "2"" of type '" "std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t >""'");
60205 }
60206 if (!argp2) {
60207 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIDMap2_rev_map_set" "', argument " "2"" of type '" "std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t >""'");
60208 } else {
60209 std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > * temp = reinterpret_cast< std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > * >(argp2);
60210 arg2 = *temp;
60211 if (SWIG_IsNewObj(res2)) delete temp;
60212 }
60213 }
60214 if (arg1) (arg1)->rev_map = arg2;
60215 resultobj = SWIG_Py_Void();
60216 return resultobj;
60217 fail:
60218 return NULL;
60219 }
60220
60221
60222 SWIGINTERN PyObject *_wrap_IndexIDMap2_rev_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60223 PyObject *resultobj = 0;
60224 faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
60225 void *argp1 = 0 ;
60226 int res1 = 0 ;
60227 PyObject * obj0 = 0 ;
60228 std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > result;
60229
60230 if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap2_rev_map_get",&obj0)) SWIG_fail;
60231 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
60232 if (!SWIG_IsOK(res1)) {
60233 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_rev_map_get" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
60234 }
60235 arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
60236 result = ((arg1)->rev_map);
60237 resultobj = SWIG_NewPointerObj((new std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t >(static_cast< const std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t >& >(result))), SWIGTYPE_p_std__unordered_mapT_long_long_t, SWIG_POINTER_OWN | 0 );
60238 return resultobj;
60239 fail:
60240 return NULL;
60241 }
60242
60243
60244 SWIGINTERN PyObject *_wrap_new_IndexIDMap2__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60245 PyObject *resultobj = 0;
60246 faiss::Index *arg1 = (faiss::Index *) 0 ;
60247 void *argp1 = 0 ;
60248 int res1 = 0 ;
60249 PyObject * obj0 = 0 ;
60250 faiss::IndexIDMap2 *result = 0 ;
60251
60252 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexIDMap2",&obj0)) SWIG_fail;
60253 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
60254 if (!SWIG_IsOK(res1)) {
60255 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_IndexIDMap2" "', argument " "1"" of type '" "faiss::Index *""'");
60256 }
60257 arg1 = reinterpret_cast< faiss::Index * >(argp1);
60258 {
60259 Py_BEGIN_ALLOW_THREADS
60260 try {
60261 result = (faiss::IndexIDMap2 *)new faiss::IndexIDMap2(arg1);
60262 } catch(faiss::FaissException & e) {
60263 PyEval_RestoreThread(_save);
60264 PyErr_SetString(PyExc_RuntimeError, e.what());
60265 SWIG_fail;
60266 }
60267 Py_END_ALLOW_THREADS
60268 }
60269 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIDMap2, SWIG_POINTER_NEW | 0 );
60270 return resultobj;
60271 fail:
60272 return NULL;
60273 }
60274
60275
60276 SWIGINTERN PyObject *_wrap_IndexIDMap2_construct_rev_map(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60277 PyObject *resultobj = 0;
60278 faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
60279 void *argp1 = 0 ;
60280 int res1 = 0 ;
60281 PyObject * obj0 = 0 ;
60282
60283 if (!PyArg_ParseTuple(args,(char *)"O:IndexIDMap2_construct_rev_map",&obj0)) SWIG_fail;
60284 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
60285 if (!SWIG_IsOK(res1)) {
60286 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_construct_rev_map" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
60287 }
60288 arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
60289 {
60290 Py_BEGIN_ALLOW_THREADS
60291 try {
60292 (arg1)->construct_rev_map();
60293 } catch(faiss::FaissException & e) {
60294 PyEval_RestoreThread(_save);
60295 PyErr_SetString(PyExc_RuntimeError, e.what());
60296 SWIG_fail;
60297 }
60298 Py_END_ALLOW_THREADS
60299 }
60300 resultobj = SWIG_Py_Void();
60301 return resultobj;
60302 fail:
60303 return NULL;
60304 }
60305
60306
60307 SWIGINTERN PyObject *_wrap_IndexIDMap2_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60308 PyObject *resultobj = 0;
60309 faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
60310 faiss::Index::idx_t arg2 ;
60311 float *arg3 = (float *) 0 ;
60312 long *arg4 = (long *) 0 ;
60313 void *argp1 = 0 ;
60314 int res1 = 0 ;
60315 long val2 ;
60316 int ecode2 = 0 ;
60317 void *argp3 = 0 ;
60318 int res3 = 0 ;
60319 void *argp4 = 0 ;
60320 int res4 = 0 ;
60321 PyObject * obj0 = 0 ;
60322 PyObject * obj1 = 0 ;
60323 PyObject * obj2 = 0 ;
60324 PyObject * obj3 = 0 ;
60325
60326 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexIDMap2_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
60327 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
60328 if (!SWIG_IsOK(res1)) {
60329 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_add_with_ids" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
60330 }
60331 arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
60332 ecode2 = SWIG_AsVal_long(obj1, &val2);
60333 if (!SWIG_IsOK(ecode2)) {
60334 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap2_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
60335 }
60336 arg2 = static_cast< faiss::Index::idx_t >(val2);
60337 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
60338 if (!SWIG_IsOK(res3)) {
60339 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap2_add_with_ids" "', argument " "3"" of type '" "float const *""'");
60340 }
60341 arg3 = reinterpret_cast< float * >(argp3);
60342 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
60343 if (!SWIG_IsOK(res4)) {
60344 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexIDMap2_add_with_ids" "', argument " "4"" of type '" "long const *""'");
60345 }
60346 arg4 = reinterpret_cast< long * >(argp4);
60347 {
60348 Py_BEGIN_ALLOW_THREADS
60349 try {
60350 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
60351 } catch(faiss::FaissException & e) {
60352 PyEval_RestoreThread(_save);
60353 PyErr_SetString(PyExc_RuntimeError, e.what());
60354 SWIG_fail;
60355 }
60356 Py_END_ALLOW_THREADS
60357 }
60358 resultobj = SWIG_Py_Void();
60359 return resultobj;
60360 fail:
60361 return NULL;
60362 }
60363
60364
60365 SWIGINTERN PyObject *_wrap_IndexIDMap2_remove_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60366 PyObject *resultobj = 0;
60367 faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
60368 faiss::IDSelector *arg2 = 0 ;
60369 void *argp1 = 0 ;
60370 int res1 = 0 ;
60371 void *argp2 = 0 ;
60372 int res2 = 0 ;
60373 PyObject * obj0 = 0 ;
60374 PyObject * obj1 = 0 ;
60375 long result;
60376
60377 if (!PyArg_ParseTuple(args,(char *)"OO:IndexIDMap2_remove_ids",&obj0,&obj1)) SWIG_fail;
60378 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
60379 if (!SWIG_IsOK(res1)) {
60380 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_remove_ids" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
60381 }
60382 arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
60383 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__IDSelector, 0 | 0);
60384 if (!SWIG_IsOK(res2)) {
60385 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexIDMap2_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
60386 }
60387 if (!argp2) {
60388 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IndexIDMap2_remove_ids" "', argument " "2"" of type '" "faiss::IDSelector const &""'");
60389 }
60390 arg2 = reinterpret_cast< faiss::IDSelector * >(argp2);
60391 {
60392 Py_BEGIN_ALLOW_THREADS
60393 try {
60394 result = (long)(arg1)->remove_ids((faiss::IDSelector const &)*arg2);
60395 } catch(faiss::FaissException & e) {
60396 PyEval_RestoreThread(_save);
60397 PyErr_SetString(PyExc_RuntimeError, e.what());
60398 SWIG_fail;
60399 }
60400 Py_END_ALLOW_THREADS
60401 }
60402 resultobj = SWIG_From_long(static_cast< long >(result));
60403 return resultobj;
60404 fail:
60405 return NULL;
60406 }
60407
60408
60409 SWIGINTERN PyObject *_wrap_IndexIDMap2_reconstruct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60410 PyObject *resultobj = 0;
60411 faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
60412 faiss::Index::idx_t arg2 ;
60413 float *arg3 = (float *) 0 ;
60414 void *argp1 = 0 ;
60415 int res1 = 0 ;
60416 long val2 ;
60417 int ecode2 = 0 ;
60418 void *argp3 = 0 ;
60419 int res3 = 0 ;
60420 PyObject * obj0 = 0 ;
60421 PyObject * obj1 = 0 ;
60422 PyObject * obj2 = 0 ;
60423
60424 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexIDMap2_reconstruct",&obj0,&obj1,&obj2)) SWIG_fail;
60425 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, 0 | 0 );
60426 if (!SWIG_IsOK(res1)) {
60427 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexIDMap2_reconstruct" "', argument " "1"" of type '" "faiss::IndexIDMap2 const *""'");
60428 }
60429 arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
60430 ecode2 = SWIG_AsVal_long(obj1, &val2);
60431 if (!SWIG_IsOK(ecode2)) {
60432 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexIDMap2_reconstruct" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
60433 }
60434 arg2 = static_cast< faiss::Index::idx_t >(val2);
60435 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
60436 if (!SWIG_IsOK(res3)) {
60437 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexIDMap2_reconstruct" "', argument " "3"" of type '" "float *""'");
60438 }
60439 arg3 = reinterpret_cast< float * >(argp3);
60440 {
60441 Py_BEGIN_ALLOW_THREADS
60442 try {
60443 ((faiss::IndexIDMap2 const *)arg1)->reconstruct(arg2,arg3);
60444 } catch(faiss::FaissException & e) {
60445 PyEval_RestoreThread(_save);
60446 PyErr_SetString(PyExc_RuntimeError, e.what());
60447 SWIG_fail;
60448 }
60449 Py_END_ALLOW_THREADS
60450 }
60451 resultobj = SWIG_Py_Void();
60452 return resultobj;
60453 fail:
60454 return NULL;
60455 }
60456
60457
60458 SWIGINTERN PyObject *_wrap_delete_IndexIDMap2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60459 PyObject *resultobj = 0;
60460 faiss::IndexIDMap2 *arg1 = (faiss::IndexIDMap2 *) 0 ;
60461 void *argp1 = 0 ;
60462 int res1 = 0 ;
60463 PyObject * obj0 = 0 ;
60464
60465 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexIDMap2",&obj0)) SWIG_fail;
60466 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexIDMap2, SWIG_POINTER_DISOWN | 0 );
60467 if (!SWIG_IsOK(res1)) {
60468 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexIDMap2" "', argument " "1"" of type '" "faiss::IndexIDMap2 *""'");
60469 }
60470 arg1 = reinterpret_cast< faiss::IndexIDMap2 * >(argp1);
60471 {
60472 Py_BEGIN_ALLOW_THREADS
60473 try {
60474 delete arg1;
60475 } catch(faiss::FaissException & e) {
60476 PyEval_RestoreThread(_save);
60477 PyErr_SetString(PyExc_RuntimeError, e.what());
60478 SWIG_fail;
60479 }
60480 Py_END_ALLOW_THREADS
60481 }
60482 resultobj = SWIG_Py_Void();
60483 return resultobj;
60484 fail:
60485 return NULL;
60486 }
60487
60488
60489 SWIGINTERN PyObject *_wrap_new_IndexIDMap2__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60490 PyObject *resultobj = 0;
60491 faiss::IndexIDMap2 *result = 0 ;
60492
60493 if (!PyArg_ParseTuple(args,(char *)":new_IndexIDMap2")) SWIG_fail;
60494 {
60495 Py_BEGIN_ALLOW_THREADS
60496 try {
60497 result = (faiss::IndexIDMap2 *)new faiss::IndexIDMap2();
60498 } catch(faiss::FaissException & e) {
60499 PyEval_RestoreThread(_save);
60500 PyErr_SetString(PyExc_RuntimeError, e.what());
60501 SWIG_fail;
60502 }
60503 Py_END_ALLOW_THREADS
60504 }
60505 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIDMap2, SWIG_POINTER_NEW | 0 );
60506 return resultobj;
60507 fail:
60508 return NULL;
60509 }
60510
60511
60512 SWIGINTERN PyObject *_wrap_new_IndexIDMap2(PyObject *self, PyObject *args) {
60513 Py_ssize_t argc;
60514 PyObject *argv[2] = {
60515 0
60516 };
60517 Py_ssize_t ii;
60518
60519 if (!PyTuple_Check(args)) SWIG_fail;
60520 argc = args ? PyObject_Length(args) : 0;
60521 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
60522 argv[ii] = PyTuple_GET_ITEM(args,ii);
60523 }
60524 if (argc == 0) {
60525 return _wrap_new_IndexIDMap2__SWIG_1(self, args);
60526 }
60527 if (argc == 1) {
60528 int _v;
60529 void *vptr = 0;
60530 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
60531 _v = SWIG_CheckState(res);
60532 if (_v) {
60533 return _wrap_new_IndexIDMap2__SWIG_0(self, args);
60534 }
60535 }
60536
60537 fail:
60538 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexIDMap2'.\n"
60539 " Possible C/C++ prototypes are:\n"
60540 " faiss::IndexIDMap2::IndexIDMap2(faiss::Index *)\n"
60541 " faiss::IndexIDMap2::IndexIDMap2()\n");
60542 return 0;
60543 }
60544
60545
60546 SWIGINTERN PyObject *IndexIDMap2_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60547 PyObject *obj;
60548 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
60549 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexIDMap2, SWIG_NewClientData(obj));
60550 return SWIG_Py_Void();
60551 }
60552
60553 SWIGINTERN PyObject *_wrap_IndexShards_shard_indexes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60554 PyObject *resultobj = 0;
60555 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60556 std::vector< faiss::Index * > *arg2 = (std::vector< faiss::Index * > *) 0 ;
60557 void *argp1 = 0 ;
60558 int res1 = 0 ;
60559 void *argp2 = 0 ;
60560 int res2 = 0 ;
60561 PyObject * obj0 = 0 ;
60562 PyObject * obj1 = 0 ;
60563
60564 if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_shard_indexes_set",&obj0,&obj1)) SWIG_fail;
60565 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60566 if (!SWIG_IsOK(res1)) {
60567 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_shard_indexes_set" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60568 }
60569 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60570 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
60571 if (!SWIG_IsOK(res2)) {
60572 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexShards_shard_indexes_set" "', argument " "2"" of type '" "std::vector< faiss::Index * > *""'");
60573 }
60574 arg2 = reinterpret_cast< std::vector< faiss::Index * > * >(argp2);
60575 if (arg1) (arg1)->shard_indexes = *arg2;
60576 resultobj = SWIG_Py_Void();
60577 return resultobj;
60578 fail:
60579 return NULL;
60580 }
60581
60582
60583 SWIGINTERN PyObject *_wrap_IndexShards_shard_indexes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60584 PyObject *resultobj = 0;
60585 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60586 void *argp1 = 0 ;
60587 int res1 = 0 ;
60588 PyObject * obj0 = 0 ;
60589 std::vector< faiss::Index * > *result = 0 ;
60590
60591 if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_shard_indexes_get",&obj0)) SWIG_fail;
60592 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60593 if (!SWIG_IsOK(res1)) {
60594 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_shard_indexes_get" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60595 }
60596 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60597 result = (std::vector< faiss::Index * > *)& ((arg1)->shard_indexes);
60598 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
60599 return resultobj;
60600 fail:
60601 return NULL;
60602 }
60603
60604
60605 SWIGINTERN PyObject *_wrap_IndexShards_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60606 PyObject *resultobj = 0;
60607 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60608 bool arg2 ;
60609 void *argp1 = 0 ;
60610 int res1 = 0 ;
60611 bool val2 ;
60612 int ecode2 = 0 ;
60613 PyObject * obj0 = 0 ;
60614 PyObject * obj1 = 0 ;
60615
60616 if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_own_fields_set",&obj0,&obj1)) SWIG_fail;
60617 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60618 if (!SWIG_IsOK(res1)) {
60619 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_own_fields_set" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60620 }
60621 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60622 ecode2 = SWIG_AsVal_bool(obj1, &val2);
60623 if (!SWIG_IsOK(ecode2)) {
60624 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_own_fields_set" "', argument " "2"" of type '" "bool""'");
60625 }
60626 arg2 = static_cast< bool >(val2);
60627 if (arg1) (arg1)->own_fields = arg2;
60628 resultobj = SWIG_Py_Void();
60629 return resultobj;
60630 fail:
60631 return NULL;
60632 }
60633
60634
60635 SWIGINTERN PyObject *_wrap_IndexShards_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60636 PyObject *resultobj = 0;
60637 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60638 void *argp1 = 0 ;
60639 int res1 = 0 ;
60640 PyObject * obj0 = 0 ;
60641 bool result;
60642
60643 if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_own_fields_get",&obj0)) SWIG_fail;
60644 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60645 if (!SWIG_IsOK(res1)) {
60646 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_own_fields_get" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60647 }
60648 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60649 result = (bool) ((arg1)->own_fields);
60650 resultobj = SWIG_From_bool(static_cast< bool >(result));
60651 return resultobj;
60652 fail:
60653 return NULL;
60654 }
60655
60656
60657 SWIGINTERN PyObject *_wrap_IndexShards_threaded_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60658 PyObject *resultobj = 0;
60659 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60660 bool arg2 ;
60661 void *argp1 = 0 ;
60662 int res1 = 0 ;
60663 bool val2 ;
60664 int ecode2 = 0 ;
60665 PyObject * obj0 = 0 ;
60666 PyObject * obj1 = 0 ;
60667
60668 if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_threaded_set",&obj0,&obj1)) SWIG_fail;
60669 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60670 if (!SWIG_IsOK(res1)) {
60671 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_threaded_set" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60672 }
60673 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60674 ecode2 = SWIG_AsVal_bool(obj1, &val2);
60675 if (!SWIG_IsOK(ecode2)) {
60676 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_threaded_set" "', argument " "2"" of type '" "bool""'");
60677 }
60678 arg2 = static_cast< bool >(val2);
60679 if (arg1) (arg1)->threaded = arg2;
60680 resultobj = SWIG_Py_Void();
60681 return resultobj;
60682 fail:
60683 return NULL;
60684 }
60685
60686
60687 SWIGINTERN PyObject *_wrap_IndexShards_threaded_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60688 PyObject *resultobj = 0;
60689 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60690 void *argp1 = 0 ;
60691 int res1 = 0 ;
60692 PyObject * obj0 = 0 ;
60693 bool result;
60694
60695 if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_threaded_get",&obj0)) SWIG_fail;
60696 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60697 if (!SWIG_IsOK(res1)) {
60698 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_threaded_get" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60699 }
60700 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60701 result = (bool) ((arg1)->threaded);
60702 resultobj = SWIG_From_bool(static_cast< bool >(result));
60703 return resultobj;
60704 fail:
60705 return NULL;
60706 }
60707
60708
60709 SWIGINTERN PyObject *_wrap_IndexShards_successive_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60710 PyObject *resultobj = 0;
60711 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60712 bool arg2 ;
60713 void *argp1 = 0 ;
60714 int res1 = 0 ;
60715 bool val2 ;
60716 int ecode2 = 0 ;
60717 PyObject * obj0 = 0 ;
60718 PyObject * obj1 = 0 ;
60719
60720 if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_successive_ids_set",&obj0,&obj1)) SWIG_fail;
60721 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60722 if (!SWIG_IsOK(res1)) {
60723 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_successive_ids_set" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60724 }
60725 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60726 ecode2 = SWIG_AsVal_bool(obj1, &val2);
60727 if (!SWIG_IsOK(ecode2)) {
60728 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_successive_ids_set" "', argument " "2"" of type '" "bool""'");
60729 }
60730 arg2 = static_cast< bool >(val2);
60731 if (arg1) (arg1)->successive_ids = arg2;
60732 resultobj = SWIG_Py_Void();
60733 return resultobj;
60734 fail:
60735 return NULL;
60736 }
60737
60738
60739 SWIGINTERN PyObject *_wrap_IndexShards_successive_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60740 PyObject *resultobj = 0;
60741 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60742 void *argp1 = 0 ;
60743 int res1 = 0 ;
60744 PyObject * obj0 = 0 ;
60745 bool result;
60746
60747 if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_successive_ids_get",&obj0)) SWIG_fail;
60748 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60749 if (!SWIG_IsOK(res1)) {
60750 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_successive_ids_get" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60751 }
60752 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60753 result = (bool) ((arg1)->successive_ids);
60754 resultobj = SWIG_From_bool(static_cast< bool >(result));
60755 return resultobj;
60756 fail:
60757 return NULL;
60758 }
60759
60760
60761 SWIGINTERN PyObject *_wrap_new_IndexShards__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60762 PyObject *resultobj = 0;
60763 faiss::Index::idx_t arg1 ;
60764 bool arg2 ;
60765 bool arg3 ;
60766 long val1 ;
60767 int ecode1 = 0 ;
60768 bool val2 ;
60769 int ecode2 = 0 ;
60770 bool val3 ;
60771 int ecode3 = 0 ;
60772 PyObject * obj0 = 0 ;
60773 PyObject * obj1 = 0 ;
60774 PyObject * obj2 = 0 ;
60775 faiss::IndexShards *result = 0 ;
60776
60777 if (!PyArg_ParseTuple(args,(char *)"OOO:new_IndexShards",&obj0,&obj1,&obj2)) SWIG_fail;
60778 ecode1 = SWIG_AsVal_long(obj0, &val1);
60779 if (!SWIG_IsOK(ecode1)) {
60780 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexShards" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
60781 }
60782 arg1 = static_cast< faiss::Index::idx_t >(val1);
60783 ecode2 = SWIG_AsVal_bool(obj1, &val2);
60784 if (!SWIG_IsOK(ecode2)) {
60785 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexShards" "', argument " "2"" of type '" "bool""'");
60786 }
60787 arg2 = static_cast< bool >(val2);
60788 ecode3 = SWIG_AsVal_bool(obj2, &val3);
60789 if (!SWIG_IsOK(ecode3)) {
60790 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_IndexShards" "', argument " "3"" of type '" "bool""'");
60791 }
60792 arg3 = static_cast< bool >(val3);
60793 {
60794 Py_BEGIN_ALLOW_THREADS
60795 try {
60796 result = (faiss::IndexShards *)new faiss::IndexShards(arg1,arg2,arg3);
60797 } catch(faiss::FaissException & e) {
60798 PyEval_RestoreThread(_save);
60799 PyErr_SetString(PyExc_RuntimeError, e.what());
60800 SWIG_fail;
60801 }
60802 Py_END_ALLOW_THREADS
60803 }
60804 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexShards, SWIG_POINTER_NEW | 0 );
60805 return resultobj;
60806 fail:
60807 return NULL;
60808 }
60809
60810
60811 SWIGINTERN PyObject *_wrap_new_IndexShards__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60812 PyObject *resultobj = 0;
60813 faiss::Index::idx_t arg1 ;
60814 bool arg2 ;
60815 long val1 ;
60816 int ecode1 = 0 ;
60817 bool val2 ;
60818 int ecode2 = 0 ;
60819 PyObject * obj0 = 0 ;
60820 PyObject * obj1 = 0 ;
60821 faiss::IndexShards *result = 0 ;
60822
60823 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexShards",&obj0,&obj1)) SWIG_fail;
60824 ecode1 = SWIG_AsVal_long(obj0, &val1);
60825 if (!SWIG_IsOK(ecode1)) {
60826 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexShards" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
60827 }
60828 arg1 = static_cast< faiss::Index::idx_t >(val1);
60829 ecode2 = SWIG_AsVal_bool(obj1, &val2);
60830 if (!SWIG_IsOK(ecode2)) {
60831 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexShards" "', argument " "2"" of type '" "bool""'");
60832 }
60833 arg2 = static_cast< bool >(val2);
60834 {
60835 Py_BEGIN_ALLOW_THREADS
60836 try {
60837 result = (faiss::IndexShards *)new faiss::IndexShards(arg1,arg2);
60838 } catch(faiss::FaissException & e) {
60839 PyEval_RestoreThread(_save);
60840 PyErr_SetString(PyExc_RuntimeError, e.what());
60841 SWIG_fail;
60842 }
60843 Py_END_ALLOW_THREADS
60844 }
60845 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexShards, SWIG_POINTER_NEW | 0 );
60846 return resultobj;
60847 fail:
60848 return NULL;
60849 }
60850
60851
60852 SWIGINTERN PyObject *_wrap_new_IndexShards__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60853 PyObject *resultobj = 0;
60854 faiss::Index::idx_t arg1 ;
60855 long val1 ;
60856 int ecode1 = 0 ;
60857 PyObject * obj0 = 0 ;
60858 faiss::IndexShards *result = 0 ;
60859
60860 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexShards",&obj0)) SWIG_fail;
60861 ecode1 = SWIG_AsVal_long(obj0, &val1);
60862 if (!SWIG_IsOK(ecode1)) {
60863 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexShards" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
60864 }
60865 arg1 = static_cast< faiss::Index::idx_t >(val1);
60866 {
60867 Py_BEGIN_ALLOW_THREADS
60868 try {
60869 result = (faiss::IndexShards *)new faiss::IndexShards(arg1);
60870 } catch(faiss::FaissException & e) {
60871 PyEval_RestoreThread(_save);
60872 PyErr_SetString(PyExc_RuntimeError, e.what());
60873 SWIG_fail;
60874 }
60875 Py_END_ALLOW_THREADS
60876 }
60877 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexShards, SWIG_POINTER_NEW | 0 );
60878 return resultobj;
60879 fail:
60880 return NULL;
60881 }
60882
60883
60884 SWIGINTERN PyObject *_wrap_new_IndexShards(PyObject *self, PyObject *args) {
60885 Py_ssize_t argc;
60886 PyObject *argv[4] = {
60887 0
60888 };
60889 Py_ssize_t ii;
60890
60891 if (!PyTuple_Check(args)) SWIG_fail;
60892 argc = args ? PyObject_Length(args) : 0;
60893 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
60894 argv[ii] = PyTuple_GET_ITEM(args,ii);
60895 }
60896 if (argc == 1) {
60897 int _v;
60898 {
60899 int res = SWIG_AsVal_long(argv[0], NULL);
60900 _v = SWIG_CheckState(res);
60901 }
60902 if (_v) {
60903 return _wrap_new_IndexShards__SWIG_2(self, args);
60904 }
60905 }
60906 if (argc == 2) {
60907 int _v;
60908 {
60909 int res = SWIG_AsVal_long(argv[0], NULL);
60910 _v = SWIG_CheckState(res);
60911 }
60912 if (_v) {
60913 {
60914 int res = SWIG_AsVal_bool(argv[1], NULL);
60915 _v = SWIG_CheckState(res);
60916 }
60917 if (_v) {
60918 return _wrap_new_IndexShards__SWIG_1(self, args);
60919 }
60920 }
60921 }
60922 if (argc == 3) {
60923 int _v;
60924 {
60925 int res = SWIG_AsVal_long(argv[0], NULL);
60926 _v = SWIG_CheckState(res);
60927 }
60928 if (_v) {
60929 {
60930 int res = SWIG_AsVal_bool(argv[1], NULL);
60931 _v = SWIG_CheckState(res);
60932 }
60933 if (_v) {
60934 {
60935 int res = SWIG_AsVal_bool(argv[2], NULL);
60936 _v = SWIG_CheckState(res);
60937 }
60938 if (_v) {
60939 return _wrap_new_IndexShards__SWIG_0(self, args);
60940 }
60941 }
60942 }
60943 }
60944
60945 fail:
60946 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexShards'.\n"
60947 " Possible C/C++ prototypes are:\n"
60948 " faiss::IndexShards::IndexShards(faiss::Index::idx_t,bool,bool)\n"
60949 " faiss::IndexShards::IndexShards(faiss::Index::idx_t,bool)\n"
60950 " faiss::IndexShards::IndexShards(faiss::Index::idx_t)\n");
60951 return 0;
60952 }
60953
60954
60955 SWIGINTERN PyObject *_wrap_IndexShards_add_shard(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60956 PyObject *resultobj = 0;
60957 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60958 faiss::Index *arg2 = (faiss::Index *) 0 ;
60959 void *argp1 = 0 ;
60960 int res1 = 0 ;
60961 void *argp2 = 0 ;
60962 int res2 = 0 ;
60963 PyObject * obj0 = 0 ;
60964 PyObject * obj1 = 0 ;
60965
60966 if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_add_shard",&obj0,&obj1)) SWIG_fail;
60967 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
60968 if (!SWIG_IsOK(res1)) {
60969 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_add_shard" "', argument " "1"" of type '" "faiss::IndexShards *""'");
60970 }
60971 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
60972 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
60973 if (!SWIG_IsOK(res2)) {
60974 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexShards_add_shard" "', argument " "2"" of type '" "faiss::Index *""'");
60975 }
60976 arg2 = reinterpret_cast< faiss::Index * >(argp2);
60977 {
60978 Py_BEGIN_ALLOW_THREADS
60979 try {
60980 (arg1)->add_shard(arg2);
60981 } catch(faiss::FaissException & e) {
60982 PyEval_RestoreThread(_save);
60983 PyErr_SetString(PyExc_RuntimeError, e.what());
60984 SWIG_fail;
60985 }
60986 Py_END_ALLOW_THREADS
60987 }
60988 resultobj = SWIG_Py_Void();
60989 return resultobj;
60990 fail:
60991 return NULL;
60992 }
60993
60994
60995 SWIGINTERN PyObject *_wrap_IndexShards_sync_with_shard_indexes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
60996 PyObject *resultobj = 0;
60997 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
60998 void *argp1 = 0 ;
60999 int res1 = 0 ;
61000 PyObject * obj0 = 0 ;
61001
61002 if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_sync_with_shard_indexes",&obj0)) SWIG_fail;
61003 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61004 if (!SWIG_IsOK(res1)) {
61005 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_sync_with_shard_indexes" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61006 }
61007 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61008 {
61009 Py_BEGIN_ALLOW_THREADS
61010 try {
61011 (arg1)->sync_with_shard_indexes();
61012 } catch(faiss::FaissException & e) {
61013 PyEval_RestoreThread(_save);
61014 PyErr_SetString(PyExc_RuntimeError, e.what());
61015 SWIG_fail;
61016 }
61017 Py_END_ALLOW_THREADS
61018 }
61019 resultobj = SWIG_Py_Void();
61020 return resultobj;
61021 fail:
61022 return NULL;
61023 }
61024
61025
61026 SWIGINTERN PyObject *_wrap_IndexShards_at(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61027 PyObject *resultobj = 0;
61028 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61029 int arg2 ;
61030 void *argp1 = 0 ;
61031 int res1 = 0 ;
61032 int val2 ;
61033 int ecode2 = 0 ;
61034 PyObject * obj0 = 0 ;
61035 PyObject * obj1 = 0 ;
61036 faiss::Index *result = 0 ;
61037
61038 if (!PyArg_ParseTuple(args,(char *)"OO:IndexShards_at",&obj0,&obj1)) SWIG_fail;
61039 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61040 if (!SWIG_IsOK(res1)) {
61041 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_at" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61042 }
61043 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61044 ecode2 = SWIG_AsVal_int(obj1, &val2);
61045 if (!SWIG_IsOK(ecode2)) {
61046 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_at" "', argument " "2"" of type '" "int""'");
61047 }
61048 arg2 = static_cast< int >(val2);
61049 {
61050 Py_BEGIN_ALLOW_THREADS
61051 try {
61052 result = (faiss::Index *)(arg1)->at(arg2);
61053 } catch(faiss::FaissException & e) {
61054 PyEval_RestoreThread(_save);
61055 PyErr_SetString(PyExc_RuntimeError, e.what());
61056 SWIG_fail;
61057 }
61058 Py_END_ALLOW_THREADS
61059 }
61060 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Index, 0 | 0 );
61061 return resultobj;
61062 fail:
61063 return NULL;
61064 }
61065
61066
61067 SWIGINTERN PyObject *_wrap_IndexShards_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61068 PyObject *resultobj = 0;
61069 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61070 faiss::Index::idx_t arg2 ;
61071 float *arg3 = (float *) 0 ;
61072 void *argp1 = 0 ;
61073 int res1 = 0 ;
61074 long val2 ;
61075 int ecode2 = 0 ;
61076 void *argp3 = 0 ;
61077 int res3 = 0 ;
61078 PyObject * obj0 = 0 ;
61079 PyObject * obj1 = 0 ;
61080 PyObject * obj2 = 0 ;
61081
61082 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexShards_add",&obj0,&obj1,&obj2)) SWIG_fail;
61083 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61084 if (!SWIG_IsOK(res1)) {
61085 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_add" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61086 }
61087 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61088 ecode2 = SWIG_AsVal_long(obj1, &val2);
61089 if (!SWIG_IsOK(ecode2)) {
61090 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61091 }
61092 arg2 = static_cast< faiss::Index::idx_t >(val2);
61093 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61094 if (!SWIG_IsOK(res3)) {
61095 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexShards_add" "', argument " "3"" of type '" "float const *""'");
61096 }
61097 arg3 = reinterpret_cast< float * >(argp3);
61098 {
61099 Py_BEGIN_ALLOW_THREADS
61100 try {
61101 (arg1)->add(arg2,(float const *)arg3);
61102 } catch(faiss::FaissException & e) {
61103 PyEval_RestoreThread(_save);
61104 PyErr_SetString(PyExc_RuntimeError, e.what());
61105 SWIG_fail;
61106 }
61107 Py_END_ALLOW_THREADS
61108 }
61109 resultobj = SWIG_Py_Void();
61110 return resultobj;
61111 fail:
61112 return NULL;
61113 }
61114
61115
61116 SWIGINTERN PyObject *_wrap_IndexShards_add_with_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61117 PyObject *resultobj = 0;
61118 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61119 faiss::Index::idx_t arg2 ;
61120 float *arg3 = (float *) 0 ;
61121 long *arg4 = (long *) 0 ;
61122 void *argp1 = 0 ;
61123 int res1 = 0 ;
61124 long val2 ;
61125 int ecode2 = 0 ;
61126 void *argp3 = 0 ;
61127 int res3 = 0 ;
61128 void *argp4 = 0 ;
61129 int res4 = 0 ;
61130 PyObject * obj0 = 0 ;
61131 PyObject * obj1 = 0 ;
61132 PyObject * obj2 = 0 ;
61133 PyObject * obj3 = 0 ;
61134
61135 if (!PyArg_ParseTuple(args,(char *)"OOOO:IndexShards_add_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
61136 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61137 if (!SWIG_IsOK(res1)) {
61138 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_add_with_ids" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61139 }
61140 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61141 ecode2 = SWIG_AsVal_long(obj1, &val2);
61142 if (!SWIG_IsOK(ecode2)) {
61143 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_add_with_ids" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61144 }
61145 arg2 = static_cast< faiss::Index::idx_t >(val2);
61146 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61147 if (!SWIG_IsOK(res3)) {
61148 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexShards_add_with_ids" "', argument " "3"" of type '" "float const *""'");
61149 }
61150 arg3 = reinterpret_cast< float * >(argp3);
61151 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
61152 if (!SWIG_IsOK(res4)) {
61153 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "IndexShards_add_with_ids" "', argument " "4"" of type '" "long const *""'");
61154 }
61155 arg4 = reinterpret_cast< long * >(argp4);
61156 {
61157 Py_BEGIN_ALLOW_THREADS
61158 try {
61159 (arg1)->add_with_ids(arg2,(float const *)arg3,(long const *)arg4);
61160 } catch(faiss::FaissException & e) {
61161 PyEval_RestoreThread(_save);
61162 PyErr_SetString(PyExc_RuntimeError, e.what());
61163 SWIG_fail;
61164 }
61165 Py_END_ALLOW_THREADS
61166 }
61167 resultobj = SWIG_Py_Void();
61168 return resultobj;
61169 fail:
61170 return NULL;
61171 }
61172
61173
61174 SWIGINTERN PyObject *_wrap_IndexShards_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61175 PyObject *resultobj = 0;
61176 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61177 faiss::Index::idx_t arg2 ;
61178 float *arg3 = (float *) 0 ;
61179 faiss::Index::idx_t arg4 ;
61180 float *arg5 = (float *) 0 ;
61181 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
61182 void *argp1 = 0 ;
61183 int res1 = 0 ;
61184 long val2 ;
61185 int ecode2 = 0 ;
61186 void *argp3 = 0 ;
61187 int res3 = 0 ;
61188 long val4 ;
61189 int ecode4 = 0 ;
61190 void *argp5 = 0 ;
61191 int res5 = 0 ;
61192 void *argp6 = 0 ;
61193 int res6 = 0 ;
61194 PyObject * obj0 = 0 ;
61195 PyObject * obj1 = 0 ;
61196 PyObject * obj2 = 0 ;
61197 PyObject * obj3 = 0 ;
61198 PyObject * obj4 = 0 ;
61199 PyObject * obj5 = 0 ;
61200
61201 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexShards_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
61202 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61203 if (!SWIG_IsOK(res1)) {
61204 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_search" "', argument " "1"" of type '" "faiss::IndexShards const *""'");
61205 }
61206 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61207 ecode2 = SWIG_AsVal_long(obj1, &val2);
61208 if (!SWIG_IsOK(ecode2)) {
61209 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61210 }
61211 arg2 = static_cast< faiss::Index::idx_t >(val2);
61212 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61213 if (!SWIG_IsOK(res3)) {
61214 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexShards_search" "', argument " "3"" of type '" "float const *""'");
61215 }
61216 arg3 = reinterpret_cast< float * >(argp3);
61217 ecode4 = SWIG_AsVal_long(obj3, &val4);
61218 if (!SWIG_IsOK(ecode4)) {
61219 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexShards_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
61220 }
61221 arg4 = static_cast< faiss::Index::idx_t >(val4);
61222 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
61223 if (!SWIG_IsOK(res5)) {
61224 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexShards_search" "', argument " "5"" of type '" "float *""'");
61225 }
61226 arg5 = reinterpret_cast< float * >(argp5);
61227 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
61228 if (!SWIG_IsOK(res6)) {
61229 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexShards_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
61230 }
61231 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
61232 {
61233 Py_BEGIN_ALLOW_THREADS
61234 try {
61235 ((faiss::IndexShards const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
61236 } catch(faiss::FaissException & e) {
61237 PyEval_RestoreThread(_save);
61238 PyErr_SetString(PyExc_RuntimeError, e.what());
61239 SWIG_fail;
61240 }
61241 Py_END_ALLOW_THREADS
61242 }
61243 resultobj = SWIG_Py_Void();
61244 return resultobj;
61245 fail:
61246 return NULL;
61247 }
61248
61249
61250 SWIGINTERN PyObject *_wrap_IndexShards_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61251 PyObject *resultobj = 0;
61252 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61253 faiss::Index::idx_t arg2 ;
61254 float *arg3 = (float *) 0 ;
61255 void *argp1 = 0 ;
61256 int res1 = 0 ;
61257 long val2 ;
61258 int ecode2 = 0 ;
61259 void *argp3 = 0 ;
61260 int res3 = 0 ;
61261 PyObject * obj0 = 0 ;
61262 PyObject * obj1 = 0 ;
61263 PyObject * obj2 = 0 ;
61264
61265 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexShards_train",&obj0,&obj1,&obj2)) SWIG_fail;
61266 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61267 if (!SWIG_IsOK(res1)) {
61268 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_train" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61269 }
61270 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61271 ecode2 = SWIG_AsVal_long(obj1, &val2);
61272 if (!SWIG_IsOK(ecode2)) {
61273 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexShards_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61274 }
61275 arg2 = static_cast< faiss::Index::idx_t >(val2);
61276 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61277 if (!SWIG_IsOK(res3)) {
61278 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexShards_train" "', argument " "3"" of type '" "float const *""'");
61279 }
61280 arg3 = reinterpret_cast< float * >(argp3);
61281 {
61282 Py_BEGIN_ALLOW_THREADS
61283 try {
61284 (arg1)->train(arg2,(float const *)arg3);
61285 } catch(faiss::FaissException & e) {
61286 PyEval_RestoreThread(_save);
61287 PyErr_SetString(PyExc_RuntimeError, e.what());
61288 SWIG_fail;
61289 }
61290 Py_END_ALLOW_THREADS
61291 }
61292 resultobj = SWIG_Py_Void();
61293 return resultobj;
61294 fail:
61295 return NULL;
61296 }
61297
61298
61299 SWIGINTERN PyObject *_wrap_IndexShards_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61300 PyObject *resultobj = 0;
61301 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61302 void *argp1 = 0 ;
61303 int res1 = 0 ;
61304 PyObject * obj0 = 0 ;
61305
61306 if (!PyArg_ParseTuple(args,(char *)"O:IndexShards_reset",&obj0)) SWIG_fail;
61307 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, 0 | 0 );
61308 if (!SWIG_IsOK(res1)) {
61309 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexShards_reset" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61310 }
61311 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61312 {
61313 Py_BEGIN_ALLOW_THREADS
61314 try {
61315 (arg1)->reset();
61316 } catch(faiss::FaissException & e) {
61317 PyEval_RestoreThread(_save);
61318 PyErr_SetString(PyExc_RuntimeError, e.what());
61319 SWIG_fail;
61320 }
61321 Py_END_ALLOW_THREADS
61322 }
61323 resultobj = SWIG_Py_Void();
61324 return resultobj;
61325 fail:
61326 return NULL;
61327 }
61328
61329
61330 SWIGINTERN PyObject *_wrap_delete_IndexShards(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61331 PyObject *resultobj = 0;
61332 faiss::IndexShards *arg1 = (faiss::IndexShards *) 0 ;
61333 void *argp1 = 0 ;
61334 int res1 = 0 ;
61335 PyObject * obj0 = 0 ;
61336
61337 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexShards",&obj0)) SWIG_fail;
61338 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexShards, SWIG_POINTER_DISOWN | 0 );
61339 if (!SWIG_IsOK(res1)) {
61340 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexShards" "', argument " "1"" of type '" "faiss::IndexShards *""'");
61341 }
61342 arg1 = reinterpret_cast< faiss::IndexShards * >(argp1);
61343 {
61344 Py_BEGIN_ALLOW_THREADS
61345 try {
61346 delete arg1;
61347 } catch(faiss::FaissException & e) {
61348 PyEval_RestoreThread(_save);
61349 PyErr_SetString(PyExc_RuntimeError, e.what());
61350 SWIG_fail;
61351 }
61352 Py_END_ALLOW_THREADS
61353 }
61354 resultobj = SWIG_Py_Void();
61355 return resultobj;
61356 fail:
61357 return NULL;
61358 }
61359
61360
61361 SWIGINTERN PyObject *IndexShards_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61362 PyObject *obj;
61363 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
61364 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexShards, SWIG_NewClientData(obj));
61365 return SWIG_Py_Void();
61366 }
61367
61368 SWIGINTERN PyObject *_wrap_IndexSplitVectors_own_fields_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61369 PyObject *resultobj = 0;
61370 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61371 bool arg2 ;
61372 void *argp1 = 0 ;
61373 int res1 = 0 ;
61374 bool val2 ;
61375 int ecode2 = 0 ;
61376 PyObject * obj0 = 0 ;
61377 PyObject * obj1 = 0 ;
61378
61379 if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_own_fields_set",&obj0,&obj1)) SWIG_fail;
61380 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61381 if (!SWIG_IsOK(res1)) {
61382 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_own_fields_set" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61383 }
61384 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61385 ecode2 = SWIG_AsVal_bool(obj1, &val2);
61386 if (!SWIG_IsOK(ecode2)) {
61387 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_own_fields_set" "', argument " "2"" of type '" "bool""'");
61388 }
61389 arg2 = static_cast< bool >(val2);
61390 if (arg1) (arg1)->own_fields = arg2;
61391 resultobj = SWIG_Py_Void();
61392 return resultobj;
61393 fail:
61394 return NULL;
61395 }
61396
61397
61398 SWIGINTERN PyObject *_wrap_IndexSplitVectors_own_fields_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61399 PyObject *resultobj = 0;
61400 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61401 void *argp1 = 0 ;
61402 int res1 = 0 ;
61403 PyObject * obj0 = 0 ;
61404 bool result;
61405
61406 if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_own_fields_get",&obj0)) SWIG_fail;
61407 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61408 if (!SWIG_IsOK(res1)) {
61409 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_own_fields_get" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61410 }
61411 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61412 result = (bool) ((arg1)->own_fields);
61413 resultobj = SWIG_From_bool(static_cast< bool >(result));
61414 return resultobj;
61415 fail:
61416 return NULL;
61417 }
61418
61419
61420 SWIGINTERN PyObject *_wrap_IndexSplitVectors_threaded_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61421 PyObject *resultobj = 0;
61422 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61423 bool arg2 ;
61424 void *argp1 = 0 ;
61425 int res1 = 0 ;
61426 bool val2 ;
61427 int ecode2 = 0 ;
61428 PyObject * obj0 = 0 ;
61429 PyObject * obj1 = 0 ;
61430
61431 if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_threaded_set",&obj0,&obj1)) SWIG_fail;
61432 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61433 if (!SWIG_IsOK(res1)) {
61434 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_threaded_set" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61435 }
61436 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61437 ecode2 = SWIG_AsVal_bool(obj1, &val2);
61438 if (!SWIG_IsOK(ecode2)) {
61439 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_threaded_set" "', argument " "2"" of type '" "bool""'");
61440 }
61441 arg2 = static_cast< bool >(val2);
61442 if (arg1) (arg1)->threaded = arg2;
61443 resultobj = SWIG_Py_Void();
61444 return resultobj;
61445 fail:
61446 return NULL;
61447 }
61448
61449
61450 SWIGINTERN PyObject *_wrap_IndexSplitVectors_threaded_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61451 PyObject *resultobj = 0;
61452 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61453 void *argp1 = 0 ;
61454 int res1 = 0 ;
61455 PyObject * obj0 = 0 ;
61456 bool result;
61457
61458 if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_threaded_get",&obj0)) SWIG_fail;
61459 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61460 if (!SWIG_IsOK(res1)) {
61461 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_threaded_get" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61462 }
61463 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61464 result = (bool) ((arg1)->threaded);
61465 resultobj = SWIG_From_bool(static_cast< bool >(result));
61466 return resultobj;
61467 fail:
61468 return NULL;
61469 }
61470
61471
61472 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sub_indexes_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61473 PyObject *resultobj = 0;
61474 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61475 std::vector< faiss::Index * > *arg2 = (std::vector< faiss::Index * > *) 0 ;
61476 void *argp1 = 0 ;
61477 int res1 = 0 ;
61478 void *argp2 = 0 ;
61479 int res2 = 0 ;
61480 PyObject * obj0 = 0 ;
61481 PyObject * obj1 = 0 ;
61482
61483 if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_sub_indexes_set",&obj0,&obj1)) SWIG_fail;
61484 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61485 if (!SWIG_IsOK(res1)) {
61486 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sub_indexes_set" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61487 }
61488 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61489 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
61490 if (!SWIG_IsOK(res2)) {
61491 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexSplitVectors_sub_indexes_set" "', argument " "2"" of type '" "std::vector< faiss::Index * > *""'");
61492 }
61493 arg2 = reinterpret_cast< std::vector< faiss::Index * > * >(argp2);
61494 if (arg1) (arg1)->sub_indexes = *arg2;
61495 resultobj = SWIG_Py_Void();
61496 return resultobj;
61497 fail:
61498 return NULL;
61499 }
61500
61501
61502 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sub_indexes_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61503 PyObject *resultobj = 0;
61504 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61505 void *argp1 = 0 ;
61506 int res1 = 0 ;
61507 PyObject * obj0 = 0 ;
61508 std::vector< faiss::Index * > *result = 0 ;
61509
61510 if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_sub_indexes_get",&obj0)) SWIG_fail;
61511 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61512 if (!SWIG_IsOK(res1)) {
61513 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sub_indexes_get" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61514 }
61515 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61516 result = (std::vector< faiss::Index * > *)& ((arg1)->sub_indexes);
61517 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__Index_p_t, 0 | 0 );
61518 return resultobj;
61519 fail:
61520 return NULL;
61521 }
61522
61523
61524 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sum_d_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61525 PyObject *resultobj = 0;
61526 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61527 faiss::Index::idx_t arg2 ;
61528 void *argp1 = 0 ;
61529 int res1 = 0 ;
61530 long val2 ;
61531 int ecode2 = 0 ;
61532 PyObject * obj0 = 0 ;
61533 PyObject * obj1 = 0 ;
61534
61535 if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_sum_d_set",&obj0,&obj1)) SWIG_fail;
61536 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61537 if (!SWIG_IsOK(res1)) {
61538 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sum_d_set" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61539 }
61540 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61541 ecode2 = SWIG_AsVal_long(obj1, &val2);
61542 if (!SWIG_IsOK(ecode2)) {
61543 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_sum_d_set" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61544 }
61545 arg2 = static_cast< faiss::Index::idx_t >(val2);
61546 if (arg1) (arg1)->sum_d = arg2;
61547 resultobj = SWIG_Py_Void();
61548 return resultobj;
61549 fail:
61550 return NULL;
61551 }
61552
61553
61554 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sum_d_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61555 PyObject *resultobj = 0;
61556 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61557 void *argp1 = 0 ;
61558 int res1 = 0 ;
61559 PyObject * obj0 = 0 ;
61560 faiss::Index::idx_t result;
61561
61562 if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_sum_d_get",&obj0)) SWIG_fail;
61563 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61564 if (!SWIG_IsOK(res1)) {
61565 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sum_d_get" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61566 }
61567 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61568 result = (faiss::Index::idx_t) ((arg1)->sum_d);
61569 resultobj = SWIG_From_long(static_cast< long >(result));
61570 return resultobj;
61571 fail:
61572 return NULL;
61573 }
61574
61575
61576 SWIGINTERN PyObject *_wrap_new_IndexSplitVectors__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61577 PyObject *resultobj = 0;
61578 faiss::Index::idx_t arg1 ;
61579 bool arg2 ;
61580 long val1 ;
61581 int ecode1 = 0 ;
61582 bool val2 ;
61583 int ecode2 = 0 ;
61584 PyObject * obj0 = 0 ;
61585 PyObject * obj1 = 0 ;
61586 faiss::IndexSplitVectors *result = 0 ;
61587
61588 if (!PyArg_ParseTuple(args,(char *)"OO:new_IndexSplitVectors",&obj0,&obj1)) SWIG_fail;
61589 ecode1 = SWIG_AsVal_long(obj0, &val1);
61590 if (!SWIG_IsOK(ecode1)) {
61591 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexSplitVectors" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
61592 }
61593 arg1 = static_cast< faiss::Index::idx_t >(val1);
61594 ecode2 = SWIG_AsVal_bool(obj1, &val2);
61595 if (!SWIG_IsOK(ecode2)) {
61596 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IndexSplitVectors" "', argument " "2"" of type '" "bool""'");
61597 }
61598 arg2 = static_cast< bool >(val2);
61599 {
61600 Py_BEGIN_ALLOW_THREADS
61601 try {
61602 result = (faiss::IndexSplitVectors *)new faiss::IndexSplitVectors(arg1,arg2);
61603 } catch(faiss::FaissException & e) {
61604 PyEval_RestoreThread(_save);
61605 PyErr_SetString(PyExc_RuntimeError, e.what());
61606 SWIG_fail;
61607 }
61608 Py_END_ALLOW_THREADS
61609 }
61610 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexSplitVectors, SWIG_POINTER_NEW | 0 );
61611 return resultobj;
61612 fail:
61613 return NULL;
61614 }
61615
61616
61617 SWIGINTERN PyObject *_wrap_new_IndexSplitVectors__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61618 PyObject *resultobj = 0;
61619 faiss::Index::idx_t arg1 ;
61620 long val1 ;
61621 int ecode1 = 0 ;
61622 PyObject * obj0 = 0 ;
61623 faiss::IndexSplitVectors *result = 0 ;
61624
61625 if (!PyArg_ParseTuple(args,(char *)"O:new_IndexSplitVectors",&obj0)) SWIG_fail;
61626 ecode1 = SWIG_AsVal_long(obj0, &val1);
61627 if (!SWIG_IsOK(ecode1)) {
61628 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IndexSplitVectors" "', argument " "1"" of type '" "faiss::Index::idx_t""'");
61629 }
61630 arg1 = static_cast< faiss::Index::idx_t >(val1);
61631 {
61632 Py_BEGIN_ALLOW_THREADS
61633 try {
61634 result = (faiss::IndexSplitVectors *)new faiss::IndexSplitVectors(arg1);
61635 } catch(faiss::FaissException & e) {
61636 PyEval_RestoreThread(_save);
61637 PyErr_SetString(PyExc_RuntimeError, e.what());
61638 SWIG_fail;
61639 }
61640 Py_END_ALLOW_THREADS
61641 }
61642 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexSplitVectors, SWIG_POINTER_NEW | 0 );
61643 return resultobj;
61644 fail:
61645 return NULL;
61646 }
61647
61648
61649 SWIGINTERN PyObject *_wrap_new_IndexSplitVectors(PyObject *self, PyObject *args) {
61650 Py_ssize_t argc;
61651 PyObject *argv[3] = {
61652 0
61653 };
61654 Py_ssize_t ii;
61655
61656 if (!PyTuple_Check(args)) SWIG_fail;
61657 argc = args ? PyObject_Length(args) : 0;
61658 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
61659 argv[ii] = PyTuple_GET_ITEM(args,ii);
61660 }
61661 if (argc == 1) {
61662 int _v;
61663 {
61664 int res = SWIG_AsVal_long(argv[0], NULL);
61665 _v = SWIG_CheckState(res);
61666 }
61667 if (_v) {
61668 return _wrap_new_IndexSplitVectors__SWIG_1(self, args);
61669 }
61670 }
61671 if (argc == 2) {
61672 int _v;
61673 {
61674 int res = SWIG_AsVal_long(argv[0], NULL);
61675 _v = SWIG_CheckState(res);
61676 }
61677 if (_v) {
61678 {
61679 int res = SWIG_AsVal_bool(argv[1], NULL);
61680 _v = SWIG_CheckState(res);
61681 }
61682 if (_v) {
61683 return _wrap_new_IndexSplitVectors__SWIG_0(self, args);
61684 }
61685 }
61686 }
61687
61688 fail:
61689 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_IndexSplitVectors'.\n"
61690 " Possible C/C++ prototypes are:\n"
61691 " faiss::IndexSplitVectors::IndexSplitVectors(faiss::Index::idx_t,bool)\n"
61692 " faiss::IndexSplitVectors::IndexSplitVectors(faiss::Index::idx_t)\n");
61693 return 0;
61694 }
61695
61696
61697 SWIGINTERN PyObject *_wrap_IndexSplitVectors_add_sub_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61698 PyObject *resultobj = 0;
61699 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61700 faiss::Index *arg2 = (faiss::Index *) 0 ;
61701 void *argp1 = 0 ;
61702 int res1 = 0 ;
61703 void *argp2 = 0 ;
61704 int res2 = 0 ;
61705 PyObject * obj0 = 0 ;
61706 PyObject * obj1 = 0 ;
61707
61708 if (!PyArg_ParseTuple(args,(char *)"OO:IndexSplitVectors_add_sub_index",&obj0,&obj1)) SWIG_fail;
61709 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61710 if (!SWIG_IsOK(res1)) {
61711 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_add_sub_index" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61712 }
61713 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61714 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
61715 if (!SWIG_IsOK(res2)) {
61716 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IndexSplitVectors_add_sub_index" "', argument " "2"" of type '" "faiss::Index *""'");
61717 }
61718 arg2 = reinterpret_cast< faiss::Index * >(argp2);
61719 {
61720 Py_BEGIN_ALLOW_THREADS
61721 try {
61722 (arg1)->add_sub_index(arg2);
61723 } catch(faiss::FaissException & e) {
61724 PyEval_RestoreThread(_save);
61725 PyErr_SetString(PyExc_RuntimeError, e.what());
61726 SWIG_fail;
61727 }
61728 Py_END_ALLOW_THREADS
61729 }
61730 resultobj = SWIG_Py_Void();
61731 return resultobj;
61732 fail:
61733 return NULL;
61734 }
61735
61736
61737 SWIGINTERN PyObject *_wrap_IndexSplitVectors_sync_with_sub_indexes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61738 PyObject *resultobj = 0;
61739 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61740 void *argp1 = 0 ;
61741 int res1 = 0 ;
61742 PyObject * obj0 = 0 ;
61743
61744 if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_sync_with_sub_indexes",&obj0)) SWIG_fail;
61745 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61746 if (!SWIG_IsOK(res1)) {
61747 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_sync_with_sub_indexes" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61748 }
61749 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61750 {
61751 Py_BEGIN_ALLOW_THREADS
61752 try {
61753 (arg1)->sync_with_sub_indexes();
61754 } catch(faiss::FaissException & e) {
61755 PyEval_RestoreThread(_save);
61756 PyErr_SetString(PyExc_RuntimeError, e.what());
61757 SWIG_fail;
61758 }
61759 Py_END_ALLOW_THREADS
61760 }
61761 resultobj = SWIG_Py_Void();
61762 return resultobj;
61763 fail:
61764 return NULL;
61765 }
61766
61767
61768 SWIGINTERN PyObject *_wrap_IndexSplitVectors_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61769 PyObject *resultobj = 0;
61770 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61771 faiss::Index::idx_t arg2 ;
61772 float *arg3 = (float *) 0 ;
61773 void *argp1 = 0 ;
61774 int res1 = 0 ;
61775 long val2 ;
61776 int ecode2 = 0 ;
61777 void *argp3 = 0 ;
61778 int res3 = 0 ;
61779 PyObject * obj0 = 0 ;
61780 PyObject * obj1 = 0 ;
61781 PyObject * obj2 = 0 ;
61782
61783 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexSplitVectors_add",&obj0,&obj1,&obj2)) SWIG_fail;
61784 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61785 if (!SWIG_IsOK(res1)) {
61786 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_add" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61787 }
61788 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61789 ecode2 = SWIG_AsVal_long(obj1, &val2);
61790 if (!SWIG_IsOK(ecode2)) {
61791 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_add" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61792 }
61793 arg2 = static_cast< faiss::Index::idx_t >(val2);
61794 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61795 if (!SWIG_IsOK(res3)) {
61796 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexSplitVectors_add" "', argument " "3"" of type '" "float const *""'");
61797 }
61798 arg3 = reinterpret_cast< float * >(argp3);
61799 {
61800 Py_BEGIN_ALLOW_THREADS
61801 try {
61802 (arg1)->add(arg2,(float const *)arg3);
61803 } catch(faiss::FaissException & e) {
61804 PyEval_RestoreThread(_save);
61805 PyErr_SetString(PyExc_RuntimeError, e.what());
61806 SWIG_fail;
61807 }
61808 Py_END_ALLOW_THREADS
61809 }
61810 resultobj = SWIG_Py_Void();
61811 return resultobj;
61812 fail:
61813 return NULL;
61814 }
61815
61816
61817 SWIGINTERN PyObject *_wrap_IndexSplitVectors_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61818 PyObject *resultobj = 0;
61819 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61820 faiss::Index::idx_t arg2 ;
61821 float *arg3 = (float *) 0 ;
61822 faiss::Index::idx_t arg4 ;
61823 float *arg5 = (float *) 0 ;
61824 faiss::Index::idx_t *arg6 = (faiss::Index::idx_t *) 0 ;
61825 void *argp1 = 0 ;
61826 int res1 = 0 ;
61827 long val2 ;
61828 int ecode2 = 0 ;
61829 void *argp3 = 0 ;
61830 int res3 = 0 ;
61831 long val4 ;
61832 int ecode4 = 0 ;
61833 void *argp5 = 0 ;
61834 int res5 = 0 ;
61835 void *argp6 = 0 ;
61836 int res6 = 0 ;
61837 PyObject * obj0 = 0 ;
61838 PyObject * obj1 = 0 ;
61839 PyObject * obj2 = 0 ;
61840 PyObject * obj3 = 0 ;
61841 PyObject * obj4 = 0 ;
61842 PyObject * obj5 = 0 ;
61843
61844 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:IndexSplitVectors_search",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
61845 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61846 if (!SWIG_IsOK(res1)) {
61847 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_search" "', argument " "1"" of type '" "faiss::IndexSplitVectors const *""'");
61848 }
61849 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61850 ecode2 = SWIG_AsVal_long(obj1, &val2);
61851 if (!SWIG_IsOK(ecode2)) {
61852 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_search" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61853 }
61854 arg2 = static_cast< faiss::Index::idx_t >(val2);
61855 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61856 if (!SWIG_IsOK(res3)) {
61857 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexSplitVectors_search" "', argument " "3"" of type '" "float const *""'");
61858 }
61859 arg3 = reinterpret_cast< float * >(argp3);
61860 ecode4 = SWIG_AsVal_long(obj3, &val4);
61861 if (!SWIG_IsOK(ecode4)) {
61862 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IndexSplitVectors_search" "', argument " "4"" of type '" "faiss::Index::idx_t""'");
61863 }
61864 arg4 = static_cast< faiss::Index::idx_t >(val4);
61865 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
61866 if (!SWIG_IsOK(res5)) {
61867 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "IndexSplitVectors_search" "', argument " "5"" of type '" "float *""'");
61868 }
61869 arg5 = reinterpret_cast< float * >(argp5);
61870 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_long, 0 | 0 );
61871 if (!SWIG_IsOK(res6)) {
61872 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "IndexSplitVectors_search" "', argument " "6"" of type '" "faiss::Index::idx_t *""'");
61873 }
61874 arg6 = reinterpret_cast< faiss::Index::idx_t * >(argp6);
61875 {
61876 Py_BEGIN_ALLOW_THREADS
61877 try {
61878 ((faiss::IndexSplitVectors const *)arg1)->search(arg2,(float const *)arg3,arg4,arg5,arg6);
61879 } catch(faiss::FaissException & e) {
61880 PyEval_RestoreThread(_save);
61881 PyErr_SetString(PyExc_RuntimeError, e.what());
61882 SWIG_fail;
61883 }
61884 Py_END_ALLOW_THREADS
61885 }
61886 resultobj = SWIG_Py_Void();
61887 return resultobj;
61888 fail:
61889 return NULL;
61890 }
61891
61892
61893 SWIGINTERN PyObject *_wrap_IndexSplitVectors_train(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61894 PyObject *resultobj = 0;
61895 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61896 faiss::Index::idx_t arg2 ;
61897 float *arg3 = (float *) 0 ;
61898 void *argp1 = 0 ;
61899 int res1 = 0 ;
61900 long val2 ;
61901 int ecode2 = 0 ;
61902 void *argp3 = 0 ;
61903 int res3 = 0 ;
61904 PyObject * obj0 = 0 ;
61905 PyObject * obj1 = 0 ;
61906 PyObject * obj2 = 0 ;
61907
61908 if (!PyArg_ParseTuple(args,(char *)"OOO:IndexSplitVectors_train",&obj0,&obj1,&obj2)) SWIG_fail;
61909 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61910 if (!SWIG_IsOK(res1)) {
61911 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_train" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61912 }
61913 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61914 ecode2 = SWIG_AsVal_long(obj1, &val2);
61915 if (!SWIG_IsOK(ecode2)) {
61916 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IndexSplitVectors_train" "', argument " "2"" of type '" "faiss::Index::idx_t""'");
61917 }
61918 arg2 = static_cast< faiss::Index::idx_t >(val2);
61919 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
61920 if (!SWIG_IsOK(res3)) {
61921 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IndexSplitVectors_train" "', argument " "3"" of type '" "float const *""'");
61922 }
61923 arg3 = reinterpret_cast< float * >(argp3);
61924 {
61925 Py_BEGIN_ALLOW_THREADS
61926 try {
61927 (arg1)->train(arg2,(float const *)arg3);
61928 } catch(faiss::FaissException & e) {
61929 PyEval_RestoreThread(_save);
61930 PyErr_SetString(PyExc_RuntimeError, e.what());
61931 SWIG_fail;
61932 }
61933 Py_END_ALLOW_THREADS
61934 }
61935 resultobj = SWIG_Py_Void();
61936 return resultobj;
61937 fail:
61938 return NULL;
61939 }
61940
61941
61942 SWIGINTERN PyObject *_wrap_IndexSplitVectors_reset(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61943 PyObject *resultobj = 0;
61944 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61945 void *argp1 = 0 ;
61946 int res1 = 0 ;
61947 PyObject * obj0 = 0 ;
61948
61949 if (!PyArg_ParseTuple(args,(char *)"O:IndexSplitVectors_reset",&obj0)) SWIG_fail;
61950 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, 0 | 0 );
61951 if (!SWIG_IsOK(res1)) {
61952 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IndexSplitVectors_reset" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61953 }
61954 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61955 {
61956 Py_BEGIN_ALLOW_THREADS
61957 try {
61958 (arg1)->reset();
61959 } catch(faiss::FaissException & e) {
61960 PyEval_RestoreThread(_save);
61961 PyErr_SetString(PyExc_RuntimeError, e.what());
61962 SWIG_fail;
61963 }
61964 Py_END_ALLOW_THREADS
61965 }
61966 resultobj = SWIG_Py_Void();
61967 return resultobj;
61968 fail:
61969 return NULL;
61970 }
61971
61972
61973 SWIGINTERN PyObject *_wrap_delete_IndexSplitVectors(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
61974 PyObject *resultobj = 0;
61975 faiss::IndexSplitVectors *arg1 = (faiss::IndexSplitVectors *) 0 ;
61976 void *argp1 = 0 ;
61977 int res1 = 0 ;
61978 PyObject * obj0 = 0 ;
61979
61980 if (!PyArg_ParseTuple(args,(char *)"O:delete_IndexSplitVectors",&obj0)) SWIG_fail;
61981 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexSplitVectors, SWIG_POINTER_DISOWN | 0 );
61982 if (!SWIG_IsOK(res1)) {
61983 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IndexSplitVectors" "', argument " "1"" of type '" "faiss::IndexSplitVectors *""'");
61984 }
61985 arg1 = reinterpret_cast< faiss::IndexSplitVectors * >(argp1);
61986 {
61987 Py_BEGIN_ALLOW_THREADS
61988 try {
61989 delete arg1;
61990 } catch(faiss::FaissException & e) {
61991 PyEval_RestoreThread(_save);
61992 PyErr_SetString(PyExc_RuntimeError, e.what());
61993 SWIG_fail;
61994 }
61995 Py_END_ALLOW_THREADS
61996 }
61997 resultobj = SWIG_Py_Void();
61998 return resultobj;
61999 fail:
62000 return NULL;
62001 }
62002
62003
62004 SWIGINTERN PyObject *IndexSplitVectors_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62005 PyObject *obj;
62006 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
62007 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IndexSplitVectors, SWIG_NewClientData(obj));
62008 return SWIG_Py_Void();
62009 }
62010
62011 SWIGINTERN PyObject *_wrap_downcast_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62012 PyObject *resultobj = 0;
62013 faiss::Index *arg1 = (faiss::Index *) 0 ;
62014 void *argp1 = 0 ;
62015 int res1 = 0 ;
62016 PyObject * obj0 = 0 ;
62017 faiss::Index *result = 0 ;
62018
62019 if (!PyArg_ParseTuple(args,(char *)"O:downcast_index",&obj0)) SWIG_fail;
62020 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
62021 if (!SWIG_IsOK(res1)) {
62022 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "downcast_index" "', argument " "1"" of type '" "faiss::Index *""'");
62023 }
62024 arg1 = reinterpret_cast< faiss::Index * >(argp1);
62025 {
62026 Py_BEGIN_ALLOW_THREADS
62027 try {
62028 result = (faiss::Index *)downcast_index(arg1);
62029 } catch(faiss::FaissException & e) {
62030 PyEval_RestoreThread(_save);
62031 PyErr_SetString(PyExc_RuntimeError, e.what());
62032 SWIG_fail;
62033 }
62034 Py_END_ALLOW_THREADS
62035 }
62036 {
62037 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62038 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
62039 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,0);
62040 } else
62041 /*@SWIG@*/
62042 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62043 if (dynamic_cast<faiss::IndexShards *> (result)) {
62044 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,0);
62045 } else
62046 /*@SWIG@*/
62047 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62048 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
62049 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,0);
62050 } else
62051 /*@SWIG@*/
62052 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62053 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
62054 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,0);
62055 } else
62056 /*@SWIG@*/
62057 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62058 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
62059 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,0);
62060 } else
62061 /*@SWIG@*/
62062 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62063 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
62064 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,0);
62065 } else
62066 /*@SWIG@*/
62067 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62068 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
62069 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,0);
62070 } else
62071 /*@SWIG@*/
62072 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62073 if (dynamic_cast<faiss::IndexIVF *> (result)) {
62074 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,0);
62075 } else
62076 /*@SWIG@*/
62077 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62078 if (dynamic_cast<faiss::IndexFlat *> (result)) {
62079 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,0);
62080 } else
62081 /*@SWIG@*/
62082 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62083 if (dynamic_cast<faiss::IndexPQ *> (result)) {
62084 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,0);
62085 } else
62086 /*@SWIG@*/
62087 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62088 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
62089 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,0);
62090 } else
62091 /*@SWIG@*/
62092 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62093 if (dynamic_cast<faiss::IndexLSH *> (result)) {
62094 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,0);
62095 } else
62096 /*@SWIG@*/
62097 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62098 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
62099 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,0);
62100 } else
62101 /*@SWIG@*/
62102 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62103 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
62104 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,0);
62105 } else
62106 /*@SWIG@*/
62107 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62108 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
62109 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,0);
62110 } else
62111 /*@SWIG@*/
62112 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62113 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
62114 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,0);
62115 } else
62116 /*@SWIG@*/
62117 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62118 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
62119 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,0);
62120 } else
62121 /*@SWIG@*/
62122 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62123 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
62124 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,0);
62125 } else
62126 /*@SWIG@*/
62127 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62128 if (dynamic_cast<faiss::Index2Layer *> (result)) {
62129 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,0);
62130 } else
62131 /*@SWIG@*/
62132
62133
62134
62135
62136
62137
62138 // default for non-recognized classes
62139 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62140 if (dynamic_cast<faiss::Index *> (result)) {
62141 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,0);
62142 } else
62143 /*@SWIG@*/
62144 if (result == NULL)
62145 {
62146 resultobj = SWIG_Py_Void();
62147
62148 // Lua does not need a push for nil
62149 } else {
62150 assert(false);
62151 }
62152
62153
62154
62155 }
62156 return resultobj;
62157 fail:
62158 return NULL;
62159 }
62160
62161
62162 SWIGINTERN PyObject *_wrap_downcast_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62163 PyObject *resultobj = 0;
62164 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
62165 void *argp1 = 0 ;
62166 int res1 = 0 ;
62167 PyObject * obj0 = 0 ;
62168 faiss::VectorTransform *result = 0 ;
62169
62170 if (!PyArg_ParseTuple(args,(char *)"O:downcast_VectorTransform",&obj0)) SWIG_fail;
62171 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
62172 if (!SWIG_IsOK(res1)) {
62173 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "downcast_VectorTransform" "', argument " "1"" of type '" "faiss::VectorTransform *""'");
62174 }
62175 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
62176 {
62177 Py_BEGIN_ALLOW_THREADS
62178 try {
62179 result = (faiss::VectorTransform *)downcast_VectorTransform(arg1);
62180 } catch(faiss::FaissException & e) {
62181 PyEval_RestoreThread(_save);
62182 PyErr_SetString(PyExc_RuntimeError, e.what());
62183 SWIG_fail;
62184 }
62185 Py_END_ALLOW_THREADS
62186 }
62187 {
62188 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62189 if (dynamic_cast<faiss::RemapDimensionsTransform *> (result)) {
62190 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RemapDimensionsTransform,0);
62191 } else
62192 /*@SWIG@*/
62193 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62194 if (dynamic_cast<faiss::OPQMatrix *> (result)) {
62195 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__OPQMatrix,0);
62196 } else
62197 /*@SWIG@*/
62198 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62199 if (dynamic_cast<faiss::PCAMatrix *> (result)) {
62200 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__PCAMatrix,0);
62201 } else
62202 /*@SWIG@*/
62203 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62204 if (dynamic_cast<faiss::RandomRotationMatrix *> (result)) {
62205 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RandomRotationMatrix,0);
62206 } else
62207 /*@SWIG@*/
62208 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62209 if (dynamic_cast<faiss::LinearTransform *> (result)) {
62210 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__LinearTransform,0);
62211 } else
62212 /*@SWIG@*/
62213 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62214 if (dynamic_cast<faiss::NormalizationTransform *> (result)) {
62215 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__NormalizationTransform,0);
62216 } else
62217 /*@SWIG@*/
62218 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62219 if (dynamic_cast<faiss::VectorTransform *> (result)) {
62220 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__VectorTransform,0);
62221 } else
62222 /*@SWIG@*/
62223 {
62224 assert(false);
62225 }
62226
62227
62228
62229 }
62230 return resultobj;
62231 fail:
62232 return NULL;
62233 }
62234
62235
62236 SWIGINTERN PyObject *_wrap_downcast_IndexBinary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62237 PyObject *resultobj = 0;
62238 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
62239 void *argp1 = 0 ;
62240 int res1 = 0 ;
62241 PyObject * obj0 = 0 ;
62242 faiss::IndexBinary *result = 0 ;
62243
62244 if (!PyArg_ParseTuple(args,(char *)"O:downcast_IndexBinary",&obj0)) SWIG_fail;
62245 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
62246 if (!SWIG_IsOK(res1)) {
62247 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "downcast_IndexBinary" "', argument " "1"" of type '" "faiss::IndexBinary *""'");
62248 }
62249 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
62250 {
62251 Py_BEGIN_ALLOW_THREADS
62252 try {
62253 result = (faiss::IndexBinary *)downcast_IndexBinary(arg1);
62254 } catch(faiss::FaissException & e) {
62255 PyEval_RestoreThread(_save);
62256 PyErr_SetString(PyExc_RuntimeError, e.what());
62257 SWIG_fail;
62258 }
62259 Py_END_ALLOW_THREADS
62260 }
62261 {
62262 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62263 if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
62264 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,0);
62265 } else
62266 /*@SWIG@*/
62267 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62268 if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
62269 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,0);
62270 } else
62271 /*@SWIG@*/
62272 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62273 if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
62274 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,0);
62275 } else
62276 /*@SWIG@*/
62277 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62278 if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
62279 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,0);
62280 } else
62281 /*@SWIG@*/
62282
62283
62284
62285 // default for non-recognized classes
62286 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62287 if (dynamic_cast<faiss::IndexBinary *> (result)) {
62288 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,0);
62289 } else
62290 /*@SWIG@*/
62291 if (result == NULL)
62292 {
62293 resultobj = SWIG_Py_Void();
62294
62295 // Lua does not need a push for nil
62296 } else {
62297 assert(false);
62298 }
62299
62300
62301
62302 }
62303 return resultobj;
62304 fail:
62305 return NULL;
62306 }
62307
62308
62309 SWIGINTERN PyObject *_wrap_write_index__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62310 PyObject *resultobj = 0;
62311 faiss::Index *arg1 = (faiss::Index *) 0 ;
62312 char *arg2 = (char *) 0 ;
62313 void *argp1 = 0 ;
62314 int res1 = 0 ;
62315 int res2 ;
62316 char *buf2 = 0 ;
62317 int alloc2 = 0 ;
62318 PyObject * obj0 = 0 ;
62319 PyObject * obj1 = 0 ;
62320
62321 if (!PyArg_ParseTuple(args,(char *)"OO:write_index",&obj0,&obj1)) SWIG_fail;
62322 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
62323 if (!SWIG_IsOK(res1)) {
62324 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index" "', argument " "1"" of type '" "faiss::Index const *""'");
62325 }
62326 arg1 = reinterpret_cast< faiss::Index * >(argp1);
62327 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62328 if (!SWIG_IsOK(res2)) {
62329 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index" "', argument " "2"" of type '" "char const *""'");
62330 }
62331 arg2 = reinterpret_cast< char * >(buf2);
62332 {
62333 Py_BEGIN_ALLOW_THREADS
62334 try {
62335 faiss::write_index((faiss::Index const *)arg1,(char const *)arg2);
62336 } catch(faiss::FaissException & e) {
62337 PyEval_RestoreThread(_save);
62338 PyErr_SetString(PyExc_RuntimeError, e.what());
62339 SWIG_fail;
62340 }
62341 Py_END_ALLOW_THREADS
62342 }
62343 resultobj = SWIG_Py_Void();
62344 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62345 return resultobj;
62346 fail:
62347 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62348 return NULL;
62349 }
62350
62351
62352 SWIGINTERN PyObject *_wrap_write_index__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62353 PyObject *resultobj = 0;
62354 faiss::Index *arg1 = (faiss::Index *) 0 ;
62355 FILE *arg2 = (FILE *) 0 ;
62356 void *argp1 = 0 ;
62357 int res1 = 0 ;
62358 void *argp2 = 0 ;
62359 int res2 = 0 ;
62360 PyObject * obj0 = 0 ;
62361 PyObject * obj1 = 0 ;
62362
62363 if (!PyArg_ParseTuple(args,(char *)"OO:write_index",&obj0,&obj1)) SWIG_fail;
62364 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
62365 if (!SWIG_IsOK(res1)) {
62366 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index" "', argument " "1"" of type '" "faiss::Index const *""'");
62367 }
62368 arg1 = reinterpret_cast< faiss::Index * >(argp1);
62369 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FILE, 0 | 0 );
62370 if (!SWIG_IsOK(res2)) {
62371 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index" "', argument " "2"" of type '" "FILE *""'");
62372 }
62373 arg2 = reinterpret_cast< FILE * >(argp2);
62374 {
62375 Py_BEGIN_ALLOW_THREADS
62376 try {
62377 faiss::write_index((faiss::Index const *)arg1,arg2);
62378 } catch(faiss::FaissException & e) {
62379 PyEval_RestoreThread(_save);
62380 PyErr_SetString(PyExc_RuntimeError, e.what());
62381 SWIG_fail;
62382 }
62383 Py_END_ALLOW_THREADS
62384 }
62385 resultobj = SWIG_Py_Void();
62386 return resultobj;
62387 fail:
62388 return NULL;
62389 }
62390
62391
62392 SWIGINTERN PyObject *_wrap_write_index__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62393 PyObject *resultobj = 0;
62394 faiss::Index *arg1 = (faiss::Index *) 0 ;
62395 faiss::IOWriter *arg2 = (faiss::IOWriter *) 0 ;
62396 void *argp1 = 0 ;
62397 int res1 = 0 ;
62398 void *argp2 = 0 ;
62399 int res2 = 0 ;
62400 PyObject * obj0 = 0 ;
62401 PyObject * obj1 = 0 ;
62402
62403 if (!PyArg_ParseTuple(args,(char *)"OO:write_index",&obj0,&obj1)) SWIG_fail;
62404 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
62405 if (!SWIG_IsOK(res1)) {
62406 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index" "', argument " "1"" of type '" "faiss::Index const *""'");
62407 }
62408 arg1 = reinterpret_cast< faiss::Index * >(argp1);
62409 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
62410 if (!SWIG_IsOK(res2)) {
62411 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index" "', argument " "2"" of type '" "faiss::IOWriter *""'");
62412 }
62413 arg2 = reinterpret_cast< faiss::IOWriter * >(argp2);
62414 {
62415 Py_BEGIN_ALLOW_THREADS
62416 try {
62417 faiss::write_index((faiss::Index const *)arg1,arg2);
62418 } catch(faiss::FaissException & e) {
62419 PyEval_RestoreThread(_save);
62420 PyErr_SetString(PyExc_RuntimeError, e.what());
62421 SWIG_fail;
62422 }
62423 Py_END_ALLOW_THREADS
62424 }
62425 resultobj = SWIG_Py_Void();
62426 return resultobj;
62427 fail:
62428 return NULL;
62429 }
62430
62431
62432 SWIGINTERN PyObject *_wrap_write_index(PyObject *self, PyObject *args) {
62433 Py_ssize_t argc;
62434 PyObject *argv[3] = {
62435 0
62436 };
62437 Py_ssize_t ii;
62438
62439 if (!PyTuple_Check(args)) SWIG_fail;
62440 argc = args ? PyObject_Length(args) : 0;
62441 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
62442 argv[ii] = PyTuple_GET_ITEM(args,ii);
62443 }
62444 if (argc == 2) {
62445 int _v;
62446 void *vptr = 0;
62447 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
62448 _v = SWIG_CheckState(res);
62449 if (_v) {
62450 void *vptr = 0;
62451 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FILE, 0);
62452 _v = SWIG_CheckState(res);
62453 if (_v) {
62454 return _wrap_write_index__SWIG_1(self, args);
62455 }
62456 }
62457 }
62458 if (argc == 2) {
62459 int _v;
62460 void *vptr = 0;
62461 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
62462 _v = SWIG_CheckState(res);
62463 if (_v) {
62464 void *vptr = 0;
62465 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IOWriter, 0);
62466 _v = SWIG_CheckState(res);
62467 if (_v) {
62468 return _wrap_write_index__SWIG_2(self, args);
62469 }
62470 }
62471 }
62472 if (argc == 2) {
62473 int _v;
62474 void *vptr = 0;
62475 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__Index, 0);
62476 _v = SWIG_CheckState(res);
62477 if (_v) {
62478 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
62479 _v = SWIG_CheckState(res);
62480 if (_v) {
62481 return _wrap_write_index__SWIG_0(self, args);
62482 }
62483 }
62484 }
62485
62486 fail:
62487 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'write_index'.\n"
62488 " Possible C/C++ prototypes are:\n"
62489 " faiss::write_index(faiss::Index const *,char const *)\n"
62490 " faiss::write_index(faiss::Index const *,FILE *)\n"
62491 " faiss::write_index(faiss::Index const *,faiss::IOWriter *)\n");
62492 return 0;
62493 }
62494
62495
62496 SWIGINTERN PyObject *_wrap_write_index_binary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62497 PyObject *resultobj = 0;
62498 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
62499 char *arg2 = (char *) 0 ;
62500 void *argp1 = 0 ;
62501 int res1 = 0 ;
62502 int res2 ;
62503 char *buf2 = 0 ;
62504 int alloc2 = 0 ;
62505 PyObject * obj0 = 0 ;
62506 PyObject * obj1 = 0 ;
62507
62508 if (!PyArg_ParseTuple(args,(char *)"OO:write_index_binary",&obj0,&obj1)) SWIG_fail;
62509 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
62510 if (!SWIG_IsOK(res1)) {
62511 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index_binary" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
62512 }
62513 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
62514 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
62515 if (!SWIG_IsOK(res2)) {
62516 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index_binary" "', argument " "2"" of type '" "char const *""'");
62517 }
62518 arg2 = reinterpret_cast< char * >(buf2);
62519 {
62520 Py_BEGIN_ALLOW_THREADS
62521 try {
62522 faiss::write_index_binary((faiss::IndexBinary const *)arg1,(char const *)arg2);
62523 } catch(faiss::FaissException & e) {
62524 PyEval_RestoreThread(_save);
62525 PyErr_SetString(PyExc_RuntimeError, e.what());
62526 SWIG_fail;
62527 }
62528 Py_END_ALLOW_THREADS
62529 }
62530 resultobj = SWIG_Py_Void();
62531 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62532 return resultobj;
62533 fail:
62534 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
62535 return NULL;
62536 }
62537
62538
62539 SWIGINTERN PyObject *_wrap_write_index_binary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62540 PyObject *resultobj = 0;
62541 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
62542 FILE *arg2 = (FILE *) 0 ;
62543 void *argp1 = 0 ;
62544 int res1 = 0 ;
62545 void *argp2 = 0 ;
62546 int res2 = 0 ;
62547 PyObject * obj0 = 0 ;
62548 PyObject * obj1 = 0 ;
62549
62550 if (!PyArg_ParseTuple(args,(char *)"OO:write_index_binary",&obj0,&obj1)) SWIG_fail;
62551 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
62552 if (!SWIG_IsOK(res1)) {
62553 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index_binary" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
62554 }
62555 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
62556 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_FILE, 0 | 0 );
62557 if (!SWIG_IsOK(res2)) {
62558 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index_binary" "', argument " "2"" of type '" "FILE *""'");
62559 }
62560 arg2 = reinterpret_cast< FILE * >(argp2);
62561 {
62562 Py_BEGIN_ALLOW_THREADS
62563 try {
62564 faiss::write_index_binary((faiss::IndexBinary const *)arg1,arg2);
62565 } catch(faiss::FaissException & e) {
62566 PyEval_RestoreThread(_save);
62567 PyErr_SetString(PyExc_RuntimeError, e.what());
62568 SWIG_fail;
62569 }
62570 Py_END_ALLOW_THREADS
62571 }
62572 resultobj = SWIG_Py_Void();
62573 return resultobj;
62574 fail:
62575 return NULL;
62576 }
62577
62578
62579 SWIGINTERN PyObject *_wrap_write_index_binary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62580 PyObject *resultobj = 0;
62581 faiss::IndexBinary *arg1 = (faiss::IndexBinary *) 0 ;
62582 faiss::IOWriter *arg2 = (faiss::IOWriter *) 0 ;
62583 void *argp1 = 0 ;
62584 int res1 = 0 ;
62585 void *argp2 = 0 ;
62586 int res2 = 0 ;
62587 PyObject * obj0 = 0 ;
62588 PyObject * obj1 = 0 ;
62589
62590 if (!PyArg_ParseTuple(args,(char *)"OO:write_index_binary",&obj0,&obj1)) SWIG_fail;
62591 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IndexBinary, 0 | 0 );
62592 if (!SWIG_IsOK(res1)) {
62593 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_index_binary" "', argument " "1"" of type '" "faiss::IndexBinary const *""'");
62594 }
62595 arg1 = reinterpret_cast< faiss::IndexBinary * >(argp1);
62596 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
62597 if (!SWIG_IsOK(res2)) {
62598 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_index_binary" "', argument " "2"" of type '" "faiss::IOWriter *""'");
62599 }
62600 arg2 = reinterpret_cast< faiss::IOWriter * >(argp2);
62601 {
62602 Py_BEGIN_ALLOW_THREADS
62603 try {
62604 faiss::write_index_binary((faiss::IndexBinary const *)arg1,arg2);
62605 } catch(faiss::FaissException & e) {
62606 PyEval_RestoreThread(_save);
62607 PyErr_SetString(PyExc_RuntimeError, e.what());
62608 SWIG_fail;
62609 }
62610 Py_END_ALLOW_THREADS
62611 }
62612 resultobj = SWIG_Py_Void();
62613 return resultobj;
62614 fail:
62615 return NULL;
62616 }
62617
62618
62619 SWIGINTERN PyObject *_wrap_write_index_binary(PyObject *self, PyObject *args) {
62620 Py_ssize_t argc;
62621 PyObject *argv[3] = {
62622 0
62623 };
62624 Py_ssize_t ii;
62625
62626 if (!PyTuple_Check(args)) SWIG_fail;
62627 argc = args ? PyObject_Length(args) : 0;
62628 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
62629 argv[ii] = PyTuple_GET_ITEM(args,ii);
62630 }
62631 if (argc == 2) {
62632 int _v;
62633 void *vptr = 0;
62634 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
62635 _v = SWIG_CheckState(res);
62636 if (_v) {
62637 void *vptr = 0;
62638 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_FILE, 0);
62639 _v = SWIG_CheckState(res);
62640 if (_v) {
62641 return _wrap_write_index_binary__SWIG_1(self, args);
62642 }
62643 }
62644 }
62645 if (argc == 2) {
62646 int _v;
62647 void *vptr = 0;
62648 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
62649 _v = SWIG_CheckState(res);
62650 if (_v) {
62651 void *vptr = 0;
62652 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IOWriter, 0);
62653 _v = SWIG_CheckState(res);
62654 if (_v) {
62655 return _wrap_write_index_binary__SWIG_2(self, args);
62656 }
62657 }
62658 }
62659 if (argc == 2) {
62660 int _v;
62661 void *vptr = 0;
62662 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IndexBinary, 0);
62663 _v = SWIG_CheckState(res);
62664 if (_v) {
62665 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
62666 _v = SWIG_CheckState(res);
62667 if (_v) {
62668 return _wrap_write_index_binary__SWIG_0(self, args);
62669 }
62670 }
62671 }
62672
62673 fail:
62674 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'write_index_binary'.\n"
62675 " Possible C/C++ prototypes are:\n"
62676 " faiss::write_index_binary(faiss::IndexBinary const *,char const *)\n"
62677 " faiss::write_index_binary(faiss::IndexBinary const *,FILE *)\n"
62678 " faiss::write_index_binary(faiss::IndexBinary const *,faiss::IOWriter *)\n");
62679 return 0;
62680 }
62681
62682
62683 SWIGINTERN int Swig_var_IO_FLAG_MMAP_set(PyObject *) {
62684 SWIG_Error(SWIG_AttributeError,"Variable IO_FLAG_MMAP is read-only.");
62685 return 1;
62686 }
62687
62688
62689 SWIGINTERN PyObject *Swig_var_IO_FLAG_MMAP_get(void) {
62690 PyObject *pyobj = 0;
62691
62692 pyobj = SWIG_From_int(static_cast< int >(faiss::IO_FLAG_MMAP));
62693 return pyobj;
62694 }
62695
62696
62697 SWIGINTERN int Swig_var_IO_FLAG_READ_ONLY_set(PyObject *) {
62698 SWIG_Error(SWIG_AttributeError,"Variable IO_FLAG_READ_ONLY is read-only.");
62699 return 1;
62700 }
62701
62702
62703 SWIGINTERN PyObject *Swig_var_IO_FLAG_READ_ONLY_get(void) {
62704 PyObject *pyobj = 0;
62705
62706 pyobj = SWIG_From_int(static_cast< int >(faiss::IO_FLAG_READ_ONLY));
62707 return pyobj;
62708 }
62709
62710
62711 SWIGINTERN PyObject *_wrap_read_index__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62712 PyObject *resultobj = 0;
62713 char *arg1 = (char *) 0 ;
62714 int arg2 ;
62715 int res1 ;
62716 char *buf1 = 0 ;
62717 int alloc1 = 0 ;
62718 int val2 ;
62719 int ecode2 = 0 ;
62720 PyObject * obj0 = 0 ;
62721 PyObject * obj1 = 0 ;
62722 faiss::Index *result = 0 ;
62723
62724 if (!PyArg_ParseTuple(args,(char *)"OO:read_index",&obj0,&obj1)) SWIG_fail;
62725 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
62726 if (!SWIG_IsOK(res1)) {
62727 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "char const *""'");
62728 }
62729 arg1 = reinterpret_cast< char * >(buf1);
62730 ecode2 = SWIG_AsVal_int(obj1, &val2);
62731 if (!SWIG_IsOK(ecode2)) {
62732 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index" "', argument " "2"" of type '" "int""'");
62733 }
62734 arg2 = static_cast< int >(val2);
62735 {
62736 Py_BEGIN_ALLOW_THREADS
62737 try {
62738 result = (faiss::Index *)faiss::read_index((char const *)arg1,arg2);
62739 } catch(faiss::FaissException & e) {
62740 PyEval_RestoreThread(_save);
62741 PyErr_SetString(PyExc_RuntimeError, e.what());
62742 SWIG_fail;
62743 }
62744 Py_END_ALLOW_THREADS
62745 }
62746 {
62747 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62748 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
62749 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
62750 } else
62751 /*@SWIG@*/
62752 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62753 if (dynamic_cast<faiss::IndexShards *> (result)) {
62754 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
62755 } else
62756 /*@SWIG@*/
62757 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62758 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
62759 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
62760 } else
62761 /*@SWIG@*/
62762 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62763 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
62764 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
62765 } else
62766 /*@SWIG@*/
62767 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62768 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
62769 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
62770 } else
62771 /*@SWIG@*/
62772 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62773 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
62774 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
62775 } else
62776 /*@SWIG@*/
62777 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62778 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
62779 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
62780 } else
62781 /*@SWIG@*/
62782 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62783 if (dynamic_cast<faiss::IndexIVF *> (result)) {
62784 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
62785 } else
62786 /*@SWIG@*/
62787 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62788 if (dynamic_cast<faiss::IndexFlat *> (result)) {
62789 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
62790 } else
62791 /*@SWIG@*/
62792 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62793 if (dynamic_cast<faiss::IndexPQ *> (result)) {
62794 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
62795 } else
62796 /*@SWIG@*/
62797 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62798 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
62799 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
62800 } else
62801 /*@SWIG@*/
62802 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62803 if (dynamic_cast<faiss::IndexLSH *> (result)) {
62804 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
62805 } else
62806 /*@SWIG@*/
62807 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62808 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
62809 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
62810 } else
62811 /*@SWIG@*/
62812 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62813 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
62814 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
62815 } else
62816 /*@SWIG@*/
62817 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62818 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
62819 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
62820 } else
62821 /*@SWIG@*/
62822 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62823 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
62824 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
62825 } else
62826 /*@SWIG@*/
62827 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62828 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
62829 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
62830 } else
62831 /*@SWIG@*/
62832 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62833 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
62834 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
62835 } else
62836 /*@SWIG@*/
62837 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62838 if (dynamic_cast<faiss::Index2Layer *> (result)) {
62839 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
62840 } else
62841 /*@SWIG@*/
62842
62843
62844
62845
62846
62847
62848 // default for non-recognized classes
62849 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62850 if (dynamic_cast<faiss::Index *> (result)) {
62851 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
62852 } else
62853 /*@SWIG@*/
62854 if (result == NULL)
62855 {
62856 resultobj = SWIG_Py_Void();
62857
62858 // Lua does not need a push for nil
62859 } else {
62860 assert(false);
62861 }
62862
62863
62864
62865 }
62866 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
62867 return resultobj;
62868 fail:
62869 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
62870 return NULL;
62871 }
62872
62873
62874 SWIGINTERN PyObject *_wrap_read_index__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
62875 PyObject *resultobj = 0;
62876 char *arg1 = (char *) 0 ;
62877 int res1 ;
62878 char *buf1 = 0 ;
62879 int alloc1 = 0 ;
62880 PyObject * obj0 = 0 ;
62881 faiss::Index *result = 0 ;
62882
62883 if (!PyArg_ParseTuple(args,(char *)"O:read_index",&obj0)) SWIG_fail;
62884 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
62885 if (!SWIG_IsOK(res1)) {
62886 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "char const *""'");
62887 }
62888 arg1 = reinterpret_cast< char * >(buf1);
62889 {
62890 Py_BEGIN_ALLOW_THREADS
62891 try {
62892 result = (faiss::Index *)faiss::read_index((char const *)arg1);
62893 } catch(faiss::FaissException & e) {
62894 PyEval_RestoreThread(_save);
62895 PyErr_SetString(PyExc_RuntimeError, e.what());
62896 SWIG_fail;
62897 }
62898 Py_END_ALLOW_THREADS
62899 }
62900 {
62901 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62902 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
62903 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
62904 } else
62905 /*@SWIG@*/
62906 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62907 if (dynamic_cast<faiss::IndexShards *> (result)) {
62908 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
62909 } else
62910 /*@SWIG@*/
62911 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62912 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
62913 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
62914 } else
62915 /*@SWIG@*/
62916 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62917 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
62918 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
62919 } else
62920 /*@SWIG@*/
62921 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62922 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
62923 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
62924 } else
62925 /*@SWIG@*/
62926 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62927 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
62928 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
62929 } else
62930 /*@SWIG@*/
62931 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62932 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
62933 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
62934 } else
62935 /*@SWIG@*/
62936 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62937 if (dynamic_cast<faiss::IndexIVF *> (result)) {
62938 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
62939 } else
62940 /*@SWIG@*/
62941 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62942 if (dynamic_cast<faiss::IndexFlat *> (result)) {
62943 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
62944 } else
62945 /*@SWIG@*/
62946 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62947 if (dynamic_cast<faiss::IndexPQ *> (result)) {
62948 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
62949 } else
62950 /*@SWIG@*/
62951 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62952 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
62953 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
62954 } else
62955 /*@SWIG@*/
62956 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62957 if (dynamic_cast<faiss::IndexLSH *> (result)) {
62958 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
62959 } else
62960 /*@SWIG@*/
62961 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62962 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
62963 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
62964 } else
62965 /*@SWIG@*/
62966 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62967 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
62968 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
62969 } else
62970 /*@SWIG@*/
62971 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62972 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
62973 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
62974 } else
62975 /*@SWIG@*/
62976 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62977 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
62978 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
62979 } else
62980 /*@SWIG@*/
62981 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62982 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
62983 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
62984 } else
62985 /*@SWIG@*/
62986 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62987 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
62988 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
62989 } else
62990 /*@SWIG@*/
62991 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
62992 if (dynamic_cast<faiss::Index2Layer *> (result)) {
62993 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
62994 } else
62995 /*@SWIG@*/
62996
62997
62998
62999
63000
63001
63002 // default for non-recognized classes
63003 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63004 if (dynamic_cast<faiss::Index *> (result)) {
63005 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
63006 } else
63007 /*@SWIG@*/
63008 if (result == NULL)
63009 {
63010 resultobj = SWIG_Py_Void();
63011
63012 // Lua does not need a push for nil
63013 } else {
63014 assert(false);
63015 }
63016
63017
63018
63019 }
63020 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
63021 return resultobj;
63022 fail:
63023 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
63024 return NULL;
63025 }
63026
63027
63028 SWIGINTERN PyObject *_wrap_read_index__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63029 PyObject *resultobj = 0;
63030 FILE *arg1 = (FILE *) 0 ;
63031 int arg2 ;
63032 void *argp1 = 0 ;
63033 int res1 = 0 ;
63034 int val2 ;
63035 int ecode2 = 0 ;
63036 PyObject * obj0 = 0 ;
63037 PyObject * obj1 = 0 ;
63038 faiss::Index *result = 0 ;
63039
63040 if (!PyArg_ParseTuple(args,(char *)"OO:read_index",&obj0,&obj1)) SWIG_fail;
63041 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 );
63042 if (!SWIG_IsOK(res1)) {
63043 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "FILE *""'");
63044 }
63045 arg1 = reinterpret_cast< FILE * >(argp1);
63046 ecode2 = SWIG_AsVal_int(obj1, &val2);
63047 if (!SWIG_IsOK(ecode2)) {
63048 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index" "', argument " "2"" of type '" "int""'");
63049 }
63050 arg2 = static_cast< int >(val2);
63051 {
63052 Py_BEGIN_ALLOW_THREADS
63053 try {
63054 result = (faiss::Index *)faiss::read_index(arg1,arg2);
63055 } catch(faiss::FaissException & e) {
63056 PyEval_RestoreThread(_save);
63057 PyErr_SetString(PyExc_RuntimeError, e.what());
63058 SWIG_fail;
63059 }
63060 Py_END_ALLOW_THREADS
63061 }
63062 {
63063 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63064 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
63065 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
63066 } else
63067 /*@SWIG@*/
63068 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63069 if (dynamic_cast<faiss::IndexShards *> (result)) {
63070 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
63071 } else
63072 /*@SWIG@*/
63073 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63074 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
63075 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
63076 } else
63077 /*@SWIG@*/
63078 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63079 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
63080 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
63081 } else
63082 /*@SWIG@*/
63083 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63084 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
63085 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
63086 } else
63087 /*@SWIG@*/
63088 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63089 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
63090 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
63091 } else
63092 /*@SWIG@*/
63093 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63094 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
63095 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
63096 } else
63097 /*@SWIG@*/
63098 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63099 if (dynamic_cast<faiss::IndexIVF *> (result)) {
63100 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
63101 } else
63102 /*@SWIG@*/
63103 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63104 if (dynamic_cast<faiss::IndexFlat *> (result)) {
63105 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
63106 } else
63107 /*@SWIG@*/
63108 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63109 if (dynamic_cast<faiss::IndexPQ *> (result)) {
63110 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
63111 } else
63112 /*@SWIG@*/
63113 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63114 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
63115 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
63116 } else
63117 /*@SWIG@*/
63118 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63119 if (dynamic_cast<faiss::IndexLSH *> (result)) {
63120 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
63121 } else
63122 /*@SWIG@*/
63123 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63124 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
63125 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
63126 } else
63127 /*@SWIG@*/
63128 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63129 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
63130 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
63131 } else
63132 /*@SWIG@*/
63133 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63134 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
63135 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
63136 } else
63137 /*@SWIG@*/
63138 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63139 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
63140 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
63141 } else
63142 /*@SWIG@*/
63143 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63144 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
63145 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
63146 } else
63147 /*@SWIG@*/
63148 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63149 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
63150 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
63151 } else
63152 /*@SWIG@*/
63153 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63154 if (dynamic_cast<faiss::Index2Layer *> (result)) {
63155 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
63156 } else
63157 /*@SWIG@*/
63158
63159
63160
63161
63162
63163
63164 // default for non-recognized classes
63165 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63166 if (dynamic_cast<faiss::Index *> (result)) {
63167 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
63168 } else
63169 /*@SWIG@*/
63170 if (result == NULL)
63171 {
63172 resultobj = SWIG_Py_Void();
63173
63174 // Lua does not need a push for nil
63175 } else {
63176 assert(false);
63177 }
63178
63179
63180
63181 }
63182 return resultobj;
63183 fail:
63184 return NULL;
63185 }
63186
63187
63188 SWIGINTERN PyObject *_wrap_read_index__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63189 PyObject *resultobj = 0;
63190 FILE *arg1 = (FILE *) 0 ;
63191 void *argp1 = 0 ;
63192 int res1 = 0 ;
63193 PyObject * obj0 = 0 ;
63194 faiss::Index *result = 0 ;
63195
63196 if (!PyArg_ParseTuple(args,(char *)"O:read_index",&obj0)) SWIG_fail;
63197 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 );
63198 if (!SWIG_IsOK(res1)) {
63199 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "FILE *""'");
63200 }
63201 arg1 = reinterpret_cast< FILE * >(argp1);
63202 {
63203 Py_BEGIN_ALLOW_THREADS
63204 try {
63205 result = (faiss::Index *)faiss::read_index(arg1);
63206 } catch(faiss::FaissException & e) {
63207 PyEval_RestoreThread(_save);
63208 PyErr_SetString(PyExc_RuntimeError, e.what());
63209 SWIG_fail;
63210 }
63211 Py_END_ALLOW_THREADS
63212 }
63213 {
63214 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63215 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
63216 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
63217 } else
63218 /*@SWIG@*/
63219 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63220 if (dynamic_cast<faiss::IndexShards *> (result)) {
63221 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
63222 } else
63223 /*@SWIG@*/
63224 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63225 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
63226 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
63227 } else
63228 /*@SWIG@*/
63229 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63230 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
63231 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
63232 } else
63233 /*@SWIG@*/
63234 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63235 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
63236 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
63237 } else
63238 /*@SWIG@*/
63239 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63240 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
63241 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
63242 } else
63243 /*@SWIG@*/
63244 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63245 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
63246 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
63247 } else
63248 /*@SWIG@*/
63249 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63250 if (dynamic_cast<faiss::IndexIVF *> (result)) {
63251 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
63252 } else
63253 /*@SWIG@*/
63254 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63255 if (dynamic_cast<faiss::IndexFlat *> (result)) {
63256 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
63257 } else
63258 /*@SWIG@*/
63259 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63260 if (dynamic_cast<faiss::IndexPQ *> (result)) {
63261 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
63262 } else
63263 /*@SWIG@*/
63264 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63265 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
63266 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
63267 } else
63268 /*@SWIG@*/
63269 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63270 if (dynamic_cast<faiss::IndexLSH *> (result)) {
63271 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
63272 } else
63273 /*@SWIG@*/
63274 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63275 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
63276 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
63277 } else
63278 /*@SWIG@*/
63279 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63280 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
63281 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
63282 } else
63283 /*@SWIG@*/
63284 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63285 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
63286 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
63287 } else
63288 /*@SWIG@*/
63289 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63290 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
63291 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
63292 } else
63293 /*@SWIG@*/
63294 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63295 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
63296 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
63297 } else
63298 /*@SWIG@*/
63299 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63300 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
63301 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
63302 } else
63303 /*@SWIG@*/
63304 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63305 if (dynamic_cast<faiss::Index2Layer *> (result)) {
63306 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
63307 } else
63308 /*@SWIG@*/
63309
63310
63311
63312
63313
63314
63315 // default for non-recognized classes
63316 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63317 if (dynamic_cast<faiss::Index *> (result)) {
63318 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
63319 } else
63320 /*@SWIG@*/
63321 if (result == NULL)
63322 {
63323 resultobj = SWIG_Py_Void();
63324
63325 // Lua does not need a push for nil
63326 } else {
63327 assert(false);
63328 }
63329
63330
63331
63332 }
63333 return resultobj;
63334 fail:
63335 return NULL;
63336 }
63337
63338
63339 SWIGINTERN PyObject *_wrap_read_index__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63340 PyObject *resultobj = 0;
63341 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
63342 int arg2 ;
63343 void *argp1 = 0 ;
63344 int res1 = 0 ;
63345 int val2 ;
63346 int ecode2 = 0 ;
63347 PyObject * obj0 = 0 ;
63348 PyObject * obj1 = 0 ;
63349 faiss::Index *result = 0 ;
63350
63351 if (!PyArg_ParseTuple(args,(char *)"OO:read_index",&obj0,&obj1)) SWIG_fail;
63352 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
63353 if (!SWIG_IsOK(res1)) {
63354 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "faiss::IOReader *""'");
63355 }
63356 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
63357 ecode2 = SWIG_AsVal_int(obj1, &val2);
63358 if (!SWIG_IsOK(ecode2)) {
63359 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index" "', argument " "2"" of type '" "int""'");
63360 }
63361 arg2 = static_cast< int >(val2);
63362 {
63363 Py_BEGIN_ALLOW_THREADS
63364 try {
63365 result = (faiss::Index *)faiss::read_index(arg1,arg2);
63366 } catch(faiss::FaissException & e) {
63367 PyEval_RestoreThread(_save);
63368 PyErr_SetString(PyExc_RuntimeError, e.what());
63369 SWIG_fail;
63370 }
63371 Py_END_ALLOW_THREADS
63372 }
63373 {
63374 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63375 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
63376 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
63377 } else
63378 /*@SWIG@*/
63379 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63380 if (dynamic_cast<faiss::IndexShards *> (result)) {
63381 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
63382 } else
63383 /*@SWIG@*/
63384 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63385 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
63386 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
63387 } else
63388 /*@SWIG@*/
63389 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63390 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
63391 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
63392 } else
63393 /*@SWIG@*/
63394 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63395 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
63396 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
63397 } else
63398 /*@SWIG@*/
63399 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63400 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
63401 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
63402 } else
63403 /*@SWIG@*/
63404 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63405 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
63406 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
63407 } else
63408 /*@SWIG@*/
63409 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63410 if (dynamic_cast<faiss::IndexIVF *> (result)) {
63411 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
63412 } else
63413 /*@SWIG@*/
63414 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63415 if (dynamic_cast<faiss::IndexFlat *> (result)) {
63416 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
63417 } else
63418 /*@SWIG@*/
63419 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63420 if (dynamic_cast<faiss::IndexPQ *> (result)) {
63421 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
63422 } else
63423 /*@SWIG@*/
63424 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63425 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
63426 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
63427 } else
63428 /*@SWIG@*/
63429 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63430 if (dynamic_cast<faiss::IndexLSH *> (result)) {
63431 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
63432 } else
63433 /*@SWIG@*/
63434 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63435 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
63436 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
63437 } else
63438 /*@SWIG@*/
63439 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63440 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
63441 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
63442 } else
63443 /*@SWIG@*/
63444 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63445 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
63446 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
63447 } else
63448 /*@SWIG@*/
63449 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63450 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
63451 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
63452 } else
63453 /*@SWIG@*/
63454 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63455 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
63456 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
63457 } else
63458 /*@SWIG@*/
63459 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63460 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
63461 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
63462 } else
63463 /*@SWIG@*/
63464 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63465 if (dynamic_cast<faiss::Index2Layer *> (result)) {
63466 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
63467 } else
63468 /*@SWIG@*/
63469
63470
63471
63472
63473
63474
63475 // default for non-recognized classes
63476 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63477 if (dynamic_cast<faiss::Index *> (result)) {
63478 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
63479 } else
63480 /*@SWIG@*/
63481 if (result == NULL)
63482 {
63483 resultobj = SWIG_Py_Void();
63484
63485 // Lua does not need a push for nil
63486 } else {
63487 assert(false);
63488 }
63489
63490
63491
63492 }
63493 return resultobj;
63494 fail:
63495 return NULL;
63496 }
63497
63498
63499 SWIGINTERN PyObject *_wrap_read_index__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63500 PyObject *resultobj = 0;
63501 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
63502 void *argp1 = 0 ;
63503 int res1 = 0 ;
63504 PyObject * obj0 = 0 ;
63505 faiss::Index *result = 0 ;
63506
63507 if (!PyArg_ParseTuple(args,(char *)"O:read_index",&obj0)) SWIG_fail;
63508 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
63509 if (!SWIG_IsOK(res1)) {
63510 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index" "', argument " "1"" of type '" "faiss::IOReader *""'");
63511 }
63512 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
63513 {
63514 Py_BEGIN_ALLOW_THREADS
63515 try {
63516 result = (faiss::Index *)faiss::read_index(arg1);
63517 } catch(faiss::FaissException & e) {
63518 PyEval_RestoreThread(_save);
63519 PyErr_SetString(PyExc_RuntimeError, e.what());
63520 SWIG_fail;
63521 }
63522 Py_END_ALLOW_THREADS
63523 }
63524 {
63525 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63526 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
63527 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
63528 } else
63529 /*@SWIG@*/
63530 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63531 if (dynamic_cast<faiss::IndexShards *> (result)) {
63532 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
63533 } else
63534 /*@SWIG@*/
63535 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63536 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
63537 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
63538 } else
63539 /*@SWIG@*/
63540 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63541 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
63542 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
63543 } else
63544 /*@SWIG@*/
63545 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63546 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
63547 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
63548 } else
63549 /*@SWIG@*/
63550 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63551 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
63552 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
63553 } else
63554 /*@SWIG@*/
63555 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63556 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
63557 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
63558 } else
63559 /*@SWIG@*/
63560 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63561 if (dynamic_cast<faiss::IndexIVF *> (result)) {
63562 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
63563 } else
63564 /*@SWIG@*/
63565 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63566 if (dynamic_cast<faiss::IndexFlat *> (result)) {
63567 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
63568 } else
63569 /*@SWIG@*/
63570 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63571 if (dynamic_cast<faiss::IndexPQ *> (result)) {
63572 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
63573 } else
63574 /*@SWIG@*/
63575 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63576 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
63577 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
63578 } else
63579 /*@SWIG@*/
63580 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63581 if (dynamic_cast<faiss::IndexLSH *> (result)) {
63582 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
63583 } else
63584 /*@SWIG@*/
63585 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63586 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
63587 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
63588 } else
63589 /*@SWIG@*/
63590 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63591 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
63592 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
63593 } else
63594 /*@SWIG@*/
63595 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63596 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
63597 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
63598 } else
63599 /*@SWIG@*/
63600 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63601 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
63602 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
63603 } else
63604 /*@SWIG@*/
63605 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63606 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
63607 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
63608 } else
63609 /*@SWIG@*/
63610 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63611 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
63612 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
63613 } else
63614 /*@SWIG@*/
63615 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63616 if (dynamic_cast<faiss::Index2Layer *> (result)) {
63617 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
63618 } else
63619 /*@SWIG@*/
63620
63621
63622
63623
63624
63625
63626 // default for non-recognized classes
63627 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63628 if (dynamic_cast<faiss::Index *> (result)) {
63629 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
63630 } else
63631 /*@SWIG@*/
63632 if (result == NULL)
63633 {
63634 resultobj = SWIG_Py_Void();
63635
63636 // Lua does not need a push for nil
63637 } else {
63638 assert(false);
63639 }
63640
63641
63642
63643 }
63644 return resultobj;
63645 fail:
63646 return NULL;
63647 }
63648
63649
63650 SWIGINTERN PyObject *_wrap_read_index(PyObject *self, PyObject *args) {
63651 Py_ssize_t argc;
63652 PyObject *argv[3] = {
63653 0
63654 };
63655 Py_ssize_t ii;
63656
63657 if (!PyTuple_Check(args)) SWIG_fail;
63658 argc = args ? PyObject_Length(args) : 0;
63659 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
63660 argv[ii] = PyTuple_GET_ITEM(args,ii);
63661 }
63662 if (argc == 1) {
63663 int _v;
63664 void *vptr = 0;
63665 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
63666 _v = SWIG_CheckState(res);
63667 if (_v) {
63668 return _wrap_read_index__SWIG_3(self, args);
63669 }
63670 }
63671 if (argc == 1) {
63672 int _v;
63673 void *vptr = 0;
63674 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
63675 _v = SWIG_CheckState(res);
63676 if (_v) {
63677 return _wrap_read_index__SWIG_5(self, args);
63678 }
63679 }
63680 if (argc == 1) {
63681 int _v;
63682 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
63683 _v = SWIG_CheckState(res);
63684 if (_v) {
63685 return _wrap_read_index__SWIG_1(self, args);
63686 }
63687 }
63688 if (argc == 2) {
63689 int _v;
63690 void *vptr = 0;
63691 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
63692 _v = SWIG_CheckState(res);
63693 if (_v) {
63694 {
63695 int res = SWIG_AsVal_int(argv[1], NULL);
63696 _v = SWIG_CheckState(res);
63697 }
63698 if (_v) {
63699 return _wrap_read_index__SWIG_4(self, args);
63700 }
63701 }
63702 }
63703 if (argc == 2) {
63704 int _v;
63705 void *vptr = 0;
63706 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
63707 _v = SWIG_CheckState(res);
63708 if (_v) {
63709 {
63710 int res = SWIG_AsVal_int(argv[1], NULL);
63711 _v = SWIG_CheckState(res);
63712 }
63713 if (_v) {
63714 return _wrap_read_index__SWIG_2(self, args);
63715 }
63716 }
63717 }
63718 if (argc == 2) {
63719 int _v;
63720 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
63721 _v = SWIG_CheckState(res);
63722 if (_v) {
63723 {
63724 int res = SWIG_AsVal_int(argv[1], NULL);
63725 _v = SWIG_CheckState(res);
63726 }
63727 if (_v) {
63728 return _wrap_read_index__SWIG_0(self, args);
63729 }
63730 }
63731 }
63732
63733 fail:
63734 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'read_index'.\n"
63735 " Possible C/C++ prototypes are:\n"
63736 " faiss::read_index(char const *,int)\n"
63737 " faiss::read_index(char const *)\n"
63738 " faiss::read_index(FILE *,int)\n"
63739 " faiss::read_index(FILE *)\n"
63740 " faiss::read_index(faiss::IOReader *,int)\n"
63741 " faiss::read_index(faiss::IOReader *)\n");
63742 return 0;
63743 }
63744
63745
63746 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63747 PyObject *resultobj = 0;
63748 char *arg1 = (char *) 0 ;
63749 int arg2 ;
63750 int res1 ;
63751 char *buf1 = 0 ;
63752 int alloc1 = 0 ;
63753 int val2 ;
63754 int ecode2 = 0 ;
63755 PyObject * obj0 = 0 ;
63756 PyObject * obj1 = 0 ;
63757 faiss::IndexBinary *result = 0 ;
63758
63759 if (!PyArg_ParseTuple(args,(char *)"OO:read_index_binary",&obj0,&obj1)) SWIG_fail;
63760 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
63761 if (!SWIG_IsOK(res1)) {
63762 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "char const *""'");
63763 }
63764 arg1 = reinterpret_cast< char * >(buf1);
63765 ecode2 = SWIG_AsVal_int(obj1, &val2);
63766 if (!SWIG_IsOK(ecode2)) {
63767 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index_binary" "', argument " "2"" of type '" "int""'");
63768 }
63769 arg2 = static_cast< int >(val2);
63770 {
63771 Py_BEGIN_ALLOW_THREADS
63772 try {
63773 result = (faiss::IndexBinary *)faiss::read_index_binary((char const *)arg1,arg2);
63774 } catch(faiss::FaissException & e) {
63775 PyEval_RestoreThread(_save);
63776 PyErr_SetString(PyExc_RuntimeError, e.what());
63777 SWIG_fail;
63778 }
63779 Py_END_ALLOW_THREADS
63780 }
63781 {
63782 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63783 if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
63784 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
63785 } else
63786 /*@SWIG@*/
63787 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63788 if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
63789 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
63790 } else
63791 /*@SWIG@*/
63792 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63793 if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
63794 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
63795 } else
63796 /*@SWIG@*/
63797 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63798 if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
63799 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
63800 } else
63801 /*@SWIG@*/
63802
63803
63804
63805 // default for non-recognized classes
63806 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63807 if (dynamic_cast<faiss::IndexBinary *> (result)) {
63808 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
63809 } else
63810 /*@SWIG@*/
63811 if (result == NULL)
63812 {
63813 resultobj = SWIG_Py_Void();
63814
63815 // Lua does not need a push for nil
63816 } else {
63817 assert(false);
63818 }
63819
63820
63821
63822 }
63823 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
63824 return resultobj;
63825 fail:
63826 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
63827 return NULL;
63828 }
63829
63830
63831 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63832 PyObject *resultobj = 0;
63833 char *arg1 = (char *) 0 ;
63834 int res1 ;
63835 char *buf1 = 0 ;
63836 int alloc1 = 0 ;
63837 PyObject * obj0 = 0 ;
63838 faiss::IndexBinary *result = 0 ;
63839
63840 if (!PyArg_ParseTuple(args,(char *)"O:read_index_binary",&obj0)) SWIG_fail;
63841 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
63842 if (!SWIG_IsOK(res1)) {
63843 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "char const *""'");
63844 }
63845 arg1 = reinterpret_cast< char * >(buf1);
63846 {
63847 Py_BEGIN_ALLOW_THREADS
63848 try {
63849 result = (faiss::IndexBinary *)faiss::read_index_binary((char const *)arg1);
63850 } catch(faiss::FaissException & e) {
63851 PyEval_RestoreThread(_save);
63852 PyErr_SetString(PyExc_RuntimeError, e.what());
63853 SWIG_fail;
63854 }
63855 Py_END_ALLOW_THREADS
63856 }
63857 {
63858 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63859 if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
63860 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
63861 } else
63862 /*@SWIG@*/
63863 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63864 if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
63865 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
63866 } else
63867 /*@SWIG@*/
63868 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63869 if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
63870 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
63871 } else
63872 /*@SWIG@*/
63873 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63874 if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
63875 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
63876 } else
63877 /*@SWIG@*/
63878
63879
63880
63881 // default for non-recognized classes
63882 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63883 if (dynamic_cast<faiss::IndexBinary *> (result)) {
63884 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
63885 } else
63886 /*@SWIG@*/
63887 if (result == NULL)
63888 {
63889 resultobj = SWIG_Py_Void();
63890
63891 // Lua does not need a push for nil
63892 } else {
63893 assert(false);
63894 }
63895
63896
63897
63898 }
63899 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
63900 return resultobj;
63901 fail:
63902 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
63903 return NULL;
63904 }
63905
63906
63907 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63908 PyObject *resultobj = 0;
63909 FILE *arg1 = (FILE *) 0 ;
63910 int arg2 ;
63911 void *argp1 = 0 ;
63912 int res1 = 0 ;
63913 int val2 ;
63914 int ecode2 = 0 ;
63915 PyObject * obj0 = 0 ;
63916 PyObject * obj1 = 0 ;
63917 faiss::IndexBinary *result = 0 ;
63918
63919 if (!PyArg_ParseTuple(args,(char *)"OO:read_index_binary",&obj0,&obj1)) SWIG_fail;
63920 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 );
63921 if (!SWIG_IsOK(res1)) {
63922 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "FILE *""'");
63923 }
63924 arg1 = reinterpret_cast< FILE * >(argp1);
63925 ecode2 = SWIG_AsVal_int(obj1, &val2);
63926 if (!SWIG_IsOK(ecode2)) {
63927 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index_binary" "', argument " "2"" of type '" "int""'");
63928 }
63929 arg2 = static_cast< int >(val2);
63930 {
63931 Py_BEGIN_ALLOW_THREADS
63932 try {
63933 result = (faiss::IndexBinary *)faiss::read_index_binary(arg1,arg2);
63934 } catch(faiss::FaissException & e) {
63935 PyEval_RestoreThread(_save);
63936 PyErr_SetString(PyExc_RuntimeError, e.what());
63937 SWIG_fail;
63938 }
63939 Py_END_ALLOW_THREADS
63940 }
63941 {
63942 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63943 if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
63944 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
63945 } else
63946 /*@SWIG@*/
63947 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63948 if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
63949 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
63950 } else
63951 /*@SWIG@*/
63952 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63953 if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
63954 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
63955 } else
63956 /*@SWIG@*/
63957 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63958 if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
63959 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
63960 } else
63961 /*@SWIG@*/
63962
63963
63964
63965 // default for non-recognized classes
63966 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
63967 if (dynamic_cast<faiss::IndexBinary *> (result)) {
63968 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
63969 } else
63970 /*@SWIG@*/
63971 if (result == NULL)
63972 {
63973 resultobj = SWIG_Py_Void();
63974
63975 // Lua does not need a push for nil
63976 } else {
63977 assert(false);
63978 }
63979
63980
63981
63982 }
63983 return resultobj;
63984 fail:
63985 return NULL;
63986 }
63987
63988
63989 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
63990 PyObject *resultobj = 0;
63991 FILE *arg1 = (FILE *) 0 ;
63992 void *argp1 = 0 ;
63993 int res1 = 0 ;
63994 PyObject * obj0 = 0 ;
63995 faiss::IndexBinary *result = 0 ;
63996
63997 if (!PyArg_ParseTuple(args,(char *)"O:read_index_binary",&obj0)) SWIG_fail;
63998 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_FILE, 0 | 0 );
63999 if (!SWIG_IsOK(res1)) {
64000 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "FILE *""'");
64001 }
64002 arg1 = reinterpret_cast< FILE * >(argp1);
64003 {
64004 Py_BEGIN_ALLOW_THREADS
64005 try {
64006 result = (faiss::IndexBinary *)faiss::read_index_binary(arg1);
64007 } catch(faiss::FaissException & e) {
64008 PyEval_RestoreThread(_save);
64009 PyErr_SetString(PyExc_RuntimeError, e.what());
64010 SWIG_fail;
64011 }
64012 Py_END_ALLOW_THREADS
64013 }
64014 {
64015 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64016 if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
64017 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
64018 } else
64019 /*@SWIG@*/
64020 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64021 if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
64022 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
64023 } else
64024 /*@SWIG@*/
64025 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64026 if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
64027 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
64028 } else
64029 /*@SWIG@*/
64030 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64031 if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
64032 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
64033 } else
64034 /*@SWIG@*/
64035
64036
64037
64038 // default for non-recognized classes
64039 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64040 if (dynamic_cast<faiss::IndexBinary *> (result)) {
64041 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
64042 } else
64043 /*@SWIG@*/
64044 if (result == NULL)
64045 {
64046 resultobj = SWIG_Py_Void();
64047
64048 // Lua does not need a push for nil
64049 } else {
64050 assert(false);
64051 }
64052
64053
64054
64055 }
64056 return resultobj;
64057 fail:
64058 return NULL;
64059 }
64060
64061
64062 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64063 PyObject *resultobj = 0;
64064 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
64065 int arg2 ;
64066 void *argp1 = 0 ;
64067 int res1 = 0 ;
64068 int val2 ;
64069 int ecode2 = 0 ;
64070 PyObject * obj0 = 0 ;
64071 PyObject * obj1 = 0 ;
64072 faiss::IndexBinary *result = 0 ;
64073
64074 if (!PyArg_ParseTuple(args,(char *)"OO:read_index_binary",&obj0,&obj1)) SWIG_fail;
64075 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
64076 if (!SWIG_IsOK(res1)) {
64077 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "faiss::IOReader *""'");
64078 }
64079 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
64080 ecode2 = SWIG_AsVal_int(obj1, &val2);
64081 if (!SWIG_IsOK(ecode2)) {
64082 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_index_binary" "', argument " "2"" of type '" "int""'");
64083 }
64084 arg2 = static_cast< int >(val2);
64085 {
64086 Py_BEGIN_ALLOW_THREADS
64087 try {
64088 result = (faiss::IndexBinary *)faiss::read_index_binary(arg1,arg2);
64089 } catch(faiss::FaissException & e) {
64090 PyEval_RestoreThread(_save);
64091 PyErr_SetString(PyExc_RuntimeError, e.what());
64092 SWIG_fail;
64093 }
64094 Py_END_ALLOW_THREADS
64095 }
64096 {
64097 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64098 if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
64099 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
64100 } else
64101 /*@SWIG@*/
64102 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64103 if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
64104 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
64105 } else
64106 /*@SWIG@*/
64107 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64108 if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
64109 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
64110 } else
64111 /*@SWIG@*/
64112 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64113 if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
64114 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
64115 } else
64116 /*@SWIG@*/
64117
64118
64119
64120 // default for non-recognized classes
64121 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64122 if (dynamic_cast<faiss::IndexBinary *> (result)) {
64123 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
64124 } else
64125 /*@SWIG@*/
64126 if (result == NULL)
64127 {
64128 resultobj = SWIG_Py_Void();
64129
64130 // Lua does not need a push for nil
64131 } else {
64132 assert(false);
64133 }
64134
64135
64136
64137 }
64138 return resultobj;
64139 fail:
64140 return NULL;
64141 }
64142
64143
64144 SWIGINTERN PyObject *_wrap_read_index_binary__SWIG_5(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64145 PyObject *resultobj = 0;
64146 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
64147 void *argp1 = 0 ;
64148 int res1 = 0 ;
64149 PyObject * obj0 = 0 ;
64150 faiss::IndexBinary *result = 0 ;
64151
64152 if (!PyArg_ParseTuple(args,(char *)"O:read_index_binary",&obj0)) SWIG_fail;
64153 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
64154 if (!SWIG_IsOK(res1)) {
64155 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_index_binary" "', argument " "1"" of type '" "faiss::IOReader *""'");
64156 }
64157 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
64158 {
64159 Py_BEGIN_ALLOW_THREADS
64160 try {
64161 result = (faiss::IndexBinary *)faiss::read_index_binary(arg1);
64162 } catch(faiss::FaissException & e) {
64163 PyEval_RestoreThread(_save);
64164 PyErr_SetString(PyExc_RuntimeError, e.what());
64165 SWIG_fail;
64166 }
64167 Py_END_ALLOW_THREADS
64168 }
64169 {
64170 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64171 if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
64172 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
64173 } else
64174 /*@SWIG@*/
64175 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64176 if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
64177 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
64178 } else
64179 /*@SWIG@*/
64180 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64181 if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
64182 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
64183 } else
64184 /*@SWIG@*/
64185 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64186 if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
64187 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
64188 } else
64189 /*@SWIG@*/
64190
64191
64192
64193 // default for non-recognized classes
64194 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64195 if (dynamic_cast<faiss::IndexBinary *> (result)) {
64196 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
64197 } else
64198 /*@SWIG@*/
64199 if (result == NULL)
64200 {
64201 resultobj = SWIG_Py_Void();
64202
64203 // Lua does not need a push for nil
64204 } else {
64205 assert(false);
64206 }
64207
64208
64209
64210 }
64211 return resultobj;
64212 fail:
64213 return NULL;
64214 }
64215
64216
64217 SWIGINTERN PyObject *_wrap_read_index_binary(PyObject *self, PyObject *args) {
64218 Py_ssize_t argc;
64219 PyObject *argv[3] = {
64220 0
64221 };
64222 Py_ssize_t ii;
64223
64224 if (!PyTuple_Check(args)) SWIG_fail;
64225 argc = args ? PyObject_Length(args) : 0;
64226 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
64227 argv[ii] = PyTuple_GET_ITEM(args,ii);
64228 }
64229 if (argc == 1) {
64230 int _v;
64231 void *vptr = 0;
64232 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
64233 _v = SWIG_CheckState(res);
64234 if (_v) {
64235 return _wrap_read_index_binary__SWIG_3(self, args);
64236 }
64237 }
64238 if (argc == 1) {
64239 int _v;
64240 void *vptr = 0;
64241 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
64242 _v = SWIG_CheckState(res);
64243 if (_v) {
64244 return _wrap_read_index_binary__SWIG_5(self, args);
64245 }
64246 }
64247 if (argc == 1) {
64248 int _v;
64249 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
64250 _v = SWIG_CheckState(res);
64251 if (_v) {
64252 return _wrap_read_index_binary__SWIG_1(self, args);
64253 }
64254 }
64255 if (argc == 2) {
64256 int _v;
64257 void *vptr = 0;
64258 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
64259 _v = SWIG_CheckState(res);
64260 if (_v) {
64261 {
64262 int res = SWIG_AsVal_int(argv[1], NULL);
64263 _v = SWIG_CheckState(res);
64264 }
64265 if (_v) {
64266 return _wrap_read_index_binary__SWIG_4(self, args);
64267 }
64268 }
64269 }
64270 if (argc == 2) {
64271 int _v;
64272 void *vptr = 0;
64273 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_FILE, 0);
64274 _v = SWIG_CheckState(res);
64275 if (_v) {
64276 {
64277 int res = SWIG_AsVal_int(argv[1], NULL);
64278 _v = SWIG_CheckState(res);
64279 }
64280 if (_v) {
64281 return _wrap_read_index_binary__SWIG_2(self, args);
64282 }
64283 }
64284 }
64285 if (argc == 2) {
64286 int _v;
64287 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
64288 _v = SWIG_CheckState(res);
64289 if (_v) {
64290 {
64291 int res = SWIG_AsVal_int(argv[1], NULL);
64292 _v = SWIG_CheckState(res);
64293 }
64294 if (_v) {
64295 return _wrap_read_index_binary__SWIG_0(self, args);
64296 }
64297 }
64298 }
64299
64300 fail:
64301 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'read_index_binary'.\n"
64302 " Possible C/C++ prototypes are:\n"
64303 " faiss::read_index_binary(char const *,int)\n"
64304 " faiss::read_index_binary(char const *)\n"
64305 " faiss::read_index_binary(FILE *,int)\n"
64306 " faiss::read_index_binary(FILE *)\n"
64307 " faiss::read_index_binary(faiss::IOReader *,int)\n"
64308 " faiss::read_index_binary(faiss::IOReader *)\n");
64309 return 0;
64310 }
64311
64312
64313 SWIGINTERN PyObject *_wrap_write_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64314 PyObject *resultobj = 0;
64315 faiss::VectorTransform *arg1 = (faiss::VectorTransform *) 0 ;
64316 char *arg2 = (char *) 0 ;
64317 void *argp1 = 0 ;
64318 int res1 = 0 ;
64319 int res2 ;
64320 char *buf2 = 0 ;
64321 int alloc2 = 0 ;
64322 PyObject * obj0 = 0 ;
64323 PyObject * obj1 = 0 ;
64324
64325 if (!PyArg_ParseTuple(args,(char *)"OO:write_VectorTransform",&obj0,&obj1)) SWIG_fail;
64326 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
64327 if (!SWIG_IsOK(res1)) {
64328 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_VectorTransform" "', argument " "1"" of type '" "faiss::VectorTransform const *""'");
64329 }
64330 arg1 = reinterpret_cast< faiss::VectorTransform * >(argp1);
64331 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
64332 if (!SWIG_IsOK(res2)) {
64333 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_VectorTransform" "', argument " "2"" of type '" "char const *""'");
64334 }
64335 arg2 = reinterpret_cast< char * >(buf2);
64336 {
64337 Py_BEGIN_ALLOW_THREADS
64338 try {
64339 faiss::write_VectorTransform((faiss::VectorTransform const *)arg1,(char const *)arg2);
64340 } catch(faiss::FaissException & e) {
64341 PyEval_RestoreThread(_save);
64342 PyErr_SetString(PyExc_RuntimeError, e.what());
64343 SWIG_fail;
64344 }
64345 Py_END_ALLOW_THREADS
64346 }
64347 resultobj = SWIG_Py_Void();
64348 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
64349 return resultobj;
64350 fail:
64351 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
64352 return NULL;
64353 }
64354
64355
64356 SWIGINTERN PyObject *_wrap_read_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64357 PyObject *resultobj = 0;
64358 char *arg1 = (char *) 0 ;
64359 int res1 ;
64360 char *buf1 = 0 ;
64361 int alloc1 = 0 ;
64362 PyObject * obj0 = 0 ;
64363 faiss::VectorTransform *result = 0 ;
64364
64365 if (!PyArg_ParseTuple(args,(char *)"O:read_VectorTransform",&obj0)) SWIG_fail;
64366 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
64367 if (!SWIG_IsOK(res1)) {
64368 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_VectorTransform" "', argument " "1"" of type '" "char const *""'");
64369 }
64370 arg1 = reinterpret_cast< char * >(buf1);
64371 {
64372 Py_BEGIN_ALLOW_THREADS
64373 try {
64374 result = (faiss::VectorTransform *)faiss::read_VectorTransform((char const *)arg1);
64375 } catch(faiss::FaissException & e) {
64376 PyEval_RestoreThread(_save);
64377 PyErr_SetString(PyExc_RuntimeError, e.what());
64378 SWIG_fail;
64379 }
64380 Py_END_ALLOW_THREADS
64381 }
64382 {
64383 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64384 if (dynamic_cast<faiss::RemapDimensionsTransform *> (result)) {
64385 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RemapDimensionsTransform,SWIG_POINTER_OWN);
64386 } else
64387 /*@SWIG@*/
64388 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64389 if (dynamic_cast<faiss::OPQMatrix *> (result)) {
64390 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__OPQMatrix,SWIG_POINTER_OWN);
64391 } else
64392 /*@SWIG@*/
64393 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64394 if (dynamic_cast<faiss::PCAMatrix *> (result)) {
64395 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__PCAMatrix,SWIG_POINTER_OWN);
64396 } else
64397 /*@SWIG@*/
64398 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64399 if (dynamic_cast<faiss::RandomRotationMatrix *> (result)) {
64400 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RandomRotationMatrix,SWIG_POINTER_OWN);
64401 } else
64402 /*@SWIG@*/
64403 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64404 if (dynamic_cast<faiss::LinearTransform *> (result)) {
64405 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__LinearTransform,SWIG_POINTER_OWN);
64406 } else
64407 /*@SWIG@*/
64408 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64409 if (dynamic_cast<faiss::NormalizationTransform *> (result)) {
64410 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__NormalizationTransform,SWIG_POINTER_OWN);
64411 } else
64412 /*@SWIG@*/
64413 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64414 if (dynamic_cast<faiss::VectorTransform *> (result)) {
64415 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__VectorTransform,SWIG_POINTER_OWN);
64416 } else
64417 /*@SWIG@*/
64418 {
64419 assert(false);
64420 }
64421
64422
64423
64424 }
64425 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
64426 return resultobj;
64427 fail:
64428 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
64429 return NULL;
64430 }
64431
64432
64433 SWIGINTERN PyObject *_wrap_read_ProductQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64434 PyObject *resultobj = 0;
64435 char *arg1 = (char *) 0 ;
64436 int res1 ;
64437 char *buf1 = 0 ;
64438 int alloc1 = 0 ;
64439 PyObject * obj0 = 0 ;
64440 faiss::ProductQuantizer *result = 0 ;
64441
64442 if (!PyArg_ParseTuple(args,(char *)"O:read_ProductQuantizer",&obj0)) SWIG_fail;
64443 res1 = SWIG_AsCharPtrAndSize(obj0, &buf1, NULL, &alloc1);
64444 if (!SWIG_IsOK(res1)) {
64445 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_ProductQuantizer" "', argument " "1"" of type '" "char const *""'");
64446 }
64447 arg1 = reinterpret_cast< char * >(buf1);
64448 {
64449 Py_BEGIN_ALLOW_THREADS
64450 try {
64451 result = (faiss::ProductQuantizer *)faiss::read_ProductQuantizer((char const *)arg1);
64452 } catch(faiss::FaissException & e) {
64453 PyEval_RestoreThread(_save);
64454 PyErr_SetString(PyExc_RuntimeError, e.what());
64455 SWIG_fail;
64456 }
64457 Py_END_ALLOW_THREADS
64458 }
64459 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_OWN | 0 );
64460 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
64461 return resultobj;
64462 fail:
64463 if (alloc1 == SWIG_NEWOBJ) delete[] buf1;
64464 return NULL;
64465 }
64466
64467
64468 SWIGINTERN PyObject *_wrap_read_ProductQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64469 PyObject *resultobj = 0;
64470 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
64471 void *argp1 = 0 ;
64472 int res1 = 0 ;
64473 PyObject * obj0 = 0 ;
64474 faiss::ProductQuantizer *result = 0 ;
64475
64476 if (!PyArg_ParseTuple(args,(char *)"O:read_ProductQuantizer",&obj0)) SWIG_fail;
64477 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
64478 if (!SWIG_IsOK(res1)) {
64479 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_ProductQuantizer" "', argument " "1"" of type '" "faiss::IOReader *""'");
64480 }
64481 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
64482 {
64483 Py_BEGIN_ALLOW_THREADS
64484 try {
64485 result = (faiss::ProductQuantizer *)faiss::read_ProductQuantizer(arg1);
64486 } catch(faiss::FaissException & e) {
64487 PyEval_RestoreThread(_save);
64488 PyErr_SetString(PyExc_RuntimeError, e.what());
64489 SWIG_fail;
64490 }
64491 Py_END_ALLOW_THREADS
64492 }
64493 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ProductQuantizer, SWIG_POINTER_OWN | 0 );
64494 return resultobj;
64495 fail:
64496 return NULL;
64497 }
64498
64499
64500 SWIGINTERN PyObject *_wrap_read_ProductQuantizer(PyObject *self, PyObject *args) {
64501 Py_ssize_t argc;
64502 PyObject *argv[2] = {
64503 0
64504 };
64505 Py_ssize_t ii;
64506
64507 if (!PyTuple_Check(args)) SWIG_fail;
64508 argc = args ? PyObject_Length(args) : 0;
64509 for (ii = 0; (ii < 1) && (ii < argc); ii++) {
64510 argv[ii] = PyTuple_GET_ITEM(args,ii);
64511 }
64512 if (argc == 1) {
64513 int _v;
64514 void *vptr = 0;
64515 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
64516 _v = SWIG_CheckState(res);
64517 if (_v) {
64518 return _wrap_read_ProductQuantizer__SWIG_1(self, args);
64519 }
64520 }
64521 if (argc == 1) {
64522 int _v;
64523 int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
64524 _v = SWIG_CheckState(res);
64525 if (_v) {
64526 return _wrap_read_ProductQuantizer__SWIG_0(self, args);
64527 }
64528 }
64529
64530 fail:
64531 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'read_ProductQuantizer'.\n"
64532 " Possible C/C++ prototypes are:\n"
64533 " faiss::read_ProductQuantizer(char const *)\n"
64534 " faiss::read_ProductQuantizer(faiss::IOReader *)\n");
64535 return 0;
64536 }
64537
64538
64539 SWIGINTERN PyObject *_wrap_write_ProductQuantizer__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64540 PyObject *resultobj = 0;
64541 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
64542 char *arg2 = (char *) 0 ;
64543 void *argp1 = 0 ;
64544 int res1 = 0 ;
64545 int res2 ;
64546 char *buf2 = 0 ;
64547 int alloc2 = 0 ;
64548 PyObject * obj0 = 0 ;
64549 PyObject * obj1 = 0 ;
64550
64551 if (!PyArg_ParseTuple(args,(char *)"OO:write_ProductQuantizer",&obj0,&obj1)) SWIG_fail;
64552 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
64553 if (!SWIG_IsOK(res1)) {
64554 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_ProductQuantizer" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
64555 }
64556 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
64557 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
64558 if (!SWIG_IsOK(res2)) {
64559 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_ProductQuantizer" "', argument " "2"" of type '" "char const *""'");
64560 }
64561 arg2 = reinterpret_cast< char * >(buf2);
64562 {
64563 Py_BEGIN_ALLOW_THREADS
64564 try {
64565 faiss::write_ProductQuantizer((faiss::ProductQuantizer const *)arg1,(char const *)arg2);
64566 } catch(faiss::FaissException & e) {
64567 PyEval_RestoreThread(_save);
64568 PyErr_SetString(PyExc_RuntimeError, e.what());
64569 SWIG_fail;
64570 }
64571 Py_END_ALLOW_THREADS
64572 }
64573 resultobj = SWIG_Py_Void();
64574 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
64575 return resultobj;
64576 fail:
64577 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
64578 return NULL;
64579 }
64580
64581
64582 SWIGINTERN PyObject *_wrap_write_ProductQuantizer__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64583 PyObject *resultobj = 0;
64584 faiss::ProductQuantizer *arg1 = (faiss::ProductQuantizer *) 0 ;
64585 faiss::IOWriter *arg2 = (faiss::IOWriter *) 0 ;
64586 void *argp1 = 0 ;
64587 int res1 = 0 ;
64588 void *argp2 = 0 ;
64589 int res2 = 0 ;
64590 PyObject * obj0 = 0 ;
64591 PyObject * obj1 = 0 ;
64592
64593 if (!PyArg_ParseTuple(args,(char *)"OO:write_ProductQuantizer",&obj0,&obj1)) SWIG_fail;
64594 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ProductQuantizer, 0 | 0 );
64595 if (!SWIG_IsOK(res1)) {
64596 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_ProductQuantizer" "', argument " "1"" of type '" "faiss::ProductQuantizer const *""'");
64597 }
64598 arg1 = reinterpret_cast< faiss::ProductQuantizer * >(argp1);
64599 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
64600 if (!SWIG_IsOK(res2)) {
64601 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_ProductQuantizer" "', argument " "2"" of type '" "faiss::IOWriter *""'");
64602 }
64603 arg2 = reinterpret_cast< faiss::IOWriter * >(argp2);
64604 {
64605 Py_BEGIN_ALLOW_THREADS
64606 try {
64607 faiss::write_ProductQuantizer((faiss::ProductQuantizer const *)arg1,arg2);
64608 } catch(faiss::FaissException & e) {
64609 PyEval_RestoreThread(_save);
64610 PyErr_SetString(PyExc_RuntimeError, e.what());
64611 SWIG_fail;
64612 }
64613 Py_END_ALLOW_THREADS
64614 }
64615 resultobj = SWIG_Py_Void();
64616 return resultobj;
64617 fail:
64618 return NULL;
64619 }
64620
64621
64622 SWIGINTERN PyObject *_wrap_write_ProductQuantizer(PyObject *self, PyObject *args) {
64623 Py_ssize_t argc;
64624 PyObject *argv[3] = {
64625 0
64626 };
64627 Py_ssize_t ii;
64628
64629 if (!PyTuple_Check(args)) SWIG_fail;
64630 argc = args ? PyObject_Length(args) : 0;
64631 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
64632 argv[ii] = PyTuple_GET_ITEM(args,ii);
64633 }
64634 if (argc == 2) {
64635 int _v;
64636 void *vptr = 0;
64637 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
64638 _v = SWIG_CheckState(res);
64639 if (_v) {
64640 void *vptr = 0;
64641 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__IOWriter, 0);
64642 _v = SWIG_CheckState(res);
64643 if (_v) {
64644 return _wrap_write_ProductQuantizer__SWIG_1(self, args);
64645 }
64646 }
64647 }
64648 if (argc == 2) {
64649 int _v;
64650 void *vptr = 0;
64651 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ProductQuantizer, 0);
64652 _v = SWIG_CheckState(res);
64653 if (_v) {
64654 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
64655 _v = SWIG_CheckState(res);
64656 if (_v) {
64657 return _wrap_write_ProductQuantizer__SWIG_0(self, args);
64658 }
64659 }
64660 }
64661
64662 fail:
64663 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'write_ProductQuantizer'.\n"
64664 " Possible C/C++ prototypes are:\n"
64665 " faiss::write_ProductQuantizer(faiss::ProductQuantizer const *,char const *)\n"
64666 " faiss::write_ProductQuantizer(faiss::ProductQuantizer const *,faiss::IOWriter *)\n");
64667 return 0;
64668 }
64669
64670
64671 SWIGINTERN PyObject *_wrap_write_InvertedLists(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64672 PyObject *resultobj = 0;
64673 faiss::InvertedLists *arg1 = (faiss::InvertedLists *) 0 ;
64674 faiss::IOWriter *arg2 = (faiss::IOWriter *) 0 ;
64675 void *argp1 = 0 ;
64676 int res1 = 0 ;
64677 void *argp2 = 0 ;
64678 int res2 = 0 ;
64679 PyObject * obj0 = 0 ;
64680 PyObject * obj1 = 0 ;
64681
64682 if (!PyArg_ParseTuple(args,(char *)"OO:write_InvertedLists",&obj0,&obj1)) SWIG_fail;
64683 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
64684 if (!SWIG_IsOK(res1)) {
64685 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "write_InvertedLists" "', argument " "1"" of type '" "faiss::InvertedLists const *""'");
64686 }
64687 arg1 = reinterpret_cast< faiss::InvertedLists * >(argp1);
64688 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
64689 if (!SWIG_IsOK(res2)) {
64690 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "write_InvertedLists" "', argument " "2"" of type '" "faiss::IOWriter *""'");
64691 }
64692 arg2 = reinterpret_cast< faiss::IOWriter * >(argp2);
64693 {
64694 Py_BEGIN_ALLOW_THREADS
64695 try {
64696 faiss::write_InvertedLists((faiss::InvertedLists const *)arg1,arg2);
64697 } catch(faiss::FaissException & e) {
64698 PyEval_RestoreThread(_save);
64699 PyErr_SetString(PyExc_RuntimeError, e.what());
64700 SWIG_fail;
64701 }
64702 Py_END_ALLOW_THREADS
64703 }
64704 resultobj = SWIG_Py_Void();
64705 return resultobj;
64706 fail:
64707 return NULL;
64708 }
64709
64710
64711 SWIGINTERN PyObject *_wrap_read_InvertedLists__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64712 PyObject *resultobj = 0;
64713 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
64714 int arg2 ;
64715 void *argp1 = 0 ;
64716 int res1 = 0 ;
64717 int val2 ;
64718 int ecode2 = 0 ;
64719 PyObject * obj0 = 0 ;
64720 PyObject * obj1 = 0 ;
64721 faiss::InvertedLists *result = 0 ;
64722
64723 if (!PyArg_ParseTuple(args,(char *)"OO:read_InvertedLists",&obj0,&obj1)) SWIG_fail;
64724 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
64725 if (!SWIG_IsOK(res1)) {
64726 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_InvertedLists" "', argument " "1"" of type '" "faiss::IOReader *""'");
64727 }
64728 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
64729 ecode2 = SWIG_AsVal_int(obj1, &val2);
64730 if (!SWIG_IsOK(ecode2)) {
64731 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "read_InvertedLists" "', argument " "2"" of type '" "int""'");
64732 }
64733 arg2 = static_cast< int >(val2);
64734 {
64735 Py_BEGIN_ALLOW_THREADS
64736 try {
64737 result = (faiss::InvertedLists *)faiss::read_InvertedLists(arg1,arg2);
64738 } catch(faiss::FaissException & e) {
64739 PyEval_RestoreThread(_save);
64740 PyErr_SetString(PyExc_RuntimeError, e.what());
64741 SWIG_fail;
64742 }
64743 Py_END_ALLOW_THREADS
64744 }
64745 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
64746 return resultobj;
64747 fail:
64748 return NULL;
64749 }
64750
64751
64752 SWIGINTERN PyObject *_wrap_read_InvertedLists__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64753 PyObject *resultobj = 0;
64754 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
64755 void *argp1 = 0 ;
64756 int res1 = 0 ;
64757 PyObject * obj0 = 0 ;
64758 faiss::InvertedLists *result = 0 ;
64759
64760 if (!PyArg_ParseTuple(args,(char *)"O:read_InvertedLists",&obj0)) SWIG_fail;
64761 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
64762 if (!SWIG_IsOK(res1)) {
64763 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "read_InvertedLists" "', argument " "1"" of type '" "faiss::IOReader *""'");
64764 }
64765 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
64766 {
64767 Py_BEGIN_ALLOW_THREADS
64768 try {
64769 result = (faiss::InvertedLists *)faiss::read_InvertedLists(arg1);
64770 } catch(faiss::FaissException & e) {
64771 PyEval_RestoreThread(_save);
64772 PyErr_SetString(PyExc_RuntimeError, e.what());
64773 SWIG_fail;
64774 }
64775 Py_END_ALLOW_THREADS
64776 }
64777 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__InvertedLists, 0 | 0 );
64778 return resultobj;
64779 fail:
64780 return NULL;
64781 }
64782
64783
64784 SWIGINTERN PyObject *_wrap_read_InvertedLists(PyObject *self, PyObject *args) {
64785 Py_ssize_t argc;
64786 PyObject *argv[3] = {
64787 0
64788 };
64789 Py_ssize_t ii;
64790
64791 if (!PyTuple_Check(args)) SWIG_fail;
64792 argc = args ? PyObject_Length(args) : 0;
64793 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
64794 argv[ii] = PyTuple_GET_ITEM(args,ii);
64795 }
64796 if (argc == 1) {
64797 int _v;
64798 void *vptr = 0;
64799 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
64800 _v = SWIG_CheckState(res);
64801 if (_v) {
64802 return _wrap_read_InvertedLists__SWIG_1(self, args);
64803 }
64804 }
64805 if (argc == 2) {
64806 int _v;
64807 void *vptr = 0;
64808 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__IOReader, 0);
64809 _v = SWIG_CheckState(res);
64810 if (_v) {
64811 {
64812 int res = SWIG_AsVal_int(argv[1], NULL);
64813 _v = SWIG_CheckState(res);
64814 }
64815 if (_v) {
64816 return _wrap_read_InvertedLists__SWIG_0(self, args);
64817 }
64818 }
64819 }
64820
64821 fail:
64822 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'read_InvertedLists'.\n"
64823 " Possible C/C++ prototypes are:\n"
64824 " faiss::read_InvertedLists(faiss::IOReader *,int)\n"
64825 " faiss::read_InvertedLists(faiss::IOReader *)\n");
64826 return 0;
64827 }
64828
64829
64830 SWIGINTERN PyObject *_wrap_clone_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64831 PyObject *resultobj = 0;
64832 faiss::Index *arg1 = (faiss::Index *) 0 ;
64833 void *argp1 = 0 ;
64834 int res1 = 0 ;
64835 PyObject * obj0 = 0 ;
64836 faiss::Index *result = 0 ;
64837
64838 if (!PyArg_ParseTuple(args,(char *)"O:clone_index",&obj0)) SWIG_fail;
64839 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Index, 0 | 0 );
64840 if (!SWIG_IsOK(res1)) {
64841 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "clone_index" "', argument " "1"" of type '" "faiss::Index const *""'");
64842 }
64843 arg1 = reinterpret_cast< faiss::Index * >(argp1);
64844 {
64845 Py_BEGIN_ALLOW_THREADS
64846 try {
64847 result = (faiss::Index *)faiss::clone_index((faiss::Index const *)arg1);
64848 } catch(faiss::FaissException & e) {
64849 PyEval_RestoreThread(_save);
64850 PyErr_SetString(PyExc_RuntimeError, e.what());
64851 SWIG_fail;
64852 }
64853 Py_END_ALLOW_THREADS
64854 }
64855 {
64856 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64857 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
64858 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
64859 } else
64860 /*@SWIG@*/
64861 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64862 if (dynamic_cast<faiss::IndexShards *> (result)) {
64863 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
64864 } else
64865 /*@SWIG@*/
64866 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64867 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
64868 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
64869 } else
64870 /*@SWIG@*/
64871 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64872 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
64873 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
64874 } else
64875 /*@SWIG@*/
64876 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64877 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
64878 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
64879 } else
64880 /*@SWIG@*/
64881 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64882 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
64883 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
64884 } else
64885 /*@SWIG@*/
64886 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64887 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
64888 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
64889 } else
64890 /*@SWIG@*/
64891 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64892 if (dynamic_cast<faiss::IndexIVF *> (result)) {
64893 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
64894 } else
64895 /*@SWIG@*/
64896 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64897 if (dynamic_cast<faiss::IndexFlat *> (result)) {
64898 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
64899 } else
64900 /*@SWIG@*/
64901 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64902 if (dynamic_cast<faiss::IndexPQ *> (result)) {
64903 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
64904 } else
64905 /*@SWIG@*/
64906 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64907 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
64908 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
64909 } else
64910 /*@SWIG@*/
64911 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64912 if (dynamic_cast<faiss::IndexLSH *> (result)) {
64913 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
64914 } else
64915 /*@SWIG@*/
64916 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64917 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
64918 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
64919 } else
64920 /*@SWIG@*/
64921 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64922 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
64923 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
64924 } else
64925 /*@SWIG@*/
64926 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64927 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
64928 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
64929 } else
64930 /*@SWIG@*/
64931 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64932 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
64933 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
64934 } else
64935 /*@SWIG@*/
64936 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64937 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
64938 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
64939 } else
64940 /*@SWIG@*/
64941 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64942 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
64943 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
64944 } else
64945 /*@SWIG@*/
64946 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64947 if (dynamic_cast<faiss::Index2Layer *> (result)) {
64948 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
64949 } else
64950 /*@SWIG@*/
64951
64952
64953
64954
64955
64956
64957 // default for non-recognized classes
64958 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
64959 if (dynamic_cast<faiss::Index *> (result)) {
64960 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
64961 } else
64962 /*@SWIG@*/
64963 if (result == NULL)
64964 {
64965 resultobj = SWIG_Py_Void();
64966
64967 // Lua does not need a push for nil
64968 } else {
64969 assert(false);
64970 }
64971
64972
64973
64974 }
64975 return resultobj;
64976 fail:
64977 return NULL;
64978 }
64979
64980
64981 SWIGINTERN PyObject *_wrap_Cloner_clone_VectorTransform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
64982 PyObject *resultobj = 0;
64983 faiss::Cloner *arg1 = (faiss::Cloner *) 0 ;
64984 faiss::VectorTransform *arg2 = (faiss::VectorTransform *) 0 ;
64985 void *argp1 = 0 ;
64986 int res1 = 0 ;
64987 void *argp2 = 0 ;
64988 int res2 = 0 ;
64989 PyObject * obj0 = 0 ;
64990 PyObject * obj1 = 0 ;
64991 faiss::VectorTransform *result = 0 ;
64992
64993 if (!PyArg_ParseTuple(args,(char *)"OO:Cloner_clone_VectorTransform",&obj0,&obj1)) SWIG_fail;
64994 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Cloner, 0 | 0 );
64995 if (!SWIG_IsOK(res1)) {
64996 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cloner_clone_VectorTransform" "', argument " "1"" of type '" "faiss::Cloner *""'");
64997 }
64998 arg1 = reinterpret_cast< faiss::Cloner * >(argp1);
64999 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__VectorTransform, 0 | 0 );
65000 if (!SWIG_IsOK(res2)) {
65001 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cloner_clone_VectorTransform" "', argument " "2"" of type '" "faiss::VectorTransform const *""'");
65002 }
65003 arg2 = reinterpret_cast< faiss::VectorTransform * >(argp2);
65004 {
65005 Py_BEGIN_ALLOW_THREADS
65006 try {
65007 result = (faiss::VectorTransform *)(arg1)->clone_VectorTransform((faiss::VectorTransform const *)arg2);
65008 } catch(faiss::FaissException & e) {
65009 PyEval_RestoreThread(_save);
65010 PyErr_SetString(PyExc_RuntimeError, e.what());
65011 SWIG_fail;
65012 }
65013 Py_END_ALLOW_THREADS
65014 }
65015 {
65016 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65017 if (dynamic_cast<faiss::RemapDimensionsTransform *> (result)) {
65018 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RemapDimensionsTransform,SWIG_POINTER_OWN);
65019 } else
65020 /*@SWIG@*/
65021 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65022 if (dynamic_cast<faiss::OPQMatrix *> (result)) {
65023 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__OPQMatrix,SWIG_POINTER_OWN);
65024 } else
65025 /*@SWIG@*/
65026 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65027 if (dynamic_cast<faiss::PCAMatrix *> (result)) {
65028 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__PCAMatrix,SWIG_POINTER_OWN);
65029 } else
65030 /*@SWIG@*/
65031 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65032 if (dynamic_cast<faiss::RandomRotationMatrix *> (result)) {
65033 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__RandomRotationMatrix,SWIG_POINTER_OWN);
65034 } else
65035 /*@SWIG@*/
65036 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65037 if (dynamic_cast<faiss::LinearTransform *> (result)) {
65038 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__LinearTransform,SWIG_POINTER_OWN);
65039 } else
65040 /*@SWIG@*/
65041 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65042 if (dynamic_cast<faiss::NormalizationTransform *> (result)) {
65043 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__NormalizationTransform,SWIG_POINTER_OWN);
65044 } else
65045 /*@SWIG@*/
65046 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65047 if (dynamic_cast<faiss::VectorTransform *> (result)) {
65048 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__VectorTransform,SWIG_POINTER_OWN);
65049 } else
65050 /*@SWIG@*/
65051 {
65052 assert(false);
65053 }
65054
65055
65056
65057 }
65058 return resultobj;
65059 fail:
65060 return NULL;
65061 }
65062
65063
65064 SWIGINTERN PyObject *_wrap_Cloner_clone_Index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65065 PyObject *resultobj = 0;
65066 faiss::Cloner *arg1 = (faiss::Cloner *) 0 ;
65067 faiss::Index *arg2 = (faiss::Index *) 0 ;
65068 void *argp1 = 0 ;
65069 int res1 = 0 ;
65070 void *argp2 = 0 ;
65071 int res2 = 0 ;
65072 PyObject * obj0 = 0 ;
65073 PyObject * obj1 = 0 ;
65074 faiss::Index *result = 0 ;
65075
65076 if (!PyArg_ParseTuple(args,(char *)"OO:Cloner_clone_Index",&obj0,&obj1)) SWIG_fail;
65077 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Cloner, 0 | 0 );
65078 if (!SWIG_IsOK(res1)) {
65079 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cloner_clone_Index" "', argument " "1"" of type '" "faiss::Cloner *""'");
65080 }
65081 arg1 = reinterpret_cast< faiss::Cloner * >(argp1);
65082 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
65083 if (!SWIG_IsOK(res2)) {
65084 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cloner_clone_Index" "', argument " "2"" of type '" "faiss::Index const *""'");
65085 }
65086 arg2 = reinterpret_cast< faiss::Index * >(argp2);
65087 {
65088 Py_BEGIN_ALLOW_THREADS
65089 try {
65090 result = (faiss::Index *)(arg1)->clone_Index((faiss::Index const *)arg2);
65091 } catch(faiss::FaissException & e) {
65092 PyEval_RestoreThread(_save);
65093 PyErr_SetString(PyExc_RuntimeError, e.what());
65094 SWIG_fail;
65095 }
65096 Py_END_ALLOW_THREADS
65097 }
65098 {
65099 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65100 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
65101 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,0);
65102 } else
65103 /*@SWIG@*/
65104 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65105 if (dynamic_cast<faiss::IndexShards *> (result)) {
65106 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,0);
65107 } else
65108 /*@SWIG@*/
65109 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65110 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
65111 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,0);
65112 } else
65113 /*@SWIG@*/
65114 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65115 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
65116 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,0);
65117 } else
65118 /*@SWIG@*/
65119 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65120 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
65121 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,0);
65122 } else
65123 /*@SWIG@*/
65124 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65125 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
65126 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,0);
65127 } else
65128 /*@SWIG@*/
65129 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65130 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
65131 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,0);
65132 } else
65133 /*@SWIG@*/
65134 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65135 if (dynamic_cast<faiss::IndexIVF *> (result)) {
65136 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,0);
65137 } else
65138 /*@SWIG@*/
65139 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65140 if (dynamic_cast<faiss::IndexFlat *> (result)) {
65141 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,0);
65142 } else
65143 /*@SWIG@*/
65144 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65145 if (dynamic_cast<faiss::IndexPQ *> (result)) {
65146 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,0);
65147 } else
65148 /*@SWIG@*/
65149 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65150 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
65151 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,0);
65152 } else
65153 /*@SWIG@*/
65154 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65155 if (dynamic_cast<faiss::IndexLSH *> (result)) {
65156 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,0);
65157 } else
65158 /*@SWIG@*/
65159 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65160 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
65161 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,0);
65162 } else
65163 /*@SWIG@*/
65164 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65165 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
65166 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,0);
65167 } else
65168 /*@SWIG@*/
65169 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65170 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
65171 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,0);
65172 } else
65173 /*@SWIG@*/
65174 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65175 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
65176 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,0);
65177 } else
65178 /*@SWIG@*/
65179 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65180 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
65181 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,0);
65182 } else
65183 /*@SWIG@*/
65184 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65185 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
65186 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,0);
65187 } else
65188 /*@SWIG@*/
65189 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65190 if (dynamic_cast<faiss::Index2Layer *> (result)) {
65191 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,0);
65192 } else
65193 /*@SWIG@*/
65194
65195
65196
65197
65198
65199
65200 // default for non-recognized classes
65201 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
65202 if (dynamic_cast<faiss::Index *> (result)) {
65203 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,0);
65204 } else
65205 /*@SWIG@*/
65206 if (result == NULL)
65207 {
65208 resultobj = SWIG_Py_Void();
65209
65210 // Lua does not need a push for nil
65211 } else {
65212 assert(false);
65213 }
65214
65215
65216
65217 }
65218 return resultobj;
65219 fail:
65220 return NULL;
65221 }
65222
65223
65224 SWIGINTERN PyObject *_wrap_Cloner_clone_IndexIVF(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65225 PyObject *resultobj = 0;
65226 faiss::Cloner *arg1 = (faiss::Cloner *) 0 ;
65227 faiss::IndexIVF *arg2 = (faiss::IndexIVF *) 0 ;
65228 void *argp1 = 0 ;
65229 int res1 = 0 ;
65230 void *argp2 = 0 ;
65231 int res2 = 0 ;
65232 PyObject * obj0 = 0 ;
65233 PyObject * obj1 = 0 ;
65234 faiss::IndexIVF *result = 0 ;
65235
65236 if (!PyArg_ParseTuple(args,(char *)"OO:Cloner_clone_IndexIVF",&obj0,&obj1)) SWIG_fail;
65237 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Cloner, 0 | 0 );
65238 if (!SWIG_IsOK(res1)) {
65239 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "Cloner_clone_IndexIVF" "', argument " "1"" of type '" "faiss::Cloner *""'");
65240 }
65241 arg1 = reinterpret_cast< faiss::Cloner * >(argp1);
65242 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
65243 if (!SWIG_IsOK(res2)) {
65244 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "Cloner_clone_IndexIVF" "', argument " "2"" of type '" "faiss::IndexIVF const *""'");
65245 }
65246 arg2 = reinterpret_cast< faiss::IndexIVF * >(argp2);
65247 {
65248 Py_BEGIN_ALLOW_THREADS
65249 try {
65250 result = (faiss::IndexIVF *)(arg1)->clone_IndexIVF((faiss::IndexIVF const *)arg2);
65251 } catch(faiss::FaissException & e) {
65252 PyEval_RestoreThread(_save);
65253 PyErr_SetString(PyExc_RuntimeError, e.what());
65254 SWIG_fail;
65255 }
65256 Py_END_ALLOW_THREADS
65257 }
65258 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IndexIVF, 0 | 0 );
65259 return resultobj;
65260 fail:
65261 return NULL;
65262 }
65263
65264
65265 SWIGINTERN PyObject *_wrap_delete_Cloner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65266 PyObject *resultobj = 0;
65267 faiss::Cloner *arg1 = (faiss::Cloner *) 0 ;
65268 void *argp1 = 0 ;
65269 int res1 = 0 ;
65270 PyObject * obj0 = 0 ;
65271
65272 if (!PyArg_ParseTuple(args,(char *)"O:delete_Cloner",&obj0)) SWIG_fail;
65273 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__Cloner, SWIG_POINTER_DISOWN | 0 );
65274 if (!SWIG_IsOK(res1)) {
65275 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_Cloner" "', argument " "1"" of type '" "faiss::Cloner *""'");
65276 }
65277 arg1 = reinterpret_cast< faiss::Cloner * >(argp1);
65278 {
65279 Py_BEGIN_ALLOW_THREADS
65280 try {
65281 delete arg1;
65282 } catch(faiss::FaissException & e) {
65283 PyEval_RestoreThread(_save);
65284 PyErr_SetString(PyExc_RuntimeError, e.what());
65285 SWIG_fail;
65286 }
65287 Py_END_ALLOW_THREADS
65288 }
65289 resultobj = SWIG_Py_Void();
65290 return resultobj;
65291 fail:
65292 return NULL;
65293 }
65294
65295
65296 SWIGINTERN PyObject *_wrap_new_Cloner(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65297 PyObject *resultobj = 0;
65298 faiss::Cloner *result = 0 ;
65299
65300 if (!PyArg_ParseTuple(args,(char *)":new_Cloner")) SWIG_fail;
65301 result = (faiss::Cloner *)new faiss::Cloner();
65302 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__Cloner, SWIG_POINTER_NEW | 0 );
65303 return resultobj;
65304 fail:
65305 return NULL;
65306 }
65307
65308
65309 SWIGINTERN PyObject *Cloner_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65310 PyObject *obj;
65311 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
65312 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__Cloner, SWIG_NewClientData(obj));
65313 return SWIG_Py_Void();
65314 }
65315
65316 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_nq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65317 PyObject *resultobj = 0;
65318 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65319 faiss::AutoTuneCriterion::idx_t arg2 ;
65320 void *argp1 = 0 ;
65321 int res1 = 0 ;
65322 long val2 ;
65323 int ecode2 = 0 ;
65324 PyObject * obj0 = 0 ;
65325 PyObject * obj1 = 0 ;
65326
65327 if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_nq_set",&obj0,&obj1)) SWIG_fail;
65328 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65329 if (!SWIG_IsOK(res1)) {
65330 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_nq_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65331 }
65332 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65333 ecode2 = SWIG_AsVal_long(obj1, &val2);
65334 if (!SWIG_IsOK(ecode2)) {
65335 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AutoTuneCriterion_nq_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65336 }
65337 arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
65338 if (arg1) (arg1)->nq = arg2;
65339 resultobj = SWIG_Py_Void();
65340 return resultobj;
65341 fail:
65342 return NULL;
65343 }
65344
65345
65346 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_nq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65347 PyObject *resultobj = 0;
65348 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65349 void *argp1 = 0 ;
65350 int res1 = 0 ;
65351 PyObject * obj0 = 0 ;
65352 faiss::AutoTuneCriterion::idx_t result;
65353
65354 if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_nq_get",&obj0)) SWIG_fail;
65355 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65356 if (!SWIG_IsOK(res1)) {
65357 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_nq_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65358 }
65359 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65360 result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->nq);
65361 resultobj = SWIG_From_long(static_cast< long >(result));
65362 return resultobj;
65363 fail:
65364 return NULL;
65365 }
65366
65367
65368 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_nnn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65369 PyObject *resultobj = 0;
65370 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65371 faiss::AutoTuneCriterion::idx_t arg2 ;
65372 void *argp1 = 0 ;
65373 int res1 = 0 ;
65374 long val2 ;
65375 int ecode2 = 0 ;
65376 PyObject * obj0 = 0 ;
65377 PyObject * obj1 = 0 ;
65378
65379 if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_nnn_set",&obj0,&obj1)) SWIG_fail;
65380 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65381 if (!SWIG_IsOK(res1)) {
65382 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_nnn_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65383 }
65384 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65385 ecode2 = SWIG_AsVal_long(obj1, &val2);
65386 if (!SWIG_IsOK(ecode2)) {
65387 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AutoTuneCriterion_nnn_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65388 }
65389 arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
65390 if (arg1) (arg1)->nnn = arg2;
65391 resultobj = SWIG_Py_Void();
65392 return resultobj;
65393 fail:
65394 return NULL;
65395 }
65396
65397
65398 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_nnn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65399 PyObject *resultobj = 0;
65400 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65401 void *argp1 = 0 ;
65402 int res1 = 0 ;
65403 PyObject * obj0 = 0 ;
65404 faiss::AutoTuneCriterion::idx_t result;
65405
65406 if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_nnn_get",&obj0)) SWIG_fail;
65407 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65408 if (!SWIG_IsOK(res1)) {
65409 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_nnn_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65410 }
65411 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65412 result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->nnn);
65413 resultobj = SWIG_From_long(static_cast< long >(result));
65414 return resultobj;
65415 fail:
65416 return NULL;
65417 }
65418
65419
65420 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_nnn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65421 PyObject *resultobj = 0;
65422 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65423 faiss::AutoTuneCriterion::idx_t arg2 ;
65424 void *argp1 = 0 ;
65425 int res1 = 0 ;
65426 long val2 ;
65427 int ecode2 = 0 ;
65428 PyObject * obj0 = 0 ;
65429 PyObject * obj1 = 0 ;
65430
65431 if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_gt_nnn_set",&obj0,&obj1)) SWIG_fail;
65432 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65433 if (!SWIG_IsOK(res1)) {
65434 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_nnn_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65435 }
65436 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65437 ecode2 = SWIG_AsVal_long(obj1, &val2);
65438 if (!SWIG_IsOK(ecode2)) {
65439 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AutoTuneCriterion_gt_nnn_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65440 }
65441 arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
65442 if (arg1) (arg1)->gt_nnn = arg2;
65443 resultobj = SWIG_Py_Void();
65444 return resultobj;
65445 fail:
65446 return NULL;
65447 }
65448
65449
65450 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_nnn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65451 PyObject *resultobj = 0;
65452 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65453 void *argp1 = 0 ;
65454 int res1 = 0 ;
65455 PyObject * obj0 = 0 ;
65456 faiss::AutoTuneCriterion::idx_t result;
65457
65458 if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_gt_nnn_get",&obj0)) SWIG_fail;
65459 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65460 if (!SWIG_IsOK(res1)) {
65461 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_nnn_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65462 }
65463 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65464 result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->gt_nnn);
65465 resultobj = SWIG_From_long(static_cast< long >(result));
65466 return resultobj;
65467 fail:
65468 return NULL;
65469 }
65470
65471
65472 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_D_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65473 PyObject *resultobj = 0;
65474 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65475 std::vector< float > *arg2 = (std::vector< float > *) 0 ;
65476 void *argp1 = 0 ;
65477 int res1 = 0 ;
65478 void *argp2 = 0 ;
65479 int res2 = 0 ;
65480 PyObject * obj0 = 0 ;
65481 PyObject * obj1 = 0 ;
65482
65483 if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_gt_D_set",&obj0,&obj1)) SWIG_fail;
65484 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65485 if (!SWIG_IsOK(res1)) {
65486 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_D_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65487 }
65488 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65489 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
65490 if (!SWIG_IsOK(res2)) {
65491 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoTuneCriterion_gt_D_set" "', argument " "2"" of type '" "std::vector< float > *""'");
65492 }
65493 arg2 = reinterpret_cast< std::vector< float > * >(argp2);
65494 if (arg1) (arg1)->gt_D = *arg2;
65495 resultobj = SWIG_Py_Void();
65496 return resultobj;
65497 fail:
65498 return NULL;
65499 }
65500
65501
65502 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_D_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65503 PyObject *resultobj = 0;
65504 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65505 void *argp1 = 0 ;
65506 int res1 = 0 ;
65507 PyObject * obj0 = 0 ;
65508 std::vector< float > *result = 0 ;
65509
65510 if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_gt_D_get",&obj0)) SWIG_fail;
65511 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65512 if (!SWIG_IsOK(res1)) {
65513 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_D_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65514 }
65515 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65516 result = (std::vector< float > *)& ((arg1)->gt_D);
65517 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_float_t, 0 | 0 );
65518 return resultobj;
65519 fail:
65520 return NULL;
65521 }
65522
65523
65524 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_I_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65525 PyObject *resultobj = 0;
65526 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65527 std::vector< faiss::AutoTuneCriterion::idx_t > *arg2 = (std::vector< faiss::AutoTuneCriterion::idx_t > *) 0 ;
65528 void *argp1 = 0 ;
65529 int res1 = 0 ;
65530 void *argp2 = 0 ;
65531 int res2 = 0 ;
65532 PyObject * obj0 = 0 ;
65533 PyObject * obj1 = 0 ;
65534
65535 if (!PyArg_ParseTuple(args,(char *)"OO:AutoTuneCriterion_gt_I_set",&obj0,&obj1)) SWIG_fail;
65536 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65537 if (!SWIG_IsOK(res1)) {
65538 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_I_set" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65539 }
65540 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65541 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
65542 if (!SWIG_IsOK(res2)) {
65543 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoTuneCriterion_gt_I_set" "', argument " "2"" of type '" "std::vector< faiss::AutoTuneCriterion::idx_t > *""'");
65544 }
65545 arg2 = reinterpret_cast< std::vector< faiss::AutoTuneCriterion::idx_t > * >(argp2);
65546 if (arg1) (arg1)->gt_I = *arg2;
65547 resultobj = SWIG_Py_Void();
65548 return resultobj;
65549 fail:
65550 return NULL;
65551 }
65552
65553
65554 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_gt_I_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65555 PyObject *resultobj = 0;
65556 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65557 void *argp1 = 0 ;
65558 int res1 = 0 ;
65559 PyObject * obj0 = 0 ;
65560 std::vector< faiss::AutoTuneCriterion::idx_t > *result = 0 ;
65561
65562 if (!PyArg_ParseTuple(args,(char *)"O:AutoTuneCriterion_gt_I_get",&obj0)) SWIG_fail;
65563 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65564 if (!SWIG_IsOK(res1)) {
65565 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_gt_I_get" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65566 }
65567 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65568 result = (std::vector< faiss::AutoTuneCriterion::idx_t > *)& ((arg1)->gt_I);
65569 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_long_t, 0 | 0 );
65570 return resultobj;
65571 fail:
65572 return NULL;
65573 }
65574
65575
65576 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_set_groundtruth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65577 PyObject *resultobj = 0;
65578 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65579 int arg2 ;
65580 float *arg3 = (float *) 0 ;
65581 faiss::AutoTuneCriterion::idx_t *arg4 = (faiss::AutoTuneCriterion::idx_t *) 0 ;
65582 void *argp1 = 0 ;
65583 int res1 = 0 ;
65584 int val2 ;
65585 int ecode2 = 0 ;
65586 void *argp3 = 0 ;
65587 int res3 = 0 ;
65588 void *argp4 = 0 ;
65589 int res4 = 0 ;
65590 PyObject * obj0 = 0 ;
65591 PyObject * obj1 = 0 ;
65592 PyObject * obj2 = 0 ;
65593 PyObject * obj3 = 0 ;
65594
65595 if (!PyArg_ParseTuple(args,(char *)"OOOO:AutoTuneCriterion_set_groundtruth",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
65596 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65597 if (!SWIG_IsOK(res1)) {
65598 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_set_groundtruth" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65599 }
65600 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65601 ecode2 = SWIG_AsVal_int(obj1, &val2);
65602 if (!SWIG_IsOK(ecode2)) {
65603 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "AutoTuneCriterion_set_groundtruth" "', argument " "2"" of type '" "int""'");
65604 }
65605 arg2 = static_cast< int >(val2);
65606 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
65607 if (!SWIG_IsOK(res3)) {
65608 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoTuneCriterion_set_groundtruth" "', argument " "3"" of type '" "float const *""'");
65609 }
65610 arg3 = reinterpret_cast< float * >(argp3);
65611 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
65612 if (!SWIG_IsOK(res4)) {
65613 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "AutoTuneCriterion_set_groundtruth" "', argument " "4"" of type '" "faiss::AutoTuneCriterion::idx_t const *""'");
65614 }
65615 arg4 = reinterpret_cast< faiss::AutoTuneCriterion::idx_t * >(argp4);
65616 {
65617 Py_BEGIN_ALLOW_THREADS
65618 try {
65619 (arg1)->set_groundtruth(arg2,(float const *)arg3,(faiss::AutoTuneCriterion::idx_t const *)arg4);
65620 } catch(faiss::FaissException & e) {
65621 PyEval_RestoreThread(_save);
65622 PyErr_SetString(PyExc_RuntimeError, e.what());
65623 SWIG_fail;
65624 }
65625 Py_END_ALLOW_THREADS
65626 }
65627 resultobj = SWIG_Py_Void();
65628 return resultobj;
65629 fail:
65630 return NULL;
65631 }
65632
65633
65634 SWIGINTERN PyObject *_wrap_AutoTuneCriterion_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65635 PyObject *resultobj = 0;
65636 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65637 float *arg2 = (float *) 0 ;
65638 faiss::AutoTuneCriterion::idx_t *arg3 = (faiss::AutoTuneCriterion::idx_t *) 0 ;
65639 void *argp1 = 0 ;
65640 int res1 = 0 ;
65641 void *argp2 = 0 ;
65642 int res2 = 0 ;
65643 void *argp3 = 0 ;
65644 int res3 = 0 ;
65645 PyObject * obj0 = 0 ;
65646 PyObject * obj1 = 0 ;
65647 PyObject * obj2 = 0 ;
65648 double result;
65649
65650 if (!PyArg_ParseTuple(args,(char *)"OOO:AutoTuneCriterion_evaluate",&obj0,&obj1,&obj2)) SWIG_fail;
65651 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0 );
65652 if (!SWIG_IsOK(res1)) {
65653 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "AutoTuneCriterion_evaluate" "', argument " "1"" of type '" "faiss::AutoTuneCriterion const *""'");
65654 }
65655 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65656 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
65657 if (!SWIG_IsOK(res2)) {
65658 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "AutoTuneCriterion_evaluate" "', argument " "2"" of type '" "float const *""'");
65659 }
65660 arg2 = reinterpret_cast< float * >(argp2);
65661 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
65662 if (!SWIG_IsOK(res3)) {
65663 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "AutoTuneCriterion_evaluate" "', argument " "3"" of type '" "faiss::AutoTuneCriterion::idx_t const *""'");
65664 }
65665 arg3 = reinterpret_cast< faiss::AutoTuneCriterion::idx_t * >(argp3);
65666 {
65667 Py_BEGIN_ALLOW_THREADS
65668 try {
65669 result = (double)((faiss::AutoTuneCriterion const *)arg1)->evaluate((float const *)arg2,(faiss::AutoTuneCriterion::idx_t const *)arg3);
65670 } catch(faiss::FaissException & e) {
65671 PyEval_RestoreThread(_save);
65672 PyErr_SetString(PyExc_RuntimeError, e.what());
65673 SWIG_fail;
65674 }
65675 Py_END_ALLOW_THREADS
65676 }
65677 resultobj = SWIG_From_double(static_cast< double >(result));
65678 return resultobj;
65679 fail:
65680 return NULL;
65681 }
65682
65683
65684 SWIGINTERN PyObject *_wrap_delete_AutoTuneCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65685 PyObject *resultobj = 0;
65686 faiss::AutoTuneCriterion *arg1 = (faiss::AutoTuneCriterion *) 0 ;
65687 void *argp1 = 0 ;
65688 int res1 = 0 ;
65689 PyObject * obj0 = 0 ;
65690
65691 if (!PyArg_ParseTuple(args,(char *)"O:delete_AutoTuneCriterion",&obj0)) SWIG_fail;
65692 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__AutoTuneCriterion, SWIG_POINTER_DISOWN | 0 );
65693 if (!SWIG_IsOK(res1)) {
65694 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_AutoTuneCriterion" "', argument " "1"" of type '" "faiss::AutoTuneCriterion *""'");
65695 }
65696 arg1 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp1);
65697 {
65698 Py_BEGIN_ALLOW_THREADS
65699 try {
65700 delete arg1;
65701 } catch(faiss::FaissException & e) {
65702 PyEval_RestoreThread(_save);
65703 PyErr_SetString(PyExc_RuntimeError, e.what());
65704 SWIG_fail;
65705 }
65706 Py_END_ALLOW_THREADS
65707 }
65708 resultobj = SWIG_Py_Void();
65709 return resultobj;
65710 fail:
65711 return NULL;
65712 }
65713
65714
65715 SWIGINTERN PyObject *AutoTuneCriterion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65716 PyObject *obj;
65717 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
65718 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__AutoTuneCriterion, SWIG_NewClientData(obj));
65719 return SWIG_Py_Void();
65720 }
65721
65722 SWIGINTERN PyObject *_wrap_OneRecallAtRCriterion_R_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65723 PyObject *resultobj = 0;
65724 faiss::OneRecallAtRCriterion *arg1 = (faiss::OneRecallAtRCriterion *) 0 ;
65725 faiss::AutoTuneCriterion::idx_t arg2 ;
65726 void *argp1 = 0 ;
65727 int res1 = 0 ;
65728 long val2 ;
65729 int ecode2 = 0 ;
65730 PyObject * obj0 = 0 ;
65731 PyObject * obj1 = 0 ;
65732
65733 if (!PyArg_ParseTuple(args,(char *)"OO:OneRecallAtRCriterion_R_set",&obj0,&obj1)) SWIG_fail;
65734 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OneRecallAtRCriterion, 0 | 0 );
65735 if (!SWIG_IsOK(res1)) {
65736 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OneRecallAtRCriterion_R_set" "', argument " "1"" of type '" "faiss::OneRecallAtRCriterion *""'");
65737 }
65738 arg1 = reinterpret_cast< faiss::OneRecallAtRCriterion * >(argp1);
65739 ecode2 = SWIG_AsVal_long(obj1, &val2);
65740 if (!SWIG_IsOK(ecode2)) {
65741 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OneRecallAtRCriterion_R_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65742 }
65743 arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
65744 if (arg1) (arg1)->R = arg2;
65745 resultobj = SWIG_Py_Void();
65746 return resultobj;
65747 fail:
65748 return NULL;
65749 }
65750
65751
65752 SWIGINTERN PyObject *_wrap_OneRecallAtRCriterion_R_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65753 PyObject *resultobj = 0;
65754 faiss::OneRecallAtRCriterion *arg1 = (faiss::OneRecallAtRCriterion *) 0 ;
65755 void *argp1 = 0 ;
65756 int res1 = 0 ;
65757 PyObject * obj0 = 0 ;
65758 faiss::AutoTuneCriterion::idx_t result;
65759
65760 if (!PyArg_ParseTuple(args,(char *)"O:OneRecallAtRCriterion_R_get",&obj0)) SWIG_fail;
65761 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OneRecallAtRCriterion, 0 | 0 );
65762 if (!SWIG_IsOK(res1)) {
65763 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OneRecallAtRCriterion_R_get" "', argument " "1"" of type '" "faiss::OneRecallAtRCriterion *""'");
65764 }
65765 arg1 = reinterpret_cast< faiss::OneRecallAtRCriterion * >(argp1);
65766 result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->R);
65767 resultobj = SWIG_From_long(static_cast< long >(result));
65768 return resultobj;
65769 fail:
65770 return NULL;
65771 }
65772
65773
65774 SWIGINTERN PyObject *_wrap_new_OneRecallAtRCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65775 PyObject *resultobj = 0;
65776 faiss::AutoTuneCriterion::idx_t arg1 ;
65777 faiss::AutoTuneCriterion::idx_t arg2 ;
65778 long val1 ;
65779 int ecode1 = 0 ;
65780 long val2 ;
65781 int ecode2 = 0 ;
65782 PyObject * obj0 = 0 ;
65783 PyObject * obj1 = 0 ;
65784 faiss::OneRecallAtRCriterion *result = 0 ;
65785
65786 if (!PyArg_ParseTuple(args,(char *)"OO:new_OneRecallAtRCriterion",&obj0,&obj1)) SWIG_fail;
65787 ecode1 = SWIG_AsVal_long(obj0, &val1);
65788 if (!SWIG_IsOK(ecode1)) {
65789 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_OneRecallAtRCriterion" "', argument " "1"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65790 }
65791 arg1 = static_cast< faiss::AutoTuneCriterion::idx_t >(val1);
65792 ecode2 = SWIG_AsVal_long(obj1, &val2);
65793 if (!SWIG_IsOK(ecode2)) {
65794 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_OneRecallAtRCriterion" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65795 }
65796 arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
65797 {
65798 Py_BEGIN_ALLOW_THREADS
65799 try {
65800 result = (faiss::OneRecallAtRCriterion *)new faiss::OneRecallAtRCriterion(arg1,arg2);
65801 } catch(faiss::FaissException & e) {
65802 PyEval_RestoreThread(_save);
65803 PyErr_SetString(PyExc_RuntimeError, e.what());
65804 SWIG_fail;
65805 }
65806 Py_END_ALLOW_THREADS
65807 }
65808 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OneRecallAtRCriterion, SWIG_POINTER_NEW | 0 );
65809 return resultobj;
65810 fail:
65811 return NULL;
65812 }
65813
65814
65815 SWIGINTERN PyObject *_wrap_OneRecallAtRCriterion_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65816 PyObject *resultobj = 0;
65817 faiss::OneRecallAtRCriterion *arg1 = (faiss::OneRecallAtRCriterion *) 0 ;
65818 float *arg2 = (float *) 0 ;
65819 faiss::AutoTuneCriterion::idx_t *arg3 = (faiss::AutoTuneCriterion::idx_t *) 0 ;
65820 void *argp1 = 0 ;
65821 int res1 = 0 ;
65822 void *argp2 = 0 ;
65823 int res2 = 0 ;
65824 void *argp3 = 0 ;
65825 int res3 = 0 ;
65826 PyObject * obj0 = 0 ;
65827 PyObject * obj1 = 0 ;
65828 PyObject * obj2 = 0 ;
65829 double result;
65830
65831 if (!PyArg_ParseTuple(args,(char *)"OOO:OneRecallAtRCriterion_evaluate",&obj0,&obj1,&obj2)) SWIG_fail;
65832 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OneRecallAtRCriterion, 0 | 0 );
65833 if (!SWIG_IsOK(res1)) {
65834 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OneRecallAtRCriterion_evaluate" "', argument " "1"" of type '" "faiss::OneRecallAtRCriterion const *""'");
65835 }
65836 arg1 = reinterpret_cast< faiss::OneRecallAtRCriterion * >(argp1);
65837 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
65838 if (!SWIG_IsOK(res2)) {
65839 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OneRecallAtRCriterion_evaluate" "', argument " "2"" of type '" "float const *""'");
65840 }
65841 arg2 = reinterpret_cast< float * >(argp2);
65842 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
65843 if (!SWIG_IsOK(res3)) {
65844 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "OneRecallAtRCriterion_evaluate" "', argument " "3"" of type '" "faiss::AutoTuneCriterion::idx_t const *""'");
65845 }
65846 arg3 = reinterpret_cast< faiss::AutoTuneCriterion::idx_t * >(argp3);
65847 {
65848 Py_BEGIN_ALLOW_THREADS
65849 try {
65850 result = (double)((faiss::OneRecallAtRCriterion const *)arg1)->evaluate((float const *)arg2,(faiss::AutoTuneCriterion::idx_t const *)arg3);
65851 } catch(faiss::FaissException & e) {
65852 PyEval_RestoreThread(_save);
65853 PyErr_SetString(PyExc_RuntimeError, e.what());
65854 SWIG_fail;
65855 }
65856 Py_END_ALLOW_THREADS
65857 }
65858 resultobj = SWIG_From_double(static_cast< double >(result));
65859 return resultobj;
65860 fail:
65861 return NULL;
65862 }
65863
65864
65865 SWIGINTERN PyObject *_wrap_delete_OneRecallAtRCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65866 PyObject *resultobj = 0;
65867 faiss::OneRecallAtRCriterion *arg1 = (faiss::OneRecallAtRCriterion *) 0 ;
65868 void *argp1 = 0 ;
65869 int res1 = 0 ;
65870 PyObject * obj0 = 0 ;
65871
65872 if (!PyArg_ParseTuple(args,(char *)"O:delete_OneRecallAtRCriterion",&obj0)) SWIG_fail;
65873 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OneRecallAtRCriterion, SWIG_POINTER_DISOWN | 0 );
65874 if (!SWIG_IsOK(res1)) {
65875 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OneRecallAtRCriterion" "', argument " "1"" of type '" "faiss::OneRecallAtRCriterion *""'");
65876 }
65877 arg1 = reinterpret_cast< faiss::OneRecallAtRCriterion * >(argp1);
65878 {
65879 Py_BEGIN_ALLOW_THREADS
65880 try {
65881 delete arg1;
65882 } catch(faiss::FaissException & e) {
65883 PyEval_RestoreThread(_save);
65884 PyErr_SetString(PyExc_RuntimeError, e.what());
65885 SWIG_fail;
65886 }
65887 Py_END_ALLOW_THREADS
65888 }
65889 resultobj = SWIG_Py_Void();
65890 return resultobj;
65891 fail:
65892 return NULL;
65893 }
65894
65895
65896 SWIGINTERN PyObject *OneRecallAtRCriterion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65897 PyObject *obj;
65898 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
65899 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OneRecallAtRCriterion, SWIG_NewClientData(obj));
65900 return SWIG_Py_Void();
65901 }
65902
65903 SWIGINTERN PyObject *_wrap_IntersectionCriterion_R_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65904 PyObject *resultobj = 0;
65905 faiss::IntersectionCriterion *arg1 = (faiss::IntersectionCriterion *) 0 ;
65906 faiss::AutoTuneCriterion::idx_t arg2 ;
65907 void *argp1 = 0 ;
65908 int res1 = 0 ;
65909 long val2 ;
65910 int ecode2 = 0 ;
65911 PyObject * obj0 = 0 ;
65912 PyObject * obj1 = 0 ;
65913
65914 if (!PyArg_ParseTuple(args,(char *)"OO:IntersectionCriterion_R_set",&obj0,&obj1)) SWIG_fail;
65915 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IntersectionCriterion, 0 | 0 );
65916 if (!SWIG_IsOK(res1)) {
65917 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntersectionCriterion_R_set" "', argument " "1"" of type '" "faiss::IntersectionCriterion *""'");
65918 }
65919 arg1 = reinterpret_cast< faiss::IntersectionCriterion * >(argp1);
65920 ecode2 = SWIG_AsVal_long(obj1, &val2);
65921 if (!SWIG_IsOK(ecode2)) {
65922 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IntersectionCriterion_R_set" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65923 }
65924 arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
65925 if (arg1) (arg1)->R = arg2;
65926 resultobj = SWIG_Py_Void();
65927 return resultobj;
65928 fail:
65929 return NULL;
65930 }
65931
65932
65933 SWIGINTERN PyObject *_wrap_IntersectionCriterion_R_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65934 PyObject *resultobj = 0;
65935 faiss::IntersectionCriterion *arg1 = (faiss::IntersectionCriterion *) 0 ;
65936 void *argp1 = 0 ;
65937 int res1 = 0 ;
65938 PyObject * obj0 = 0 ;
65939 faiss::AutoTuneCriterion::idx_t result;
65940
65941 if (!PyArg_ParseTuple(args,(char *)"O:IntersectionCriterion_R_get",&obj0)) SWIG_fail;
65942 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IntersectionCriterion, 0 | 0 );
65943 if (!SWIG_IsOK(res1)) {
65944 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntersectionCriterion_R_get" "', argument " "1"" of type '" "faiss::IntersectionCriterion *""'");
65945 }
65946 arg1 = reinterpret_cast< faiss::IntersectionCriterion * >(argp1);
65947 result = (faiss::AutoTuneCriterion::idx_t) ((arg1)->R);
65948 resultobj = SWIG_From_long(static_cast< long >(result));
65949 return resultobj;
65950 fail:
65951 return NULL;
65952 }
65953
65954
65955 SWIGINTERN PyObject *_wrap_new_IntersectionCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65956 PyObject *resultobj = 0;
65957 faiss::AutoTuneCriterion::idx_t arg1 ;
65958 faiss::AutoTuneCriterion::idx_t arg2 ;
65959 long val1 ;
65960 int ecode1 = 0 ;
65961 long val2 ;
65962 int ecode2 = 0 ;
65963 PyObject * obj0 = 0 ;
65964 PyObject * obj1 = 0 ;
65965 faiss::IntersectionCriterion *result = 0 ;
65966
65967 if (!PyArg_ParseTuple(args,(char *)"OO:new_IntersectionCriterion",&obj0,&obj1)) SWIG_fail;
65968 ecode1 = SWIG_AsVal_long(obj0, &val1);
65969 if (!SWIG_IsOK(ecode1)) {
65970 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IntersectionCriterion" "', argument " "1"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65971 }
65972 arg1 = static_cast< faiss::AutoTuneCriterion::idx_t >(val1);
65973 ecode2 = SWIG_AsVal_long(obj1, &val2);
65974 if (!SWIG_IsOK(ecode2)) {
65975 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IntersectionCriterion" "', argument " "2"" of type '" "faiss::AutoTuneCriterion::idx_t""'");
65976 }
65977 arg2 = static_cast< faiss::AutoTuneCriterion::idx_t >(val2);
65978 {
65979 Py_BEGIN_ALLOW_THREADS
65980 try {
65981 result = (faiss::IntersectionCriterion *)new faiss::IntersectionCriterion(arg1,arg2);
65982 } catch(faiss::FaissException & e) {
65983 PyEval_RestoreThread(_save);
65984 PyErr_SetString(PyExc_RuntimeError, e.what());
65985 SWIG_fail;
65986 }
65987 Py_END_ALLOW_THREADS
65988 }
65989 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IntersectionCriterion, SWIG_POINTER_NEW | 0 );
65990 return resultobj;
65991 fail:
65992 return NULL;
65993 }
65994
65995
65996 SWIGINTERN PyObject *_wrap_IntersectionCriterion_evaluate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
65997 PyObject *resultobj = 0;
65998 faiss::IntersectionCriterion *arg1 = (faiss::IntersectionCriterion *) 0 ;
65999 float *arg2 = (float *) 0 ;
66000 faiss::AutoTuneCriterion::idx_t *arg3 = (faiss::AutoTuneCriterion::idx_t *) 0 ;
66001 void *argp1 = 0 ;
66002 int res1 = 0 ;
66003 void *argp2 = 0 ;
66004 int res2 = 0 ;
66005 void *argp3 = 0 ;
66006 int res3 = 0 ;
66007 PyObject * obj0 = 0 ;
66008 PyObject * obj1 = 0 ;
66009 PyObject * obj2 = 0 ;
66010 double result;
66011
66012 if (!PyArg_ParseTuple(args,(char *)"OOO:IntersectionCriterion_evaluate",&obj0,&obj1,&obj2)) SWIG_fail;
66013 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IntersectionCriterion, 0 | 0 );
66014 if (!SWIG_IsOK(res1)) {
66015 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IntersectionCriterion_evaluate" "', argument " "1"" of type '" "faiss::IntersectionCriterion const *""'");
66016 }
66017 arg1 = reinterpret_cast< faiss::IntersectionCriterion * >(argp1);
66018 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
66019 if (!SWIG_IsOK(res2)) {
66020 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IntersectionCriterion_evaluate" "', argument " "2"" of type '" "float const *""'");
66021 }
66022 arg2 = reinterpret_cast< float * >(argp2);
66023 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
66024 if (!SWIG_IsOK(res3)) {
66025 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "IntersectionCriterion_evaluate" "', argument " "3"" of type '" "faiss::AutoTuneCriterion::idx_t const *""'");
66026 }
66027 arg3 = reinterpret_cast< faiss::AutoTuneCriterion::idx_t * >(argp3);
66028 {
66029 Py_BEGIN_ALLOW_THREADS
66030 try {
66031 result = (double)((faiss::IntersectionCriterion const *)arg1)->evaluate((float const *)arg2,(faiss::AutoTuneCriterion::idx_t const *)arg3);
66032 } catch(faiss::FaissException & e) {
66033 PyEval_RestoreThread(_save);
66034 PyErr_SetString(PyExc_RuntimeError, e.what());
66035 SWIG_fail;
66036 }
66037 Py_END_ALLOW_THREADS
66038 }
66039 resultobj = SWIG_From_double(static_cast< double >(result));
66040 return resultobj;
66041 fail:
66042 return NULL;
66043 }
66044
66045
66046 SWIGINTERN PyObject *_wrap_delete_IntersectionCriterion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66047 PyObject *resultobj = 0;
66048 faiss::IntersectionCriterion *arg1 = (faiss::IntersectionCriterion *) 0 ;
66049 void *argp1 = 0 ;
66050 int res1 = 0 ;
66051 PyObject * obj0 = 0 ;
66052
66053 if (!PyArg_ParseTuple(args,(char *)"O:delete_IntersectionCriterion",&obj0)) SWIG_fail;
66054 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IntersectionCriterion, SWIG_POINTER_DISOWN | 0 );
66055 if (!SWIG_IsOK(res1)) {
66056 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IntersectionCriterion" "', argument " "1"" of type '" "faiss::IntersectionCriterion *""'");
66057 }
66058 arg1 = reinterpret_cast< faiss::IntersectionCriterion * >(argp1);
66059 {
66060 Py_BEGIN_ALLOW_THREADS
66061 try {
66062 delete arg1;
66063 } catch(faiss::FaissException & e) {
66064 PyEval_RestoreThread(_save);
66065 PyErr_SetString(PyExc_RuntimeError, e.what());
66066 SWIG_fail;
66067 }
66068 Py_END_ALLOW_THREADS
66069 }
66070 resultobj = SWIG_Py_Void();
66071 return resultobj;
66072 fail:
66073 return NULL;
66074 }
66075
66076
66077 SWIGINTERN PyObject *IntersectionCriterion_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66078 PyObject *obj;
66079 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
66080 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IntersectionCriterion, SWIG_NewClientData(obj));
66081 return SWIG_Py_Void();
66082 }
66083
66084 SWIGINTERN PyObject *_wrap_OperatingPoint_perf_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66085 PyObject *resultobj = 0;
66086 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66087 double arg2 ;
66088 void *argp1 = 0 ;
66089 int res1 = 0 ;
66090 double val2 ;
66091 int ecode2 = 0 ;
66092 PyObject * obj0 = 0 ;
66093 PyObject * obj1 = 0 ;
66094
66095 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoint_perf_set",&obj0,&obj1)) SWIG_fail;
66096 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
66097 if (!SWIG_IsOK(res1)) {
66098 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_perf_set" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66099 }
66100 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66101 ecode2 = SWIG_AsVal_double(obj1, &val2);
66102 if (!SWIG_IsOK(ecode2)) {
66103 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoint_perf_set" "', argument " "2"" of type '" "double""'");
66104 }
66105 arg2 = static_cast< double >(val2);
66106 if (arg1) (arg1)->perf = arg2;
66107 resultobj = SWIG_Py_Void();
66108 return resultobj;
66109 fail:
66110 return NULL;
66111 }
66112
66113
66114 SWIGINTERN PyObject *_wrap_OperatingPoint_perf_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66115 PyObject *resultobj = 0;
66116 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66117 void *argp1 = 0 ;
66118 int res1 = 0 ;
66119 PyObject * obj0 = 0 ;
66120 double result;
66121
66122 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoint_perf_get",&obj0)) SWIG_fail;
66123 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
66124 if (!SWIG_IsOK(res1)) {
66125 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_perf_get" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66126 }
66127 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66128 result = (double) ((arg1)->perf);
66129 resultobj = SWIG_From_double(static_cast< double >(result));
66130 return resultobj;
66131 fail:
66132 return NULL;
66133 }
66134
66135
66136 SWIGINTERN PyObject *_wrap_OperatingPoint_t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66137 PyObject *resultobj = 0;
66138 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66139 double arg2 ;
66140 void *argp1 = 0 ;
66141 int res1 = 0 ;
66142 double val2 ;
66143 int ecode2 = 0 ;
66144 PyObject * obj0 = 0 ;
66145 PyObject * obj1 = 0 ;
66146
66147 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoint_t_set",&obj0,&obj1)) SWIG_fail;
66148 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
66149 if (!SWIG_IsOK(res1)) {
66150 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_t_set" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66151 }
66152 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66153 ecode2 = SWIG_AsVal_double(obj1, &val2);
66154 if (!SWIG_IsOK(ecode2)) {
66155 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoint_t_set" "', argument " "2"" of type '" "double""'");
66156 }
66157 arg2 = static_cast< double >(val2);
66158 if (arg1) (arg1)->t = arg2;
66159 resultobj = SWIG_Py_Void();
66160 return resultobj;
66161 fail:
66162 return NULL;
66163 }
66164
66165
66166 SWIGINTERN PyObject *_wrap_OperatingPoint_t_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66167 PyObject *resultobj = 0;
66168 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66169 void *argp1 = 0 ;
66170 int res1 = 0 ;
66171 PyObject * obj0 = 0 ;
66172 double result;
66173
66174 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoint_t_get",&obj0)) SWIG_fail;
66175 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
66176 if (!SWIG_IsOK(res1)) {
66177 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_t_get" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66178 }
66179 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66180 result = (double) ((arg1)->t);
66181 resultobj = SWIG_From_double(static_cast< double >(result));
66182 return resultobj;
66183 fail:
66184 return NULL;
66185 }
66186
66187
66188 SWIGINTERN PyObject *_wrap_OperatingPoint_key_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66189 PyObject *resultobj = 0;
66190 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66191 std::string *arg2 = 0 ;
66192 void *argp1 = 0 ;
66193 int res1 = 0 ;
66194 int res2 = SWIG_OLDOBJ ;
66195 PyObject * obj0 = 0 ;
66196 PyObject * obj1 = 0 ;
66197
66198 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoint_key_set",&obj0,&obj1)) SWIG_fail;
66199 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
66200 if (!SWIG_IsOK(res1)) {
66201 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_key_set" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66202 }
66203 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66204 {
66205 std::string *ptr = (std::string *)0;
66206 res2 = SWIG_AsPtr_std_string(obj1, &ptr);
66207 if (!SWIG_IsOK(res2)) {
66208 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoint_key_set" "', argument " "2"" of type '" "std::string const &""'");
66209 }
66210 if (!ptr) {
66211 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoint_key_set" "', argument " "2"" of type '" "std::string const &""'");
66212 }
66213 arg2 = ptr;
66214 }
66215 if (arg1) (arg1)->key = *arg2;
66216 resultobj = SWIG_Py_Void();
66217 if (SWIG_IsNewObj(res2)) delete arg2;
66218 return resultobj;
66219 fail:
66220 if (SWIG_IsNewObj(res2)) delete arg2;
66221 return NULL;
66222 }
66223
66224
66225 SWIGINTERN PyObject *_wrap_OperatingPoint_key_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66226 PyObject *resultobj = 0;
66227 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66228 void *argp1 = 0 ;
66229 int res1 = 0 ;
66230 PyObject * obj0 = 0 ;
66231 std::string *result = 0 ;
66232
66233 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoint_key_get",&obj0)) SWIG_fail;
66234 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
66235 if (!SWIG_IsOK(res1)) {
66236 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_key_get" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66237 }
66238 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66239 result = (std::string *) & ((arg1)->key);
66240 resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
66241 return resultobj;
66242 fail:
66243 return NULL;
66244 }
66245
66246
66247 SWIGINTERN PyObject *_wrap_OperatingPoint_cno_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66248 PyObject *resultobj = 0;
66249 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66250 long arg2 ;
66251 void *argp1 = 0 ;
66252 int res1 = 0 ;
66253 long val2 ;
66254 int ecode2 = 0 ;
66255 PyObject * obj0 = 0 ;
66256 PyObject * obj1 = 0 ;
66257
66258 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoint_cno_set",&obj0,&obj1)) SWIG_fail;
66259 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
66260 if (!SWIG_IsOK(res1)) {
66261 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_cno_set" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66262 }
66263 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66264 ecode2 = SWIG_AsVal_long(obj1, &val2);
66265 if (!SWIG_IsOK(ecode2)) {
66266 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoint_cno_set" "', argument " "2"" of type '" "long""'");
66267 }
66268 arg2 = static_cast< long >(val2);
66269 if (arg1) (arg1)->cno = arg2;
66270 resultobj = SWIG_Py_Void();
66271 return resultobj;
66272 fail:
66273 return NULL;
66274 }
66275
66276
66277 SWIGINTERN PyObject *_wrap_OperatingPoint_cno_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66278 PyObject *resultobj = 0;
66279 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66280 void *argp1 = 0 ;
66281 int res1 = 0 ;
66282 PyObject * obj0 = 0 ;
66283 long result;
66284
66285 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoint_cno_get",&obj0)) SWIG_fail;
66286 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, 0 | 0 );
66287 if (!SWIG_IsOK(res1)) {
66288 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoint_cno_get" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66289 }
66290 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66291 result = (long) ((arg1)->cno);
66292 resultobj = SWIG_From_long(static_cast< long >(result));
66293 return resultobj;
66294 fail:
66295 return NULL;
66296 }
66297
66298
66299 SWIGINTERN PyObject *_wrap_new_OperatingPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66300 PyObject *resultobj = 0;
66301 faiss::OperatingPoint *result = 0 ;
66302
66303 if (!PyArg_ParseTuple(args,(char *)":new_OperatingPoint")) SWIG_fail;
66304 result = (faiss::OperatingPoint *)new faiss::OperatingPoint();
66305 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OperatingPoint, SWIG_POINTER_NEW | 0 );
66306 return resultobj;
66307 fail:
66308 return NULL;
66309 }
66310
66311
66312 SWIGINTERN PyObject *_wrap_delete_OperatingPoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66313 PyObject *resultobj = 0;
66314 faiss::OperatingPoint *arg1 = (faiss::OperatingPoint *) 0 ;
66315 void *argp1 = 0 ;
66316 int res1 = 0 ;
66317 PyObject * obj0 = 0 ;
66318
66319 if (!PyArg_ParseTuple(args,(char *)"O:delete_OperatingPoint",&obj0)) SWIG_fail;
66320 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoint, SWIG_POINTER_DISOWN | 0 );
66321 if (!SWIG_IsOK(res1)) {
66322 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OperatingPoint" "', argument " "1"" of type '" "faiss::OperatingPoint *""'");
66323 }
66324 arg1 = reinterpret_cast< faiss::OperatingPoint * >(argp1);
66325 delete arg1;
66326 resultobj = SWIG_Py_Void();
66327 return resultobj;
66328 fail:
66329 return NULL;
66330 }
66331
66332
66333 SWIGINTERN PyObject *OperatingPoint_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66334 PyObject *obj;
66335 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
66336 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OperatingPoint, SWIG_NewClientData(obj));
66337 return SWIG_Py_Void();
66338 }
66339
66340 SWIGINTERN PyObject *_wrap_OperatingPoints_all_pts_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66341 PyObject *resultobj = 0;
66342 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66343 std::vector< faiss::OperatingPoint > *arg2 = (std::vector< faiss::OperatingPoint > *) 0 ;
66344 void *argp1 = 0 ;
66345 int res1 = 0 ;
66346 void *argp2 = 0 ;
66347 int res2 = 0 ;
66348 PyObject * obj0 = 0 ;
66349 PyObject * obj1 = 0 ;
66350
66351 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_all_pts_set",&obj0,&obj1)) SWIG_fail;
66352 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66353 if (!SWIG_IsOK(res1)) {
66354 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_all_pts_set" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66355 }
66356 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66357 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
66358 if (!SWIG_IsOK(res2)) {
66359 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_all_pts_set" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > *""'");
66360 }
66361 arg2 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp2);
66362 if (arg1) (arg1)->all_pts = *arg2;
66363 resultobj = SWIG_Py_Void();
66364 return resultobj;
66365 fail:
66366 return NULL;
66367 }
66368
66369
66370 SWIGINTERN PyObject *_wrap_OperatingPoints_all_pts_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66371 PyObject *resultobj = 0;
66372 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66373 void *argp1 = 0 ;
66374 int res1 = 0 ;
66375 PyObject * obj0 = 0 ;
66376 std::vector< faiss::OperatingPoint > *result = 0 ;
66377
66378 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoints_all_pts_get",&obj0)) SWIG_fail;
66379 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66380 if (!SWIG_IsOK(res1)) {
66381 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_all_pts_get" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66382 }
66383 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66384 result = (std::vector< faiss::OperatingPoint > *)& ((arg1)->all_pts);
66385 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
66386 return resultobj;
66387 fail:
66388 return NULL;
66389 }
66390
66391
66392 SWIGINTERN PyObject *_wrap_OperatingPoints_optimal_pts_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66393 PyObject *resultobj = 0;
66394 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66395 std::vector< faiss::OperatingPoint > *arg2 = (std::vector< faiss::OperatingPoint > *) 0 ;
66396 void *argp1 = 0 ;
66397 int res1 = 0 ;
66398 void *argp2 = 0 ;
66399 int res2 = 0 ;
66400 PyObject * obj0 = 0 ;
66401 PyObject * obj1 = 0 ;
66402
66403 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_optimal_pts_set",&obj0,&obj1)) SWIG_fail;
66404 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66405 if (!SWIG_IsOK(res1)) {
66406 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_optimal_pts_set" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66407 }
66408 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66409 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
66410 if (!SWIG_IsOK(res2)) {
66411 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_optimal_pts_set" "', argument " "2"" of type '" "std::vector< faiss::OperatingPoint > *""'");
66412 }
66413 arg2 = reinterpret_cast< std::vector< faiss::OperatingPoint > * >(argp2);
66414 if (arg1) (arg1)->optimal_pts = *arg2;
66415 resultobj = SWIG_Py_Void();
66416 return resultobj;
66417 fail:
66418 return NULL;
66419 }
66420
66421
66422 SWIGINTERN PyObject *_wrap_OperatingPoints_optimal_pts_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66423 PyObject *resultobj = 0;
66424 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66425 void *argp1 = 0 ;
66426 int res1 = 0 ;
66427 PyObject * obj0 = 0 ;
66428 std::vector< faiss::OperatingPoint > *result = 0 ;
66429
66430 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoints_optimal_pts_get",&obj0)) SWIG_fail;
66431 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66432 if (!SWIG_IsOK(res1)) {
66433 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_optimal_pts_get" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66434 }
66435 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66436 result = (std::vector< faiss::OperatingPoint > *)& ((arg1)->optimal_pts);
66437 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__OperatingPoint_t, 0 | 0 );
66438 return resultobj;
66439 fail:
66440 return NULL;
66441 }
66442
66443
66444 SWIGINTERN PyObject *_wrap_new_OperatingPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66445 PyObject *resultobj = 0;
66446 faiss::OperatingPoints *result = 0 ;
66447
66448 if (!PyArg_ParseTuple(args,(char *)":new_OperatingPoints")) SWIG_fail;
66449 {
66450 Py_BEGIN_ALLOW_THREADS
66451 try {
66452 result = (faiss::OperatingPoints *)new faiss::OperatingPoints();
66453 } catch(faiss::FaissException & e) {
66454 PyEval_RestoreThread(_save);
66455 PyErr_SetString(PyExc_RuntimeError, e.what());
66456 SWIG_fail;
66457 }
66458 Py_END_ALLOW_THREADS
66459 }
66460 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__OperatingPoints, SWIG_POINTER_NEW | 0 );
66461 return resultobj;
66462 fail:
66463 return NULL;
66464 }
66465
66466
66467 SWIGINTERN PyObject *_wrap_OperatingPoints_merge_with__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66468 PyObject *resultobj = 0;
66469 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66470 faiss::OperatingPoints *arg2 = 0 ;
66471 std::string *arg3 = 0 ;
66472 void *argp1 = 0 ;
66473 int res1 = 0 ;
66474 void *argp2 = 0 ;
66475 int res2 = 0 ;
66476 int res3 = SWIG_OLDOBJ ;
66477 PyObject * obj0 = 0 ;
66478 PyObject * obj1 = 0 ;
66479 PyObject * obj2 = 0 ;
66480 int result;
66481
66482 if (!PyArg_ParseTuple(args,(char *)"OOO:OperatingPoints_merge_with",&obj0,&obj1,&obj2)) SWIG_fail;
66483 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66484 if (!SWIG_IsOK(res1)) {
66485 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_merge_with" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66486 }
66487 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66488 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__OperatingPoints, 0 | 0);
66489 if (!SWIG_IsOK(res2)) {
66490 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_merge_with" "', argument " "2"" of type '" "faiss::OperatingPoints const &""'");
66491 }
66492 if (!argp2) {
66493 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_merge_with" "', argument " "2"" of type '" "faiss::OperatingPoints const &""'");
66494 }
66495 arg2 = reinterpret_cast< faiss::OperatingPoints * >(argp2);
66496 {
66497 std::string *ptr = (std::string *)0;
66498 res3 = SWIG_AsPtr_std_string(obj2, &ptr);
66499 if (!SWIG_IsOK(res3)) {
66500 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "OperatingPoints_merge_with" "', argument " "3"" of type '" "std::string const &""'");
66501 }
66502 if (!ptr) {
66503 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_merge_with" "', argument " "3"" of type '" "std::string const &""'");
66504 }
66505 arg3 = ptr;
66506 }
66507 {
66508 Py_BEGIN_ALLOW_THREADS
66509 try {
66510 result = (int)(arg1)->merge_with((faiss::OperatingPoints const &)*arg2,(std::string const &)*arg3);
66511 } catch(faiss::FaissException & e) {
66512 PyEval_RestoreThread(_save);
66513 PyErr_SetString(PyExc_RuntimeError, e.what());
66514 SWIG_fail;
66515 }
66516 Py_END_ALLOW_THREADS
66517 }
66518 resultobj = SWIG_From_int(static_cast< int >(result));
66519 if (SWIG_IsNewObj(res3)) delete arg3;
66520 return resultobj;
66521 fail:
66522 if (SWIG_IsNewObj(res3)) delete arg3;
66523 return NULL;
66524 }
66525
66526
66527 SWIGINTERN PyObject *_wrap_OperatingPoints_merge_with__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66528 PyObject *resultobj = 0;
66529 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66530 faiss::OperatingPoints *arg2 = 0 ;
66531 void *argp1 = 0 ;
66532 int res1 = 0 ;
66533 void *argp2 = 0 ;
66534 int res2 = 0 ;
66535 PyObject * obj0 = 0 ;
66536 PyObject * obj1 = 0 ;
66537 int result;
66538
66539 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_merge_with",&obj0,&obj1)) SWIG_fail;
66540 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66541 if (!SWIG_IsOK(res1)) {
66542 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_merge_with" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66543 }
66544 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66545 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_faiss__OperatingPoints, 0 | 0);
66546 if (!SWIG_IsOK(res2)) {
66547 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_merge_with" "', argument " "2"" of type '" "faiss::OperatingPoints const &""'");
66548 }
66549 if (!argp2) {
66550 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_merge_with" "', argument " "2"" of type '" "faiss::OperatingPoints const &""'");
66551 }
66552 arg2 = reinterpret_cast< faiss::OperatingPoints * >(argp2);
66553 {
66554 Py_BEGIN_ALLOW_THREADS
66555 try {
66556 result = (int)(arg1)->merge_with((faiss::OperatingPoints const &)*arg2);
66557 } catch(faiss::FaissException & e) {
66558 PyEval_RestoreThread(_save);
66559 PyErr_SetString(PyExc_RuntimeError, e.what());
66560 SWIG_fail;
66561 }
66562 Py_END_ALLOW_THREADS
66563 }
66564 resultobj = SWIG_From_int(static_cast< int >(result));
66565 return resultobj;
66566 fail:
66567 return NULL;
66568 }
66569
66570
66571 SWIGINTERN PyObject *_wrap_OperatingPoints_merge_with(PyObject *self, PyObject *args) {
66572 Py_ssize_t argc;
66573 PyObject *argv[4] = {
66574 0
66575 };
66576 Py_ssize_t ii;
66577
66578 if (!PyTuple_Check(args)) SWIG_fail;
66579 argc = args ? PyObject_Length(args) : 0;
66580 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
66581 argv[ii] = PyTuple_GET_ITEM(args,ii);
66582 }
66583 if (argc == 2) {
66584 int _v;
66585 void *vptr = 0;
66586 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
66587 _v = SWIG_CheckState(res);
66588 if (_v) {
66589 int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_faiss__OperatingPoints, 0);
66590 _v = SWIG_CheckState(res);
66591 if (_v) {
66592 return _wrap_OperatingPoints_merge_with__SWIG_1(self, args);
66593 }
66594 }
66595 }
66596 if (argc == 3) {
66597 int _v;
66598 void *vptr = 0;
66599 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
66600 _v = SWIG_CheckState(res);
66601 if (_v) {
66602 int res = SWIG_ConvertPtr(argv[1], 0, SWIGTYPE_p_faiss__OperatingPoints, 0);
66603 _v = SWIG_CheckState(res);
66604 if (_v) {
66605 int res = SWIG_AsPtr_std_string(argv[2], (std::string**)(0));
66606 _v = SWIG_CheckState(res);
66607 if (_v) {
66608 return _wrap_OperatingPoints_merge_with__SWIG_0(self, args);
66609 }
66610 }
66611 }
66612 }
66613
66614 fail:
66615 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OperatingPoints_merge_with'.\n"
66616 " Possible C/C++ prototypes are:\n"
66617 " faiss::OperatingPoints::merge_with(faiss::OperatingPoints const &,std::string const &)\n"
66618 " faiss::OperatingPoints::merge_with(faiss::OperatingPoints const &)\n");
66619 return 0;
66620 }
66621
66622
66623 SWIGINTERN PyObject *_wrap_OperatingPoints_clear(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66624 PyObject *resultobj = 0;
66625 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66626 void *argp1 = 0 ;
66627 int res1 = 0 ;
66628 PyObject * obj0 = 0 ;
66629
66630 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoints_clear",&obj0)) SWIG_fail;
66631 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66632 if (!SWIG_IsOK(res1)) {
66633 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_clear" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66634 }
66635 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66636 {
66637 Py_BEGIN_ALLOW_THREADS
66638 try {
66639 (arg1)->clear();
66640 } catch(faiss::FaissException & e) {
66641 PyEval_RestoreThread(_save);
66642 PyErr_SetString(PyExc_RuntimeError, e.what());
66643 SWIG_fail;
66644 }
66645 Py_END_ALLOW_THREADS
66646 }
66647 resultobj = SWIG_Py_Void();
66648 return resultobj;
66649 fail:
66650 return NULL;
66651 }
66652
66653
66654 SWIGINTERN PyObject *_wrap_OperatingPoints_add__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66655 PyObject *resultobj = 0;
66656 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66657 double arg2 ;
66658 double arg3 ;
66659 std::string *arg4 = 0 ;
66660 size_t arg5 ;
66661 void *argp1 = 0 ;
66662 int res1 = 0 ;
66663 double val2 ;
66664 int ecode2 = 0 ;
66665 double val3 ;
66666 int ecode3 = 0 ;
66667 int res4 = SWIG_OLDOBJ ;
66668 size_t val5 ;
66669 int ecode5 = 0 ;
66670 PyObject * obj0 = 0 ;
66671 PyObject * obj1 = 0 ;
66672 PyObject * obj2 = 0 ;
66673 PyObject * obj3 = 0 ;
66674 PyObject * obj4 = 0 ;
66675 bool result;
66676
66677 if (!PyArg_ParseTuple(args,(char *)"OOOOO:OperatingPoints_add",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
66678 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66679 if (!SWIG_IsOK(res1)) {
66680 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_add" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66681 }
66682 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66683 ecode2 = SWIG_AsVal_double(obj1, &val2);
66684 if (!SWIG_IsOK(ecode2)) {
66685 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoints_add" "', argument " "2"" of type '" "double""'");
66686 }
66687 arg2 = static_cast< double >(val2);
66688 ecode3 = SWIG_AsVal_double(obj2, &val3);
66689 if (!SWIG_IsOK(ecode3)) {
66690 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OperatingPoints_add" "', argument " "3"" of type '" "double""'");
66691 }
66692 arg3 = static_cast< double >(val3);
66693 {
66694 std::string *ptr = (std::string *)0;
66695 res4 = SWIG_AsPtr_std_string(obj3, &ptr);
66696 if (!SWIG_IsOK(res4)) {
66697 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "OperatingPoints_add" "', argument " "4"" of type '" "std::string const &""'");
66698 }
66699 if (!ptr) {
66700 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_add" "', argument " "4"" of type '" "std::string const &""'");
66701 }
66702 arg4 = ptr;
66703 }
66704 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
66705 if (!SWIG_IsOK(ecode5)) {
66706 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "OperatingPoints_add" "', argument " "5"" of type '" "size_t""'");
66707 }
66708 arg5 = static_cast< size_t >(val5);
66709 {
66710 Py_BEGIN_ALLOW_THREADS
66711 try {
66712 result = (bool)(arg1)->add(arg2,arg3,(std::string const &)*arg4,arg5);
66713 } catch(faiss::FaissException & e) {
66714 PyEval_RestoreThread(_save);
66715 PyErr_SetString(PyExc_RuntimeError, e.what());
66716 SWIG_fail;
66717 }
66718 Py_END_ALLOW_THREADS
66719 }
66720 resultobj = SWIG_From_bool(static_cast< bool >(result));
66721 if (SWIG_IsNewObj(res4)) delete arg4;
66722 return resultobj;
66723 fail:
66724 if (SWIG_IsNewObj(res4)) delete arg4;
66725 return NULL;
66726 }
66727
66728
66729 SWIGINTERN PyObject *_wrap_OperatingPoints_add__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66730 PyObject *resultobj = 0;
66731 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66732 double arg2 ;
66733 double arg3 ;
66734 std::string *arg4 = 0 ;
66735 void *argp1 = 0 ;
66736 int res1 = 0 ;
66737 double val2 ;
66738 int ecode2 = 0 ;
66739 double val3 ;
66740 int ecode3 = 0 ;
66741 int res4 = SWIG_OLDOBJ ;
66742 PyObject * obj0 = 0 ;
66743 PyObject * obj1 = 0 ;
66744 PyObject * obj2 = 0 ;
66745 PyObject * obj3 = 0 ;
66746 bool result;
66747
66748 if (!PyArg_ParseTuple(args,(char *)"OOOO:OperatingPoints_add",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
66749 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66750 if (!SWIG_IsOK(res1)) {
66751 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_add" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
66752 }
66753 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66754 ecode2 = SWIG_AsVal_double(obj1, &val2);
66755 if (!SWIG_IsOK(ecode2)) {
66756 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoints_add" "', argument " "2"" of type '" "double""'");
66757 }
66758 arg2 = static_cast< double >(val2);
66759 ecode3 = SWIG_AsVal_double(obj2, &val3);
66760 if (!SWIG_IsOK(ecode3)) {
66761 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "OperatingPoints_add" "', argument " "3"" of type '" "double""'");
66762 }
66763 arg3 = static_cast< double >(val3);
66764 {
66765 std::string *ptr = (std::string *)0;
66766 res4 = SWIG_AsPtr_std_string(obj3, &ptr);
66767 if (!SWIG_IsOK(res4)) {
66768 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "OperatingPoints_add" "', argument " "4"" of type '" "std::string const &""'");
66769 }
66770 if (!ptr) {
66771 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OperatingPoints_add" "', argument " "4"" of type '" "std::string const &""'");
66772 }
66773 arg4 = ptr;
66774 }
66775 {
66776 Py_BEGIN_ALLOW_THREADS
66777 try {
66778 result = (bool)(arg1)->add(arg2,arg3,(std::string const &)*arg4);
66779 } catch(faiss::FaissException & e) {
66780 PyEval_RestoreThread(_save);
66781 PyErr_SetString(PyExc_RuntimeError, e.what());
66782 SWIG_fail;
66783 }
66784 Py_END_ALLOW_THREADS
66785 }
66786 resultobj = SWIG_From_bool(static_cast< bool >(result));
66787 if (SWIG_IsNewObj(res4)) delete arg4;
66788 return resultobj;
66789 fail:
66790 if (SWIG_IsNewObj(res4)) delete arg4;
66791 return NULL;
66792 }
66793
66794
66795 SWIGINTERN PyObject *_wrap_OperatingPoints_add(PyObject *self, PyObject *args) {
66796 Py_ssize_t argc;
66797 PyObject *argv[6] = {
66798 0
66799 };
66800 Py_ssize_t ii;
66801
66802 if (!PyTuple_Check(args)) SWIG_fail;
66803 argc = args ? PyObject_Length(args) : 0;
66804 for (ii = 0; (ii < 5) && (ii < argc); ii++) {
66805 argv[ii] = PyTuple_GET_ITEM(args,ii);
66806 }
66807 if (argc == 4) {
66808 int _v;
66809 void *vptr = 0;
66810 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
66811 _v = SWIG_CheckState(res);
66812 if (_v) {
66813 {
66814 int res = SWIG_AsVal_double(argv[1], NULL);
66815 _v = SWIG_CheckState(res);
66816 }
66817 if (_v) {
66818 {
66819 int res = SWIG_AsVal_double(argv[2], NULL);
66820 _v = SWIG_CheckState(res);
66821 }
66822 if (_v) {
66823 int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
66824 _v = SWIG_CheckState(res);
66825 if (_v) {
66826 return _wrap_OperatingPoints_add__SWIG_1(self, args);
66827 }
66828 }
66829 }
66830 }
66831 }
66832 if (argc == 5) {
66833 int _v;
66834 void *vptr = 0;
66835 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
66836 _v = SWIG_CheckState(res);
66837 if (_v) {
66838 {
66839 int res = SWIG_AsVal_double(argv[1], NULL);
66840 _v = SWIG_CheckState(res);
66841 }
66842 if (_v) {
66843 {
66844 int res = SWIG_AsVal_double(argv[2], NULL);
66845 _v = SWIG_CheckState(res);
66846 }
66847 if (_v) {
66848 int res = SWIG_AsPtr_std_string(argv[3], (std::string**)(0));
66849 _v = SWIG_CheckState(res);
66850 if (_v) {
66851 {
66852 int res = SWIG_AsVal_size_t(argv[4], NULL);
66853 _v = SWIG_CheckState(res);
66854 }
66855 if (_v) {
66856 return _wrap_OperatingPoints_add__SWIG_0(self, args);
66857 }
66858 }
66859 }
66860 }
66861 }
66862 }
66863
66864 fail:
66865 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OperatingPoints_add'.\n"
66866 " Possible C/C++ prototypes are:\n"
66867 " faiss::OperatingPoints::add(double,double,std::string const &,size_t)\n"
66868 " faiss::OperatingPoints::add(double,double,std::string const &)\n");
66869 return 0;
66870 }
66871
66872
66873 SWIGINTERN PyObject *_wrap_OperatingPoints_t_for_perf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66874 PyObject *resultobj = 0;
66875 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66876 double arg2 ;
66877 void *argp1 = 0 ;
66878 int res1 = 0 ;
66879 double val2 ;
66880 int ecode2 = 0 ;
66881 PyObject * obj0 = 0 ;
66882 PyObject * obj1 = 0 ;
66883 double result;
66884
66885 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_t_for_perf",&obj0,&obj1)) SWIG_fail;
66886 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66887 if (!SWIG_IsOK(res1)) {
66888 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_t_for_perf" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
66889 }
66890 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66891 ecode2 = SWIG_AsVal_double(obj1, &val2);
66892 if (!SWIG_IsOK(ecode2)) {
66893 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoints_t_for_perf" "', argument " "2"" of type '" "double""'");
66894 }
66895 arg2 = static_cast< double >(val2);
66896 {
66897 Py_BEGIN_ALLOW_THREADS
66898 try {
66899 result = (double)((faiss::OperatingPoints const *)arg1)->t_for_perf(arg2);
66900 } catch(faiss::FaissException & e) {
66901 PyEval_RestoreThread(_save);
66902 PyErr_SetString(PyExc_RuntimeError, e.what());
66903 SWIG_fail;
66904 }
66905 Py_END_ALLOW_THREADS
66906 }
66907 resultobj = SWIG_From_double(static_cast< double >(result));
66908 return resultobj;
66909 fail:
66910 return NULL;
66911 }
66912
66913
66914 SWIGINTERN PyObject *_wrap_OperatingPoints_display__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66915 PyObject *resultobj = 0;
66916 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66917 bool arg2 ;
66918 void *argp1 = 0 ;
66919 int res1 = 0 ;
66920 bool val2 ;
66921 int ecode2 = 0 ;
66922 PyObject * obj0 = 0 ;
66923 PyObject * obj1 = 0 ;
66924
66925 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_display",&obj0,&obj1)) SWIG_fail;
66926 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66927 if (!SWIG_IsOK(res1)) {
66928 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_display" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
66929 }
66930 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66931 ecode2 = SWIG_AsVal_bool(obj1, &val2);
66932 if (!SWIG_IsOK(ecode2)) {
66933 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OperatingPoints_display" "', argument " "2"" of type '" "bool""'");
66934 }
66935 arg2 = static_cast< bool >(val2);
66936 {
66937 Py_BEGIN_ALLOW_THREADS
66938 try {
66939 ((faiss::OperatingPoints const *)arg1)->display(arg2);
66940 } catch(faiss::FaissException & e) {
66941 PyEval_RestoreThread(_save);
66942 PyErr_SetString(PyExc_RuntimeError, e.what());
66943 SWIG_fail;
66944 }
66945 Py_END_ALLOW_THREADS
66946 }
66947 resultobj = SWIG_Py_Void();
66948 return resultobj;
66949 fail:
66950 return NULL;
66951 }
66952
66953
66954 SWIGINTERN PyObject *_wrap_OperatingPoints_display__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
66955 PyObject *resultobj = 0;
66956 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
66957 void *argp1 = 0 ;
66958 int res1 = 0 ;
66959 PyObject * obj0 = 0 ;
66960
66961 if (!PyArg_ParseTuple(args,(char *)"O:OperatingPoints_display",&obj0)) SWIG_fail;
66962 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
66963 if (!SWIG_IsOK(res1)) {
66964 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_display" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
66965 }
66966 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
66967 {
66968 Py_BEGIN_ALLOW_THREADS
66969 try {
66970 ((faiss::OperatingPoints const *)arg1)->display();
66971 } catch(faiss::FaissException & e) {
66972 PyEval_RestoreThread(_save);
66973 PyErr_SetString(PyExc_RuntimeError, e.what());
66974 SWIG_fail;
66975 }
66976 Py_END_ALLOW_THREADS
66977 }
66978 resultobj = SWIG_Py_Void();
66979 return resultobj;
66980 fail:
66981 return NULL;
66982 }
66983
66984
66985 SWIGINTERN PyObject *_wrap_OperatingPoints_display(PyObject *self, PyObject *args) {
66986 Py_ssize_t argc;
66987 PyObject *argv[3] = {
66988 0
66989 };
66990 Py_ssize_t ii;
66991
66992 if (!PyTuple_Check(args)) SWIG_fail;
66993 argc = args ? PyObject_Length(args) : 0;
66994 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
66995 argv[ii] = PyTuple_GET_ITEM(args,ii);
66996 }
66997 if (argc == 1) {
66998 int _v;
66999 void *vptr = 0;
67000 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
67001 _v = SWIG_CheckState(res);
67002 if (_v) {
67003 return _wrap_OperatingPoints_display__SWIG_1(self, args);
67004 }
67005 }
67006 if (argc == 2) {
67007 int _v;
67008 void *vptr = 0;
67009 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__OperatingPoints, 0);
67010 _v = SWIG_CheckState(res);
67011 if (_v) {
67012 {
67013 int res = SWIG_AsVal_bool(argv[1], NULL);
67014 _v = SWIG_CheckState(res);
67015 }
67016 if (_v) {
67017 return _wrap_OperatingPoints_display__SWIG_0(self, args);
67018 }
67019 }
67020 }
67021
67022 fail:
67023 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'OperatingPoints_display'.\n"
67024 " Possible C/C++ prototypes are:\n"
67025 " faiss::OperatingPoints::display(bool) const\n"
67026 " faiss::OperatingPoints::display() const\n");
67027 return 0;
67028 }
67029
67030
67031 SWIGINTERN PyObject *_wrap_OperatingPoints_all_to_gnuplot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67032 PyObject *resultobj = 0;
67033 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
67034 char *arg2 = (char *) 0 ;
67035 void *argp1 = 0 ;
67036 int res1 = 0 ;
67037 int res2 ;
67038 char *buf2 = 0 ;
67039 int alloc2 = 0 ;
67040 PyObject * obj0 = 0 ;
67041 PyObject * obj1 = 0 ;
67042
67043 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_all_to_gnuplot",&obj0,&obj1)) SWIG_fail;
67044 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
67045 if (!SWIG_IsOK(res1)) {
67046 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_all_to_gnuplot" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
67047 }
67048 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
67049 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
67050 if (!SWIG_IsOK(res2)) {
67051 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_all_to_gnuplot" "', argument " "2"" of type '" "char const *""'");
67052 }
67053 arg2 = reinterpret_cast< char * >(buf2);
67054 {
67055 Py_BEGIN_ALLOW_THREADS
67056 try {
67057 ((faiss::OperatingPoints const *)arg1)->all_to_gnuplot((char const *)arg2);
67058 } catch(faiss::FaissException & e) {
67059 PyEval_RestoreThread(_save);
67060 PyErr_SetString(PyExc_RuntimeError, e.what());
67061 SWIG_fail;
67062 }
67063 Py_END_ALLOW_THREADS
67064 }
67065 resultobj = SWIG_Py_Void();
67066 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
67067 return resultobj;
67068 fail:
67069 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
67070 return NULL;
67071 }
67072
67073
67074 SWIGINTERN PyObject *_wrap_OperatingPoints_optimal_to_gnuplot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67075 PyObject *resultobj = 0;
67076 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
67077 char *arg2 = (char *) 0 ;
67078 void *argp1 = 0 ;
67079 int res1 = 0 ;
67080 int res2 ;
67081 char *buf2 = 0 ;
67082 int alloc2 = 0 ;
67083 PyObject * obj0 = 0 ;
67084 PyObject * obj1 = 0 ;
67085
67086 if (!PyArg_ParseTuple(args,(char *)"OO:OperatingPoints_optimal_to_gnuplot",&obj0,&obj1)) SWIG_fail;
67087 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
67088 if (!SWIG_IsOK(res1)) {
67089 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OperatingPoints_optimal_to_gnuplot" "', argument " "1"" of type '" "faiss::OperatingPoints const *""'");
67090 }
67091 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
67092 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
67093 if (!SWIG_IsOK(res2)) {
67094 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OperatingPoints_optimal_to_gnuplot" "', argument " "2"" of type '" "char const *""'");
67095 }
67096 arg2 = reinterpret_cast< char * >(buf2);
67097 {
67098 Py_BEGIN_ALLOW_THREADS
67099 try {
67100 ((faiss::OperatingPoints const *)arg1)->optimal_to_gnuplot((char const *)arg2);
67101 } catch(faiss::FaissException & e) {
67102 PyEval_RestoreThread(_save);
67103 PyErr_SetString(PyExc_RuntimeError, e.what());
67104 SWIG_fail;
67105 }
67106 Py_END_ALLOW_THREADS
67107 }
67108 resultobj = SWIG_Py_Void();
67109 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
67110 return resultobj;
67111 fail:
67112 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
67113 return NULL;
67114 }
67115
67116
67117 SWIGINTERN PyObject *_wrap_delete_OperatingPoints(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67118 PyObject *resultobj = 0;
67119 faiss::OperatingPoints *arg1 = (faiss::OperatingPoints *) 0 ;
67120 void *argp1 = 0 ;
67121 int res1 = 0 ;
67122 PyObject * obj0 = 0 ;
67123
67124 if (!PyArg_ParseTuple(args,(char *)"O:delete_OperatingPoints",&obj0)) SWIG_fail;
67125 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__OperatingPoints, SWIG_POINTER_DISOWN | 0 );
67126 if (!SWIG_IsOK(res1)) {
67127 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_OperatingPoints" "', argument " "1"" of type '" "faiss::OperatingPoints *""'");
67128 }
67129 arg1 = reinterpret_cast< faiss::OperatingPoints * >(argp1);
67130 delete arg1;
67131 resultobj = SWIG_Py_Void();
67132 return resultobj;
67133 fail:
67134 return NULL;
67135 }
67136
67137
67138 SWIGINTERN PyObject *OperatingPoints_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67139 PyObject *obj;
67140 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
67141 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__OperatingPoints, SWIG_NewClientData(obj));
67142 return SWIG_Py_Void();
67143 }
67144
67145 SWIGINTERN PyObject *_wrap_ParameterRange_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67146 PyObject *resultobj = 0;
67147 faiss::ParameterRange *arg1 = (faiss::ParameterRange *) 0 ;
67148 std::string *arg2 = 0 ;
67149 void *argp1 = 0 ;
67150 int res1 = 0 ;
67151 int res2 = SWIG_OLDOBJ ;
67152 PyObject * obj0 = 0 ;
67153 PyObject * obj1 = 0 ;
67154
67155 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterRange_name_set",&obj0,&obj1)) SWIG_fail;
67156 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
67157 if (!SWIG_IsOK(res1)) {
67158 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterRange_name_set" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
67159 }
67160 arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
67161 {
67162 std::string *ptr = (std::string *)0;
67163 res2 = SWIG_AsPtr_std_string(obj1, &ptr);
67164 if (!SWIG_IsOK(res2)) {
67165 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterRange_name_set" "', argument " "2"" of type '" "std::string const &""'");
67166 }
67167 if (!ptr) {
67168 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParameterRange_name_set" "', argument " "2"" of type '" "std::string const &""'");
67169 }
67170 arg2 = ptr;
67171 }
67172 if (arg1) (arg1)->name = *arg2;
67173 resultobj = SWIG_Py_Void();
67174 if (SWIG_IsNewObj(res2)) delete arg2;
67175 return resultobj;
67176 fail:
67177 if (SWIG_IsNewObj(res2)) delete arg2;
67178 return NULL;
67179 }
67180
67181
67182 SWIGINTERN PyObject *_wrap_ParameterRange_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67183 PyObject *resultobj = 0;
67184 faiss::ParameterRange *arg1 = (faiss::ParameterRange *) 0 ;
67185 void *argp1 = 0 ;
67186 int res1 = 0 ;
67187 PyObject * obj0 = 0 ;
67188 std::string *result = 0 ;
67189
67190 if (!PyArg_ParseTuple(args,(char *)"O:ParameterRange_name_get",&obj0)) SWIG_fail;
67191 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
67192 if (!SWIG_IsOK(res1)) {
67193 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterRange_name_get" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
67194 }
67195 arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
67196 result = (std::string *) & ((arg1)->name);
67197 resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
67198 return resultobj;
67199 fail:
67200 return NULL;
67201 }
67202
67203
67204 SWIGINTERN PyObject *_wrap_ParameterRange_values_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67205 PyObject *resultobj = 0;
67206 faiss::ParameterRange *arg1 = (faiss::ParameterRange *) 0 ;
67207 std::vector< double > *arg2 = (std::vector< double > *) 0 ;
67208 void *argp1 = 0 ;
67209 int res1 = 0 ;
67210 void *argp2 = 0 ;
67211 int res2 = 0 ;
67212 PyObject * obj0 = 0 ;
67213 PyObject * obj1 = 0 ;
67214
67215 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterRange_values_set",&obj0,&obj1)) SWIG_fail;
67216 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
67217 if (!SWIG_IsOK(res1)) {
67218 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterRange_values_set" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
67219 }
67220 arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
67221 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
67222 if (!SWIG_IsOK(res2)) {
67223 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterRange_values_set" "', argument " "2"" of type '" "std::vector< double > *""'");
67224 }
67225 arg2 = reinterpret_cast< std::vector< double > * >(argp2);
67226 if (arg1) (arg1)->values = *arg2;
67227 resultobj = SWIG_Py_Void();
67228 return resultobj;
67229 fail:
67230 return NULL;
67231 }
67232
67233
67234 SWIGINTERN PyObject *_wrap_ParameterRange_values_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67235 PyObject *resultobj = 0;
67236 faiss::ParameterRange *arg1 = (faiss::ParameterRange *) 0 ;
67237 void *argp1 = 0 ;
67238 int res1 = 0 ;
67239 PyObject * obj0 = 0 ;
67240 std::vector< double > *result = 0 ;
67241
67242 if (!PyArg_ParseTuple(args,(char *)"O:ParameterRange_values_get",&obj0)) SWIG_fail;
67243 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
67244 if (!SWIG_IsOK(res1)) {
67245 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterRange_values_get" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
67246 }
67247 arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
67248 result = (std::vector< double > *)& ((arg1)->values);
67249 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_double_t, 0 | 0 );
67250 return resultobj;
67251 fail:
67252 return NULL;
67253 }
67254
67255
67256 SWIGINTERN PyObject *_wrap_new_ParameterRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67257 PyObject *resultobj = 0;
67258 faiss::ParameterRange *result = 0 ;
67259
67260 if (!PyArg_ParseTuple(args,(char *)":new_ParameterRange")) SWIG_fail;
67261 result = (faiss::ParameterRange *)new faiss::ParameterRange();
67262 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ParameterRange, SWIG_POINTER_NEW | 0 );
67263 return resultobj;
67264 fail:
67265 return NULL;
67266 }
67267
67268
67269 SWIGINTERN PyObject *_wrap_delete_ParameterRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67270 PyObject *resultobj = 0;
67271 faiss::ParameterRange *arg1 = (faiss::ParameterRange *) 0 ;
67272 void *argp1 = 0 ;
67273 int res1 = 0 ;
67274 PyObject * obj0 = 0 ;
67275
67276 if (!PyArg_ParseTuple(args,(char *)"O:delete_ParameterRange",&obj0)) SWIG_fail;
67277 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterRange, SWIG_POINTER_DISOWN | 0 );
67278 if (!SWIG_IsOK(res1)) {
67279 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParameterRange" "', argument " "1"" of type '" "faiss::ParameterRange *""'");
67280 }
67281 arg1 = reinterpret_cast< faiss::ParameterRange * >(argp1);
67282 delete arg1;
67283 resultobj = SWIG_Py_Void();
67284 return resultobj;
67285 fail:
67286 return NULL;
67287 }
67288
67289
67290 SWIGINTERN PyObject *ParameterRange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67291 PyObject *obj;
67292 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
67293 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ParameterRange, SWIG_NewClientData(obj));
67294 return SWIG_Py_Void();
67295 }
67296
67297 SWIGINTERN PyObject *_wrap_ParameterSpace_parameter_ranges_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67298 PyObject *resultobj = 0;
67299 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67300 std::vector< faiss::ParameterRange > *arg2 = (std::vector< faiss::ParameterRange > *) 0 ;
67301 void *argp1 = 0 ;
67302 int res1 = 0 ;
67303 void *argp2 = 0 ;
67304 int res2 = 0 ;
67305 PyObject * obj0 = 0 ;
67306 PyObject * obj1 = 0 ;
67307
67308 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_parameter_ranges_set",&obj0,&obj1)) SWIG_fail;
67309 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67310 if (!SWIG_IsOK(res1)) {
67311 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_parameter_ranges_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67312 }
67313 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67314 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__ParameterRange_t, 0 | 0 );
67315 if (!SWIG_IsOK(res2)) {
67316 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_parameter_ranges_set" "', argument " "2"" of type '" "std::vector< faiss::ParameterRange > *""'");
67317 }
67318 arg2 = reinterpret_cast< std::vector< faiss::ParameterRange > * >(argp2);
67319 if (arg1) (arg1)->parameter_ranges = *arg2;
67320 resultobj = SWIG_Py_Void();
67321 return resultobj;
67322 fail:
67323 return NULL;
67324 }
67325
67326
67327 SWIGINTERN PyObject *_wrap_ParameterSpace_parameter_ranges_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67328 PyObject *resultobj = 0;
67329 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67330 void *argp1 = 0 ;
67331 int res1 = 0 ;
67332 PyObject * obj0 = 0 ;
67333 std::vector< faiss::ParameterRange > *result = 0 ;
67334
67335 if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_parameter_ranges_get",&obj0)) SWIG_fail;
67336 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67337 if (!SWIG_IsOK(res1)) {
67338 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_parameter_ranges_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67339 }
67340 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67341 result = (std::vector< faiss::ParameterRange > *)& ((arg1)->parameter_ranges);
67342 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__ParameterRange_t, 0 | 0 );
67343 return resultobj;
67344 fail:
67345 return NULL;
67346 }
67347
67348
67349 SWIGINTERN PyObject *_wrap_ParameterSpace_verbose_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67350 PyObject *resultobj = 0;
67351 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67352 int arg2 ;
67353 void *argp1 = 0 ;
67354 int res1 = 0 ;
67355 int val2 ;
67356 int ecode2 = 0 ;
67357 PyObject * obj0 = 0 ;
67358 PyObject * obj1 = 0 ;
67359
67360 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_verbose_set",&obj0,&obj1)) SWIG_fail;
67361 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67362 if (!SWIG_IsOK(res1)) {
67363 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_verbose_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67364 }
67365 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67366 ecode2 = SWIG_AsVal_int(obj1, &val2);
67367 if (!SWIG_IsOK(ecode2)) {
67368 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_verbose_set" "', argument " "2"" of type '" "int""'");
67369 }
67370 arg2 = static_cast< int >(val2);
67371 if (arg1) (arg1)->verbose = arg2;
67372 resultobj = SWIG_Py_Void();
67373 return resultobj;
67374 fail:
67375 return NULL;
67376 }
67377
67378
67379 SWIGINTERN PyObject *_wrap_ParameterSpace_verbose_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67380 PyObject *resultobj = 0;
67381 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67382 void *argp1 = 0 ;
67383 int res1 = 0 ;
67384 PyObject * obj0 = 0 ;
67385 int result;
67386
67387 if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_verbose_get",&obj0)) SWIG_fail;
67388 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67389 if (!SWIG_IsOK(res1)) {
67390 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_verbose_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67391 }
67392 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67393 result = (int) ((arg1)->verbose);
67394 resultobj = SWIG_From_int(static_cast< int >(result));
67395 return resultobj;
67396 fail:
67397 return NULL;
67398 }
67399
67400
67401 SWIGINTERN PyObject *_wrap_ParameterSpace_n_experiments_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67402 PyObject *resultobj = 0;
67403 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67404 int arg2 ;
67405 void *argp1 = 0 ;
67406 int res1 = 0 ;
67407 int val2 ;
67408 int ecode2 = 0 ;
67409 PyObject * obj0 = 0 ;
67410 PyObject * obj1 = 0 ;
67411
67412 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_n_experiments_set",&obj0,&obj1)) SWIG_fail;
67413 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67414 if (!SWIG_IsOK(res1)) {
67415 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_n_experiments_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67416 }
67417 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67418 ecode2 = SWIG_AsVal_int(obj1, &val2);
67419 if (!SWIG_IsOK(ecode2)) {
67420 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_n_experiments_set" "', argument " "2"" of type '" "int""'");
67421 }
67422 arg2 = static_cast< int >(val2);
67423 if (arg1) (arg1)->n_experiments = arg2;
67424 resultobj = SWIG_Py_Void();
67425 return resultobj;
67426 fail:
67427 return NULL;
67428 }
67429
67430
67431 SWIGINTERN PyObject *_wrap_ParameterSpace_n_experiments_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67432 PyObject *resultobj = 0;
67433 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67434 void *argp1 = 0 ;
67435 int res1 = 0 ;
67436 PyObject * obj0 = 0 ;
67437 int result;
67438
67439 if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_n_experiments_get",&obj0)) SWIG_fail;
67440 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67441 if (!SWIG_IsOK(res1)) {
67442 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_n_experiments_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67443 }
67444 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67445 result = (int) ((arg1)->n_experiments);
67446 resultobj = SWIG_From_int(static_cast< int >(result));
67447 return resultobj;
67448 fail:
67449 return NULL;
67450 }
67451
67452
67453 SWIGINTERN PyObject *_wrap_ParameterSpace_batchsize_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67454 PyObject *resultobj = 0;
67455 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67456 size_t arg2 ;
67457 void *argp1 = 0 ;
67458 int res1 = 0 ;
67459 size_t val2 ;
67460 int ecode2 = 0 ;
67461 PyObject * obj0 = 0 ;
67462 PyObject * obj1 = 0 ;
67463
67464 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_batchsize_set",&obj0,&obj1)) SWIG_fail;
67465 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67466 if (!SWIG_IsOK(res1)) {
67467 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_batchsize_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67468 }
67469 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67470 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
67471 if (!SWIG_IsOK(ecode2)) {
67472 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_batchsize_set" "', argument " "2"" of type '" "size_t""'");
67473 }
67474 arg2 = static_cast< size_t >(val2);
67475 if (arg1) (arg1)->batchsize = arg2;
67476 resultobj = SWIG_Py_Void();
67477 return resultobj;
67478 fail:
67479 return NULL;
67480 }
67481
67482
67483 SWIGINTERN PyObject *_wrap_ParameterSpace_batchsize_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67484 PyObject *resultobj = 0;
67485 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67486 void *argp1 = 0 ;
67487 int res1 = 0 ;
67488 PyObject * obj0 = 0 ;
67489 size_t result;
67490
67491 if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_batchsize_get",&obj0)) SWIG_fail;
67492 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67493 if (!SWIG_IsOK(res1)) {
67494 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_batchsize_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67495 }
67496 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67497 result = (size_t) ((arg1)->batchsize);
67498 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
67499 return resultobj;
67500 fail:
67501 return NULL;
67502 }
67503
67504
67505 SWIGINTERN PyObject *_wrap_ParameterSpace_thread_over_batches_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67506 PyObject *resultobj = 0;
67507 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67508 bool arg2 ;
67509 void *argp1 = 0 ;
67510 int res1 = 0 ;
67511 bool val2 ;
67512 int ecode2 = 0 ;
67513 PyObject * obj0 = 0 ;
67514 PyObject * obj1 = 0 ;
67515
67516 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_thread_over_batches_set",&obj0,&obj1)) SWIG_fail;
67517 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67518 if (!SWIG_IsOK(res1)) {
67519 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_thread_over_batches_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67520 }
67521 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67522 ecode2 = SWIG_AsVal_bool(obj1, &val2);
67523 if (!SWIG_IsOK(ecode2)) {
67524 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_thread_over_batches_set" "', argument " "2"" of type '" "bool""'");
67525 }
67526 arg2 = static_cast< bool >(val2);
67527 if (arg1) (arg1)->thread_over_batches = arg2;
67528 resultobj = SWIG_Py_Void();
67529 return resultobj;
67530 fail:
67531 return NULL;
67532 }
67533
67534
67535 SWIGINTERN PyObject *_wrap_ParameterSpace_thread_over_batches_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67536 PyObject *resultobj = 0;
67537 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67538 void *argp1 = 0 ;
67539 int res1 = 0 ;
67540 PyObject * obj0 = 0 ;
67541 bool result;
67542
67543 if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_thread_over_batches_get",&obj0)) SWIG_fail;
67544 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67545 if (!SWIG_IsOK(res1)) {
67546 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_thread_over_batches_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67547 }
67548 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67549 result = (bool) ((arg1)->thread_over_batches);
67550 resultobj = SWIG_From_bool(static_cast< bool >(result));
67551 return resultobj;
67552 fail:
67553 return NULL;
67554 }
67555
67556
67557 SWIGINTERN PyObject *_wrap_ParameterSpace_min_test_duration_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67558 PyObject *resultobj = 0;
67559 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67560 double arg2 ;
67561 void *argp1 = 0 ;
67562 int res1 = 0 ;
67563 double val2 ;
67564 int ecode2 = 0 ;
67565 PyObject * obj0 = 0 ;
67566 PyObject * obj1 = 0 ;
67567
67568 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_min_test_duration_set",&obj0,&obj1)) SWIG_fail;
67569 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67570 if (!SWIG_IsOK(res1)) {
67571 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_min_test_duration_set" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67572 }
67573 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67574 ecode2 = SWIG_AsVal_double(obj1, &val2);
67575 if (!SWIG_IsOK(ecode2)) {
67576 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_min_test_duration_set" "', argument " "2"" of type '" "double""'");
67577 }
67578 arg2 = static_cast< double >(val2);
67579 if (arg1) (arg1)->min_test_duration = arg2;
67580 resultobj = SWIG_Py_Void();
67581 return resultobj;
67582 fail:
67583 return NULL;
67584 }
67585
67586
67587 SWIGINTERN PyObject *_wrap_ParameterSpace_min_test_duration_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67588 PyObject *resultobj = 0;
67589 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67590 void *argp1 = 0 ;
67591 int res1 = 0 ;
67592 PyObject * obj0 = 0 ;
67593 double result;
67594
67595 if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_min_test_duration_get",&obj0)) SWIG_fail;
67596 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67597 if (!SWIG_IsOK(res1)) {
67598 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_min_test_duration_get" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67599 }
67600 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67601 result = (double) ((arg1)->min_test_duration);
67602 resultobj = SWIG_From_double(static_cast< double >(result));
67603 return resultobj;
67604 fail:
67605 return NULL;
67606 }
67607
67608
67609 SWIGINTERN PyObject *_wrap_new_ParameterSpace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67610 PyObject *resultobj = 0;
67611 faiss::ParameterSpace *result = 0 ;
67612
67613 if (!PyArg_ParseTuple(args,(char *)":new_ParameterSpace")) SWIG_fail;
67614 {
67615 Py_BEGIN_ALLOW_THREADS
67616 try {
67617 result = (faiss::ParameterSpace *)new faiss::ParameterSpace();
67618 } catch(faiss::FaissException & e) {
67619 PyEval_RestoreThread(_save);
67620 PyErr_SetString(PyExc_RuntimeError, e.what());
67621 SWIG_fail;
67622 }
67623 Py_END_ALLOW_THREADS
67624 }
67625 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ParameterSpace, SWIG_POINTER_NEW | 0 );
67626 return resultobj;
67627 fail:
67628 return NULL;
67629 }
67630
67631
67632 SWIGINTERN PyObject *_wrap_ParameterSpace_n_combinations(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67633 PyObject *resultobj = 0;
67634 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67635 void *argp1 = 0 ;
67636 int res1 = 0 ;
67637 PyObject * obj0 = 0 ;
67638 size_t result;
67639
67640 if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_n_combinations",&obj0)) SWIG_fail;
67641 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67642 if (!SWIG_IsOK(res1)) {
67643 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_n_combinations" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
67644 }
67645 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67646 {
67647 Py_BEGIN_ALLOW_THREADS
67648 try {
67649 result = (size_t)((faiss::ParameterSpace const *)arg1)->n_combinations();
67650 } catch(faiss::FaissException & e) {
67651 PyEval_RestoreThread(_save);
67652 PyErr_SetString(PyExc_RuntimeError, e.what());
67653 SWIG_fail;
67654 }
67655 Py_END_ALLOW_THREADS
67656 }
67657 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
67658 return resultobj;
67659 fail:
67660 return NULL;
67661 }
67662
67663
67664 SWIGINTERN PyObject *_wrap_ParameterSpace_combination_ge(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67665 PyObject *resultobj = 0;
67666 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67667 size_t arg2 ;
67668 size_t arg3 ;
67669 void *argp1 = 0 ;
67670 int res1 = 0 ;
67671 size_t val2 ;
67672 int ecode2 = 0 ;
67673 size_t val3 ;
67674 int ecode3 = 0 ;
67675 PyObject * obj0 = 0 ;
67676 PyObject * obj1 = 0 ;
67677 PyObject * obj2 = 0 ;
67678 bool result;
67679
67680 if (!PyArg_ParseTuple(args,(char *)"OOO:ParameterSpace_combination_ge",&obj0,&obj1,&obj2)) SWIG_fail;
67681 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67682 if (!SWIG_IsOK(res1)) {
67683 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_combination_ge" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
67684 }
67685 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67686 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
67687 if (!SWIG_IsOK(ecode2)) {
67688 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_combination_ge" "', argument " "2"" of type '" "size_t""'");
67689 }
67690 arg2 = static_cast< size_t >(val2);
67691 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
67692 if (!SWIG_IsOK(ecode3)) {
67693 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ParameterSpace_combination_ge" "', argument " "3"" of type '" "size_t""'");
67694 }
67695 arg3 = static_cast< size_t >(val3);
67696 {
67697 Py_BEGIN_ALLOW_THREADS
67698 try {
67699 result = (bool)((faiss::ParameterSpace const *)arg1)->combination_ge(arg2,arg3);
67700 } catch(faiss::FaissException & e) {
67701 PyEval_RestoreThread(_save);
67702 PyErr_SetString(PyExc_RuntimeError, e.what());
67703 SWIG_fail;
67704 }
67705 Py_END_ALLOW_THREADS
67706 }
67707 resultobj = SWIG_From_bool(static_cast< bool >(result));
67708 return resultobj;
67709 fail:
67710 return NULL;
67711 }
67712
67713
67714 SWIGINTERN PyObject *_wrap_ParameterSpace_combination_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67715 PyObject *resultobj = 0;
67716 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67717 size_t arg2 ;
67718 void *argp1 = 0 ;
67719 int res1 = 0 ;
67720 size_t val2 ;
67721 int ecode2 = 0 ;
67722 PyObject * obj0 = 0 ;
67723 PyObject * obj1 = 0 ;
67724 std::string result;
67725
67726 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_combination_name",&obj0,&obj1)) SWIG_fail;
67727 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67728 if (!SWIG_IsOK(res1)) {
67729 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_combination_name" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
67730 }
67731 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67732 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
67733 if (!SWIG_IsOK(ecode2)) {
67734 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_combination_name" "', argument " "2"" of type '" "size_t""'");
67735 }
67736 arg2 = static_cast< size_t >(val2);
67737 {
67738 Py_BEGIN_ALLOW_THREADS
67739 try {
67740 result = ((faiss::ParameterSpace const *)arg1)->combination_name(arg2);
67741 } catch(faiss::FaissException & e) {
67742 PyEval_RestoreThread(_save);
67743 PyErr_SetString(PyExc_RuntimeError, e.what());
67744 SWIG_fail;
67745 }
67746 Py_END_ALLOW_THREADS
67747 }
67748 resultobj = SWIG_From_std_string(static_cast< std::string >(result));
67749 return resultobj;
67750 fail:
67751 return NULL;
67752 }
67753
67754
67755 SWIGINTERN PyObject *_wrap_ParameterSpace_display(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67756 PyObject *resultobj = 0;
67757 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67758 void *argp1 = 0 ;
67759 int res1 = 0 ;
67760 PyObject * obj0 = 0 ;
67761
67762 if (!PyArg_ParseTuple(args,(char *)"O:ParameterSpace_display",&obj0)) SWIG_fail;
67763 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67764 if (!SWIG_IsOK(res1)) {
67765 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_display" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
67766 }
67767 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67768 {
67769 Py_BEGIN_ALLOW_THREADS
67770 try {
67771 ((faiss::ParameterSpace const *)arg1)->display();
67772 } catch(faiss::FaissException & e) {
67773 PyEval_RestoreThread(_save);
67774 PyErr_SetString(PyExc_RuntimeError, e.what());
67775 SWIG_fail;
67776 }
67777 Py_END_ALLOW_THREADS
67778 }
67779 resultobj = SWIG_Py_Void();
67780 return resultobj;
67781 fail:
67782 return NULL;
67783 }
67784
67785
67786 SWIGINTERN PyObject *_wrap_ParameterSpace_add_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67787 PyObject *resultobj = 0;
67788 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67789 char *arg2 = (char *) 0 ;
67790 void *argp1 = 0 ;
67791 int res1 = 0 ;
67792 int res2 ;
67793 char *buf2 = 0 ;
67794 int alloc2 = 0 ;
67795 PyObject * obj0 = 0 ;
67796 PyObject * obj1 = 0 ;
67797 faiss::ParameterRange *result = 0 ;
67798
67799 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_add_range",&obj0,&obj1)) SWIG_fail;
67800 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67801 if (!SWIG_IsOK(res1)) {
67802 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_add_range" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67803 }
67804 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67805 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
67806 if (!SWIG_IsOK(res2)) {
67807 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_add_range" "', argument " "2"" of type '" "char const *""'");
67808 }
67809 arg2 = reinterpret_cast< char * >(buf2);
67810 {
67811 Py_BEGIN_ALLOW_THREADS
67812 try {
67813 result = (faiss::ParameterRange *) &(arg1)->add_range((char const *)arg2);
67814 } catch(faiss::FaissException & e) {
67815 PyEval_RestoreThread(_save);
67816 PyErr_SetString(PyExc_RuntimeError, e.what());
67817 SWIG_fail;
67818 }
67819 Py_END_ALLOW_THREADS
67820 }
67821 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__ParameterRange, 0 | 0 );
67822 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
67823 return resultobj;
67824 fail:
67825 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
67826 return NULL;
67827 }
67828
67829
67830 SWIGINTERN PyObject *_wrap_ParameterSpace_initialize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67831 PyObject *resultobj = 0;
67832 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67833 faiss::Index *arg2 = (faiss::Index *) 0 ;
67834 void *argp1 = 0 ;
67835 int res1 = 0 ;
67836 void *argp2 = 0 ;
67837 int res2 = 0 ;
67838 PyObject * obj0 = 0 ;
67839 PyObject * obj1 = 0 ;
67840
67841 if (!PyArg_ParseTuple(args,(char *)"OO:ParameterSpace_initialize",&obj0,&obj1)) SWIG_fail;
67842 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67843 if (!SWIG_IsOK(res1)) {
67844 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_initialize" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
67845 }
67846 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67847 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
67848 if (!SWIG_IsOK(res2)) {
67849 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_initialize" "', argument " "2"" of type '" "faiss::Index const *""'");
67850 }
67851 arg2 = reinterpret_cast< faiss::Index * >(argp2);
67852 {
67853 Py_BEGIN_ALLOW_THREADS
67854 try {
67855 (arg1)->initialize((faiss::Index const *)arg2);
67856 } catch(faiss::FaissException & e) {
67857 PyEval_RestoreThread(_save);
67858 PyErr_SetString(PyExc_RuntimeError, e.what());
67859 SWIG_fail;
67860 }
67861 Py_END_ALLOW_THREADS
67862 }
67863 resultobj = SWIG_Py_Void();
67864 return resultobj;
67865 fail:
67866 return NULL;
67867 }
67868
67869
67870 SWIGINTERN PyObject *_wrap_ParameterSpace_set_index_parameters__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67871 PyObject *resultobj = 0;
67872 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67873 faiss::Index *arg2 = (faiss::Index *) 0 ;
67874 size_t arg3 ;
67875 void *argp1 = 0 ;
67876 int res1 = 0 ;
67877 void *argp2 = 0 ;
67878 int res2 = 0 ;
67879 size_t val3 ;
67880 int ecode3 = 0 ;
67881 PyObject * obj0 = 0 ;
67882 PyObject * obj1 = 0 ;
67883 PyObject * obj2 = 0 ;
67884
67885 if (!PyArg_ParseTuple(args,(char *)"OOO:ParameterSpace_set_index_parameters",&obj0,&obj1,&obj2)) SWIG_fail;
67886 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67887 if (!SWIG_IsOK(res1)) {
67888 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_set_index_parameters" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
67889 }
67890 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67891 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
67892 if (!SWIG_IsOK(res2)) {
67893 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_set_index_parameters" "', argument " "2"" of type '" "faiss::Index *""'");
67894 }
67895 arg2 = reinterpret_cast< faiss::Index * >(argp2);
67896 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
67897 if (!SWIG_IsOK(ecode3)) {
67898 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ParameterSpace_set_index_parameters" "', argument " "3"" of type '" "size_t""'");
67899 }
67900 arg3 = static_cast< size_t >(val3);
67901 {
67902 Py_BEGIN_ALLOW_THREADS
67903 try {
67904 ((faiss::ParameterSpace const *)arg1)->set_index_parameters(arg2,arg3);
67905 } catch(faiss::FaissException & e) {
67906 PyEval_RestoreThread(_save);
67907 PyErr_SetString(PyExc_RuntimeError, e.what());
67908 SWIG_fail;
67909 }
67910 Py_END_ALLOW_THREADS
67911 }
67912 resultobj = SWIG_Py_Void();
67913 return resultobj;
67914 fail:
67915 return NULL;
67916 }
67917
67918
67919 SWIGINTERN PyObject *_wrap_ParameterSpace_set_index_parameters__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
67920 PyObject *resultobj = 0;
67921 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
67922 faiss::Index *arg2 = (faiss::Index *) 0 ;
67923 char *arg3 = (char *) 0 ;
67924 void *argp1 = 0 ;
67925 int res1 = 0 ;
67926 void *argp2 = 0 ;
67927 int res2 = 0 ;
67928 int res3 ;
67929 char *buf3 = 0 ;
67930 int alloc3 = 0 ;
67931 PyObject * obj0 = 0 ;
67932 PyObject * obj1 = 0 ;
67933 PyObject * obj2 = 0 ;
67934
67935 if (!PyArg_ParseTuple(args,(char *)"OOO:ParameterSpace_set_index_parameters",&obj0,&obj1,&obj2)) SWIG_fail;
67936 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
67937 if (!SWIG_IsOK(res1)) {
67938 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_set_index_parameters" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
67939 }
67940 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
67941 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
67942 if (!SWIG_IsOK(res2)) {
67943 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_set_index_parameters" "', argument " "2"" of type '" "faiss::Index *""'");
67944 }
67945 arg2 = reinterpret_cast< faiss::Index * >(argp2);
67946 res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
67947 if (!SWIG_IsOK(res3)) {
67948 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ParameterSpace_set_index_parameters" "', argument " "3"" of type '" "char const *""'");
67949 }
67950 arg3 = reinterpret_cast< char * >(buf3);
67951 {
67952 Py_BEGIN_ALLOW_THREADS
67953 try {
67954 ((faiss::ParameterSpace const *)arg1)->set_index_parameters(arg2,(char const *)arg3);
67955 } catch(faiss::FaissException & e) {
67956 PyEval_RestoreThread(_save);
67957 PyErr_SetString(PyExc_RuntimeError, e.what());
67958 SWIG_fail;
67959 }
67960 Py_END_ALLOW_THREADS
67961 }
67962 resultobj = SWIG_Py_Void();
67963 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
67964 return resultobj;
67965 fail:
67966 if (alloc3 == SWIG_NEWOBJ) delete[] buf3;
67967 return NULL;
67968 }
67969
67970
67971 SWIGINTERN PyObject *_wrap_ParameterSpace_set_index_parameters(PyObject *self, PyObject *args) {
67972 Py_ssize_t argc;
67973 PyObject *argv[4] = {
67974 0
67975 };
67976 Py_ssize_t ii;
67977
67978 if (!PyTuple_Check(args)) SWIG_fail;
67979 argc = args ? PyObject_Length(args) : 0;
67980 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
67981 argv[ii] = PyTuple_GET_ITEM(args,ii);
67982 }
67983 if (argc == 3) {
67984 int _v;
67985 void *vptr = 0;
67986 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ParameterSpace, 0);
67987 _v = SWIG_CheckState(res);
67988 if (_v) {
67989 void *vptr = 0;
67990 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__Index, 0);
67991 _v = SWIG_CheckState(res);
67992 if (_v) {
67993 {
67994 int res = SWIG_AsVal_size_t(argv[2], NULL);
67995 _v = SWIG_CheckState(res);
67996 }
67997 if (_v) {
67998 return _wrap_ParameterSpace_set_index_parameters__SWIG_0(self, args);
67999 }
68000 }
68001 }
68002 }
68003 if (argc == 3) {
68004 int _v;
68005 void *vptr = 0;
68006 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__ParameterSpace, 0);
68007 _v = SWIG_CheckState(res);
68008 if (_v) {
68009 void *vptr = 0;
68010 int res = SWIG_ConvertPtr(argv[1], &vptr, SWIGTYPE_p_faiss__Index, 0);
68011 _v = SWIG_CheckState(res);
68012 if (_v) {
68013 int res = SWIG_AsCharPtrAndSize(argv[2], 0, NULL, 0);
68014 _v = SWIG_CheckState(res);
68015 if (_v) {
68016 return _wrap_ParameterSpace_set_index_parameters__SWIG_1(self, args);
68017 }
68018 }
68019 }
68020 }
68021
68022 fail:
68023 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'ParameterSpace_set_index_parameters'.\n"
68024 " Possible C/C++ prototypes are:\n"
68025 " faiss::ParameterSpace::set_index_parameters(faiss::Index *,size_t) const\n"
68026 " faiss::ParameterSpace::set_index_parameters(faiss::Index *,char const *) const\n");
68027 return 0;
68028 }
68029
68030
68031 SWIGINTERN PyObject *_wrap_ParameterSpace_set_index_parameter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68032 PyObject *resultobj = 0;
68033 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
68034 faiss::Index *arg2 = (faiss::Index *) 0 ;
68035 std::string *arg3 = 0 ;
68036 double arg4 ;
68037 void *argp1 = 0 ;
68038 int res1 = 0 ;
68039 void *argp2 = 0 ;
68040 int res2 = 0 ;
68041 int res3 = SWIG_OLDOBJ ;
68042 double val4 ;
68043 int ecode4 = 0 ;
68044 PyObject * obj0 = 0 ;
68045 PyObject * obj1 = 0 ;
68046 PyObject * obj2 = 0 ;
68047 PyObject * obj3 = 0 ;
68048
68049 if (!PyArg_ParseTuple(args,(char *)"OOOO:ParameterSpace_set_index_parameter",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
68050 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
68051 if (!SWIG_IsOK(res1)) {
68052 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_set_index_parameter" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
68053 }
68054 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
68055 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
68056 if (!SWIG_IsOK(res2)) {
68057 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_set_index_parameter" "', argument " "2"" of type '" "faiss::Index *""'");
68058 }
68059 arg2 = reinterpret_cast< faiss::Index * >(argp2);
68060 {
68061 std::string *ptr = (std::string *)0;
68062 res3 = SWIG_AsPtr_std_string(obj2, &ptr);
68063 if (!SWIG_IsOK(res3)) {
68064 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ParameterSpace_set_index_parameter" "', argument " "3"" of type '" "std::string const &""'");
68065 }
68066 if (!ptr) {
68067 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParameterSpace_set_index_parameter" "', argument " "3"" of type '" "std::string const &""'");
68068 }
68069 arg3 = ptr;
68070 }
68071 ecode4 = SWIG_AsVal_double(obj3, &val4);
68072 if (!SWIG_IsOK(ecode4)) {
68073 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "ParameterSpace_set_index_parameter" "', argument " "4"" of type '" "double""'");
68074 }
68075 arg4 = static_cast< double >(val4);
68076 {
68077 Py_BEGIN_ALLOW_THREADS
68078 try {
68079 ((faiss::ParameterSpace const *)arg1)->set_index_parameter(arg2,(std::string const &)*arg3,arg4);
68080 } catch(faiss::FaissException & e) {
68081 PyEval_RestoreThread(_save);
68082 PyErr_SetString(PyExc_RuntimeError, e.what());
68083 SWIG_fail;
68084 }
68085 Py_END_ALLOW_THREADS
68086 }
68087 resultobj = SWIG_Py_Void();
68088 if (SWIG_IsNewObj(res3)) delete arg3;
68089 return resultobj;
68090 fail:
68091 if (SWIG_IsNewObj(res3)) delete arg3;
68092 return NULL;
68093 }
68094
68095
68096 SWIGINTERN PyObject *_wrap_ParameterSpace_update_bounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68097 PyObject *resultobj = 0;
68098 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
68099 size_t arg2 ;
68100 faiss::OperatingPoint *arg3 = 0 ;
68101 double *arg4 = (double *) 0 ;
68102 double *arg5 = (double *) 0 ;
68103 void *argp1 = 0 ;
68104 int res1 = 0 ;
68105 size_t val2 ;
68106 int ecode2 = 0 ;
68107 void *argp3 = 0 ;
68108 int res3 = 0 ;
68109 void *argp4 = 0 ;
68110 int res4 = 0 ;
68111 void *argp5 = 0 ;
68112 int res5 = 0 ;
68113 PyObject * obj0 = 0 ;
68114 PyObject * obj1 = 0 ;
68115 PyObject * obj2 = 0 ;
68116 PyObject * obj3 = 0 ;
68117 PyObject * obj4 = 0 ;
68118
68119 if (!PyArg_ParseTuple(args,(char *)"OOOOO:ParameterSpace_update_bounds",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
68120 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
68121 if (!SWIG_IsOK(res1)) {
68122 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_update_bounds" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
68123 }
68124 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
68125 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
68126 if (!SWIG_IsOK(ecode2)) {
68127 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "ParameterSpace_update_bounds" "', argument " "2"" of type '" "size_t""'");
68128 }
68129 arg2 = static_cast< size_t >(val2);
68130 res3 = SWIG_ConvertPtr(obj2, &argp3, SWIGTYPE_p_faiss__OperatingPoint, 0 | 0);
68131 if (!SWIG_IsOK(res3)) {
68132 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ParameterSpace_update_bounds" "', argument " "3"" of type '" "faiss::OperatingPoint const &""'");
68133 }
68134 if (!argp3) {
68135 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParameterSpace_update_bounds" "', argument " "3"" of type '" "faiss::OperatingPoint const &""'");
68136 }
68137 arg3 = reinterpret_cast< faiss::OperatingPoint * >(argp3);
68138 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_double, 0 | 0 );
68139 if (!SWIG_IsOK(res4)) {
68140 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ParameterSpace_update_bounds" "', argument " "4"" of type '" "double *""'");
68141 }
68142 arg4 = reinterpret_cast< double * >(argp4);
68143 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_double, 0 | 0 );
68144 if (!SWIG_IsOK(res5)) {
68145 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ParameterSpace_update_bounds" "', argument " "5"" of type '" "double *""'");
68146 }
68147 arg5 = reinterpret_cast< double * >(argp5);
68148 {
68149 Py_BEGIN_ALLOW_THREADS
68150 try {
68151 ((faiss::ParameterSpace const *)arg1)->update_bounds(arg2,(faiss::OperatingPoint const &)*arg3,arg4,arg5);
68152 } catch(faiss::FaissException & e) {
68153 PyEval_RestoreThread(_save);
68154 PyErr_SetString(PyExc_RuntimeError, e.what());
68155 SWIG_fail;
68156 }
68157 Py_END_ALLOW_THREADS
68158 }
68159 resultobj = SWIG_Py_Void();
68160 return resultobj;
68161 fail:
68162 return NULL;
68163 }
68164
68165
68166 SWIGINTERN PyObject *_wrap_ParameterSpace_explore(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68167 PyObject *resultobj = 0;
68168 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
68169 faiss::Index *arg2 = (faiss::Index *) 0 ;
68170 size_t arg3 ;
68171 float *arg4 = (float *) 0 ;
68172 faiss::AutoTuneCriterion *arg5 = 0 ;
68173 faiss::OperatingPoints *arg6 = (faiss::OperatingPoints *) 0 ;
68174 void *argp1 = 0 ;
68175 int res1 = 0 ;
68176 void *argp2 = 0 ;
68177 int res2 = 0 ;
68178 size_t val3 ;
68179 int ecode3 = 0 ;
68180 void *argp4 = 0 ;
68181 int res4 = 0 ;
68182 void *argp5 = 0 ;
68183 int res5 = 0 ;
68184 void *argp6 = 0 ;
68185 int res6 = 0 ;
68186 PyObject * obj0 = 0 ;
68187 PyObject * obj1 = 0 ;
68188 PyObject * obj2 = 0 ;
68189 PyObject * obj3 = 0 ;
68190 PyObject * obj4 = 0 ;
68191 PyObject * obj5 = 0 ;
68192
68193 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:ParameterSpace_explore",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
68194 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, 0 | 0 );
68195 if (!SWIG_IsOK(res1)) {
68196 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "ParameterSpace_explore" "', argument " "1"" of type '" "faiss::ParameterSpace const *""'");
68197 }
68198 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
68199 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__Index, 0 | 0 );
68200 if (!SWIG_IsOK(res2)) {
68201 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ParameterSpace_explore" "', argument " "2"" of type '" "faiss::Index *""'");
68202 }
68203 arg2 = reinterpret_cast< faiss::Index * >(argp2);
68204 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
68205 if (!SWIG_IsOK(ecode3)) {
68206 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "ParameterSpace_explore" "', argument " "3"" of type '" "size_t""'");
68207 }
68208 arg3 = static_cast< size_t >(val3);
68209 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_float, 0 | 0 );
68210 if (!SWIG_IsOK(res4)) {
68211 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ParameterSpace_explore" "', argument " "4"" of type '" "float const *""'");
68212 }
68213 arg4 = reinterpret_cast< float * >(argp4);
68214 res5 = SWIG_ConvertPtr(obj4, &argp5, SWIGTYPE_p_faiss__AutoTuneCriterion, 0 | 0);
68215 if (!SWIG_IsOK(res5)) {
68216 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "ParameterSpace_explore" "', argument " "5"" of type '" "faiss::AutoTuneCriterion const &""'");
68217 }
68218 if (!argp5) {
68219 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "ParameterSpace_explore" "', argument " "5"" of type '" "faiss::AutoTuneCriterion const &""'");
68220 }
68221 arg5 = reinterpret_cast< faiss::AutoTuneCriterion * >(argp5);
68222 res6 = SWIG_ConvertPtr(obj5, &argp6,SWIGTYPE_p_faiss__OperatingPoints, 0 | 0 );
68223 if (!SWIG_IsOK(res6)) {
68224 SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "ParameterSpace_explore" "', argument " "6"" of type '" "faiss::OperatingPoints *""'");
68225 }
68226 arg6 = reinterpret_cast< faiss::OperatingPoints * >(argp6);
68227 {
68228 Py_BEGIN_ALLOW_THREADS
68229 try {
68230 ((faiss::ParameterSpace const *)arg1)->explore(arg2,arg3,(float const *)arg4,(faiss::AutoTuneCriterion const &)*arg5,arg6);
68231 } catch(faiss::FaissException & e) {
68232 PyEval_RestoreThread(_save);
68233 PyErr_SetString(PyExc_RuntimeError, e.what());
68234 SWIG_fail;
68235 }
68236 Py_END_ALLOW_THREADS
68237 }
68238 resultobj = SWIG_Py_Void();
68239 return resultobj;
68240 fail:
68241 return NULL;
68242 }
68243
68244
68245 SWIGINTERN PyObject *_wrap_delete_ParameterSpace(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68246 PyObject *resultobj = 0;
68247 faiss::ParameterSpace *arg1 = (faiss::ParameterSpace *) 0 ;
68248 void *argp1 = 0 ;
68249 int res1 = 0 ;
68250 PyObject * obj0 = 0 ;
68251
68252 if (!PyArg_ParseTuple(args,(char *)"O:delete_ParameterSpace",&obj0)) SWIG_fail;
68253 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__ParameterSpace, SWIG_POINTER_DISOWN | 0 );
68254 if (!SWIG_IsOK(res1)) {
68255 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_ParameterSpace" "', argument " "1"" of type '" "faiss::ParameterSpace *""'");
68256 }
68257 arg1 = reinterpret_cast< faiss::ParameterSpace * >(argp1);
68258 {
68259 Py_BEGIN_ALLOW_THREADS
68260 try {
68261 delete arg1;
68262 } catch(faiss::FaissException & e) {
68263 PyEval_RestoreThread(_save);
68264 PyErr_SetString(PyExc_RuntimeError, e.what());
68265 SWIG_fail;
68266 }
68267 Py_END_ALLOW_THREADS
68268 }
68269 resultobj = SWIG_Py_Void();
68270 return resultobj;
68271 fail:
68272 return NULL;
68273 }
68274
68275
68276 SWIGINTERN PyObject *ParameterSpace_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68277 PyObject *obj;
68278 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
68279 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__ParameterSpace, SWIG_NewClientData(obj));
68280 return SWIG_Py_Void();
68281 }
68282
68283 SWIGINTERN PyObject *_wrap_index_factory__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68284 PyObject *resultobj = 0;
68285 int arg1 ;
68286 char *arg2 = (char *) 0 ;
68287 faiss::MetricType arg3 ;
68288 int val1 ;
68289 int ecode1 = 0 ;
68290 int res2 ;
68291 char *buf2 = 0 ;
68292 int alloc2 = 0 ;
68293 int val3 ;
68294 int ecode3 = 0 ;
68295 PyObject * obj0 = 0 ;
68296 PyObject * obj1 = 0 ;
68297 PyObject * obj2 = 0 ;
68298 faiss::Index *result = 0 ;
68299
68300 if (!PyArg_ParseTuple(args,(char *)"OOO:index_factory",&obj0,&obj1,&obj2)) SWIG_fail;
68301 ecode1 = SWIG_AsVal_int(obj0, &val1);
68302 if (!SWIG_IsOK(ecode1)) {
68303 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "index_factory" "', argument " "1"" of type '" "int""'");
68304 }
68305 arg1 = static_cast< int >(val1);
68306 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
68307 if (!SWIG_IsOK(res2)) {
68308 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_factory" "', argument " "2"" of type '" "char const *""'");
68309 }
68310 arg2 = reinterpret_cast< char * >(buf2);
68311 ecode3 = SWIG_AsVal_int(obj2, &val3);
68312 if (!SWIG_IsOK(ecode3)) {
68313 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "index_factory" "', argument " "3"" of type '" "faiss::MetricType""'");
68314 }
68315 arg3 = static_cast< faiss::MetricType >(val3);
68316 {
68317 Py_BEGIN_ALLOW_THREADS
68318 try {
68319 result = (faiss::Index *)faiss::index_factory(arg1,(char const *)arg2,arg3);
68320 } catch(faiss::FaissException & e) {
68321 PyEval_RestoreThread(_save);
68322 PyErr_SetString(PyExc_RuntimeError, e.what());
68323 SWIG_fail;
68324 }
68325 Py_END_ALLOW_THREADS
68326 }
68327 {
68328 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68329 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
68330 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
68331 } else
68332 /*@SWIG@*/
68333 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68334 if (dynamic_cast<faiss::IndexShards *> (result)) {
68335 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
68336 } else
68337 /*@SWIG@*/
68338 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68339 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
68340 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
68341 } else
68342 /*@SWIG@*/
68343 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68344 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
68345 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
68346 } else
68347 /*@SWIG@*/
68348 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68349 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
68350 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
68351 } else
68352 /*@SWIG@*/
68353 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68354 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
68355 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
68356 } else
68357 /*@SWIG@*/
68358 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68359 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
68360 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
68361 } else
68362 /*@SWIG@*/
68363 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68364 if (dynamic_cast<faiss::IndexIVF *> (result)) {
68365 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
68366 } else
68367 /*@SWIG@*/
68368 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68369 if (dynamic_cast<faiss::IndexFlat *> (result)) {
68370 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
68371 } else
68372 /*@SWIG@*/
68373 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68374 if (dynamic_cast<faiss::IndexPQ *> (result)) {
68375 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
68376 } else
68377 /*@SWIG@*/
68378 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68379 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
68380 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
68381 } else
68382 /*@SWIG@*/
68383 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68384 if (dynamic_cast<faiss::IndexLSH *> (result)) {
68385 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
68386 } else
68387 /*@SWIG@*/
68388 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68389 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
68390 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
68391 } else
68392 /*@SWIG@*/
68393 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68394 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
68395 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
68396 } else
68397 /*@SWIG@*/
68398 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68399 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
68400 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
68401 } else
68402 /*@SWIG@*/
68403 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68404 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
68405 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
68406 } else
68407 /*@SWIG@*/
68408 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68409 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
68410 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
68411 } else
68412 /*@SWIG@*/
68413 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68414 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
68415 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
68416 } else
68417 /*@SWIG@*/
68418 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68419 if (dynamic_cast<faiss::Index2Layer *> (result)) {
68420 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
68421 } else
68422 /*@SWIG@*/
68423
68424
68425
68426
68427
68428
68429 // default for non-recognized classes
68430 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68431 if (dynamic_cast<faiss::Index *> (result)) {
68432 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
68433 } else
68434 /*@SWIG@*/
68435 if (result == NULL)
68436 {
68437 resultobj = SWIG_Py_Void();
68438
68439 // Lua does not need a push for nil
68440 } else {
68441 assert(false);
68442 }
68443
68444
68445
68446 }
68447 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68448 return resultobj;
68449 fail:
68450 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68451 return NULL;
68452 }
68453
68454
68455 SWIGINTERN PyObject *_wrap_index_factory__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68456 PyObject *resultobj = 0;
68457 int arg1 ;
68458 char *arg2 = (char *) 0 ;
68459 int val1 ;
68460 int ecode1 = 0 ;
68461 int res2 ;
68462 char *buf2 = 0 ;
68463 int alloc2 = 0 ;
68464 PyObject * obj0 = 0 ;
68465 PyObject * obj1 = 0 ;
68466 faiss::Index *result = 0 ;
68467
68468 if (!PyArg_ParseTuple(args,(char *)"OO:index_factory",&obj0,&obj1)) SWIG_fail;
68469 ecode1 = SWIG_AsVal_int(obj0, &val1);
68470 if (!SWIG_IsOK(ecode1)) {
68471 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "index_factory" "', argument " "1"" of type '" "int""'");
68472 }
68473 arg1 = static_cast< int >(val1);
68474 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
68475 if (!SWIG_IsOK(res2)) {
68476 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_factory" "', argument " "2"" of type '" "char const *""'");
68477 }
68478 arg2 = reinterpret_cast< char * >(buf2);
68479 {
68480 Py_BEGIN_ALLOW_THREADS
68481 try {
68482 result = (faiss::Index *)faiss::index_factory(arg1,(char const *)arg2);
68483 } catch(faiss::FaissException & e) {
68484 PyEval_RestoreThread(_save);
68485 PyErr_SetString(PyExc_RuntimeError, e.what());
68486 SWIG_fail;
68487 }
68488 Py_END_ALLOW_THREADS
68489 }
68490 {
68491 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68492 if (dynamic_cast<faiss::IndexIDMap *> (result)) {
68493 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIDMap,SWIG_POINTER_OWN);
68494 } else
68495 /*@SWIG@*/
68496 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68497 if (dynamic_cast<faiss::IndexShards *> (result)) {
68498 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexShards,SWIG_POINTER_OWN);
68499 } else
68500 /*@SWIG@*/
68501 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68502 if (dynamic_cast<faiss::IndexIVFPQR *> (result)) {
68503 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQR,SWIG_POINTER_OWN);
68504 } else
68505 /*@SWIG@*/
68506 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68507 if (dynamic_cast<faiss::IndexIVFPQ *> (result)) {
68508 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFPQ,SWIG_POINTER_OWN);
68509 } else
68510 /*@SWIG@*/
68511 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68512 if (dynamic_cast<faiss::IndexIVFScalarQuantizer *> (result)) {
68513 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFScalarQuantizer,SWIG_POINTER_OWN);
68514 } else
68515 /*@SWIG@*/
68516 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68517 if (dynamic_cast<faiss::IndexIVFFlatDedup *> (result)) {
68518 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlatDedup,SWIG_POINTER_OWN);
68519 } else
68520 /*@SWIG@*/
68521 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68522 if (dynamic_cast<faiss::IndexIVFFlat *> (result)) {
68523 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVFFlat,SWIG_POINTER_OWN);
68524 } else
68525 /*@SWIG@*/
68526 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68527 if (dynamic_cast<faiss::IndexIVF *> (result)) {
68528 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexIVF,SWIG_POINTER_OWN);
68529 } else
68530 /*@SWIG@*/
68531 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68532 if (dynamic_cast<faiss::IndexFlat *> (result)) {
68533 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexFlat,SWIG_POINTER_OWN);
68534 } else
68535 /*@SWIG@*/
68536 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68537 if (dynamic_cast<faiss::IndexPQ *> (result)) {
68538 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPQ,SWIG_POINTER_OWN);
68539 } else
68540 /*@SWIG@*/
68541 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68542 if (dynamic_cast<faiss::IndexScalarQuantizer *> (result)) {
68543 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexScalarQuantizer,SWIG_POINTER_OWN);
68544 } else
68545 /*@SWIG@*/
68546 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68547 if (dynamic_cast<faiss::IndexLSH *> (result)) {
68548 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexLSH,SWIG_POINTER_OWN);
68549 } else
68550 /*@SWIG@*/
68551 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68552 if (dynamic_cast<faiss::IndexPreTransform *> (result)) {
68553 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexPreTransform,SWIG_POINTER_OWN);
68554 } else
68555 /*@SWIG@*/
68556 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68557 if (dynamic_cast<faiss::MultiIndexQuantizer *> (result)) {
68558 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__MultiIndexQuantizer,SWIG_POINTER_OWN);
68559 } else
68560 /*@SWIG@*/
68561 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68562 if (dynamic_cast<faiss::IndexHNSWFlat *> (result)) {
68563 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWFlat,SWIG_POINTER_OWN);
68564 } else
68565 /*@SWIG@*/
68566 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68567 if (dynamic_cast<faiss::IndexHNSWPQ *> (result)) {
68568 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWPQ,SWIG_POINTER_OWN);
68569 } else
68570 /*@SWIG@*/
68571 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68572 if (dynamic_cast<faiss::IndexHNSWSQ *> (result)) {
68573 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSWSQ,SWIG_POINTER_OWN);
68574 } else
68575 /*@SWIG@*/
68576 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68577 if (dynamic_cast<faiss::IndexHNSW2Level *> (result)) {
68578 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexHNSW2Level,SWIG_POINTER_OWN);
68579 } else
68580 /*@SWIG@*/
68581 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68582 if (dynamic_cast<faiss::Index2Layer *> (result)) {
68583 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index2Layer,SWIG_POINTER_OWN);
68584 } else
68585 /*@SWIG@*/
68586
68587
68588
68589
68590
68591
68592 // default for non-recognized classes
68593 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68594 if (dynamic_cast<faiss::Index *> (result)) {
68595 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__Index,SWIG_POINTER_OWN);
68596 } else
68597 /*@SWIG@*/
68598 if (result == NULL)
68599 {
68600 resultobj = SWIG_Py_Void();
68601
68602 // Lua does not need a push for nil
68603 } else {
68604 assert(false);
68605 }
68606
68607
68608
68609 }
68610 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68611 return resultobj;
68612 fail:
68613 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68614 return NULL;
68615 }
68616
68617
68618 SWIGINTERN PyObject *_wrap_index_factory(PyObject *self, PyObject *args) {
68619 Py_ssize_t argc;
68620 PyObject *argv[4] = {
68621 0
68622 };
68623 Py_ssize_t ii;
68624
68625 if (!PyTuple_Check(args)) SWIG_fail;
68626 argc = args ? PyObject_Length(args) : 0;
68627 for (ii = 0; (ii < 3) && (ii < argc); ii++) {
68628 argv[ii] = PyTuple_GET_ITEM(args,ii);
68629 }
68630 if (argc == 2) {
68631 int _v;
68632 {
68633 int res = SWIG_AsVal_int(argv[0], NULL);
68634 _v = SWIG_CheckState(res);
68635 }
68636 if (_v) {
68637 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
68638 _v = SWIG_CheckState(res);
68639 if (_v) {
68640 return _wrap_index_factory__SWIG_1(self, args);
68641 }
68642 }
68643 }
68644 if (argc == 3) {
68645 int _v;
68646 {
68647 int res = SWIG_AsVal_int(argv[0], NULL);
68648 _v = SWIG_CheckState(res);
68649 }
68650 if (_v) {
68651 int res = SWIG_AsCharPtrAndSize(argv[1], 0, NULL, 0);
68652 _v = SWIG_CheckState(res);
68653 if (_v) {
68654 {
68655 int res = SWIG_AsVal_int(argv[2], NULL);
68656 _v = SWIG_CheckState(res);
68657 }
68658 if (_v) {
68659 return _wrap_index_factory__SWIG_0(self, args);
68660 }
68661 }
68662 }
68663 }
68664
68665 fail:
68666 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'index_factory'.\n"
68667 " Possible C/C++ prototypes are:\n"
68668 " faiss::index_factory(int,char const *,faiss::MetricType)\n"
68669 " faiss::index_factory(int,char const *)\n");
68670 return 0;
68671 }
68672
68673
68674 SWIGINTERN PyObject *_wrap_index_binary_factory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68675 PyObject *resultobj = 0;
68676 int arg1 ;
68677 char *arg2 = (char *) 0 ;
68678 int val1 ;
68679 int ecode1 = 0 ;
68680 int res2 ;
68681 char *buf2 = 0 ;
68682 int alloc2 = 0 ;
68683 PyObject * obj0 = 0 ;
68684 PyObject * obj1 = 0 ;
68685 faiss::IndexBinary *result = 0 ;
68686
68687 if (!PyArg_ParseTuple(args,(char *)"OO:index_binary_factory",&obj0,&obj1)) SWIG_fail;
68688 ecode1 = SWIG_AsVal_int(obj0, &val1);
68689 if (!SWIG_IsOK(ecode1)) {
68690 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "index_binary_factory" "', argument " "1"" of type '" "int""'");
68691 }
68692 arg1 = static_cast< int >(val1);
68693 res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
68694 if (!SWIG_IsOK(res2)) {
68695 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_binary_factory" "', argument " "2"" of type '" "char const *""'");
68696 }
68697 arg2 = reinterpret_cast< char * >(buf2);
68698 {
68699 Py_BEGIN_ALLOW_THREADS
68700 try {
68701 result = (faiss::IndexBinary *)faiss::index_binary_factory(arg1,(char const *)arg2);
68702 } catch(faiss::FaissException & e) {
68703 PyEval_RestoreThread(_save);
68704 PyErr_SetString(PyExc_RuntimeError, e.what());
68705 SWIG_fail;
68706 }
68707 Py_END_ALLOW_THREADS
68708 }
68709 {
68710 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68711 if (dynamic_cast<faiss::IndexBinaryIVF *> (result)) {
68712 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryIVF,SWIG_POINTER_OWN);
68713 } else
68714 /*@SWIG@*/
68715 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68716 if (dynamic_cast<faiss::IndexBinaryFlat *> (result)) {
68717 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFlat,SWIG_POINTER_OWN);
68718 } else
68719 /*@SWIG@*/
68720 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68721 if (dynamic_cast<faiss::IndexBinaryFromFloat *> (result)) {
68722 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryFromFloat,SWIG_POINTER_OWN);
68723 } else
68724 /*@SWIG@*/
68725 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68726 if (dynamic_cast<faiss::IndexBinaryHNSW *> (result)) {
68727 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinaryHNSW,SWIG_POINTER_OWN);
68728 } else
68729 /*@SWIG@*/
68730
68731
68732
68733 // default for non-recognized classes
68734 /*@SWIG:swigfaiss.swig,437,DOWNCAST@*/
68735 if (dynamic_cast<faiss::IndexBinary *> (result)) {
68736 resultobj = SWIG_NewPointerObj(result,SWIGTYPE_p_faiss__IndexBinary,SWIG_POINTER_OWN);
68737 } else
68738 /*@SWIG@*/
68739 if (result == NULL)
68740 {
68741 resultobj = SWIG_Py_Void();
68742
68743 // Lua does not need a push for nil
68744 } else {
68745 assert(false);
68746 }
68747
68748
68749
68750 }
68751 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68752 return resultobj;
68753 fail:
68754 if (alloc2 == SWIG_NEWOBJ) delete[] buf2;
68755 return NULL;
68756 }
68757
68758
68759 SWIGINTERN PyObject *_wrap_swig_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68760 PyObject *resultobj = 0;
68761 PyObject *arg1 = (PyObject *) 0 ;
68762 PyObject * obj0 = 0 ;
68763 PyObject *result = 0 ;
68764
68765 if (!PyArg_ParseTuple(args,(char *)"O:swig_ptr",&obj0)) SWIG_fail;
68766 arg1 = obj0;
68767 result = (PyObject *)swig_ptr(arg1);
68768 resultobj = result;
68769 return resultobj;
68770 fail:
68771 return NULL;
68772 }
68773
68774
68775 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68776 PyObject *resultobj = 0;
68777 float *arg1 = (float *) 0 ;
68778 size_t arg2 ;
68779 void *argp1 = 0 ;
68780 int res1 = 0 ;
68781 size_t val2 ;
68782 int ecode2 = 0 ;
68783 PyObject * obj0 = 0 ;
68784 PyObject * obj1 = 0 ;
68785 PyObject *result = 0 ;
68786
68787 if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
68788 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_float, 0 | 0 );
68789 if (!SWIG_IsOK(res1)) {
68790 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "float *""'");
68791 }
68792 arg1 = reinterpret_cast< float * >(argp1);
68793 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
68794 if (!SWIG_IsOK(ecode2)) {
68795 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
68796 }
68797 arg2 = static_cast< size_t >(val2);
68798 result = (PyObject *)rev_swig_ptr(arg1,arg2);
68799 resultobj = result;
68800 return resultobj;
68801 fail:
68802 return NULL;
68803 }
68804
68805
68806 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68807 PyObject *resultobj = 0;
68808 int *arg1 = (int *) 0 ;
68809 size_t arg2 ;
68810 void *argp1 = 0 ;
68811 int res1 = 0 ;
68812 size_t val2 ;
68813 int ecode2 = 0 ;
68814 PyObject * obj0 = 0 ;
68815 PyObject * obj1 = 0 ;
68816 PyObject *result = 0 ;
68817
68818 if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
68819 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_int, 0 | 0 );
68820 if (!SWIG_IsOK(res1)) {
68821 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "int *""'");
68822 }
68823 arg1 = reinterpret_cast< int * >(argp1);
68824 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
68825 if (!SWIG_IsOK(ecode2)) {
68826 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
68827 }
68828 arg2 = static_cast< size_t >(val2);
68829 result = (PyObject *)rev_swig_ptr(arg1,arg2);
68830 resultobj = result;
68831 return resultobj;
68832 fail:
68833 return NULL;
68834 }
68835
68836
68837 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68838 PyObject *resultobj = 0;
68839 unsigned char *arg1 = (unsigned char *) 0 ;
68840 size_t arg2 ;
68841 void *argp1 = 0 ;
68842 int res1 = 0 ;
68843 size_t val2 ;
68844 int ecode2 = 0 ;
68845 PyObject * obj0 = 0 ;
68846 PyObject * obj1 = 0 ;
68847 PyObject *result = 0 ;
68848
68849 if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
68850 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_char, 0 | 0 );
68851 if (!SWIG_IsOK(res1)) {
68852 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "unsigned char *""'");
68853 }
68854 arg1 = reinterpret_cast< unsigned char * >(argp1);
68855 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
68856 if (!SWIG_IsOK(ecode2)) {
68857 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
68858 }
68859 arg2 = static_cast< size_t >(val2);
68860 result = (PyObject *)rev_swig_ptr(arg1,arg2);
68861 resultobj = result;
68862 return resultobj;
68863 fail:
68864 return NULL;
68865 }
68866
68867
68868 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68869 PyObject *resultobj = 0;
68870 unsigned long *arg1 = (unsigned long *) 0 ;
68871 size_t arg2 ;
68872 void *argp1 = 0 ;
68873 int res1 = 0 ;
68874 size_t val2 ;
68875 int ecode2 = 0 ;
68876 PyObject * obj0 = 0 ;
68877 PyObject * obj1 = 0 ;
68878 PyObject *result = 0 ;
68879
68880 if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
68881 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_unsigned_long, 0 | 0 );
68882 if (!SWIG_IsOK(res1)) {
68883 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "unsigned long *""'");
68884 }
68885 arg1 = reinterpret_cast< unsigned long * >(argp1);
68886 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
68887 if (!SWIG_IsOK(ecode2)) {
68888 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
68889 }
68890 arg2 = static_cast< size_t >(val2);
68891 result = (PyObject *)rev_swig_ptr(arg1,arg2);
68892 resultobj = result;
68893 return resultobj;
68894 fail:
68895 return NULL;
68896 }
68897
68898
68899 SWIGINTERN PyObject *_wrap_rev_swig_ptr__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
68900 PyObject *resultobj = 0;
68901 long *arg1 = (long *) 0 ;
68902 size_t arg2 ;
68903 void *argp1 = 0 ;
68904 int res1 = 0 ;
68905 size_t val2 ;
68906 int ecode2 = 0 ;
68907 PyObject * obj0 = 0 ;
68908 PyObject * obj1 = 0 ;
68909 PyObject *result = 0 ;
68910
68911 if (!PyArg_ParseTuple(args,(char *)"OO:rev_swig_ptr",&obj0,&obj1)) SWIG_fail;
68912 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_long, 0 | 0 );
68913 if (!SWIG_IsOK(res1)) {
68914 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "rev_swig_ptr" "', argument " "1"" of type '" "long *""'");
68915 }
68916 arg1 = reinterpret_cast< long * >(argp1);
68917 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
68918 if (!SWIG_IsOK(ecode2)) {
68919 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "rev_swig_ptr" "', argument " "2"" of type '" "size_t""'");
68920 }
68921 arg2 = static_cast< size_t >(val2);
68922 result = (PyObject *)rev_swig_ptr(arg1,arg2);
68923 resultobj = result;
68924 return resultobj;
68925 fail:
68926 return NULL;
68927 }
68928
68929
68930 SWIGINTERN PyObject *_wrap_rev_swig_ptr(PyObject *self, PyObject *args) {
68931 Py_ssize_t argc;
68932 PyObject *argv[3] = {
68933 0
68934 };
68935 Py_ssize_t ii;
68936
68937 if (!PyTuple_Check(args)) SWIG_fail;
68938 argc = args ? PyObject_Length(args) : 0;
68939 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
68940 argv[ii] = PyTuple_GET_ITEM(args,ii);
68941 }
68942 if (argc == 2) {
68943 int _v;
68944 void *vptr = 0;
68945 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_float, 0);
68946 _v = SWIG_CheckState(res);
68947 if (_v) {
68948 {
68949 int res = SWIG_AsVal_size_t(argv[1], NULL);
68950 _v = SWIG_CheckState(res);
68951 }
68952 if (_v) {
68953 return _wrap_rev_swig_ptr__SWIG_0(self, args);
68954 }
68955 }
68956 }
68957 if (argc == 2) {
68958 int _v;
68959 void *vptr = 0;
68960 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_int, 0);
68961 _v = SWIG_CheckState(res);
68962 if (_v) {
68963 {
68964 int res = SWIG_AsVal_size_t(argv[1], NULL);
68965 _v = SWIG_CheckState(res);
68966 }
68967 if (_v) {
68968 return _wrap_rev_swig_ptr__SWIG_1(self, args);
68969 }
68970 }
68971 }
68972 if (argc == 2) {
68973 int _v;
68974 void *vptr = 0;
68975 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_char, 0);
68976 _v = SWIG_CheckState(res);
68977 if (_v) {
68978 {
68979 int res = SWIG_AsVal_size_t(argv[1], NULL);
68980 _v = SWIG_CheckState(res);
68981 }
68982 if (_v) {
68983 return _wrap_rev_swig_ptr__SWIG_2(self, args);
68984 }
68985 }
68986 }
68987 if (argc == 2) {
68988 int _v;
68989 void *vptr = 0;
68990 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_unsigned_long, 0);
68991 _v = SWIG_CheckState(res);
68992 if (_v) {
68993 {
68994 int res = SWIG_AsVal_size_t(argv[1], NULL);
68995 _v = SWIG_CheckState(res);
68996 }
68997 if (_v) {
68998 return _wrap_rev_swig_ptr__SWIG_3(self, args);
68999 }
69000 }
69001 }
69002 if (argc == 2) {
69003 int _v;
69004 void *vptr = 0;
69005 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_long, 0);
69006 _v = SWIG_CheckState(res);
69007 if (_v) {
69008 {
69009 int res = SWIG_AsVal_size_t(argv[1], NULL);
69010 _v = SWIG_CheckState(res);
69011 }
69012 if (_v) {
69013 return _wrap_rev_swig_ptr__SWIG_4(self, args);
69014 }
69015 }
69016 }
69017
69018 fail:
69019 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'rev_swig_ptr'.\n"
69020 " Possible C/C++ prototypes are:\n"
69021 " rev_swig_ptr(float *,size_t)\n"
69022 " rev_swig_ptr(int *,size_t)\n"
69023 " rev_swig_ptr(unsigned char *,size_t)\n"
69024 " rev_swig_ptr(unsigned long *,size_t)\n"
69025 " rev_swig_ptr(long *,size_t)\n");
69026 return 0;
69027 }
69028
69029
69030 SWIGINTERN PyObject *_wrap_float_minheap_array_t_nh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69031 PyObject *resultobj = 0;
69032 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69033 size_t arg2 ;
69034 void *argp1 = 0 ;
69035 int res1 = 0 ;
69036 size_t val2 ;
69037 int ecode2 = 0 ;
69038 PyObject * obj0 = 0 ;
69039 PyObject * obj1 = 0 ;
69040
69041 if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_nh_set",&obj0,&obj1)) SWIG_fail;
69042 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69043 if (!SWIG_IsOK(res1)) {
69044 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_nh_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69045 }
69046 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69047 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69048 if (!SWIG_IsOK(ecode2)) {
69049 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_nh_set" "', argument " "2"" of type '" "size_t""'");
69050 }
69051 arg2 = static_cast< size_t >(val2);
69052 if (arg1) (arg1)->nh = arg2;
69053 resultobj = SWIG_Py_Void();
69054 return resultobj;
69055 fail:
69056 return NULL;
69057 }
69058
69059
69060 SWIGINTERN PyObject *_wrap_float_minheap_array_t_nh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69061 PyObject *resultobj = 0;
69062 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69063 void *argp1 = 0 ;
69064 int res1 = 0 ;
69065 PyObject * obj0 = 0 ;
69066 size_t result;
69067
69068 if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_nh_get",&obj0)) SWIG_fail;
69069 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69070 if (!SWIG_IsOK(res1)) {
69071 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_nh_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69072 }
69073 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69074 result = (size_t) ((arg1)->nh);
69075 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
69076 return resultobj;
69077 fail:
69078 return NULL;
69079 }
69080
69081
69082 SWIGINTERN PyObject *_wrap_float_minheap_array_t_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69083 PyObject *resultobj = 0;
69084 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69085 size_t arg2 ;
69086 void *argp1 = 0 ;
69087 int res1 = 0 ;
69088 size_t val2 ;
69089 int ecode2 = 0 ;
69090 PyObject * obj0 = 0 ;
69091 PyObject * obj1 = 0 ;
69092
69093 if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_k_set",&obj0,&obj1)) SWIG_fail;
69094 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69095 if (!SWIG_IsOK(res1)) {
69096 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_k_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69097 }
69098 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69099 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69100 if (!SWIG_IsOK(ecode2)) {
69101 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_k_set" "', argument " "2"" of type '" "size_t""'");
69102 }
69103 arg2 = static_cast< size_t >(val2);
69104 if (arg1) (arg1)->k = arg2;
69105 resultobj = SWIG_Py_Void();
69106 return resultobj;
69107 fail:
69108 return NULL;
69109 }
69110
69111
69112 SWIGINTERN PyObject *_wrap_float_minheap_array_t_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69113 PyObject *resultobj = 0;
69114 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69115 void *argp1 = 0 ;
69116 int res1 = 0 ;
69117 PyObject * obj0 = 0 ;
69118 size_t result;
69119
69120 if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_k_get",&obj0)) SWIG_fail;
69121 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69122 if (!SWIG_IsOK(res1)) {
69123 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_k_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69124 }
69125 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69126 result = (size_t) ((arg1)->k);
69127 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
69128 return resultobj;
69129 fail:
69130 return NULL;
69131 }
69132
69133
69134 SWIGINTERN PyObject *_wrap_float_minheap_array_t_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69135 PyObject *resultobj = 0;
69136 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69137 faiss::HeapArray< faiss::CMin< float,long > >::TI *arg2 = (faiss::HeapArray< faiss::CMin< float,long > >::TI *) 0 ;
69138 void *argp1 = 0 ;
69139 int res1 = 0 ;
69140 void *argp2 = 0 ;
69141 int res2 = 0 ;
69142 PyObject * obj0 = 0 ;
69143 PyObject * obj1 = 0 ;
69144
69145 if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_ids_set",&obj0,&obj1)) SWIG_fail;
69146 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69147 if (!SWIG_IsOK(res1)) {
69148 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_ids_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69149 }
69150 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69151 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
69152 if (!SWIG_IsOK(res2)) {
69153 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_minheap_array_t_ids_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI *""'");
69154 }
69155 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp2);
69156 if (arg1) (arg1)->ids = arg2;
69157 resultobj = SWIG_Py_Void();
69158 return resultobj;
69159 fail:
69160 return NULL;
69161 }
69162
69163
69164 SWIGINTERN PyObject *_wrap_float_minheap_array_t_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69165 PyObject *resultobj = 0;
69166 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69167 void *argp1 = 0 ;
69168 int res1 = 0 ;
69169 PyObject * obj0 = 0 ;
69170 faiss::HeapArray< faiss::CMin< float,long > >::TI *result = 0 ;
69171
69172 if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_ids_get",&obj0)) SWIG_fail;
69173 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69174 if (!SWIG_IsOK(res1)) {
69175 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_ids_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69176 }
69177 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69178 result = (faiss::HeapArray< faiss::CMin< float,long > >::TI *) ((arg1)->ids);
69179 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
69180 return resultobj;
69181 fail:
69182 return NULL;
69183 }
69184
69185
69186 SWIGINTERN PyObject *_wrap_float_minheap_array_t_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69187 PyObject *resultobj = 0;
69188 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69189 faiss::HeapArray< faiss::CMin< float,long > >::T *arg2 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69190 void *argp1 = 0 ;
69191 int res1 = 0 ;
69192 void *argp2 = 0 ;
69193 int res2 = 0 ;
69194 PyObject * obj0 = 0 ;
69195 PyObject * obj1 = 0 ;
69196
69197 if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_val_set",&obj0,&obj1)) SWIG_fail;
69198 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69199 if (!SWIG_IsOK(res1)) {
69200 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_val_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69201 }
69202 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69203 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, SWIG_POINTER_DISOWN | 0 );
69204 if (!SWIG_IsOK(res2)) {
69205 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_minheap_array_t_val_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T *""'");
69206 }
69207 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp2);
69208 if (arg1) (arg1)->val = arg2;
69209 resultobj = SWIG_Py_Void();
69210 return resultobj;
69211 fail:
69212 return NULL;
69213 }
69214
69215
69216 SWIGINTERN PyObject *_wrap_float_minheap_array_t_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69217 PyObject *resultobj = 0;
69218 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69219 void *argp1 = 0 ;
69220 int res1 = 0 ;
69221 PyObject * obj0 = 0 ;
69222 faiss::HeapArray< faiss::CMin< float,long > >::T *result = 0 ;
69223
69224 if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_val_get",&obj0)) SWIG_fail;
69225 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69226 if (!SWIG_IsOK(res1)) {
69227 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_val_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69228 }
69229 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69230 result = (faiss::HeapArray< faiss::CMin< float,long > >::T *) ((arg1)->val);
69231 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
69232 return resultobj;
69233 fail:
69234 return NULL;
69235 }
69236
69237
69238 SWIGINTERN PyObject *_wrap_float_minheap_array_t_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69239 PyObject *resultobj = 0;
69240 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69241 size_t arg2 ;
69242 void *argp1 = 0 ;
69243 int res1 = 0 ;
69244 size_t val2 ;
69245 int ecode2 = 0 ;
69246 PyObject * obj0 = 0 ;
69247 PyObject * obj1 = 0 ;
69248 faiss::HeapArray< faiss::CMin< float,long > >::T *result = 0 ;
69249
69250 if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_get_val",&obj0,&obj1)) SWIG_fail;
69251 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69252 if (!SWIG_IsOK(res1)) {
69253 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_get_val" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69254 }
69255 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69256 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69257 if (!SWIG_IsOK(ecode2)) {
69258 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_get_val" "', argument " "2"" of type '" "size_t""'");
69259 }
69260 arg2 = static_cast< size_t >(val2);
69261 result = (faiss::HeapArray< faiss::CMin< float,long > >::T *)(arg1)->get_val(arg2);
69262 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
69263 return resultobj;
69264 fail:
69265 return NULL;
69266 }
69267
69268
69269 SWIGINTERN PyObject *_wrap_float_minheap_array_t_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69270 PyObject *resultobj = 0;
69271 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69272 size_t arg2 ;
69273 void *argp1 = 0 ;
69274 int res1 = 0 ;
69275 size_t val2 ;
69276 int ecode2 = 0 ;
69277 PyObject * obj0 = 0 ;
69278 PyObject * obj1 = 0 ;
69279 faiss::HeapArray< faiss::CMin< float,long > >::TI *result = 0 ;
69280
69281 if (!PyArg_ParseTuple(args,(char *)"OO:float_minheap_array_t_get_ids",&obj0,&obj1)) SWIG_fail;
69282 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69283 if (!SWIG_IsOK(res1)) {
69284 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_get_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69285 }
69286 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69287 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69288 if (!SWIG_IsOK(ecode2)) {
69289 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_get_ids" "', argument " "2"" of type '" "size_t""'");
69290 }
69291 arg2 = static_cast< size_t >(val2);
69292 result = (faiss::HeapArray< faiss::CMin< float,long > >::TI *)(arg1)->get_ids(arg2);
69293 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
69294 return resultobj;
69295 fail:
69296 return NULL;
69297 }
69298
69299
69300 SWIGINTERN PyObject *_wrap_float_minheap_array_t_heapify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69301 PyObject *resultobj = 0;
69302 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69303 void *argp1 = 0 ;
69304 int res1 = 0 ;
69305 PyObject * obj0 = 0 ;
69306
69307 if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_heapify",&obj0)) SWIG_fail;
69308 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69309 if (!SWIG_IsOK(res1)) {
69310 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_heapify" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69311 }
69312 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69313 (arg1)->heapify();
69314 resultobj = SWIG_Py_Void();
69315 return resultobj;
69316 fail:
69317 return NULL;
69318 }
69319
69320
69321 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69322 PyObject *resultobj = 0;
69323 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69324 size_t arg2 ;
69325 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69326 faiss::HeapArray< faiss::CMin< float,long > >::TI arg4 ;
69327 size_t arg5 ;
69328 long arg6 ;
69329 void *argp1 = 0 ;
69330 int res1 = 0 ;
69331 size_t val2 ;
69332 int ecode2 = 0 ;
69333 void *argp3 = 0 ;
69334 int res3 = 0 ;
69335 long val4 ;
69336 int ecode4 = 0 ;
69337 size_t val5 ;
69338 int ecode5 = 0 ;
69339 long val6 ;
69340 int ecode6 = 0 ;
69341 PyObject * obj0 = 0 ;
69342 PyObject * obj1 = 0 ;
69343 PyObject * obj2 = 0 ;
69344 PyObject * obj3 = 0 ;
69345 PyObject * obj4 = 0 ;
69346 PyObject * obj5 = 0 ;
69347
69348 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:float_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
69349 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69350 if (!SWIG_IsOK(res1)) {
69351 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69352 }
69353 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69354 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69355 if (!SWIG_IsOK(ecode2)) {
69356 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
69357 }
69358 arg2 = static_cast< size_t >(val2);
69359 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69360 if (!SWIG_IsOK(res3)) {
69361 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69362 }
69363 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69364 ecode4 = SWIG_AsVal_long(obj3, &val4);
69365 if (!SWIG_IsOK(ecode4)) {
69366 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI""'");
69367 }
69368 arg4 = static_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI >(val4);
69369 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
69370 if (!SWIG_IsOK(ecode5)) {
69371 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
69372 }
69373 arg5 = static_cast< size_t >(val5);
69374 ecode6 = SWIG_AsVal_long(obj5, &val6);
69375 if (!SWIG_IsOK(ecode6)) {
69376 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_minheap_array_t_addn" "', argument " "6"" of type '" "long""'");
69377 }
69378 arg6 = static_cast< long >(val6);
69379 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,arg4,arg5,arg6);
69380 resultobj = SWIG_Py_Void();
69381 return resultobj;
69382 fail:
69383 return NULL;
69384 }
69385
69386
69387 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69388 PyObject *resultobj = 0;
69389 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69390 size_t arg2 ;
69391 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69392 faiss::HeapArray< faiss::CMin< float,long > >::TI arg4 ;
69393 size_t arg5 ;
69394 void *argp1 = 0 ;
69395 int res1 = 0 ;
69396 size_t val2 ;
69397 int ecode2 = 0 ;
69398 void *argp3 = 0 ;
69399 int res3 = 0 ;
69400 long val4 ;
69401 int ecode4 = 0 ;
69402 size_t val5 ;
69403 int ecode5 = 0 ;
69404 PyObject * obj0 = 0 ;
69405 PyObject * obj1 = 0 ;
69406 PyObject * obj2 = 0 ;
69407 PyObject * obj3 = 0 ;
69408 PyObject * obj4 = 0 ;
69409
69410 if (!PyArg_ParseTuple(args,(char *)"OOOOO:float_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
69411 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69412 if (!SWIG_IsOK(res1)) {
69413 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69414 }
69415 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69416 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69417 if (!SWIG_IsOK(ecode2)) {
69418 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
69419 }
69420 arg2 = static_cast< size_t >(val2);
69421 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69422 if (!SWIG_IsOK(res3)) {
69423 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69424 }
69425 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69426 ecode4 = SWIG_AsVal_long(obj3, &val4);
69427 if (!SWIG_IsOK(ecode4)) {
69428 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI""'");
69429 }
69430 arg4 = static_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI >(val4);
69431 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
69432 if (!SWIG_IsOK(ecode5)) {
69433 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
69434 }
69435 arg5 = static_cast< size_t >(val5);
69436 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,arg4,arg5);
69437 resultobj = SWIG_Py_Void();
69438 return resultobj;
69439 fail:
69440 return NULL;
69441 }
69442
69443
69444 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69445 PyObject *resultobj = 0;
69446 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69447 size_t arg2 ;
69448 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69449 faiss::HeapArray< faiss::CMin< float,long > >::TI arg4 ;
69450 void *argp1 = 0 ;
69451 int res1 = 0 ;
69452 size_t val2 ;
69453 int ecode2 = 0 ;
69454 void *argp3 = 0 ;
69455 int res3 = 0 ;
69456 long val4 ;
69457 int ecode4 = 0 ;
69458 PyObject * obj0 = 0 ;
69459 PyObject * obj1 = 0 ;
69460 PyObject * obj2 = 0 ;
69461 PyObject * obj3 = 0 ;
69462
69463 if (!PyArg_ParseTuple(args,(char *)"OOOO:float_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
69464 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69465 if (!SWIG_IsOK(res1)) {
69466 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69467 }
69468 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69469 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69470 if (!SWIG_IsOK(ecode2)) {
69471 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
69472 }
69473 arg2 = static_cast< size_t >(val2);
69474 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69475 if (!SWIG_IsOK(res3)) {
69476 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69477 }
69478 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69479 ecode4 = SWIG_AsVal_long(obj3, &val4);
69480 if (!SWIG_IsOK(ecode4)) {
69481 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI""'");
69482 }
69483 arg4 = static_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI >(val4);
69484 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,arg4);
69485 resultobj = SWIG_Py_Void();
69486 return resultobj;
69487 fail:
69488 return NULL;
69489 }
69490
69491
69492 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69493 PyObject *resultobj = 0;
69494 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69495 size_t arg2 ;
69496 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69497 void *argp1 = 0 ;
69498 int res1 = 0 ;
69499 size_t val2 ;
69500 int ecode2 = 0 ;
69501 void *argp3 = 0 ;
69502 int res3 = 0 ;
69503 PyObject * obj0 = 0 ;
69504 PyObject * obj1 = 0 ;
69505 PyObject * obj2 = 0 ;
69506
69507 if (!PyArg_ParseTuple(args,(char *)"OOO:float_minheap_array_t_addn",&obj0,&obj1,&obj2)) SWIG_fail;
69508 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69509 if (!SWIG_IsOK(res1)) {
69510 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69511 }
69512 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69513 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69514 if (!SWIG_IsOK(ecode2)) {
69515 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
69516 }
69517 arg2 = static_cast< size_t >(val2);
69518 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69519 if (!SWIG_IsOK(res3)) {
69520 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69521 }
69522 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69523 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3);
69524 resultobj = SWIG_Py_Void();
69525 return resultobj;
69526 fail:
69527 return NULL;
69528 }
69529
69530
69531 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn(PyObject *self, PyObject *args) {
69532 Py_ssize_t argc;
69533 PyObject *argv[7] = {
69534 0
69535 };
69536 Py_ssize_t ii;
69537
69538 if (!PyTuple_Check(args)) SWIG_fail;
69539 argc = args ? PyObject_Length(args) : 0;
69540 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
69541 argv[ii] = PyTuple_GET_ITEM(args,ii);
69542 }
69543 if (argc == 3) {
69544 int _v;
69545 void *vptr = 0;
69546 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
69547 _v = SWIG_CheckState(res);
69548 if (_v) {
69549 {
69550 int res = SWIG_AsVal_size_t(argv[1], NULL);
69551 _v = SWIG_CheckState(res);
69552 }
69553 if (_v) {
69554 void *vptr = 0;
69555 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
69556 _v = SWIG_CheckState(res);
69557 if (_v) {
69558 return _wrap_float_minheap_array_t_addn__SWIG_3(self, args);
69559 }
69560 }
69561 }
69562 }
69563 if (argc == 4) {
69564 int _v;
69565 void *vptr = 0;
69566 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
69567 _v = SWIG_CheckState(res);
69568 if (_v) {
69569 {
69570 int res = SWIG_AsVal_size_t(argv[1], NULL);
69571 _v = SWIG_CheckState(res);
69572 }
69573 if (_v) {
69574 void *vptr = 0;
69575 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
69576 _v = SWIG_CheckState(res);
69577 if (_v) {
69578 {
69579 int res = SWIG_AsVal_long(argv[3], NULL);
69580 _v = SWIG_CheckState(res);
69581 }
69582 if (_v) {
69583 return _wrap_float_minheap_array_t_addn__SWIG_2(self, args);
69584 }
69585 }
69586 }
69587 }
69588 }
69589 if (argc == 5) {
69590 int _v;
69591 void *vptr = 0;
69592 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
69593 _v = SWIG_CheckState(res);
69594 if (_v) {
69595 {
69596 int res = SWIG_AsVal_size_t(argv[1], NULL);
69597 _v = SWIG_CheckState(res);
69598 }
69599 if (_v) {
69600 void *vptr = 0;
69601 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
69602 _v = SWIG_CheckState(res);
69603 if (_v) {
69604 {
69605 int res = SWIG_AsVal_long(argv[3], NULL);
69606 _v = SWIG_CheckState(res);
69607 }
69608 if (_v) {
69609 {
69610 int res = SWIG_AsVal_size_t(argv[4], NULL);
69611 _v = SWIG_CheckState(res);
69612 }
69613 if (_v) {
69614 return _wrap_float_minheap_array_t_addn__SWIG_1(self, args);
69615 }
69616 }
69617 }
69618 }
69619 }
69620 }
69621 if (argc == 6) {
69622 int _v;
69623 void *vptr = 0;
69624 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
69625 _v = SWIG_CheckState(res);
69626 if (_v) {
69627 {
69628 int res = SWIG_AsVal_size_t(argv[1], NULL);
69629 _v = SWIG_CheckState(res);
69630 }
69631 if (_v) {
69632 void *vptr = 0;
69633 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
69634 _v = SWIG_CheckState(res);
69635 if (_v) {
69636 {
69637 int res = SWIG_AsVal_long(argv[3], NULL);
69638 _v = SWIG_CheckState(res);
69639 }
69640 if (_v) {
69641 {
69642 int res = SWIG_AsVal_size_t(argv[4], NULL);
69643 _v = SWIG_CheckState(res);
69644 }
69645 if (_v) {
69646 {
69647 int res = SWIG_AsVal_long(argv[5], NULL);
69648 _v = SWIG_CheckState(res);
69649 }
69650 if (_v) {
69651 return _wrap_float_minheap_array_t_addn__SWIG_0(self, args);
69652 }
69653 }
69654 }
69655 }
69656 }
69657 }
69658 }
69659
69660 fail:
69661 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'float_minheap_array_t_addn'.\n"
69662 " Possible C/C++ prototypes are:\n"
69663 " faiss::HeapArray< faiss::CMin< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI,size_t,long)\n"
69664 " faiss::HeapArray< faiss::CMin< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI,size_t)\n"
69665 " faiss::HeapArray< faiss::CMin< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI)\n"
69666 " faiss::HeapArray< faiss::CMin< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *)\n");
69667 return 0;
69668 }
69669
69670
69671 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69672 PyObject *resultobj = 0;
69673 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69674 size_t arg2 ;
69675 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69676 faiss::HeapArray< faiss::CMin< float,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMin< float,long > >::TI *) 0 ;
69677 long arg5 ;
69678 size_t arg6 ;
69679 long arg7 ;
69680 void *argp1 = 0 ;
69681 int res1 = 0 ;
69682 size_t val2 ;
69683 int ecode2 = 0 ;
69684 void *argp3 = 0 ;
69685 int res3 = 0 ;
69686 void *argp4 = 0 ;
69687 int res4 = 0 ;
69688 long val5 ;
69689 int ecode5 = 0 ;
69690 size_t val6 ;
69691 int ecode6 = 0 ;
69692 long val7 ;
69693 int ecode7 = 0 ;
69694 PyObject * obj0 = 0 ;
69695 PyObject * obj1 = 0 ;
69696 PyObject * obj2 = 0 ;
69697 PyObject * obj3 = 0 ;
69698 PyObject * obj4 = 0 ;
69699 PyObject * obj5 = 0 ;
69700 PyObject * obj6 = 0 ;
69701
69702 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
69703 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69704 if (!SWIG_IsOK(res1)) {
69705 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69706 }
69707 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69708 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69709 if (!SWIG_IsOK(ecode2)) {
69710 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
69711 }
69712 arg2 = static_cast< size_t >(val2);
69713 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69714 if (!SWIG_IsOK(res3)) {
69715 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69716 }
69717 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69718 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
69719 if (!SWIG_IsOK(res4)) {
69720 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI const *""'");
69721 }
69722 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp4);
69723 ecode5 = SWIG_AsVal_long(obj4, &val5);
69724 if (!SWIG_IsOK(ecode5)) {
69725 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
69726 }
69727 arg5 = static_cast< long >(val5);
69728 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
69729 if (!SWIG_IsOK(ecode6)) {
69730 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
69731 }
69732 arg6 = static_cast< size_t >(val6);
69733 ecode7 = SWIG_AsVal_long(obj6, &val7);
69734 if (!SWIG_IsOK(ecode7)) {
69735 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "7"" of type '" "long""'");
69736 }
69737 arg7 = static_cast< long >(val7);
69738 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< float,long > >::TI const *)arg4,arg5,arg6,arg7);
69739 resultobj = SWIG_Py_Void();
69740 return resultobj;
69741 fail:
69742 return NULL;
69743 }
69744
69745
69746 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69747 PyObject *resultobj = 0;
69748 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69749 size_t arg2 ;
69750 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69751 faiss::HeapArray< faiss::CMin< float,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMin< float,long > >::TI *) 0 ;
69752 long arg5 ;
69753 size_t arg6 ;
69754 void *argp1 = 0 ;
69755 int res1 = 0 ;
69756 size_t val2 ;
69757 int ecode2 = 0 ;
69758 void *argp3 = 0 ;
69759 int res3 = 0 ;
69760 void *argp4 = 0 ;
69761 int res4 = 0 ;
69762 long val5 ;
69763 int ecode5 = 0 ;
69764 size_t val6 ;
69765 int ecode6 = 0 ;
69766 PyObject * obj0 = 0 ;
69767 PyObject * obj1 = 0 ;
69768 PyObject * obj2 = 0 ;
69769 PyObject * obj3 = 0 ;
69770 PyObject * obj4 = 0 ;
69771 PyObject * obj5 = 0 ;
69772
69773 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
69774 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69775 if (!SWIG_IsOK(res1)) {
69776 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69777 }
69778 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69779 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69780 if (!SWIG_IsOK(ecode2)) {
69781 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
69782 }
69783 arg2 = static_cast< size_t >(val2);
69784 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69785 if (!SWIG_IsOK(res3)) {
69786 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69787 }
69788 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69789 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
69790 if (!SWIG_IsOK(res4)) {
69791 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI const *""'");
69792 }
69793 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp4);
69794 ecode5 = SWIG_AsVal_long(obj4, &val5);
69795 if (!SWIG_IsOK(ecode5)) {
69796 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
69797 }
69798 arg5 = static_cast< long >(val5);
69799 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
69800 if (!SWIG_IsOK(ecode6)) {
69801 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
69802 }
69803 arg6 = static_cast< size_t >(val6);
69804 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< float,long > >::TI const *)arg4,arg5,arg6);
69805 resultobj = SWIG_Py_Void();
69806 return resultobj;
69807 fail:
69808 return NULL;
69809 }
69810
69811
69812 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69813 PyObject *resultobj = 0;
69814 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69815 size_t arg2 ;
69816 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69817 faiss::HeapArray< faiss::CMin< float,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMin< float,long > >::TI *) 0 ;
69818 long arg5 ;
69819 void *argp1 = 0 ;
69820 int res1 = 0 ;
69821 size_t val2 ;
69822 int ecode2 = 0 ;
69823 void *argp3 = 0 ;
69824 int res3 = 0 ;
69825 void *argp4 = 0 ;
69826 int res4 = 0 ;
69827 long val5 ;
69828 int ecode5 = 0 ;
69829 PyObject * obj0 = 0 ;
69830 PyObject * obj1 = 0 ;
69831 PyObject * obj2 = 0 ;
69832 PyObject * obj3 = 0 ;
69833 PyObject * obj4 = 0 ;
69834
69835 if (!PyArg_ParseTuple(args,(char *)"OOOOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
69836 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69837 if (!SWIG_IsOK(res1)) {
69838 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69839 }
69840 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69841 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69842 if (!SWIG_IsOK(ecode2)) {
69843 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
69844 }
69845 arg2 = static_cast< size_t >(val2);
69846 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69847 if (!SWIG_IsOK(res3)) {
69848 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69849 }
69850 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69851 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
69852 if (!SWIG_IsOK(res4)) {
69853 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI const *""'");
69854 }
69855 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp4);
69856 ecode5 = SWIG_AsVal_long(obj4, &val5);
69857 if (!SWIG_IsOK(ecode5)) {
69858 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
69859 }
69860 arg5 = static_cast< long >(val5);
69861 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< float,long > >::TI const *)arg4,arg5);
69862 resultobj = SWIG_Py_Void();
69863 return resultobj;
69864 fail:
69865 return NULL;
69866 }
69867
69868
69869 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69870 PyObject *resultobj = 0;
69871 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69872 size_t arg2 ;
69873 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69874 faiss::HeapArray< faiss::CMin< float,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMin< float,long > >::TI *) 0 ;
69875 void *argp1 = 0 ;
69876 int res1 = 0 ;
69877 size_t val2 ;
69878 int ecode2 = 0 ;
69879 void *argp3 = 0 ;
69880 int res3 = 0 ;
69881 void *argp4 = 0 ;
69882 int res4 = 0 ;
69883 PyObject * obj0 = 0 ;
69884 PyObject * obj1 = 0 ;
69885 PyObject * obj2 = 0 ;
69886 PyObject * obj3 = 0 ;
69887
69888 if (!PyArg_ParseTuple(args,(char *)"OOOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
69889 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69890 if (!SWIG_IsOK(res1)) {
69891 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69892 }
69893 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69894 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69895 if (!SWIG_IsOK(ecode2)) {
69896 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
69897 }
69898 arg2 = static_cast< size_t >(val2);
69899 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69900 if (!SWIG_IsOK(res3)) {
69901 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69902 }
69903 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69904 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
69905 if (!SWIG_IsOK(res4)) {
69906 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI const *""'");
69907 }
69908 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp4);
69909 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< float,long > >::TI const *)arg4);
69910 resultobj = SWIG_Py_Void();
69911 return resultobj;
69912 fail:
69913 return NULL;
69914 }
69915
69916
69917 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
69918 PyObject *resultobj = 0;
69919 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
69920 size_t arg2 ;
69921 faiss::HeapArray< faiss::CMin< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
69922 void *argp1 = 0 ;
69923 int res1 = 0 ;
69924 size_t val2 ;
69925 int ecode2 = 0 ;
69926 void *argp3 = 0 ;
69927 int res3 = 0 ;
69928 PyObject * obj0 = 0 ;
69929 PyObject * obj1 = 0 ;
69930 PyObject * obj2 = 0 ;
69931
69932 if (!PyArg_ParseTuple(args,(char *)"OOO:float_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
69933 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
69934 if (!SWIG_IsOK(res1)) {
69935 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
69936 }
69937 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
69938 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
69939 if (!SWIG_IsOK(ecode2)) {
69940 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
69941 }
69942 arg2 = static_cast< size_t >(val2);
69943 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
69944 if (!SWIG_IsOK(res3)) {
69945 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T const *""'");
69946 }
69947 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp3);
69948 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< float,long > >::T const *)arg3);
69949 resultobj = SWIG_Py_Void();
69950 return resultobj;
69951 fail:
69952 return NULL;
69953 }
69954
69955
69956 SWIGINTERN PyObject *_wrap_float_minheap_array_t_addn_with_ids(PyObject *self, PyObject *args) {
69957 Py_ssize_t argc;
69958 PyObject *argv[8] = {
69959 0
69960 };
69961 Py_ssize_t ii;
69962
69963 if (!PyTuple_Check(args)) SWIG_fail;
69964 argc = args ? PyObject_Length(args) : 0;
69965 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
69966 argv[ii] = PyTuple_GET_ITEM(args,ii);
69967 }
69968 if (argc == 3) {
69969 int _v;
69970 void *vptr = 0;
69971 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
69972 _v = SWIG_CheckState(res);
69973 if (_v) {
69974 {
69975 int res = SWIG_AsVal_size_t(argv[1], NULL);
69976 _v = SWIG_CheckState(res);
69977 }
69978 if (_v) {
69979 void *vptr = 0;
69980 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
69981 _v = SWIG_CheckState(res);
69982 if (_v) {
69983 return _wrap_float_minheap_array_t_addn_with_ids__SWIG_4(self, args);
69984 }
69985 }
69986 }
69987 }
69988 if (argc == 4) {
69989 int _v;
69990 void *vptr = 0;
69991 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
69992 _v = SWIG_CheckState(res);
69993 if (_v) {
69994 {
69995 int res = SWIG_AsVal_size_t(argv[1], NULL);
69996 _v = SWIG_CheckState(res);
69997 }
69998 if (_v) {
69999 void *vptr = 0;
70000 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
70001 _v = SWIG_CheckState(res);
70002 if (_v) {
70003 void *vptr = 0;
70004 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
70005 _v = SWIG_CheckState(res);
70006 if (_v) {
70007 return _wrap_float_minheap_array_t_addn_with_ids__SWIG_3(self, args);
70008 }
70009 }
70010 }
70011 }
70012 }
70013 if (argc == 5) {
70014 int _v;
70015 void *vptr = 0;
70016 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
70017 _v = SWIG_CheckState(res);
70018 if (_v) {
70019 {
70020 int res = SWIG_AsVal_size_t(argv[1], NULL);
70021 _v = SWIG_CheckState(res);
70022 }
70023 if (_v) {
70024 void *vptr = 0;
70025 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
70026 _v = SWIG_CheckState(res);
70027 if (_v) {
70028 void *vptr = 0;
70029 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
70030 _v = SWIG_CheckState(res);
70031 if (_v) {
70032 {
70033 int res = SWIG_AsVal_long(argv[4], NULL);
70034 _v = SWIG_CheckState(res);
70035 }
70036 if (_v) {
70037 return _wrap_float_minheap_array_t_addn_with_ids__SWIG_2(self, args);
70038 }
70039 }
70040 }
70041 }
70042 }
70043 }
70044 if (argc == 6) {
70045 int _v;
70046 void *vptr = 0;
70047 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
70048 _v = SWIG_CheckState(res);
70049 if (_v) {
70050 {
70051 int res = SWIG_AsVal_size_t(argv[1], NULL);
70052 _v = SWIG_CheckState(res);
70053 }
70054 if (_v) {
70055 void *vptr = 0;
70056 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
70057 _v = SWIG_CheckState(res);
70058 if (_v) {
70059 void *vptr = 0;
70060 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
70061 _v = SWIG_CheckState(res);
70062 if (_v) {
70063 {
70064 int res = SWIG_AsVal_long(argv[4], NULL);
70065 _v = SWIG_CheckState(res);
70066 }
70067 if (_v) {
70068 {
70069 int res = SWIG_AsVal_size_t(argv[5], NULL);
70070 _v = SWIG_CheckState(res);
70071 }
70072 if (_v) {
70073 return _wrap_float_minheap_array_t_addn_with_ids__SWIG_1(self, args);
70074 }
70075 }
70076 }
70077 }
70078 }
70079 }
70080 }
70081 if (argc == 7) {
70082 int _v;
70083 void *vptr = 0;
70084 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0);
70085 _v = SWIG_CheckState(res);
70086 if (_v) {
70087 {
70088 int res = SWIG_AsVal_size_t(argv[1], NULL);
70089 _v = SWIG_CheckState(res);
70090 }
70091 if (_v) {
70092 void *vptr = 0;
70093 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
70094 _v = SWIG_CheckState(res);
70095 if (_v) {
70096 void *vptr = 0;
70097 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
70098 _v = SWIG_CheckState(res);
70099 if (_v) {
70100 {
70101 int res = SWIG_AsVal_long(argv[4], NULL);
70102 _v = SWIG_CheckState(res);
70103 }
70104 if (_v) {
70105 {
70106 int res = SWIG_AsVal_size_t(argv[5], NULL);
70107 _v = SWIG_CheckState(res);
70108 }
70109 if (_v) {
70110 {
70111 int res = SWIG_AsVal_long(argv[6], NULL);
70112 _v = SWIG_CheckState(res);
70113 }
70114 if (_v) {
70115 return _wrap_float_minheap_array_t_addn_with_ids__SWIG_0(self, args);
70116 }
70117 }
70118 }
70119 }
70120 }
70121 }
70122 }
70123 }
70124
70125 fail:
70126 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'float_minheap_array_t_addn_with_ids'.\n"
70127 " Possible C/C++ prototypes are:\n"
70128 " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI const *,long,size_t,long)\n"
70129 " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI const *,long,size_t)\n"
70130 " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI const *,long)\n"
70131 " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *,faiss::HeapArray< faiss::CMin< float,long > >::TI const *)\n"
70132 " faiss::HeapArray< faiss::CMin< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< float,long > >::T const *)\n");
70133 return 0;
70134 }
70135
70136
70137 SWIGINTERN PyObject *_wrap_float_minheap_array_t_reorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70138 PyObject *resultobj = 0;
70139 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
70140 void *argp1 = 0 ;
70141 int res1 = 0 ;
70142 PyObject * obj0 = 0 ;
70143
70144 if (!PyArg_ParseTuple(args,(char *)"O:float_minheap_array_t_reorder",&obj0)) SWIG_fail;
70145 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
70146 if (!SWIG_IsOK(res1)) {
70147 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_reorder" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
70148 }
70149 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
70150 (arg1)->reorder();
70151 resultobj = SWIG_Py_Void();
70152 return resultobj;
70153 fail:
70154 return NULL;
70155 }
70156
70157
70158 SWIGINTERN PyObject *_wrap_float_minheap_array_t_per_line_extrema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70159 PyObject *resultobj = 0;
70160 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
70161 faiss::HeapArray< faiss::CMin< float,long > >::T *arg2 = (faiss::HeapArray< faiss::CMin< float,long > >::T *) 0 ;
70162 faiss::HeapArray< faiss::CMin< float,long > >::TI *arg3 = (faiss::HeapArray< faiss::CMin< float,long > >::TI *) 0 ;
70163 void *argp1 = 0 ;
70164 int res1 = 0 ;
70165 void *argp2 = 0 ;
70166 int res2 = 0 ;
70167 void *argp3 = 0 ;
70168 int res3 = 0 ;
70169 PyObject * obj0 = 0 ;
70170 PyObject * obj1 = 0 ;
70171 PyObject * obj2 = 0 ;
70172
70173 if (!PyArg_ParseTuple(args,(char *)"OOO:float_minheap_array_t_per_line_extrema",&obj0,&obj1,&obj2)) SWIG_fail;
70174 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0 | 0 );
70175 if (!SWIG_IsOK(res1)) {
70176 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_minheap_array_t_per_line_extrema" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > const *""'");
70177 }
70178 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
70179 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
70180 if (!SWIG_IsOK(res2)) {
70181 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_minheap_array_t_per_line_extrema" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::T *""'");
70182 }
70183 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::T * >(argp2);
70184 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
70185 if (!SWIG_IsOK(res3)) {
70186 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_minheap_array_t_per_line_extrema" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< float,long > >::TI *""'");
70187 }
70188 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > >::TI * >(argp3);
70189 ((faiss::HeapArray< faiss::CMin< float,long > > const *)arg1)->per_line_extrema(arg2,arg3);
70190 resultobj = SWIG_Py_Void();
70191 return resultobj;
70192 fail:
70193 return NULL;
70194 }
70195
70196
70197 SWIGINTERN PyObject *_wrap_new_float_minheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70198 PyObject *resultobj = 0;
70199 faiss::HeapArray< faiss::CMin< float,long > > *result = 0 ;
70200
70201 if (!PyArg_ParseTuple(args,(char *)":new_float_minheap_array_t")) SWIG_fail;
70202 result = (faiss::HeapArray< faiss::CMin< float,long > > *)new faiss::HeapArray< faiss::CMin< float,long > >();
70203 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, SWIG_POINTER_NEW | 0 );
70204 return resultobj;
70205 fail:
70206 return NULL;
70207 }
70208
70209
70210 SWIGINTERN PyObject *_wrap_delete_float_minheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70211 PyObject *resultobj = 0;
70212 faiss::HeapArray< faiss::CMin< float,long > > *arg1 = (faiss::HeapArray< faiss::CMin< float,long > > *) 0 ;
70213 void *argp1 = 0 ;
70214 int res1 = 0 ;
70215 PyObject * obj0 = 0 ;
70216
70217 if (!PyArg_ParseTuple(args,(char *)"O:delete_float_minheap_array_t",&obj0)) SWIG_fail;
70218 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, SWIG_POINTER_DISOWN | 0 );
70219 if (!SWIG_IsOK(res1)) {
70220 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_float_minheap_array_t" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< float,long > > *""'");
70221 }
70222 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< float,long > > * >(argp1);
70223 delete arg1;
70224 resultobj = SWIG_Py_Void();
70225 return resultobj;
70226 fail:
70227 return NULL;
70228 }
70229
70230
70231 SWIGINTERN PyObject *float_minheap_array_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70232 PyObject *obj;
70233 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
70234 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, SWIG_NewClientData(obj));
70235 return SWIG_Py_Void();
70236 }
70237
70238 SWIGINTERN PyObject *_wrap_int_minheap_array_t_nh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70239 PyObject *resultobj = 0;
70240 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70241 size_t arg2 ;
70242 void *argp1 = 0 ;
70243 int res1 = 0 ;
70244 size_t val2 ;
70245 int ecode2 = 0 ;
70246 PyObject * obj0 = 0 ;
70247 PyObject * obj1 = 0 ;
70248
70249 if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_nh_set",&obj0,&obj1)) SWIG_fail;
70250 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70251 if (!SWIG_IsOK(res1)) {
70252 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_nh_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70253 }
70254 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70255 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70256 if (!SWIG_IsOK(ecode2)) {
70257 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_nh_set" "', argument " "2"" of type '" "size_t""'");
70258 }
70259 arg2 = static_cast< size_t >(val2);
70260 if (arg1) (arg1)->nh = arg2;
70261 resultobj = SWIG_Py_Void();
70262 return resultobj;
70263 fail:
70264 return NULL;
70265 }
70266
70267
70268 SWIGINTERN PyObject *_wrap_int_minheap_array_t_nh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70269 PyObject *resultobj = 0;
70270 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70271 void *argp1 = 0 ;
70272 int res1 = 0 ;
70273 PyObject * obj0 = 0 ;
70274 size_t result;
70275
70276 if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_nh_get",&obj0)) SWIG_fail;
70277 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70278 if (!SWIG_IsOK(res1)) {
70279 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_nh_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70280 }
70281 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70282 result = (size_t) ((arg1)->nh);
70283 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
70284 return resultobj;
70285 fail:
70286 return NULL;
70287 }
70288
70289
70290 SWIGINTERN PyObject *_wrap_int_minheap_array_t_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70291 PyObject *resultobj = 0;
70292 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70293 size_t arg2 ;
70294 void *argp1 = 0 ;
70295 int res1 = 0 ;
70296 size_t val2 ;
70297 int ecode2 = 0 ;
70298 PyObject * obj0 = 0 ;
70299 PyObject * obj1 = 0 ;
70300
70301 if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_k_set",&obj0,&obj1)) SWIG_fail;
70302 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70303 if (!SWIG_IsOK(res1)) {
70304 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_k_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70305 }
70306 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70307 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70308 if (!SWIG_IsOK(ecode2)) {
70309 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_k_set" "', argument " "2"" of type '" "size_t""'");
70310 }
70311 arg2 = static_cast< size_t >(val2);
70312 if (arg1) (arg1)->k = arg2;
70313 resultobj = SWIG_Py_Void();
70314 return resultobj;
70315 fail:
70316 return NULL;
70317 }
70318
70319
70320 SWIGINTERN PyObject *_wrap_int_minheap_array_t_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70321 PyObject *resultobj = 0;
70322 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70323 void *argp1 = 0 ;
70324 int res1 = 0 ;
70325 PyObject * obj0 = 0 ;
70326 size_t result;
70327
70328 if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_k_get",&obj0)) SWIG_fail;
70329 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70330 if (!SWIG_IsOK(res1)) {
70331 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_k_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70332 }
70333 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70334 result = (size_t) ((arg1)->k);
70335 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
70336 return resultobj;
70337 fail:
70338 return NULL;
70339 }
70340
70341
70342 SWIGINTERN PyObject *_wrap_int_minheap_array_t_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70343 PyObject *resultobj = 0;
70344 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70345 faiss::HeapArray< faiss::CMin< int,long > >::TI *arg2 = (faiss::HeapArray< faiss::CMin< int,long > >::TI *) 0 ;
70346 void *argp1 = 0 ;
70347 int res1 = 0 ;
70348 void *argp2 = 0 ;
70349 int res2 = 0 ;
70350 PyObject * obj0 = 0 ;
70351 PyObject * obj1 = 0 ;
70352
70353 if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_ids_set",&obj0,&obj1)) SWIG_fail;
70354 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70355 if (!SWIG_IsOK(res1)) {
70356 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_ids_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70357 }
70358 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70359 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
70360 if (!SWIG_IsOK(res2)) {
70361 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_minheap_array_t_ids_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI *""'");
70362 }
70363 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp2);
70364 if (arg1) (arg1)->ids = arg2;
70365 resultobj = SWIG_Py_Void();
70366 return resultobj;
70367 fail:
70368 return NULL;
70369 }
70370
70371
70372 SWIGINTERN PyObject *_wrap_int_minheap_array_t_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70373 PyObject *resultobj = 0;
70374 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70375 void *argp1 = 0 ;
70376 int res1 = 0 ;
70377 PyObject * obj0 = 0 ;
70378 faiss::HeapArray< faiss::CMin< int,long > >::TI *result = 0 ;
70379
70380 if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_ids_get",&obj0)) SWIG_fail;
70381 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70382 if (!SWIG_IsOK(res1)) {
70383 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_ids_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70384 }
70385 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70386 result = (faiss::HeapArray< faiss::CMin< int,long > >::TI *) ((arg1)->ids);
70387 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
70388 return resultobj;
70389 fail:
70390 return NULL;
70391 }
70392
70393
70394 SWIGINTERN PyObject *_wrap_int_minheap_array_t_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70395 PyObject *resultobj = 0;
70396 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70397 faiss::HeapArray< faiss::CMin< int,long > >::T *arg2 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
70398 void *argp1 = 0 ;
70399 int res1 = 0 ;
70400 void *argp2 = 0 ;
70401 int res2 = 0 ;
70402 PyObject * obj0 = 0 ;
70403 PyObject * obj1 = 0 ;
70404
70405 if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_val_set",&obj0,&obj1)) SWIG_fail;
70406 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70407 if (!SWIG_IsOK(res1)) {
70408 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_val_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70409 }
70410 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70411 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, SWIG_POINTER_DISOWN | 0 );
70412 if (!SWIG_IsOK(res2)) {
70413 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_minheap_array_t_val_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T *""'");
70414 }
70415 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp2);
70416 if (arg1) (arg1)->val = arg2;
70417 resultobj = SWIG_Py_Void();
70418 return resultobj;
70419 fail:
70420 return NULL;
70421 }
70422
70423
70424 SWIGINTERN PyObject *_wrap_int_minheap_array_t_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70425 PyObject *resultobj = 0;
70426 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70427 void *argp1 = 0 ;
70428 int res1 = 0 ;
70429 PyObject * obj0 = 0 ;
70430 faiss::HeapArray< faiss::CMin< int,long > >::T *result = 0 ;
70431
70432 if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_val_get",&obj0)) SWIG_fail;
70433 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70434 if (!SWIG_IsOK(res1)) {
70435 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_val_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70436 }
70437 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70438 result = (faiss::HeapArray< faiss::CMin< int,long > >::T *) ((arg1)->val);
70439 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
70440 return resultobj;
70441 fail:
70442 return NULL;
70443 }
70444
70445
70446 SWIGINTERN PyObject *_wrap_int_minheap_array_t_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70447 PyObject *resultobj = 0;
70448 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70449 size_t arg2 ;
70450 void *argp1 = 0 ;
70451 int res1 = 0 ;
70452 size_t val2 ;
70453 int ecode2 = 0 ;
70454 PyObject * obj0 = 0 ;
70455 PyObject * obj1 = 0 ;
70456 faiss::HeapArray< faiss::CMin< int,long > >::T *result = 0 ;
70457
70458 if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_get_val",&obj0,&obj1)) SWIG_fail;
70459 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70460 if (!SWIG_IsOK(res1)) {
70461 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_get_val" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70462 }
70463 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70464 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70465 if (!SWIG_IsOK(ecode2)) {
70466 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_get_val" "', argument " "2"" of type '" "size_t""'");
70467 }
70468 arg2 = static_cast< size_t >(val2);
70469 result = (faiss::HeapArray< faiss::CMin< int,long > >::T *)(arg1)->get_val(arg2);
70470 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
70471 return resultobj;
70472 fail:
70473 return NULL;
70474 }
70475
70476
70477 SWIGINTERN PyObject *_wrap_int_minheap_array_t_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70478 PyObject *resultobj = 0;
70479 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70480 size_t arg2 ;
70481 void *argp1 = 0 ;
70482 int res1 = 0 ;
70483 size_t val2 ;
70484 int ecode2 = 0 ;
70485 PyObject * obj0 = 0 ;
70486 PyObject * obj1 = 0 ;
70487 faiss::HeapArray< faiss::CMin< int,long > >::TI *result = 0 ;
70488
70489 if (!PyArg_ParseTuple(args,(char *)"OO:int_minheap_array_t_get_ids",&obj0,&obj1)) SWIG_fail;
70490 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70491 if (!SWIG_IsOK(res1)) {
70492 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_get_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70493 }
70494 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70495 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70496 if (!SWIG_IsOK(ecode2)) {
70497 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_get_ids" "', argument " "2"" of type '" "size_t""'");
70498 }
70499 arg2 = static_cast< size_t >(val2);
70500 result = (faiss::HeapArray< faiss::CMin< int,long > >::TI *)(arg1)->get_ids(arg2);
70501 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
70502 return resultobj;
70503 fail:
70504 return NULL;
70505 }
70506
70507
70508 SWIGINTERN PyObject *_wrap_int_minheap_array_t_heapify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70509 PyObject *resultobj = 0;
70510 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70511 void *argp1 = 0 ;
70512 int res1 = 0 ;
70513 PyObject * obj0 = 0 ;
70514
70515 if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_heapify",&obj0)) SWIG_fail;
70516 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70517 if (!SWIG_IsOK(res1)) {
70518 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_heapify" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70519 }
70520 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70521 (arg1)->heapify();
70522 resultobj = SWIG_Py_Void();
70523 return resultobj;
70524 fail:
70525 return NULL;
70526 }
70527
70528
70529 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70530 PyObject *resultobj = 0;
70531 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70532 size_t arg2 ;
70533 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
70534 faiss::HeapArray< faiss::CMin< int,long > >::TI arg4 ;
70535 size_t arg5 ;
70536 long arg6 ;
70537 void *argp1 = 0 ;
70538 int res1 = 0 ;
70539 size_t val2 ;
70540 int ecode2 = 0 ;
70541 void *argp3 = 0 ;
70542 int res3 = 0 ;
70543 long val4 ;
70544 int ecode4 = 0 ;
70545 size_t val5 ;
70546 int ecode5 = 0 ;
70547 long val6 ;
70548 int ecode6 = 0 ;
70549 PyObject * obj0 = 0 ;
70550 PyObject * obj1 = 0 ;
70551 PyObject * obj2 = 0 ;
70552 PyObject * obj3 = 0 ;
70553 PyObject * obj4 = 0 ;
70554 PyObject * obj5 = 0 ;
70555
70556 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:int_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
70557 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70558 if (!SWIG_IsOK(res1)) {
70559 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70560 }
70561 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70562 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70563 if (!SWIG_IsOK(ecode2)) {
70564 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
70565 }
70566 arg2 = static_cast< size_t >(val2);
70567 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
70568 if (!SWIG_IsOK(res3)) {
70569 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
70570 }
70571 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
70572 ecode4 = SWIG_AsVal_long(obj3, &val4);
70573 if (!SWIG_IsOK(ecode4)) {
70574 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI""'");
70575 }
70576 arg4 = static_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI >(val4);
70577 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
70578 if (!SWIG_IsOK(ecode5)) {
70579 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
70580 }
70581 arg5 = static_cast< size_t >(val5);
70582 ecode6 = SWIG_AsVal_long(obj5, &val6);
70583 if (!SWIG_IsOK(ecode6)) {
70584 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_minheap_array_t_addn" "', argument " "6"" of type '" "long""'");
70585 }
70586 arg6 = static_cast< long >(val6);
70587 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,arg4,arg5,arg6);
70588 resultobj = SWIG_Py_Void();
70589 return resultobj;
70590 fail:
70591 return NULL;
70592 }
70593
70594
70595 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70596 PyObject *resultobj = 0;
70597 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70598 size_t arg2 ;
70599 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
70600 faiss::HeapArray< faiss::CMin< int,long > >::TI arg4 ;
70601 size_t arg5 ;
70602 void *argp1 = 0 ;
70603 int res1 = 0 ;
70604 size_t val2 ;
70605 int ecode2 = 0 ;
70606 void *argp3 = 0 ;
70607 int res3 = 0 ;
70608 long val4 ;
70609 int ecode4 = 0 ;
70610 size_t val5 ;
70611 int ecode5 = 0 ;
70612 PyObject * obj0 = 0 ;
70613 PyObject * obj1 = 0 ;
70614 PyObject * obj2 = 0 ;
70615 PyObject * obj3 = 0 ;
70616 PyObject * obj4 = 0 ;
70617
70618 if (!PyArg_ParseTuple(args,(char *)"OOOOO:int_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
70619 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70620 if (!SWIG_IsOK(res1)) {
70621 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70622 }
70623 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70624 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70625 if (!SWIG_IsOK(ecode2)) {
70626 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
70627 }
70628 arg2 = static_cast< size_t >(val2);
70629 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
70630 if (!SWIG_IsOK(res3)) {
70631 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
70632 }
70633 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
70634 ecode4 = SWIG_AsVal_long(obj3, &val4);
70635 if (!SWIG_IsOK(ecode4)) {
70636 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI""'");
70637 }
70638 arg4 = static_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI >(val4);
70639 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
70640 if (!SWIG_IsOK(ecode5)) {
70641 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
70642 }
70643 arg5 = static_cast< size_t >(val5);
70644 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,arg4,arg5);
70645 resultobj = SWIG_Py_Void();
70646 return resultobj;
70647 fail:
70648 return NULL;
70649 }
70650
70651
70652 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70653 PyObject *resultobj = 0;
70654 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70655 size_t arg2 ;
70656 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
70657 faiss::HeapArray< faiss::CMin< int,long > >::TI arg4 ;
70658 void *argp1 = 0 ;
70659 int res1 = 0 ;
70660 size_t val2 ;
70661 int ecode2 = 0 ;
70662 void *argp3 = 0 ;
70663 int res3 = 0 ;
70664 long val4 ;
70665 int ecode4 = 0 ;
70666 PyObject * obj0 = 0 ;
70667 PyObject * obj1 = 0 ;
70668 PyObject * obj2 = 0 ;
70669 PyObject * obj3 = 0 ;
70670
70671 if (!PyArg_ParseTuple(args,(char *)"OOOO:int_minheap_array_t_addn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
70672 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70673 if (!SWIG_IsOK(res1)) {
70674 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70675 }
70676 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70677 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70678 if (!SWIG_IsOK(ecode2)) {
70679 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
70680 }
70681 arg2 = static_cast< size_t >(val2);
70682 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
70683 if (!SWIG_IsOK(res3)) {
70684 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
70685 }
70686 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
70687 ecode4 = SWIG_AsVal_long(obj3, &val4);
70688 if (!SWIG_IsOK(ecode4)) {
70689 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_minheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI""'");
70690 }
70691 arg4 = static_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI >(val4);
70692 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,arg4);
70693 resultobj = SWIG_Py_Void();
70694 return resultobj;
70695 fail:
70696 return NULL;
70697 }
70698
70699
70700 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70701 PyObject *resultobj = 0;
70702 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70703 size_t arg2 ;
70704 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
70705 void *argp1 = 0 ;
70706 int res1 = 0 ;
70707 size_t val2 ;
70708 int ecode2 = 0 ;
70709 void *argp3 = 0 ;
70710 int res3 = 0 ;
70711 PyObject * obj0 = 0 ;
70712 PyObject * obj1 = 0 ;
70713 PyObject * obj2 = 0 ;
70714
70715 if (!PyArg_ParseTuple(args,(char *)"OOO:int_minheap_array_t_addn",&obj0,&obj1,&obj2)) SWIG_fail;
70716 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70717 if (!SWIG_IsOK(res1)) {
70718 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70719 }
70720 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70721 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70722 if (!SWIG_IsOK(ecode2)) {
70723 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
70724 }
70725 arg2 = static_cast< size_t >(val2);
70726 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
70727 if (!SWIG_IsOK(res3)) {
70728 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
70729 }
70730 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
70731 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3);
70732 resultobj = SWIG_Py_Void();
70733 return resultobj;
70734 fail:
70735 return NULL;
70736 }
70737
70738
70739 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn(PyObject *self, PyObject *args) {
70740 Py_ssize_t argc;
70741 PyObject *argv[7] = {
70742 0
70743 };
70744 Py_ssize_t ii;
70745
70746 if (!PyTuple_Check(args)) SWIG_fail;
70747 argc = args ? PyObject_Length(args) : 0;
70748 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
70749 argv[ii] = PyTuple_GET_ITEM(args,ii);
70750 }
70751 if (argc == 3) {
70752 int _v;
70753 void *vptr = 0;
70754 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
70755 _v = SWIG_CheckState(res);
70756 if (_v) {
70757 {
70758 int res = SWIG_AsVal_size_t(argv[1], NULL);
70759 _v = SWIG_CheckState(res);
70760 }
70761 if (_v) {
70762 void *vptr = 0;
70763 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
70764 _v = SWIG_CheckState(res);
70765 if (_v) {
70766 return _wrap_int_minheap_array_t_addn__SWIG_3(self, args);
70767 }
70768 }
70769 }
70770 }
70771 if (argc == 4) {
70772 int _v;
70773 void *vptr = 0;
70774 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
70775 _v = SWIG_CheckState(res);
70776 if (_v) {
70777 {
70778 int res = SWIG_AsVal_size_t(argv[1], NULL);
70779 _v = SWIG_CheckState(res);
70780 }
70781 if (_v) {
70782 void *vptr = 0;
70783 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
70784 _v = SWIG_CheckState(res);
70785 if (_v) {
70786 {
70787 int res = SWIG_AsVal_long(argv[3], NULL);
70788 _v = SWIG_CheckState(res);
70789 }
70790 if (_v) {
70791 return _wrap_int_minheap_array_t_addn__SWIG_2(self, args);
70792 }
70793 }
70794 }
70795 }
70796 }
70797 if (argc == 5) {
70798 int _v;
70799 void *vptr = 0;
70800 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
70801 _v = SWIG_CheckState(res);
70802 if (_v) {
70803 {
70804 int res = SWIG_AsVal_size_t(argv[1], NULL);
70805 _v = SWIG_CheckState(res);
70806 }
70807 if (_v) {
70808 void *vptr = 0;
70809 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
70810 _v = SWIG_CheckState(res);
70811 if (_v) {
70812 {
70813 int res = SWIG_AsVal_long(argv[3], NULL);
70814 _v = SWIG_CheckState(res);
70815 }
70816 if (_v) {
70817 {
70818 int res = SWIG_AsVal_size_t(argv[4], NULL);
70819 _v = SWIG_CheckState(res);
70820 }
70821 if (_v) {
70822 return _wrap_int_minheap_array_t_addn__SWIG_1(self, args);
70823 }
70824 }
70825 }
70826 }
70827 }
70828 }
70829 if (argc == 6) {
70830 int _v;
70831 void *vptr = 0;
70832 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
70833 _v = SWIG_CheckState(res);
70834 if (_v) {
70835 {
70836 int res = SWIG_AsVal_size_t(argv[1], NULL);
70837 _v = SWIG_CheckState(res);
70838 }
70839 if (_v) {
70840 void *vptr = 0;
70841 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
70842 _v = SWIG_CheckState(res);
70843 if (_v) {
70844 {
70845 int res = SWIG_AsVal_long(argv[3], NULL);
70846 _v = SWIG_CheckState(res);
70847 }
70848 if (_v) {
70849 {
70850 int res = SWIG_AsVal_size_t(argv[4], NULL);
70851 _v = SWIG_CheckState(res);
70852 }
70853 if (_v) {
70854 {
70855 int res = SWIG_AsVal_long(argv[5], NULL);
70856 _v = SWIG_CheckState(res);
70857 }
70858 if (_v) {
70859 return _wrap_int_minheap_array_t_addn__SWIG_0(self, args);
70860 }
70861 }
70862 }
70863 }
70864 }
70865 }
70866 }
70867
70868 fail:
70869 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'int_minheap_array_t_addn'.\n"
70870 " Possible C/C++ prototypes are:\n"
70871 " faiss::HeapArray< faiss::CMin< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI,size_t,long)\n"
70872 " faiss::HeapArray< faiss::CMin< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI,size_t)\n"
70873 " faiss::HeapArray< faiss::CMin< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI)\n"
70874 " faiss::HeapArray< faiss::CMin< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *)\n");
70875 return 0;
70876 }
70877
70878
70879 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70880 PyObject *resultobj = 0;
70881 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70882 size_t arg2 ;
70883 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
70884 faiss::HeapArray< faiss::CMin< int,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMin< int,long > >::TI *) 0 ;
70885 long arg5 ;
70886 size_t arg6 ;
70887 long arg7 ;
70888 void *argp1 = 0 ;
70889 int res1 = 0 ;
70890 size_t val2 ;
70891 int ecode2 = 0 ;
70892 void *argp3 = 0 ;
70893 int res3 = 0 ;
70894 void *argp4 = 0 ;
70895 int res4 = 0 ;
70896 long val5 ;
70897 int ecode5 = 0 ;
70898 size_t val6 ;
70899 int ecode6 = 0 ;
70900 long val7 ;
70901 int ecode7 = 0 ;
70902 PyObject * obj0 = 0 ;
70903 PyObject * obj1 = 0 ;
70904 PyObject * obj2 = 0 ;
70905 PyObject * obj3 = 0 ;
70906 PyObject * obj4 = 0 ;
70907 PyObject * obj5 = 0 ;
70908 PyObject * obj6 = 0 ;
70909
70910 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
70911 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70912 if (!SWIG_IsOK(res1)) {
70913 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70914 }
70915 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70916 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70917 if (!SWIG_IsOK(ecode2)) {
70918 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
70919 }
70920 arg2 = static_cast< size_t >(val2);
70921 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
70922 if (!SWIG_IsOK(res3)) {
70923 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
70924 }
70925 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
70926 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
70927 if (!SWIG_IsOK(res4)) {
70928 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI const *""'");
70929 }
70930 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp4);
70931 ecode5 = SWIG_AsVal_long(obj4, &val5);
70932 if (!SWIG_IsOK(ecode5)) {
70933 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
70934 }
70935 arg5 = static_cast< long >(val5);
70936 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
70937 if (!SWIG_IsOK(ecode6)) {
70938 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
70939 }
70940 arg6 = static_cast< size_t >(val6);
70941 ecode7 = SWIG_AsVal_long(obj6, &val7);
70942 if (!SWIG_IsOK(ecode7)) {
70943 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "7"" of type '" "long""'");
70944 }
70945 arg7 = static_cast< long >(val7);
70946 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< int,long > >::TI const *)arg4,arg5,arg6,arg7);
70947 resultobj = SWIG_Py_Void();
70948 return resultobj;
70949 fail:
70950 return NULL;
70951 }
70952
70953
70954 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
70955 PyObject *resultobj = 0;
70956 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
70957 size_t arg2 ;
70958 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
70959 faiss::HeapArray< faiss::CMin< int,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMin< int,long > >::TI *) 0 ;
70960 long arg5 ;
70961 size_t arg6 ;
70962 void *argp1 = 0 ;
70963 int res1 = 0 ;
70964 size_t val2 ;
70965 int ecode2 = 0 ;
70966 void *argp3 = 0 ;
70967 int res3 = 0 ;
70968 void *argp4 = 0 ;
70969 int res4 = 0 ;
70970 long val5 ;
70971 int ecode5 = 0 ;
70972 size_t val6 ;
70973 int ecode6 = 0 ;
70974 PyObject * obj0 = 0 ;
70975 PyObject * obj1 = 0 ;
70976 PyObject * obj2 = 0 ;
70977 PyObject * obj3 = 0 ;
70978 PyObject * obj4 = 0 ;
70979 PyObject * obj5 = 0 ;
70980
70981 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
70982 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
70983 if (!SWIG_IsOK(res1)) {
70984 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
70985 }
70986 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
70987 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
70988 if (!SWIG_IsOK(ecode2)) {
70989 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
70990 }
70991 arg2 = static_cast< size_t >(val2);
70992 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
70993 if (!SWIG_IsOK(res3)) {
70994 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
70995 }
70996 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
70997 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
70998 if (!SWIG_IsOK(res4)) {
70999 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI const *""'");
71000 }
71001 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp4);
71002 ecode5 = SWIG_AsVal_long(obj4, &val5);
71003 if (!SWIG_IsOK(ecode5)) {
71004 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
71005 }
71006 arg5 = static_cast< long >(val5);
71007 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
71008 if (!SWIG_IsOK(ecode6)) {
71009 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
71010 }
71011 arg6 = static_cast< size_t >(val6);
71012 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< int,long > >::TI const *)arg4,arg5,arg6);
71013 resultobj = SWIG_Py_Void();
71014 return resultobj;
71015 fail:
71016 return NULL;
71017 }
71018
71019
71020 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71021 PyObject *resultobj = 0;
71022 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
71023 size_t arg2 ;
71024 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
71025 faiss::HeapArray< faiss::CMin< int,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMin< int,long > >::TI *) 0 ;
71026 long arg5 ;
71027 void *argp1 = 0 ;
71028 int res1 = 0 ;
71029 size_t val2 ;
71030 int ecode2 = 0 ;
71031 void *argp3 = 0 ;
71032 int res3 = 0 ;
71033 void *argp4 = 0 ;
71034 int res4 = 0 ;
71035 long val5 ;
71036 int ecode5 = 0 ;
71037 PyObject * obj0 = 0 ;
71038 PyObject * obj1 = 0 ;
71039 PyObject * obj2 = 0 ;
71040 PyObject * obj3 = 0 ;
71041 PyObject * obj4 = 0 ;
71042
71043 if (!PyArg_ParseTuple(args,(char *)"OOOOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
71044 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
71045 if (!SWIG_IsOK(res1)) {
71046 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
71047 }
71048 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
71049 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71050 if (!SWIG_IsOK(ecode2)) {
71051 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
71052 }
71053 arg2 = static_cast< size_t >(val2);
71054 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
71055 if (!SWIG_IsOK(res3)) {
71056 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
71057 }
71058 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
71059 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
71060 if (!SWIG_IsOK(res4)) {
71061 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI const *""'");
71062 }
71063 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp4);
71064 ecode5 = SWIG_AsVal_long(obj4, &val5);
71065 if (!SWIG_IsOK(ecode5)) {
71066 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
71067 }
71068 arg5 = static_cast< long >(val5);
71069 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< int,long > >::TI const *)arg4,arg5);
71070 resultobj = SWIG_Py_Void();
71071 return resultobj;
71072 fail:
71073 return NULL;
71074 }
71075
71076
71077 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71078 PyObject *resultobj = 0;
71079 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
71080 size_t arg2 ;
71081 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
71082 faiss::HeapArray< faiss::CMin< int,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMin< int,long > >::TI *) 0 ;
71083 void *argp1 = 0 ;
71084 int res1 = 0 ;
71085 size_t val2 ;
71086 int ecode2 = 0 ;
71087 void *argp3 = 0 ;
71088 int res3 = 0 ;
71089 void *argp4 = 0 ;
71090 int res4 = 0 ;
71091 PyObject * obj0 = 0 ;
71092 PyObject * obj1 = 0 ;
71093 PyObject * obj2 = 0 ;
71094 PyObject * obj3 = 0 ;
71095
71096 if (!PyArg_ParseTuple(args,(char *)"OOOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
71097 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
71098 if (!SWIG_IsOK(res1)) {
71099 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
71100 }
71101 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
71102 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71103 if (!SWIG_IsOK(ecode2)) {
71104 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
71105 }
71106 arg2 = static_cast< size_t >(val2);
71107 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
71108 if (!SWIG_IsOK(res3)) {
71109 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
71110 }
71111 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
71112 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
71113 if (!SWIG_IsOK(res4)) {
71114 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI const *""'");
71115 }
71116 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp4);
71117 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMin< int,long > >::TI const *)arg4);
71118 resultobj = SWIG_Py_Void();
71119 return resultobj;
71120 fail:
71121 return NULL;
71122 }
71123
71124
71125 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71126 PyObject *resultobj = 0;
71127 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
71128 size_t arg2 ;
71129 faiss::HeapArray< faiss::CMin< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
71130 void *argp1 = 0 ;
71131 int res1 = 0 ;
71132 size_t val2 ;
71133 int ecode2 = 0 ;
71134 void *argp3 = 0 ;
71135 int res3 = 0 ;
71136 PyObject * obj0 = 0 ;
71137 PyObject * obj1 = 0 ;
71138 PyObject * obj2 = 0 ;
71139
71140 if (!PyArg_ParseTuple(args,(char *)"OOO:int_minheap_array_t_addn_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
71141 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
71142 if (!SWIG_IsOK(res1)) {
71143 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
71144 }
71145 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
71146 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71147 if (!SWIG_IsOK(ecode2)) {
71148 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
71149 }
71150 arg2 = static_cast< size_t >(val2);
71151 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
71152 if (!SWIG_IsOK(res3)) {
71153 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T const *""'");
71154 }
71155 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp3);
71156 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMin< int,long > >::T const *)arg3);
71157 resultobj = SWIG_Py_Void();
71158 return resultobj;
71159 fail:
71160 return NULL;
71161 }
71162
71163
71164 SWIGINTERN PyObject *_wrap_int_minheap_array_t_addn_with_ids(PyObject *self, PyObject *args) {
71165 Py_ssize_t argc;
71166 PyObject *argv[8] = {
71167 0
71168 };
71169 Py_ssize_t ii;
71170
71171 if (!PyTuple_Check(args)) SWIG_fail;
71172 argc = args ? PyObject_Length(args) : 0;
71173 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
71174 argv[ii] = PyTuple_GET_ITEM(args,ii);
71175 }
71176 if (argc == 3) {
71177 int _v;
71178 void *vptr = 0;
71179 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
71180 _v = SWIG_CheckState(res);
71181 if (_v) {
71182 {
71183 int res = SWIG_AsVal_size_t(argv[1], NULL);
71184 _v = SWIG_CheckState(res);
71185 }
71186 if (_v) {
71187 void *vptr = 0;
71188 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
71189 _v = SWIG_CheckState(res);
71190 if (_v) {
71191 return _wrap_int_minheap_array_t_addn_with_ids__SWIG_4(self, args);
71192 }
71193 }
71194 }
71195 }
71196 if (argc == 4) {
71197 int _v;
71198 void *vptr = 0;
71199 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
71200 _v = SWIG_CheckState(res);
71201 if (_v) {
71202 {
71203 int res = SWIG_AsVal_size_t(argv[1], NULL);
71204 _v = SWIG_CheckState(res);
71205 }
71206 if (_v) {
71207 void *vptr = 0;
71208 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
71209 _v = SWIG_CheckState(res);
71210 if (_v) {
71211 void *vptr = 0;
71212 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
71213 _v = SWIG_CheckState(res);
71214 if (_v) {
71215 return _wrap_int_minheap_array_t_addn_with_ids__SWIG_3(self, args);
71216 }
71217 }
71218 }
71219 }
71220 }
71221 if (argc == 5) {
71222 int _v;
71223 void *vptr = 0;
71224 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
71225 _v = SWIG_CheckState(res);
71226 if (_v) {
71227 {
71228 int res = SWIG_AsVal_size_t(argv[1], NULL);
71229 _v = SWIG_CheckState(res);
71230 }
71231 if (_v) {
71232 void *vptr = 0;
71233 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
71234 _v = SWIG_CheckState(res);
71235 if (_v) {
71236 void *vptr = 0;
71237 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
71238 _v = SWIG_CheckState(res);
71239 if (_v) {
71240 {
71241 int res = SWIG_AsVal_long(argv[4], NULL);
71242 _v = SWIG_CheckState(res);
71243 }
71244 if (_v) {
71245 return _wrap_int_minheap_array_t_addn_with_ids__SWIG_2(self, args);
71246 }
71247 }
71248 }
71249 }
71250 }
71251 }
71252 if (argc == 6) {
71253 int _v;
71254 void *vptr = 0;
71255 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
71256 _v = SWIG_CheckState(res);
71257 if (_v) {
71258 {
71259 int res = SWIG_AsVal_size_t(argv[1], NULL);
71260 _v = SWIG_CheckState(res);
71261 }
71262 if (_v) {
71263 void *vptr = 0;
71264 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
71265 _v = SWIG_CheckState(res);
71266 if (_v) {
71267 void *vptr = 0;
71268 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
71269 _v = SWIG_CheckState(res);
71270 if (_v) {
71271 {
71272 int res = SWIG_AsVal_long(argv[4], NULL);
71273 _v = SWIG_CheckState(res);
71274 }
71275 if (_v) {
71276 {
71277 int res = SWIG_AsVal_size_t(argv[5], NULL);
71278 _v = SWIG_CheckState(res);
71279 }
71280 if (_v) {
71281 return _wrap_int_minheap_array_t_addn_with_ids__SWIG_1(self, args);
71282 }
71283 }
71284 }
71285 }
71286 }
71287 }
71288 }
71289 if (argc == 7) {
71290 int _v;
71291 void *vptr = 0;
71292 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0);
71293 _v = SWIG_CheckState(res);
71294 if (_v) {
71295 {
71296 int res = SWIG_AsVal_size_t(argv[1], NULL);
71297 _v = SWIG_CheckState(res);
71298 }
71299 if (_v) {
71300 void *vptr = 0;
71301 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
71302 _v = SWIG_CheckState(res);
71303 if (_v) {
71304 void *vptr = 0;
71305 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
71306 _v = SWIG_CheckState(res);
71307 if (_v) {
71308 {
71309 int res = SWIG_AsVal_long(argv[4], NULL);
71310 _v = SWIG_CheckState(res);
71311 }
71312 if (_v) {
71313 {
71314 int res = SWIG_AsVal_size_t(argv[5], NULL);
71315 _v = SWIG_CheckState(res);
71316 }
71317 if (_v) {
71318 {
71319 int res = SWIG_AsVal_long(argv[6], NULL);
71320 _v = SWIG_CheckState(res);
71321 }
71322 if (_v) {
71323 return _wrap_int_minheap_array_t_addn_with_ids__SWIG_0(self, args);
71324 }
71325 }
71326 }
71327 }
71328 }
71329 }
71330 }
71331 }
71332
71333 fail:
71334 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'int_minheap_array_t_addn_with_ids'.\n"
71335 " Possible C/C++ prototypes are:\n"
71336 " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI const *,long,size_t,long)\n"
71337 " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI const *,long,size_t)\n"
71338 " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI const *,long)\n"
71339 " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *,faiss::HeapArray< faiss::CMin< int,long > >::TI const *)\n"
71340 " faiss::HeapArray< faiss::CMin< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMin< int,long > >::T const *)\n");
71341 return 0;
71342 }
71343
71344
71345 SWIGINTERN PyObject *_wrap_int_minheap_array_t_reorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71346 PyObject *resultobj = 0;
71347 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
71348 void *argp1 = 0 ;
71349 int res1 = 0 ;
71350 PyObject * obj0 = 0 ;
71351
71352 if (!PyArg_ParseTuple(args,(char *)"O:int_minheap_array_t_reorder",&obj0)) SWIG_fail;
71353 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
71354 if (!SWIG_IsOK(res1)) {
71355 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_reorder" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
71356 }
71357 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
71358 (arg1)->reorder();
71359 resultobj = SWIG_Py_Void();
71360 return resultobj;
71361 fail:
71362 return NULL;
71363 }
71364
71365
71366 SWIGINTERN PyObject *_wrap_int_minheap_array_t_per_line_extrema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71367 PyObject *resultobj = 0;
71368 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
71369 faiss::HeapArray< faiss::CMin< int,long > >::T *arg2 = (faiss::HeapArray< faiss::CMin< int,long > >::T *) 0 ;
71370 faiss::HeapArray< faiss::CMin< int,long > >::TI *arg3 = (faiss::HeapArray< faiss::CMin< int,long > >::TI *) 0 ;
71371 void *argp1 = 0 ;
71372 int res1 = 0 ;
71373 void *argp2 = 0 ;
71374 int res2 = 0 ;
71375 void *argp3 = 0 ;
71376 int res3 = 0 ;
71377 PyObject * obj0 = 0 ;
71378 PyObject * obj1 = 0 ;
71379 PyObject * obj2 = 0 ;
71380
71381 if (!PyArg_ParseTuple(args,(char *)"OOO:int_minheap_array_t_per_line_extrema",&obj0,&obj1,&obj2)) SWIG_fail;
71382 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0 | 0 );
71383 if (!SWIG_IsOK(res1)) {
71384 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_minheap_array_t_per_line_extrema" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > const *""'");
71385 }
71386 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
71387 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
71388 if (!SWIG_IsOK(res2)) {
71389 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_minheap_array_t_per_line_extrema" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::T *""'");
71390 }
71391 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::T * >(argp2);
71392 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
71393 if (!SWIG_IsOK(res3)) {
71394 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_minheap_array_t_per_line_extrema" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMin< int,long > >::TI *""'");
71395 }
71396 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > >::TI * >(argp3);
71397 ((faiss::HeapArray< faiss::CMin< int,long > > const *)arg1)->per_line_extrema(arg2,arg3);
71398 resultobj = SWIG_Py_Void();
71399 return resultobj;
71400 fail:
71401 return NULL;
71402 }
71403
71404
71405 SWIGINTERN PyObject *_wrap_new_int_minheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71406 PyObject *resultobj = 0;
71407 faiss::HeapArray< faiss::CMin< int,long > > *result = 0 ;
71408
71409 if (!PyArg_ParseTuple(args,(char *)":new_int_minheap_array_t")) SWIG_fail;
71410 result = (faiss::HeapArray< faiss::CMin< int,long > > *)new faiss::HeapArray< faiss::CMin< int,long > >();
71411 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, SWIG_POINTER_NEW | 0 );
71412 return resultobj;
71413 fail:
71414 return NULL;
71415 }
71416
71417
71418 SWIGINTERN PyObject *_wrap_delete_int_minheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71419 PyObject *resultobj = 0;
71420 faiss::HeapArray< faiss::CMin< int,long > > *arg1 = (faiss::HeapArray< faiss::CMin< int,long > > *) 0 ;
71421 void *argp1 = 0 ;
71422 int res1 = 0 ;
71423 PyObject * obj0 = 0 ;
71424
71425 if (!PyArg_ParseTuple(args,(char *)"O:delete_int_minheap_array_t",&obj0)) SWIG_fail;
71426 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, SWIG_POINTER_DISOWN | 0 );
71427 if (!SWIG_IsOK(res1)) {
71428 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_int_minheap_array_t" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMin< int,long > > *""'");
71429 }
71430 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMin< int,long > > * >(argp1);
71431 delete arg1;
71432 resultobj = SWIG_Py_Void();
71433 return resultobj;
71434 fail:
71435 return NULL;
71436 }
71437
71438
71439 SWIGINTERN PyObject *int_minheap_array_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71440 PyObject *obj;
71441 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
71442 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, SWIG_NewClientData(obj));
71443 return SWIG_Py_Void();
71444 }
71445
71446 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_nh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71447 PyObject *resultobj = 0;
71448 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71449 size_t arg2 ;
71450 void *argp1 = 0 ;
71451 int res1 = 0 ;
71452 size_t val2 ;
71453 int ecode2 = 0 ;
71454 PyObject * obj0 = 0 ;
71455 PyObject * obj1 = 0 ;
71456
71457 if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_nh_set",&obj0,&obj1)) SWIG_fail;
71458 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71459 if (!SWIG_IsOK(res1)) {
71460 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_nh_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71461 }
71462 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71463 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71464 if (!SWIG_IsOK(ecode2)) {
71465 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_nh_set" "', argument " "2"" of type '" "size_t""'");
71466 }
71467 arg2 = static_cast< size_t >(val2);
71468 if (arg1) (arg1)->nh = arg2;
71469 resultobj = SWIG_Py_Void();
71470 return resultobj;
71471 fail:
71472 return NULL;
71473 }
71474
71475
71476 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_nh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71477 PyObject *resultobj = 0;
71478 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71479 void *argp1 = 0 ;
71480 int res1 = 0 ;
71481 PyObject * obj0 = 0 ;
71482 size_t result;
71483
71484 if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_nh_get",&obj0)) SWIG_fail;
71485 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71486 if (!SWIG_IsOK(res1)) {
71487 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_nh_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71488 }
71489 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71490 result = (size_t) ((arg1)->nh);
71491 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
71492 return resultobj;
71493 fail:
71494 return NULL;
71495 }
71496
71497
71498 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71499 PyObject *resultobj = 0;
71500 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71501 size_t arg2 ;
71502 void *argp1 = 0 ;
71503 int res1 = 0 ;
71504 size_t val2 ;
71505 int ecode2 = 0 ;
71506 PyObject * obj0 = 0 ;
71507 PyObject * obj1 = 0 ;
71508
71509 if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_k_set",&obj0,&obj1)) SWIG_fail;
71510 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71511 if (!SWIG_IsOK(res1)) {
71512 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_k_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71513 }
71514 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71515 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71516 if (!SWIG_IsOK(ecode2)) {
71517 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_k_set" "', argument " "2"" of type '" "size_t""'");
71518 }
71519 arg2 = static_cast< size_t >(val2);
71520 if (arg1) (arg1)->k = arg2;
71521 resultobj = SWIG_Py_Void();
71522 return resultobj;
71523 fail:
71524 return NULL;
71525 }
71526
71527
71528 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71529 PyObject *resultobj = 0;
71530 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71531 void *argp1 = 0 ;
71532 int res1 = 0 ;
71533 PyObject * obj0 = 0 ;
71534 size_t result;
71535
71536 if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_k_get",&obj0)) SWIG_fail;
71537 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71538 if (!SWIG_IsOK(res1)) {
71539 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_k_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71540 }
71541 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71542 result = (size_t) ((arg1)->k);
71543 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
71544 return resultobj;
71545 fail:
71546 return NULL;
71547 }
71548
71549
71550 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71551 PyObject *resultobj = 0;
71552 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71553 faiss::HeapArray< faiss::CMax< float,long > >::TI *arg2 = (faiss::HeapArray< faiss::CMax< float,long > >::TI *) 0 ;
71554 void *argp1 = 0 ;
71555 int res1 = 0 ;
71556 void *argp2 = 0 ;
71557 int res2 = 0 ;
71558 PyObject * obj0 = 0 ;
71559 PyObject * obj1 = 0 ;
71560
71561 if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_ids_set",&obj0,&obj1)) SWIG_fail;
71562 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71563 if (!SWIG_IsOK(res1)) {
71564 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_ids_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71565 }
71566 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71567 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
71568 if (!SWIG_IsOK(res2)) {
71569 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_maxheap_array_t_ids_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI *""'");
71570 }
71571 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp2);
71572 if (arg1) (arg1)->ids = arg2;
71573 resultobj = SWIG_Py_Void();
71574 return resultobj;
71575 fail:
71576 return NULL;
71577 }
71578
71579
71580 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71581 PyObject *resultobj = 0;
71582 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71583 void *argp1 = 0 ;
71584 int res1 = 0 ;
71585 PyObject * obj0 = 0 ;
71586 faiss::HeapArray< faiss::CMax< float,long > >::TI *result = 0 ;
71587
71588 if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_ids_get",&obj0)) SWIG_fail;
71589 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71590 if (!SWIG_IsOK(res1)) {
71591 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_ids_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71592 }
71593 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71594 result = (faiss::HeapArray< faiss::CMax< float,long > >::TI *) ((arg1)->ids);
71595 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
71596 return resultobj;
71597 fail:
71598 return NULL;
71599 }
71600
71601
71602 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71603 PyObject *resultobj = 0;
71604 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71605 faiss::HeapArray< faiss::CMax< float,long > >::T *arg2 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
71606 void *argp1 = 0 ;
71607 int res1 = 0 ;
71608 void *argp2 = 0 ;
71609 int res2 = 0 ;
71610 PyObject * obj0 = 0 ;
71611 PyObject * obj1 = 0 ;
71612
71613 if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_val_set",&obj0,&obj1)) SWIG_fail;
71614 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71615 if (!SWIG_IsOK(res1)) {
71616 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_val_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71617 }
71618 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71619 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, SWIG_POINTER_DISOWN | 0 );
71620 if (!SWIG_IsOK(res2)) {
71621 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_maxheap_array_t_val_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T *""'");
71622 }
71623 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp2);
71624 if (arg1) (arg1)->val = arg2;
71625 resultobj = SWIG_Py_Void();
71626 return resultobj;
71627 fail:
71628 return NULL;
71629 }
71630
71631
71632 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71633 PyObject *resultobj = 0;
71634 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71635 void *argp1 = 0 ;
71636 int res1 = 0 ;
71637 PyObject * obj0 = 0 ;
71638 faiss::HeapArray< faiss::CMax< float,long > >::T *result = 0 ;
71639
71640 if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_val_get",&obj0)) SWIG_fail;
71641 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71642 if (!SWIG_IsOK(res1)) {
71643 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_val_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71644 }
71645 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71646 result = (faiss::HeapArray< faiss::CMax< float,long > >::T *) ((arg1)->val);
71647 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
71648 return resultobj;
71649 fail:
71650 return NULL;
71651 }
71652
71653
71654 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71655 PyObject *resultobj = 0;
71656 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71657 size_t arg2 ;
71658 void *argp1 = 0 ;
71659 int res1 = 0 ;
71660 size_t val2 ;
71661 int ecode2 = 0 ;
71662 PyObject * obj0 = 0 ;
71663 PyObject * obj1 = 0 ;
71664 faiss::HeapArray< faiss::CMax< float,long > >::T *result = 0 ;
71665
71666 if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_get_val",&obj0,&obj1)) SWIG_fail;
71667 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71668 if (!SWIG_IsOK(res1)) {
71669 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_get_val" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71670 }
71671 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71672 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71673 if (!SWIG_IsOK(ecode2)) {
71674 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_get_val" "', argument " "2"" of type '" "size_t""'");
71675 }
71676 arg2 = static_cast< size_t >(val2);
71677 result = (faiss::HeapArray< faiss::CMax< float,long > >::T *)(arg1)->get_val(arg2);
71678 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
71679 return resultobj;
71680 fail:
71681 return NULL;
71682 }
71683
71684
71685 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71686 PyObject *resultobj = 0;
71687 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71688 size_t arg2 ;
71689 void *argp1 = 0 ;
71690 int res1 = 0 ;
71691 size_t val2 ;
71692 int ecode2 = 0 ;
71693 PyObject * obj0 = 0 ;
71694 PyObject * obj1 = 0 ;
71695 faiss::HeapArray< faiss::CMax< float,long > >::TI *result = 0 ;
71696
71697 if (!PyArg_ParseTuple(args,(char *)"OO:float_maxheap_array_t_get_ids",&obj0,&obj1)) SWIG_fail;
71698 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71699 if (!SWIG_IsOK(res1)) {
71700 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_get_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71701 }
71702 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71703 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71704 if (!SWIG_IsOK(ecode2)) {
71705 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_get_ids" "', argument " "2"" of type '" "size_t""'");
71706 }
71707 arg2 = static_cast< size_t >(val2);
71708 result = (faiss::HeapArray< faiss::CMax< float,long > >::TI *)(arg1)->get_ids(arg2);
71709 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
71710 return resultobj;
71711 fail:
71712 return NULL;
71713 }
71714
71715
71716 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_heapify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71717 PyObject *resultobj = 0;
71718 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71719 void *argp1 = 0 ;
71720 int res1 = 0 ;
71721 PyObject * obj0 = 0 ;
71722
71723 if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_heapify",&obj0)) SWIG_fail;
71724 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71725 if (!SWIG_IsOK(res1)) {
71726 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_heapify" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71727 }
71728 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71729 (arg1)->heapify();
71730 resultobj = SWIG_Py_Void();
71731 return resultobj;
71732 fail:
71733 return NULL;
71734 }
71735
71736
71737 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71738 PyObject *resultobj = 0;
71739 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71740 size_t arg2 ;
71741 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
71742 faiss::HeapArray< faiss::CMax< float,long > >::TI arg4 ;
71743 size_t arg5 ;
71744 long arg6 ;
71745 void *argp1 = 0 ;
71746 int res1 = 0 ;
71747 size_t val2 ;
71748 int ecode2 = 0 ;
71749 void *argp3 = 0 ;
71750 int res3 = 0 ;
71751 long val4 ;
71752 int ecode4 = 0 ;
71753 size_t val5 ;
71754 int ecode5 = 0 ;
71755 long val6 ;
71756 int ecode6 = 0 ;
71757 PyObject * obj0 = 0 ;
71758 PyObject * obj1 = 0 ;
71759 PyObject * obj2 = 0 ;
71760 PyObject * obj3 = 0 ;
71761 PyObject * obj4 = 0 ;
71762 PyObject * obj5 = 0 ;
71763
71764 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:float_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
71765 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71766 if (!SWIG_IsOK(res1)) {
71767 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71768 }
71769 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71770 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71771 if (!SWIG_IsOK(ecode2)) {
71772 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
71773 }
71774 arg2 = static_cast< size_t >(val2);
71775 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
71776 if (!SWIG_IsOK(res3)) {
71777 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
71778 }
71779 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
71780 ecode4 = SWIG_AsVal_long(obj3, &val4);
71781 if (!SWIG_IsOK(ecode4)) {
71782 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI""'");
71783 }
71784 arg4 = static_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI >(val4);
71785 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
71786 if (!SWIG_IsOK(ecode5)) {
71787 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
71788 }
71789 arg5 = static_cast< size_t >(val5);
71790 ecode6 = SWIG_AsVal_long(obj5, &val6);
71791 if (!SWIG_IsOK(ecode6)) {
71792 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_maxheap_array_t_addn" "', argument " "6"" of type '" "long""'");
71793 }
71794 arg6 = static_cast< long >(val6);
71795 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,arg4,arg5,arg6);
71796 resultobj = SWIG_Py_Void();
71797 return resultobj;
71798 fail:
71799 return NULL;
71800 }
71801
71802
71803 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71804 PyObject *resultobj = 0;
71805 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71806 size_t arg2 ;
71807 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
71808 faiss::HeapArray< faiss::CMax< float,long > >::TI arg4 ;
71809 size_t arg5 ;
71810 void *argp1 = 0 ;
71811 int res1 = 0 ;
71812 size_t val2 ;
71813 int ecode2 = 0 ;
71814 void *argp3 = 0 ;
71815 int res3 = 0 ;
71816 long val4 ;
71817 int ecode4 = 0 ;
71818 size_t val5 ;
71819 int ecode5 = 0 ;
71820 PyObject * obj0 = 0 ;
71821 PyObject * obj1 = 0 ;
71822 PyObject * obj2 = 0 ;
71823 PyObject * obj3 = 0 ;
71824 PyObject * obj4 = 0 ;
71825
71826 if (!PyArg_ParseTuple(args,(char *)"OOOOO:float_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
71827 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71828 if (!SWIG_IsOK(res1)) {
71829 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71830 }
71831 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71832 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71833 if (!SWIG_IsOK(ecode2)) {
71834 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
71835 }
71836 arg2 = static_cast< size_t >(val2);
71837 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
71838 if (!SWIG_IsOK(res3)) {
71839 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
71840 }
71841 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
71842 ecode4 = SWIG_AsVal_long(obj3, &val4);
71843 if (!SWIG_IsOK(ecode4)) {
71844 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI""'");
71845 }
71846 arg4 = static_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI >(val4);
71847 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
71848 if (!SWIG_IsOK(ecode5)) {
71849 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
71850 }
71851 arg5 = static_cast< size_t >(val5);
71852 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,arg4,arg5);
71853 resultobj = SWIG_Py_Void();
71854 return resultobj;
71855 fail:
71856 return NULL;
71857 }
71858
71859
71860 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71861 PyObject *resultobj = 0;
71862 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71863 size_t arg2 ;
71864 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
71865 faiss::HeapArray< faiss::CMax< float,long > >::TI arg4 ;
71866 void *argp1 = 0 ;
71867 int res1 = 0 ;
71868 size_t val2 ;
71869 int ecode2 = 0 ;
71870 void *argp3 = 0 ;
71871 int res3 = 0 ;
71872 long val4 ;
71873 int ecode4 = 0 ;
71874 PyObject * obj0 = 0 ;
71875 PyObject * obj1 = 0 ;
71876 PyObject * obj2 = 0 ;
71877 PyObject * obj3 = 0 ;
71878
71879 if (!PyArg_ParseTuple(args,(char *)"OOOO:float_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
71880 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71881 if (!SWIG_IsOK(res1)) {
71882 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71883 }
71884 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71885 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71886 if (!SWIG_IsOK(ecode2)) {
71887 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
71888 }
71889 arg2 = static_cast< size_t >(val2);
71890 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
71891 if (!SWIG_IsOK(res3)) {
71892 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
71893 }
71894 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
71895 ecode4 = SWIG_AsVal_long(obj3, &val4);
71896 if (!SWIG_IsOK(ecode4)) {
71897 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "float_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI""'");
71898 }
71899 arg4 = static_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI >(val4);
71900 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,arg4);
71901 resultobj = SWIG_Py_Void();
71902 return resultobj;
71903 fail:
71904 return NULL;
71905 }
71906
71907
71908 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
71909 PyObject *resultobj = 0;
71910 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
71911 size_t arg2 ;
71912 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
71913 void *argp1 = 0 ;
71914 int res1 = 0 ;
71915 size_t val2 ;
71916 int ecode2 = 0 ;
71917 void *argp3 = 0 ;
71918 int res3 = 0 ;
71919 PyObject * obj0 = 0 ;
71920 PyObject * obj1 = 0 ;
71921 PyObject * obj2 = 0 ;
71922
71923 if (!PyArg_ParseTuple(args,(char *)"OOO:float_maxheap_array_t_addn",&obj0,&obj1,&obj2)) SWIG_fail;
71924 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
71925 if (!SWIG_IsOK(res1)) {
71926 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
71927 }
71928 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
71929 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
71930 if (!SWIG_IsOK(ecode2)) {
71931 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
71932 }
71933 arg2 = static_cast< size_t >(val2);
71934 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
71935 if (!SWIG_IsOK(res3)) {
71936 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
71937 }
71938 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
71939 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3);
71940 resultobj = SWIG_Py_Void();
71941 return resultobj;
71942 fail:
71943 return NULL;
71944 }
71945
71946
71947 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn(PyObject *self, PyObject *args) {
71948 Py_ssize_t argc;
71949 PyObject *argv[7] = {
71950 0
71951 };
71952 Py_ssize_t ii;
71953
71954 if (!PyTuple_Check(args)) SWIG_fail;
71955 argc = args ? PyObject_Length(args) : 0;
71956 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
71957 argv[ii] = PyTuple_GET_ITEM(args,ii);
71958 }
71959 if (argc == 3) {
71960 int _v;
71961 void *vptr = 0;
71962 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
71963 _v = SWIG_CheckState(res);
71964 if (_v) {
71965 {
71966 int res = SWIG_AsVal_size_t(argv[1], NULL);
71967 _v = SWIG_CheckState(res);
71968 }
71969 if (_v) {
71970 void *vptr = 0;
71971 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
71972 _v = SWIG_CheckState(res);
71973 if (_v) {
71974 return _wrap_float_maxheap_array_t_addn__SWIG_3(self, args);
71975 }
71976 }
71977 }
71978 }
71979 if (argc == 4) {
71980 int _v;
71981 void *vptr = 0;
71982 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
71983 _v = SWIG_CheckState(res);
71984 if (_v) {
71985 {
71986 int res = SWIG_AsVal_size_t(argv[1], NULL);
71987 _v = SWIG_CheckState(res);
71988 }
71989 if (_v) {
71990 void *vptr = 0;
71991 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
71992 _v = SWIG_CheckState(res);
71993 if (_v) {
71994 {
71995 int res = SWIG_AsVal_long(argv[3], NULL);
71996 _v = SWIG_CheckState(res);
71997 }
71998 if (_v) {
71999 return _wrap_float_maxheap_array_t_addn__SWIG_2(self, args);
72000 }
72001 }
72002 }
72003 }
72004 }
72005 if (argc == 5) {
72006 int _v;
72007 void *vptr = 0;
72008 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
72009 _v = SWIG_CheckState(res);
72010 if (_v) {
72011 {
72012 int res = SWIG_AsVal_size_t(argv[1], NULL);
72013 _v = SWIG_CheckState(res);
72014 }
72015 if (_v) {
72016 void *vptr = 0;
72017 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
72018 _v = SWIG_CheckState(res);
72019 if (_v) {
72020 {
72021 int res = SWIG_AsVal_long(argv[3], NULL);
72022 _v = SWIG_CheckState(res);
72023 }
72024 if (_v) {
72025 {
72026 int res = SWIG_AsVal_size_t(argv[4], NULL);
72027 _v = SWIG_CheckState(res);
72028 }
72029 if (_v) {
72030 return _wrap_float_maxheap_array_t_addn__SWIG_1(self, args);
72031 }
72032 }
72033 }
72034 }
72035 }
72036 }
72037 if (argc == 6) {
72038 int _v;
72039 void *vptr = 0;
72040 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
72041 _v = SWIG_CheckState(res);
72042 if (_v) {
72043 {
72044 int res = SWIG_AsVal_size_t(argv[1], NULL);
72045 _v = SWIG_CheckState(res);
72046 }
72047 if (_v) {
72048 void *vptr = 0;
72049 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
72050 _v = SWIG_CheckState(res);
72051 if (_v) {
72052 {
72053 int res = SWIG_AsVal_long(argv[3], NULL);
72054 _v = SWIG_CheckState(res);
72055 }
72056 if (_v) {
72057 {
72058 int res = SWIG_AsVal_size_t(argv[4], NULL);
72059 _v = SWIG_CheckState(res);
72060 }
72061 if (_v) {
72062 {
72063 int res = SWIG_AsVal_long(argv[5], NULL);
72064 _v = SWIG_CheckState(res);
72065 }
72066 if (_v) {
72067 return _wrap_float_maxheap_array_t_addn__SWIG_0(self, args);
72068 }
72069 }
72070 }
72071 }
72072 }
72073 }
72074 }
72075
72076 fail:
72077 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'float_maxheap_array_t_addn'.\n"
72078 " Possible C/C++ prototypes are:\n"
72079 " faiss::HeapArray< faiss::CMax< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI,size_t,long)\n"
72080 " faiss::HeapArray< faiss::CMax< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI,size_t)\n"
72081 " faiss::HeapArray< faiss::CMax< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI)\n"
72082 " faiss::HeapArray< faiss::CMax< float,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *)\n");
72083 return 0;
72084 }
72085
72086
72087 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72088 PyObject *resultobj = 0;
72089 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
72090 size_t arg2 ;
72091 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
72092 faiss::HeapArray< faiss::CMax< float,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMax< float,long > >::TI *) 0 ;
72093 long arg5 ;
72094 size_t arg6 ;
72095 long arg7 ;
72096 void *argp1 = 0 ;
72097 int res1 = 0 ;
72098 size_t val2 ;
72099 int ecode2 = 0 ;
72100 void *argp3 = 0 ;
72101 int res3 = 0 ;
72102 void *argp4 = 0 ;
72103 int res4 = 0 ;
72104 long val5 ;
72105 int ecode5 = 0 ;
72106 size_t val6 ;
72107 int ecode6 = 0 ;
72108 long val7 ;
72109 int ecode7 = 0 ;
72110 PyObject * obj0 = 0 ;
72111 PyObject * obj1 = 0 ;
72112 PyObject * obj2 = 0 ;
72113 PyObject * obj3 = 0 ;
72114 PyObject * obj4 = 0 ;
72115 PyObject * obj5 = 0 ;
72116 PyObject * obj6 = 0 ;
72117
72118 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
72119 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
72120 if (!SWIG_IsOK(res1)) {
72121 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
72122 }
72123 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
72124 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72125 if (!SWIG_IsOK(ecode2)) {
72126 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
72127 }
72128 arg2 = static_cast< size_t >(val2);
72129 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
72130 if (!SWIG_IsOK(res3)) {
72131 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
72132 }
72133 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
72134 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
72135 if (!SWIG_IsOK(res4)) {
72136 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI const *""'");
72137 }
72138 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp4);
72139 ecode5 = SWIG_AsVal_long(obj4, &val5);
72140 if (!SWIG_IsOK(ecode5)) {
72141 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
72142 }
72143 arg5 = static_cast< long >(val5);
72144 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
72145 if (!SWIG_IsOK(ecode6)) {
72146 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
72147 }
72148 arg6 = static_cast< size_t >(val6);
72149 ecode7 = SWIG_AsVal_long(obj6, &val7);
72150 if (!SWIG_IsOK(ecode7)) {
72151 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "7"" of type '" "long""'");
72152 }
72153 arg7 = static_cast< long >(val7);
72154 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< float,long > >::TI const *)arg4,arg5,arg6,arg7);
72155 resultobj = SWIG_Py_Void();
72156 return resultobj;
72157 fail:
72158 return NULL;
72159 }
72160
72161
72162 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72163 PyObject *resultobj = 0;
72164 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
72165 size_t arg2 ;
72166 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
72167 faiss::HeapArray< faiss::CMax< float,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMax< float,long > >::TI *) 0 ;
72168 long arg5 ;
72169 size_t arg6 ;
72170 void *argp1 = 0 ;
72171 int res1 = 0 ;
72172 size_t val2 ;
72173 int ecode2 = 0 ;
72174 void *argp3 = 0 ;
72175 int res3 = 0 ;
72176 void *argp4 = 0 ;
72177 int res4 = 0 ;
72178 long val5 ;
72179 int ecode5 = 0 ;
72180 size_t val6 ;
72181 int ecode6 = 0 ;
72182 PyObject * obj0 = 0 ;
72183 PyObject * obj1 = 0 ;
72184 PyObject * obj2 = 0 ;
72185 PyObject * obj3 = 0 ;
72186 PyObject * obj4 = 0 ;
72187 PyObject * obj5 = 0 ;
72188
72189 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
72190 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
72191 if (!SWIG_IsOK(res1)) {
72192 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
72193 }
72194 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
72195 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72196 if (!SWIG_IsOK(ecode2)) {
72197 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
72198 }
72199 arg2 = static_cast< size_t >(val2);
72200 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
72201 if (!SWIG_IsOK(res3)) {
72202 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
72203 }
72204 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
72205 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
72206 if (!SWIG_IsOK(res4)) {
72207 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI const *""'");
72208 }
72209 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp4);
72210 ecode5 = SWIG_AsVal_long(obj4, &val5);
72211 if (!SWIG_IsOK(ecode5)) {
72212 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
72213 }
72214 arg5 = static_cast< long >(val5);
72215 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
72216 if (!SWIG_IsOK(ecode6)) {
72217 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
72218 }
72219 arg6 = static_cast< size_t >(val6);
72220 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< float,long > >::TI const *)arg4,arg5,arg6);
72221 resultobj = SWIG_Py_Void();
72222 return resultobj;
72223 fail:
72224 return NULL;
72225 }
72226
72227
72228 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72229 PyObject *resultobj = 0;
72230 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
72231 size_t arg2 ;
72232 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
72233 faiss::HeapArray< faiss::CMax< float,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMax< float,long > >::TI *) 0 ;
72234 long arg5 ;
72235 void *argp1 = 0 ;
72236 int res1 = 0 ;
72237 size_t val2 ;
72238 int ecode2 = 0 ;
72239 void *argp3 = 0 ;
72240 int res3 = 0 ;
72241 void *argp4 = 0 ;
72242 int res4 = 0 ;
72243 long val5 ;
72244 int ecode5 = 0 ;
72245 PyObject * obj0 = 0 ;
72246 PyObject * obj1 = 0 ;
72247 PyObject * obj2 = 0 ;
72248 PyObject * obj3 = 0 ;
72249 PyObject * obj4 = 0 ;
72250
72251 if (!PyArg_ParseTuple(args,(char *)"OOOOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
72252 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
72253 if (!SWIG_IsOK(res1)) {
72254 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
72255 }
72256 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
72257 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72258 if (!SWIG_IsOK(ecode2)) {
72259 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
72260 }
72261 arg2 = static_cast< size_t >(val2);
72262 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
72263 if (!SWIG_IsOK(res3)) {
72264 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
72265 }
72266 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
72267 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
72268 if (!SWIG_IsOK(res4)) {
72269 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI const *""'");
72270 }
72271 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp4);
72272 ecode5 = SWIG_AsVal_long(obj4, &val5);
72273 if (!SWIG_IsOK(ecode5)) {
72274 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
72275 }
72276 arg5 = static_cast< long >(val5);
72277 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< float,long > >::TI const *)arg4,arg5);
72278 resultobj = SWIG_Py_Void();
72279 return resultobj;
72280 fail:
72281 return NULL;
72282 }
72283
72284
72285 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72286 PyObject *resultobj = 0;
72287 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
72288 size_t arg2 ;
72289 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
72290 faiss::HeapArray< faiss::CMax< float,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMax< float,long > >::TI *) 0 ;
72291 void *argp1 = 0 ;
72292 int res1 = 0 ;
72293 size_t val2 ;
72294 int ecode2 = 0 ;
72295 void *argp3 = 0 ;
72296 int res3 = 0 ;
72297 void *argp4 = 0 ;
72298 int res4 = 0 ;
72299 PyObject * obj0 = 0 ;
72300 PyObject * obj1 = 0 ;
72301 PyObject * obj2 = 0 ;
72302 PyObject * obj3 = 0 ;
72303
72304 if (!PyArg_ParseTuple(args,(char *)"OOOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
72305 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
72306 if (!SWIG_IsOK(res1)) {
72307 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
72308 }
72309 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
72310 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72311 if (!SWIG_IsOK(ecode2)) {
72312 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
72313 }
72314 arg2 = static_cast< size_t >(val2);
72315 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
72316 if (!SWIG_IsOK(res3)) {
72317 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
72318 }
72319 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
72320 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
72321 if (!SWIG_IsOK(res4)) {
72322 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI const *""'");
72323 }
72324 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp4);
72325 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< float,long > >::TI const *)arg4);
72326 resultobj = SWIG_Py_Void();
72327 return resultobj;
72328 fail:
72329 return NULL;
72330 }
72331
72332
72333 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72334 PyObject *resultobj = 0;
72335 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
72336 size_t arg2 ;
72337 faiss::HeapArray< faiss::CMax< float,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
72338 void *argp1 = 0 ;
72339 int res1 = 0 ;
72340 size_t val2 ;
72341 int ecode2 = 0 ;
72342 void *argp3 = 0 ;
72343 int res3 = 0 ;
72344 PyObject * obj0 = 0 ;
72345 PyObject * obj1 = 0 ;
72346 PyObject * obj2 = 0 ;
72347
72348 if (!PyArg_ParseTuple(args,(char *)"OOO:float_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
72349 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
72350 if (!SWIG_IsOK(res1)) {
72351 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
72352 }
72353 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
72354 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72355 if (!SWIG_IsOK(ecode2)) {
72356 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
72357 }
72358 arg2 = static_cast< size_t >(val2);
72359 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_float, 0 | 0 );
72360 if (!SWIG_IsOK(res3)) {
72361 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T const *""'");
72362 }
72363 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp3);
72364 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< float,long > >::T const *)arg3);
72365 resultobj = SWIG_Py_Void();
72366 return resultobj;
72367 fail:
72368 return NULL;
72369 }
72370
72371
72372 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_addn_with_ids(PyObject *self, PyObject *args) {
72373 Py_ssize_t argc;
72374 PyObject *argv[8] = {
72375 0
72376 };
72377 Py_ssize_t ii;
72378
72379 if (!PyTuple_Check(args)) SWIG_fail;
72380 argc = args ? PyObject_Length(args) : 0;
72381 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
72382 argv[ii] = PyTuple_GET_ITEM(args,ii);
72383 }
72384 if (argc == 3) {
72385 int _v;
72386 void *vptr = 0;
72387 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
72388 _v = SWIG_CheckState(res);
72389 if (_v) {
72390 {
72391 int res = SWIG_AsVal_size_t(argv[1], NULL);
72392 _v = SWIG_CheckState(res);
72393 }
72394 if (_v) {
72395 void *vptr = 0;
72396 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
72397 _v = SWIG_CheckState(res);
72398 if (_v) {
72399 return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_4(self, args);
72400 }
72401 }
72402 }
72403 }
72404 if (argc == 4) {
72405 int _v;
72406 void *vptr = 0;
72407 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
72408 _v = SWIG_CheckState(res);
72409 if (_v) {
72410 {
72411 int res = SWIG_AsVal_size_t(argv[1], NULL);
72412 _v = SWIG_CheckState(res);
72413 }
72414 if (_v) {
72415 void *vptr = 0;
72416 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
72417 _v = SWIG_CheckState(res);
72418 if (_v) {
72419 void *vptr = 0;
72420 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
72421 _v = SWIG_CheckState(res);
72422 if (_v) {
72423 return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_3(self, args);
72424 }
72425 }
72426 }
72427 }
72428 }
72429 if (argc == 5) {
72430 int _v;
72431 void *vptr = 0;
72432 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
72433 _v = SWIG_CheckState(res);
72434 if (_v) {
72435 {
72436 int res = SWIG_AsVal_size_t(argv[1], NULL);
72437 _v = SWIG_CheckState(res);
72438 }
72439 if (_v) {
72440 void *vptr = 0;
72441 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
72442 _v = SWIG_CheckState(res);
72443 if (_v) {
72444 void *vptr = 0;
72445 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
72446 _v = SWIG_CheckState(res);
72447 if (_v) {
72448 {
72449 int res = SWIG_AsVal_long(argv[4], NULL);
72450 _v = SWIG_CheckState(res);
72451 }
72452 if (_v) {
72453 return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_2(self, args);
72454 }
72455 }
72456 }
72457 }
72458 }
72459 }
72460 if (argc == 6) {
72461 int _v;
72462 void *vptr = 0;
72463 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
72464 _v = SWIG_CheckState(res);
72465 if (_v) {
72466 {
72467 int res = SWIG_AsVal_size_t(argv[1], NULL);
72468 _v = SWIG_CheckState(res);
72469 }
72470 if (_v) {
72471 void *vptr = 0;
72472 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
72473 _v = SWIG_CheckState(res);
72474 if (_v) {
72475 void *vptr = 0;
72476 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
72477 _v = SWIG_CheckState(res);
72478 if (_v) {
72479 {
72480 int res = SWIG_AsVal_long(argv[4], NULL);
72481 _v = SWIG_CheckState(res);
72482 }
72483 if (_v) {
72484 {
72485 int res = SWIG_AsVal_size_t(argv[5], NULL);
72486 _v = SWIG_CheckState(res);
72487 }
72488 if (_v) {
72489 return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_1(self, args);
72490 }
72491 }
72492 }
72493 }
72494 }
72495 }
72496 }
72497 if (argc == 7) {
72498 int _v;
72499 void *vptr = 0;
72500 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0);
72501 _v = SWIG_CheckState(res);
72502 if (_v) {
72503 {
72504 int res = SWIG_AsVal_size_t(argv[1], NULL);
72505 _v = SWIG_CheckState(res);
72506 }
72507 if (_v) {
72508 void *vptr = 0;
72509 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_float, 0);
72510 _v = SWIG_CheckState(res);
72511 if (_v) {
72512 void *vptr = 0;
72513 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
72514 _v = SWIG_CheckState(res);
72515 if (_v) {
72516 {
72517 int res = SWIG_AsVal_long(argv[4], NULL);
72518 _v = SWIG_CheckState(res);
72519 }
72520 if (_v) {
72521 {
72522 int res = SWIG_AsVal_size_t(argv[5], NULL);
72523 _v = SWIG_CheckState(res);
72524 }
72525 if (_v) {
72526 {
72527 int res = SWIG_AsVal_long(argv[6], NULL);
72528 _v = SWIG_CheckState(res);
72529 }
72530 if (_v) {
72531 return _wrap_float_maxheap_array_t_addn_with_ids__SWIG_0(self, args);
72532 }
72533 }
72534 }
72535 }
72536 }
72537 }
72538 }
72539 }
72540
72541 fail:
72542 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'float_maxheap_array_t_addn_with_ids'.\n"
72543 " Possible C/C++ prototypes are:\n"
72544 " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI const *,long,size_t,long)\n"
72545 " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI const *,long,size_t)\n"
72546 " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI const *,long)\n"
72547 " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *,faiss::HeapArray< faiss::CMax< float,long > >::TI const *)\n"
72548 " faiss::HeapArray< faiss::CMax< float,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< float,long > >::T const *)\n");
72549 return 0;
72550 }
72551
72552
72553 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_reorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72554 PyObject *resultobj = 0;
72555 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
72556 void *argp1 = 0 ;
72557 int res1 = 0 ;
72558 PyObject * obj0 = 0 ;
72559
72560 if (!PyArg_ParseTuple(args,(char *)"O:float_maxheap_array_t_reorder",&obj0)) SWIG_fail;
72561 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
72562 if (!SWIG_IsOK(res1)) {
72563 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_reorder" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
72564 }
72565 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
72566 (arg1)->reorder();
72567 resultobj = SWIG_Py_Void();
72568 return resultobj;
72569 fail:
72570 return NULL;
72571 }
72572
72573
72574 SWIGINTERN PyObject *_wrap_float_maxheap_array_t_per_line_extrema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72575 PyObject *resultobj = 0;
72576 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
72577 faiss::HeapArray< faiss::CMax< float,long > >::T *arg2 = (faiss::HeapArray< faiss::CMax< float,long > >::T *) 0 ;
72578 faiss::HeapArray< faiss::CMax< float,long > >::TI *arg3 = (faiss::HeapArray< faiss::CMax< float,long > >::TI *) 0 ;
72579 void *argp1 = 0 ;
72580 int res1 = 0 ;
72581 void *argp2 = 0 ;
72582 int res2 = 0 ;
72583 void *argp3 = 0 ;
72584 int res3 = 0 ;
72585 PyObject * obj0 = 0 ;
72586 PyObject * obj1 = 0 ;
72587 PyObject * obj2 = 0 ;
72588
72589 if (!PyArg_ParseTuple(args,(char *)"OOO:float_maxheap_array_t_per_line_extrema",&obj0,&obj1,&obj2)) SWIG_fail;
72590 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0 | 0 );
72591 if (!SWIG_IsOK(res1)) {
72592 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "float_maxheap_array_t_per_line_extrema" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > const *""'");
72593 }
72594 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
72595 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, 0 | 0 );
72596 if (!SWIG_IsOK(res2)) {
72597 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "float_maxheap_array_t_per_line_extrema" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::T *""'");
72598 }
72599 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::T * >(argp2);
72600 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
72601 if (!SWIG_IsOK(res3)) {
72602 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "float_maxheap_array_t_per_line_extrema" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< float,long > >::TI *""'");
72603 }
72604 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > >::TI * >(argp3);
72605 ((faiss::HeapArray< faiss::CMax< float,long > > const *)arg1)->per_line_extrema(arg2,arg3);
72606 resultobj = SWIG_Py_Void();
72607 return resultobj;
72608 fail:
72609 return NULL;
72610 }
72611
72612
72613 SWIGINTERN PyObject *_wrap_new_float_maxheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72614 PyObject *resultobj = 0;
72615 faiss::HeapArray< faiss::CMax< float,long > > *result = 0 ;
72616
72617 if (!PyArg_ParseTuple(args,(char *)":new_float_maxheap_array_t")) SWIG_fail;
72618 result = (faiss::HeapArray< faiss::CMax< float,long > > *)new faiss::HeapArray< faiss::CMax< float,long > >();
72619 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, SWIG_POINTER_NEW | 0 );
72620 return resultobj;
72621 fail:
72622 return NULL;
72623 }
72624
72625
72626 SWIGINTERN PyObject *_wrap_delete_float_maxheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72627 PyObject *resultobj = 0;
72628 faiss::HeapArray< faiss::CMax< float,long > > *arg1 = (faiss::HeapArray< faiss::CMax< float,long > > *) 0 ;
72629 void *argp1 = 0 ;
72630 int res1 = 0 ;
72631 PyObject * obj0 = 0 ;
72632
72633 if (!PyArg_ParseTuple(args,(char *)"O:delete_float_maxheap_array_t",&obj0)) SWIG_fail;
72634 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, SWIG_POINTER_DISOWN | 0 );
72635 if (!SWIG_IsOK(res1)) {
72636 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_float_maxheap_array_t" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< float,long > > *""'");
72637 }
72638 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< float,long > > * >(argp1);
72639 delete arg1;
72640 resultobj = SWIG_Py_Void();
72641 return resultobj;
72642 fail:
72643 return NULL;
72644 }
72645
72646
72647 SWIGINTERN PyObject *float_maxheap_array_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72648 PyObject *obj;
72649 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
72650 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, SWIG_NewClientData(obj));
72651 return SWIG_Py_Void();
72652 }
72653
72654 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_nh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72655 PyObject *resultobj = 0;
72656 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72657 size_t arg2 ;
72658 void *argp1 = 0 ;
72659 int res1 = 0 ;
72660 size_t val2 ;
72661 int ecode2 = 0 ;
72662 PyObject * obj0 = 0 ;
72663 PyObject * obj1 = 0 ;
72664
72665 if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_nh_set",&obj0,&obj1)) SWIG_fail;
72666 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72667 if (!SWIG_IsOK(res1)) {
72668 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_nh_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72669 }
72670 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72671 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72672 if (!SWIG_IsOK(ecode2)) {
72673 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_nh_set" "', argument " "2"" of type '" "size_t""'");
72674 }
72675 arg2 = static_cast< size_t >(val2);
72676 if (arg1) (arg1)->nh = arg2;
72677 resultobj = SWIG_Py_Void();
72678 return resultobj;
72679 fail:
72680 return NULL;
72681 }
72682
72683
72684 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_nh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72685 PyObject *resultobj = 0;
72686 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72687 void *argp1 = 0 ;
72688 int res1 = 0 ;
72689 PyObject * obj0 = 0 ;
72690 size_t result;
72691
72692 if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_nh_get",&obj0)) SWIG_fail;
72693 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72694 if (!SWIG_IsOK(res1)) {
72695 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_nh_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72696 }
72697 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72698 result = (size_t) ((arg1)->nh);
72699 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
72700 return resultobj;
72701 fail:
72702 return NULL;
72703 }
72704
72705
72706 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_k_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72707 PyObject *resultobj = 0;
72708 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72709 size_t arg2 ;
72710 void *argp1 = 0 ;
72711 int res1 = 0 ;
72712 size_t val2 ;
72713 int ecode2 = 0 ;
72714 PyObject * obj0 = 0 ;
72715 PyObject * obj1 = 0 ;
72716
72717 if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_k_set",&obj0,&obj1)) SWIG_fail;
72718 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72719 if (!SWIG_IsOK(res1)) {
72720 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_k_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72721 }
72722 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72723 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72724 if (!SWIG_IsOK(ecode2)) {
72725 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_k_set" "', argument " "2"" of type '" "size_t""'");
72726 }
72727 arg2 = static_cast< size_t >(val2);
72728 if (arg1) (arg1)->k = arg2;
72729 resultobj = SWIG_Py_Void();
72730 return resultobj;
72731 fail:
72732 return NULL;
72733 }
72734
72735
72736 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_k_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72737 PyObject *resultobj = 0;
72738 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72739 void *argp1 = 0 ;
72740 int res1 = 0 ;
72741 PyObject * obj0 = 0 ;
72742 size_t result;
72743
72744 if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_k_get",&obj0)) SWIG_fail;
72745 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72746 if (!SWIG_IsOK(res1)) {
72747 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_k_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72748 }
72749 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72750 result = (size_t) ((arg1)->k);
72751 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
72752 return resultobj;
72753 fail:
72754 return NULL;
72755 }
72756
72757
72758 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_ids_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72759 PyObject *resultobj = 0;
72760 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72761 faiss::HeapArray< faiss::CMax< int,long > >::TI *arg2 = (faiss::HeapArray< faiss::CMax< int,long > >::TI *) 0 ;
72762 void *argp1 = 0 ;
72763 int res1 = 0 ;
72764 void *argp2 = 0 ;
72765 int res2 = 0 ;
72766 PyObject * obj0 = 0 ;
72767 PyObject * obj1 = 0 ;
72768
72769 if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_ids_set",&obj0,&obj1)) SWIG_fail;
72770 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72771 if (!SWIG_IsOK(res1)) {
72772 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_ids_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72773 }
72774 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72775 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
72776 if (!SWIG_IsOK(res2)) {
72777 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_maxheap_array_t_ids_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI *""'");
72778 }
72779 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp2);
72780 if (arg1) (arg1)->ids = arg2;
72781 resultobj = SWIG_Py_Void();
72782 return resultobj;
72783 fail:
72784 return NULL;
72785 }
72786
72787
72788 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_ids_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72789 PyObject *resultobj = 0;
72790 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72791 void *argp1 = 0 ;
72792 int res1 = 0 ;
72793 PyObject * obj0 = 0 ;
72794 faiss::HeapArray< faiss::CMax< int,long > >::TI *result = 0 ;
72795
72796 if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_ids_get",&obj0)) SWIG_fail;
72797 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72798 if (!SWIG_IsOK(res1)) {
72799 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_ids_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72800 }
72801 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72802 result = (faiss::HeapArray< faiss::CMax< int,long > >::TI *) ((arg1)->ids);
72803 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
72804 return resultobj;
72805 fail:
72806 return NULL;
72807 }
72808
72809
72810 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_val_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72811 PyObject *resultobj = 0;
72812 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72813 faiss::HeapArray< faiss::CMax< int,long > >::T *arg2 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
72814 void *argp1 = 0 ;
72815 int res1 = 0 ;
72816 void *argp2 = 0 ;
72817 int res2 = 0 ;
72818 PyObject * obj0 = 0 ;
72819 PyObject * obj1 = 0 ;
72820
72821 if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_val_set",&obj0,&obj1)) SWIG_fail;
72822 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72823 if (!SWIG_IsOK(res1)) {
72824 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_val_set" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72825 }
72826 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72827 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, SWIG_POINTER_DISOWN | 0 );
72828 if (!SWIG_IsOK(res2)) {
72829 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_maxheap_array_t_val_set" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T *""'");
72830 }
72831 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp2);
72832 if (arg1) (arg1)->val = arg2;
72833 resultobj = SWIG_Py_Void();
72834 return resultobj;
72835 fail:
72836 return NULL;
72837 }
72838
72839
72840 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_val_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72841 PyObject *resultobj = 0;
72842 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72843 void *argp1 = 0 ;
72844 int res1 = 0 ;
72845 PyObject * obj0 = 0 ;
72846 faiss::HeapArray< faiss::CMax< int,long > >::T *result = 0 ;
72847
72848 if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_val_get",&obj0)) SWIG_fail;
72849 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72850 if (!SWIG_IsOK(res1)) {
72851 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_val_get" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72852 }
72853 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72854 result = (faiss::HeapArray< faiss::CMax< int,long > >::T *) ((arg1)->val);
72855 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
72856 return resultobj;
72857 fail:
72858 return NULL;
72859 }
72860
72861
72862 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_get_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72863 PyObject *resultobj = 0;
72864 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72865 size_t arg2 ;
72866 void *argp1 = 0 ;
72867 int res1 = 0 ;
72868 size_t val2 ;
72869 int ecode2 = 0 ;
72870 PyObject * obj0 = 0 ;
72871 PyObject * obj1 = 0 ;
72872 faiss::HeapArray< faiss::CMax< int,long > >::T *result = 0 ;
72873
72874 if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_get_val",&obj0,&obj1)) SWIG_fail;
72875 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72876 if (!SWIG_IsOK(res1)) {
72877 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_get_val" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72878 }
72879 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72880 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72881 if (!SWIG_IsOK(ecode2)) {
72882 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_get_val" "', argument " "2"" of type '" "size_t""'");
72883 }
72884 arg2 = static_cast< size_t >(val2);
72885 result = (faiss::HeapArray< faiss::CMax< int,long > >::T *)(arg1)->get_val(arg2);
72886 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
72887 return resultobj;
72888 fail:
72889 return NULL;
72890 }
72891
72892
72893 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_get_ids(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72894 PyObject *resultobj = 0;
72895 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72896 size_t arg2 ;
72897 void *argp1 = 0 ;
72898 int res1 = 0 ;
72899 size_t val2 ;
72900 int ecode2 = 0 ;
72901 PyObject * obj0 = 0 ;
72902 PyObject * obj1 = 0 ;
72903 faiss::HeapArray< faiss::CMax< int,long > >::TI *result = 0 ;
72904
72905 if (!PyArg_ParseTuple(args,(char *)"OO:int_maxheap_array_t_get_ids",&obj0,&obj1)) SWIG_fail;
72906 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72907 if (!SWIG_IsOK(res1)) {
72908 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_get_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72909 }
72910 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72911 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72912 if (!SWIG_IsOK(ecode2)) {
72913 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_get_ids" "', argument " "2"" of type '" "size_t""'");
72914 }
72915 arg2 = static_cast< size_t >(val2);
72916 result = (faiss::HeapArray< faiss::CMax< int,long > >::TI *)(arg1)->get_ids(arg2);
72917 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
72918 return resultobj;
72919 fail:
72920 return NULL;
72921 }
72922
72923
72924 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_heapify(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72925 PyObject *resultobj = 0;
72926 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72927 void *argp1 = 0 ;
72928 int res1 = 0 ;
72929 PyObject * obj0 = 0 ;
72930
72931 if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_heapify",&obj0)) SWIG_fail;
72932 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72933 if (!SWIG_IsOK(res1)) {
72934 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_heapify" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72935 }
72936 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72937 (arg1)->heapify();
72938 resultobj = SWIG_Py_Void();
72939 return resultobj;
72940 fail:
72941 return NULL;
72942 }
72943
72944
72945 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
72946 PyObject *resultobj = 0;
72947 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
72948 size_t arg2 ;
72949 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
72950 faiss::HeapArray< faiss::CMax< int,long > >::TI arg4 ;
72951 size_t arg5 ;
72952 long arg6 ;
72953 void *argp1 = 0 ;
72954 int res1 = 0 ;
72955 size_t val2 ;
72956 int ecode2 = 0 ;
72957 void *argp3 = 0 ;
72958 int res3 = 0 ;
72959 long val4 ;
72960 int ecode4 = 0 ;
72961 size_t val5 ;
72962 int ecode5 = 0 ;
72963 long val6 ;
72964 int ecode6 = 0 ;
72965 PyObject * obj0 = 0 ;
72966 PyObject * obj1 = 0 ;
72967 PyObject * obj2 = 0 ;
72968 PyObject * obj3 = 0 ;
72969 PyObject * obj4 = 0 ;
72970 PyObject * obj5 = 0 ;
72971
72972 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:int_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
72973 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
72974 if (!SWIG_IsOK(res1)) {
72975 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
72976 }
72977 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
72978 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
72979 if (!SWIG_IsOK(ecode2)) {
72980 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
72981 }
72982 arg2 = static_cast< size_t >(val2);
72983 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
72984 if (!SWIG_IsOK(res3)) {
72985 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
72986 }
72987 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
72988 ecode4 = SWIG_AsVal_long(obj3, &val4);
72989 if (!SWIG_IsOK(ecode4)) {
72990 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI""'");
72991 }
72992 arg4 = static_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI >(val4);
72993 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
72994 if (!SWIG_IsOK(ecode5)) {
72995 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
72996 }
72997 arg5 = static_cast< size_t >(val5);
72998 ecode6 = SWIG_AsVal_long(obj5, &val6);
72999 if (!SWIG_IsOK(ecode6)) {
73000 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_maxheap_array_t_addn" "', argument " "6"" of type '" "long""'");
73001 }
73002 arg6 = static_cast< long >(val6);
73003 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,arg4,arg5,arg6);
73004 resultobj = SWIG_Py_Void();
73005 return resultobj;
73006 fail:
73007 return NULL;
73008 }
73009
73010
73011 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73012 PyObject *resultobj = 0;
73013 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73014 size_t arg2 ;
73015 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73016 faiss::HeapArray< faiss::CMax< int,long > >::TI arg4 ;
73017 size_t arg5 ;
73018 void *argp1 = 0 ;
73019 int res1 = 0 ;
73020 size_t val2 ;
73021 int ecode2 = 0 ;
73022 void *argp3 = 0 ;
73023 int res3 = 0 ;
73024 long val4 ;
73025 int ecode4 = 0 ;
73026 size_t val5 ;
73027 int ecode5 = 0 ;
73028 PyObject * obj0 = 0 ;
73029 PyObject * obj1 = 0 ;
73030 PyObject * obj2 = 0 ;
73031 PyObject * obj3 = 0 ;
73032 PyObject * obj4 = 0 ;
73033
73034 if (!PyArg_ParseTuple(args,(char *)"OOOOO:int_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
73035 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73036 if (!SWIG_IsOK(res1)) {
73037 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73038 }
73039 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73040 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
73041 if (!SWIG_IsOK(ecode2)) {
73042 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
73043 }
73044 arg2 = static_cast< size_t >(val2);
73045 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
73046 if (!SWIG_IsOK(res3)) {
73047 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
73048 }
73049 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
73050 ecode4 = SWIG_AsVal_long(obj3, &val4);
73051 if (!SWIG_IsOK(ecode4)) {
73052 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI""'");
73053 }
73054 arg4 = static_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI >(val4);
73055 ecode5 = SWIG_AsVal_size_t(obj4, &val5);
73056 if (!SWIG_IsOK(ecode5)) {
73057 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn" "', argument " "5"" of type '" "size_t""'");
73058 }
73059 arg5 = static_cast< size_t >(val5);
73060 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,arg4,arg5);
73061 resultobj = SWIG_Py_Void();
73062 return resultobj;
73063 fail:
73064 return NULL;
73065 }
73066
73067
73068 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73069 PyObject *resultobj = 0;
73070 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73071 size_t arg2 ;
73072 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73073 faiss::HeapArray< faiss::CMax< int,long > >::TI arg4 ;
73074 void *argp1 = 0 ;
73075 int res1 = 0 ;
73076 size_t val2 ;
73077 int ecode2 = 0 ;
73078 void *argp3 = 0 ;
73079 int res3 = 0 ;
73080 long val4 ;
73081 int ecode4 = 0 ;
73082 PyObject * obj0 = 0 ;
73083 PyObject * obj1 = 0 ;
73084 PyObject * obj2 = 0 ;
73085 PyObject * obj3 = 0 ;
73086
73087 if (!PyArg_ParseTuple(args,(char *)"OOOO:int_maxheap_array_t_addn",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
73088 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73089 if (!SWIG_IsOK(res1)) {
73090 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73091 }
73092 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73093 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
73094 if (!SWIG_IsOK(ecode2)) {
73095 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
73096 }
73097 arg2 = static_cast< size_t >(val2);
73098 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
73099 if (!SWIG_IsOK(res3)) {
73100 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
73101 }
73102 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
73103 ecode4 = SWIG_AsVal_long(obj3, &val4);
73104 if (!SWIG_IsOK(ecode4)) {
73105 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "int_maxheap_array_t_addn" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI""'");
73106 }
73107 arg4 = static_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI >(val4);
73108 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,arg4);
73109 resultobj = SWIG_Py_Void();
73110 return resultobj;
73111 fail:
73112 return NULL;
73113 }
73114
73115
73116 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73117 PyObject *resultobj = 0;
73118 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73119 size_t arg2 ;
73120 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73121 void *argp1 = 0 ;
73122 int res1 = 0 ;
73123 size_t val2 ;
73124 int ecode2 = 0 ;
73125 void *argp3 = 0 ;
73126 int res3 = 0 ;
73127 PyObject * obj0 = 0 ;
73128 PyObject * obj1 = 0 ;
73129 PyObject * obj2 = 0 ;
73130
73131 if (!PyArg_ParseTuple(args,(char *)"OOO:int_maxheap_array_t_addn",&obj0,&obj1,&obj2)) SWIG_fail;
73132 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73133 if (!SWIG_IsOK(res1)) {
73134 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73135 }
73136 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73137 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
73138 if (!SWIG_IsOK(ecode2)) {
73139 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn" "', argument " "2"" of type '" "size_t""'");
73140 }
73141 arg2 = static_cast< size_t >(val2);
73142 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
73143 if (!SWIG_IsOK(res3)) {
73144 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
73145 }
73146 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
73147 (arg1)->addn(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3);
73148 resultobj = SWIG_Py_Void();
73149 return resultobj;
73150 fail:
73151 return NULL;
73152 }
73153
73154
73155 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn(PyObject *self, PyObject *args) {
73156 Py_ssize_t argc;
73157 PyObject *argv[7] = {
73158 0
73159 };
73160 Py_ssize_t ii;
73161
73162 if (!PyTuple_Check(args)) SWIG_fail;
73163 argc = args ? PyObject_Length(args) : 0;
73164 for (ii = 0; (ii < 6) && (ii < argc); ii++) {
73165 argv[ii] = PyTuple_GET_ITEM(args,ii);
73166 }
73167 if (argc == 3) {
73168 int _v;
73169 void *vptr = 0;
73170 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73171 _v = SWIG_CheckState(res);
73172 if (_v) {
73173 {
73174 int res = SWIG_AsVal_size_t(argv[1], NULL);
73175 _v = SWIG_CheckState(res);
73176 }
73177 if (_v) {
73178 void *vptr = 0;
73179 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73180 _v = SWIG_CheckState(res);
73181 if (_v) {
73182 return _wrap_int_maxheap_array_t_addn__SWIG_3(self, args);
73183 }
73184 }
73185 }
73186 }
73187 if (argc == 4) {
73188 int _v;
73189 void *vptr = 0;
73190 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73191 _v = SWIG_CheckState(res);
73192 if (_v) {
73193 {
73194 int res = SWIG_AsVal_size_t(argv[1], NULL);
73195 _v = SWIG_CheckState(res);
73196 }
73197 if (_v) {
73198 void *vptr = 0;
73199 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73200 _v = SWIG_CheckState(res);
73201 if (_v) {
73202 {
73203 int res = SWIG_AsVal_long(argv[3], NULL);
73204 _v = SWIG_CheckState(res);
73205 }
73206 if (_v) {
73207 return _wrap_int_maxheap_array_t_addn__SWIG_2(self, args);
73208 }
73209 }
73210 }
73211 }
73212 }
73213 if (argc == 5) {
73214 int _v;
73215 void *vptr = 0;
73216 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73217 _v = SWIG_CheckState(res);
73218 if (_v) {
73219 {
73220 int res = SWIG_AsVal_size_t(argv[1], NULL);
73221 _v = SWIG_CheckState(res);
73222 }
73223 if (_v) {
73224 void *vptr = 0;
73225 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73226 _v = SWIG_CheckState(res);
73227 if (_v) {
73228 {
73229 int res = SWIG_AsVal_long(argv[3], NULL);
73230 _v = SWIG_CheckState(res);
73231 }
73232 if (_v) {
73233 {
73234 int res = SWIG_AsVal_size_t(argv[4], NULL);
73235 _v = SWIG_CheckState(res);
73236 }
73237 if (_v) {
73238 return _wrap_int_maxheap_array_t_addn__SWIG_1(self, args);
73239 }
73240 }
73241 }
73242 }
73243 }
73244 }
73245 if (argc == 6) {
73246 int _v;
73247 void *vptr = 0;
73248 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73249 _v = SWIG_CheckState(res);
73250 if (_v) {
73251 {
73252 int res = SWIG_AsVal_size_t(argv[1], NULL);
73253 _v = SWIG_CheckState(res);
73254 }
73255 if (_v) {
73256 void *vptr = 0;
73257 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73258 _v = SWIG_CheckState(res);
73259 if (_v) {
73260 {
73261 int res = SWIG_AsVal_long(argv[3], NULL);
73262 _v = SWIG_CheckState(res);
73263 }
73264 if (_v) {
73265 {
73266 int res = SWIG_AsVal_size_t(argv[4], NULL);
73267 _v = SWIG_CheckState(res);
73268 }
73269 if (_v) {
73270 {
73271 int res = SWIG_AsVal_long(argv[5], NULL);
73272 _v = SWIG_CheckState(res);
73273 }
73274 if (_v) {
73275 return _wrap_int_maxheap_array_t_addn__SWIG_0(self, args);
73276 }
73277 }
73278 }
73279 }
73280 }
73281 }
73282 }
73283
73284 fail:
73285 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'int_maxheap_array_t_addn'.\n"
73286 " Possible C/C++ prototypes are:\n"
73287 " faiss::HeapArray< faiss::CMax< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI,size_t,long)\n"
73288 " faiss::HeapArray< faiss::CMax< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI,size_t)\n"
73289 " faiss::HeapArray< faiss::CMax< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI)\n"
73290 " faiss::HeapArray< faiss::CMax< int,long > >::addn(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *)\n");
73291 return 0;
73292 }
73293
73294
73295 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73296 PyObject *resultobj = 0;
73297 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73298 size_t arg2 ;
73299 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73300 faiss::HeapArray< faiss::CMax< int,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMax< int,long > >::TI *) 0 ;
73301 long arg5 ;
73302 size_t arg6 ;
73303 long arg7 ;
73304 void *argp1 = 0 ;
73305 int res1 = 0 ;
73306 size_t val2 ;
73307 int ecode2 = 0 ;
73308 void *argp3 = 0 ;
73309 int res3 = 0 ;
73310 void *argp4 = 0 ;
73311 int res4 = 0 ;
73312 long val5 ;
73313 int ecode5 = 0 ;
73314 size_t val6 ;
73315 int ecode6 = 0 ;
73316 long val7 ;
73317 int ecode7 = 0 ;
73318 PyObject * obj0 = 0 ;
73319 PyObject * obj1 = 0 ;
73320 PyObject * obj2 = 0 ;
73321 PyObject * obj3 = 0 ;
73322 PyObject * obj4 = 0 ;
73323 PyObject * obj5 = 0 ;
73324 PyObject * obj6 = 0 ;
73325
73326 if (!PyArg_ParseTuple(args,(char *)"OOOOOOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5,&obj6)) SWIG_fail;
73327 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73328 if (!SWIG_IsOK(res1)) {
73329 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73330 }
73331 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73332 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
73333 if (!SWIG_IsOK(ecode2)) {
73334 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
73335 }
73336 arg2 = static_cast< size_t >(val2);
73337 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
73338 if (!SWIG_IsOK(res3)) {
73339 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
73340 }
73341 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
73342 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
73343 if (!SWIG_IsOK(res4)) {
73344 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI const *""'");
73345 }
73346 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp4);
73347 ecode5 = SWIG_AsVal_long(obj4, &val5);
73348 if (!SWIG_IsOK(ecode5)) {
73349 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
73350 }
73351 arg5 = static_cast< long >(val5);
73352 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
73353 if (!SWIG_IsOK(ecode6)) {
73354 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
73355 }
73356 arg6 = static_cast< size_t >(val6);
73357 ecode7 = SWIG_AsVal_long(obj6, &val7);
73358 if (!SWIG_IsOK(ecode7)) {
73359 SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "7"" of type '" "long""'");
73360 }
73361 arg7 = static_cast< long >(val7);
73362 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< int,long > >::TI const *)arg4,arg5,arg6,arg7);
73363 resultobj = SWIG_Py_Void();
73364 return resultobj;
73365 fail:
73366 return NULL;
73367 }
73368
73369
73370 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73371 PyObject *resultobj = 0;
73372 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73373 size_t arg2 ;
73374 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73375 faiss::HeapArray< faiss::CMax< int,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMax< int,long > >::TI *) 0 ;
73376 long arg5 ;
73377 size_t arg6 ;
73378 void *argp1 = 0 ;
73379 int res1 = 0 ;
73380 size_t val2 ;
73381 int ecode2 = 0 ;
73382 void *argp3 = 0 ;
73383 int res3 = 0 ;
73384 void *argp4 = 0 ;
73385 int res4 = 0 ;
73386 long val5 ;
73387 int ecode5 = 0 ;
73388 size_t val6 ;
73389 int ecode6 = 0 ;
73390 PyObject * obj0 = 0 ;
73391 PyObject * obj1 = 0 ;
73392 PyObject * obj2 = 0 ;
73393 PyObject * obj3 = 0 ;
73394 PyObject * obj4 = 0 ;
73395 PyObject * obj5 = 0 ;
73396
73397 if (!PyArg_ParseTuple(args,(char *)"OOOOOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4,&obj5)) SWIG_fail;
73398 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73399 if (!SWIG_IsOK(res1)) {
73400 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73401 }
73402 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73403 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
73404 if (!SWIG_IsOK(ecode2)) {
73405 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
73406 }
73407 arg2 = static_cast< size_t >(val2);
73408 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
73409 if (!SWIG_IsOK(res3)) {
73410 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
73411 }
73412 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
73413 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
73414 if (!SWIG_IsOK(res4)) {
73415 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI const *""'");
73416 }
73417 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp4);
73418 ecode5 = SWIG_AsVal_long(obj4, &val5);
73419 if (!SWIG_IsOK(ecode5)) {
73420 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
73421 }
73422 arg5 = static_cast< long >(val5);
73423 ecode6 = SWIG_AsVal_size_t(obj5, &val6);
73424 if (!SWIG_IsOK(ecode6)) {
73425 SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "6"" of type '" "size_t""'");
73426 }
73427 arg6 = static_cast< size_t >(val6);
73428 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< int,long > >::TI const *)arg4,arg5,arg6);
73429 resultobj = SWIG_Py_Void();
73430 return resultobj;
73431 fail:
73432 return NULL;
73433 }
73434
73435
73436 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73437 PyObject *resultobj = 0;
73438 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73439 size_t arg2 ;
73440 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73441 faiss::HeapArray< faiss::CMax< int,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMax< int,long > >::TI *) 0 ;
73442 long arg5 ;
73443 void *argp1 = 0 ;
73444 int res1 = 0 ;
73445 size_t val2 ;
73446 int ecode2 = 0 ;
73447 void *argp3 = 0 ;
73448 int res3 = 0 ;
73449 void *argp4 = 0 ;
73450 int res4 = 0 ;
73451 long val5 ;
73452 int ecode5 = 0 ;
73453 PyObject * obj0 = 0 ;
73454 PyObject * obj1 = 0 ;
73455 PyObject * obj2 = 0 ;
73456 PyObject * obj3 = 0 ;
73457 PyObject * obj4 = 0 ;
73458
73459 if (!PyArg_ParseTuple(args,(char *)"OOOOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
73460 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73461 if (!SWIG_IsOK(res1)) {
73462 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73463 }
73464 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73465 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
73466 if (!SWIG_IsOK(ecode2)) {
73467 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
73468 }
73469 arg2 = static_cast< size_t >(val2);
73470 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
73471 if (!SWIG_IsOK(res3)) {
73472 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
73473 }
73474 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
73475 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
73476 if (!SWIG_IsOK(res4)) {
73477 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI const *""'");
73478 }
73479 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp4);
73480 ecode5 = SWIG_AsVal_long(obj4, &val5);
73481 if (!SWIG_IsOK(ecode5)) {
73482 SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "5"" of type '" "long""'");
73483 }
73484 arg5 = static_cast< long >(val5);
73485 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< int,long > >::TI const *)arg4,arg5);
73486 resultobj = SWIG_Py_Void();
73487 return resultobj;
73488 fail:
73489 return NULL;
73490 }
73491
73492
73493 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73494 PyObject *resultobj = 0;
73495 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73496 size_t arg2 ;
73497 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73498 faiss::HeapArray< faiss::CMax< int,long > >::TI *arg4 = (faiss::HeapArray< faiss::CMax< int,long > >::TI *) 0 ;
73499 void *argp1 = 0 ;
73500 int res1 = 0 ;
73501 size_t val2 ;
73502 int ecode2 = 0 ;
73503 void *argp3 = 0 ;
73504 int res3 = 0 ;
73505 void *argp4 = 0 ;
73506 int res4 = 0 ;
73507 PyObject * obj0 = 0 ;
73508 PyObject * obj1 = 0 ;
73509 PyObject * obj2 = 0 ;
73510 PyObject * obj3 = 0 ;
73511
73512 if (!PyArg_ParseTuple(args,(char *)"OOOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
73513 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73514 if (!SWIG_IsOK(res1)) {
73515 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73516 }
73517 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73518 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
73519 if (!SWIG_IsOK(ecode2)) {
73520 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
73521 }
73522 arg2 = static_cast< size_t >(val2);
73523 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
73524 if (!SWIG_IsOK(res3)) {
73525 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
73526 }
73527 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
73528 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
73529 if (!SWIG_IsOK(res4)) {
73530 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "4"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI const *""'");
73531 }
73532 arg4 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp4);
73533 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3,(faiss::HeapArray< faiss::CMax< int,long > >::TI const *)arg4);
73534 resultobj = SWIG_Py_Void();
73535 return resultobj;
73536 fail:
73537 return NULL;
73538 }
73539
73540
73541 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids__SWIG_4(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73542 PyObject *resultobj = 0;
73543 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73544 size_t arg2 ;
73545 faiss::HeapArray< faiss::CMax< int,long > >::T *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73546 void *argp1 = 0 ;
73547 int res1 = 0 ;
73548 size_t val2 ;
73549 int ecode2 = 0 ;
73550 void *argp3 = 0 ;
73551 int res3 = 0 ;
73552 PyObject * obj0 = 0 ;
73553 PyObject * obj1 = 0 ;
73554 PyObject * obj2 = 0 ;
73555
73556 if (!PyArg_ParseTuple(args,(char *)"OOO:int_maxheap_array_t_addn_with_ids",&obj0,&obj1,&obj2)) SWIG_fail;
73557 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73558 if (!SWIG_IsOK(res1)) {
73559 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73560 }
73561 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73562 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
73563 if (!SWIG_IsOK(ecode2)) {
73564 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "2"" of type '" "size_t""'");
73565 }
73566 arg2 = static_cast< size_t >(val2);
73567 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_int, 0 | 0 );
73568 if (!SWIG_IsOK(res3)) {
73569 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_addn_with_ids" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T const *""'");
73570 }
73571 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp3);
73572 (arg1)->addn_with_ids(arg2,(faiss::HeapArray< faiss::CMax< int,long > >::T const *)arg3);
73573 resultobj = SWIG_Py_Void();
73574 return resultobj;
73575 fail:
73576 return NULL;
73577 }
73578
73579
73580 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_addn_with_ids(PyObject *self, PyObject *args) {
73581 Py_ssize_t argc;
73582 PyObject *argv[8] = {
73583 0
73584 };
73585 Py_ssize_t ii;
73586
73587 if (!PyTuple_Check(args)) SWIG_fail;
73588 argc = args ? PyObject_Length(args) : 0;
73589 for (ii = 0; (ii < 7) && (ii < argc); ii++) {
73590 argv[ii] = PyTuple_GET_ITEM(args,ii);
73591 }
73592 if (argc == 3) {
73593 int _v;
73594 void *vptr = 0;
73595 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73596 _v = SWIG_CheckState(res);
73597 if (_v) {
73598 {
73599 int res = SWIG_AsVal_size_t(argv[1], NULL);
73600 _v = SWIG_CheckState(res);
73601 }
73602 if (_v) {
73603 void *vptr = 0;
73604 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73605 _v = SWIG_CheckState(res);
73606 if (_v) {
73607 return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_4(self, args);
73608 }
73609 }
73610 }
73611 }
73612 if (argc == 4) {
73613 int _v;
73614 void *vptr = 0;
73615 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73616 _v = SWIG_CheckState(res);
73617 if (_v) {
73618 {
73619 int res = SWIG_AsVal_size_t(argv[1], NULL);
73620 _v = SWIG_CheckState(res);
73621 }
73622 if (_v) {
73623 void *vptr = 0;
73624 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73625 _v = SWIG_CheckState(res);
73626 if (_v) {
73627 void *vptr = 0;
73628 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
73629 _v = SWIG_CheckState(res);
73630 if (_v) {
73631 return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_3(self, args);
73632 }
73633 }
73634 }
73635 }
73636 }
73637 if (argc == 5) {
73638 int _v;
73639 void *vptr = 0;
73640 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73641 _v = SWIG_CheckState(res);
73642 if (_v) {
73643 {
73644 int res = SWIG_AsVal_size_t(argv[1], NULL);
73645 _v = SWIG_CheckState(res);
73646 }
73647 if (_v) {
73648 void *vptr = 0;
73649 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73650 _v = SWIG_CheckState(res);
73651 if (_v) {
73652 void *vptr = 0;
73653 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
73654 _v = SWIG_CheckState(res);
73655 if (_v) {
73656 {
73657 int res = SWIG_AsVal_long(argv[4], NULL);
73658 _v = SWIG_CheckState(res);
73659 }
73660 if (_v) {
73661 return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_2(self, args);
73662 }
73663 }
73664 }
73665 }
73666 }
73667 }
73668 if (argc == 6) {
73669 int _v;
73670 void *vptr = 0;
73671 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73672 _v = SWIG_CheckState(res);
73673 if (_v) {
73674 {
73675 int res = SWIG_AsVal_size_t(argv[1], NULL);
73676 _v = SWIG_CheckState(res);
73677 }
73678 if (_v) {
73679 void *vptr = 0;
73680 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73681 _v = SWIG_CheckState(res);
73682 if (_v) {
73683 void *vptr = 0;
73684 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
73685 _v = SWIG_CheckState(res);
73686 if (_v) {
73687 {
73688 int res = SWIG_AsVal_long(argv[4], NULL);
73689 _v = SWIG_CheckState(res);
73690 }
73691 if (_v) {
73692 {
73693 int res = SWIG_AsVal_size_t(argv[5], NULL);
73694 _v = SWIG_CheckState(res);
73695 }
73696 if (_v) {
73697 return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_1(self, args);
73698 }
73699 }
73700 }
73701 }
73702 }
73703 }
73704 }
73705 if (argc == 7) {
73706 int _v;
73707 void *vptr = 0;
73708 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0);
73709 _v = SWIG_CheckState(res);
73710 if (_v) {
73711 {
73712 int res = SWIG_AsVal_size_t(argv[1], NULL);
73713 _v = SWIG_CheckState(res);
73714 }
73715 if (_v) {
73716 void *vptr = 0;
73717 int res = SWIG_ConvertPtr(argv[2], &vptr, SWIGTYPE_p_int, 0);
73718 _v = SWIG_CheckState(res);
73719 if (_v) {
73720 void *vptr = 0;
73721 int res = SWIG_ConvertPtr(argv[3], &vptr, SWIGTYPE_p_long, 0);
73722 _v = SWIG_CheckState(res);
73723 if (_v) {
73724 {
73725 int res = SWIG_AsVal_long(argv[4], NULL);
73726 _v = SWIG_CheckState(res);
73727 }
73728 if (_v) {
73729 {
73730 int res = SWIG_AsVal_size_t(argv[5], NULL);
73731 _v = SWIG_CheckState(res);
73732 }
73733 if (_v) {
73734 {
73735 int res = SWIG_AsVal_long(argv[6], NULL);
73736 _v = SWIG_CheckState(res);
73737 }
73738 if (_v) {
73739 return _wrap_int_maxheap_array_t_addn_with_ids__SWIG_0(self, args);
73740 }
73741 }
73742 }
73743 }
73744 }
73745 }
73746 }
73747 }
73748
73749 fail:
73750 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'int_maxheap_array_t_addn_with_ids'.\n"
73751 " Possible C/C++ prototypes are:\n"
73752 " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI const *,long,size_t,long)\n"
73753 " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI const *,long,size_t)\n"
73754 " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI const *,long)\n"
73755 " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *,faiss::HeapArray< faiss::CMax< int,long > >::TI const *)\n"
73756 " faiss::HeapArray< faiss::CMax< int,long > >::addn_with_ids(size_t,faiss::HeapArray< faiss::CMax< int,long > >::T const *)\n");
73757 return 0;
73758 }
73759
73760
73761 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_reorder(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73762 PyObject *resultobj = 0;
73763 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73764 void *argp1 = 0 ;
73765 int res1 = 0 ;
73766 PyObject * obj0 = 0 ;
73767
73768 if (!PyArg_ParseTuple(args,(char *)"O:int_maxheap_array_t_reorder",&obj0)) SWIG_fail;
73769 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73770 if (!SWIG_IsOK(res1)) {
73771 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_reorder" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73772 }
73773 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73774 (arg1)->reorder();
73775 resultobj = SWIG_Py_Void();
73776 return resultobj;
73777 fail:
73778 return NULL;
73779 }
73780
73781
73782 SWIGINTERN PyObject *_wrap_int_maxheap_array_t_per_line_extrema(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73783 PyObject *resultobj = 0;
73784 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73785 faiss::HeapArray< faiss::CMax< int,long > >::T *arg2 = (faiss::HeapArray< faiss::CMax< int,long > >::T *) 0 ;
73786 faiss::HeapArray< faiss::CMax< int,long > >::TI *arg3 = (faiss::HeapArray< faiss::CMax< int,long > >::TI *) 0 ;
73787 void *argp1 = 0 ;
73788 int res1 = 0 ;
73789 void *argp2 = 0 ;
73790 int res2 = 0 ;
73791 void *argp3 = 0 ;
73792 int res3 = 0 ;
73793 PyObject * obj0 = 0 ;
73794 PyObject * obj1 = 0 ;
73795 PyObject * obj2 = 0 ;
73796
73797 if (!PyArg_ParseTuple(args,(char *)"OOO:int_maxheap_array_t_per_line_extrema",&obj0,&obj1,&obj2)) SWIG_fail;
73798 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0 | 0 );
73799 if (!SWIG_IsOK(res1)) {
73800 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "int_maxheap_array_t_per_line_extrema" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > const *""'");
73801 }
73802 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73803 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_int, 0 | 0 );
73804 if (!SWIG_IsOK(res2)) {
73805 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "int_maxheap_array_t_per_line_extrema" "', argument " "2"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::T *""'");
73806 }
73807 arg2 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::T * >(argp2);
73808 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
73809 if (!SWIG_IsOK(res3)) {
73810 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "int_maxheap_array_t_per_line_extrema" "', argument " "3"" of type '" "faiss::HeapArray< faiss::CMax< int,long > >::TI *""'");
73811 }
73812 arg3 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > >::TI * >(argp3);
73813 ((faiss::HeapArray< faiss::CMax< int,long > > const *)arg1)->per_line_extrema(arg2,arg3);
73814 resultobj = SWIG_Py_Void();
73815 return resultobj;
73816 fail:
73817 return NULL;
73818 }
73819
73820
73821 SWIGINTERN PyObject *_wrap_new_int_maxheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73822 PyObject *resultobj = 0;
73823 faiss::HeapArray< faiss::CMax< int,long > > *result = 0 ;
73824
73825 if (!PyArg_ParseTuple(args,(char *)":new_int_maxheap_array_t")) SWIG_fail;
73826 result = (faiss::HeapArray< faiss::CMax< int,long > > *)new faiss::HeapArray< faiss::CMax< int,long > >();
73827 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, SWIG_POINTER_NEW | 0 );
73828 return resultobj;
73829 fail:
73830 return NULL;
73831 }
73832
73833
73834 SWIGINTERN PyObject *_wrap_delete_int_maxheap_array_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73835 PyObject *resultobj = 0;
73836 faiss::HeapArray< faiss::CMax< int,long > > *arg1 = (faiss::HeapArray< faiss::CMax< int,long > > *) 0 ;
73837 void *argp1 = 0 ;
73838 int res1 = 0 ;
73839 PyObject * obj0 = 0 ;
73840
73841 if (!PyArg_ParseTuple(args,(char *)"O:delete_int_maxheap_array_t",&obj0)) SWIG_fail;
73842 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, SWIG_POINTER_DISOWN | 0 );
73843 if (!SWIG_IsOK(res1)) {
73844 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_int_maxheap_array_t" "', argument " "1"" of type '" "faiss::HeapArray< faiss::CMax< int,long > > *""'");
73845 }
73846 arg1 = reinterpret_cast< faiss::HeapArray< faiss::CMax< int,long > > * >(argp1);
73847 delete arg1;
73848 resultobj = SWIG_Py_Void();
73849 return resultobj;
73850 fail:
73851 return NULL;
73852 }
73853
73854
73855 SWIGINTERN PyObject *int_maxheap_array_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73856 PyObject *obj;
73857 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
73858 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, SWIG_NewClientData(obj));
73859 return SWIG_Py_Void();
73860 }
73861
73862 SWIGINTERN PyObject *_wrap_omp_set_num_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73863 PyObject *resultobj = 0;
73864 int arg1 ;
73865 int val1 ;
73866 int ecode1 = 0 ;
73867 PyObject * obj0 = 0 ;
73868
73869 if (!PyArg_ParseTuple(args,(char *)"O:omp_set_num_threads",&obj0)) SWIG_fail;
73870 ecode1 = SWIG_AsVal_int(obj0, &val1);
73871 if (!SWIG_IsOK(ecode1)) {
73872 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "omp_set_num_threads" "', argument " "1"" of type '" "int""'");
73873 }
73874 arg1 = static_cast< int >(val1);
73875 omp_set_num_threads(arg1);
73876 resultobj = SWIG_Py_Void();
73877 return resultobj;
73878 fail:
73879 return NULL;
73880 }
73881
73882
73883 SWIGINTERN PyObject *_wrap_omp_get_max_threads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73884 PyObject *resultobj = 0;
73885 int result;
73886
73887 if (!PyArg_ParseTuple(args,(char *)":omp_get_max_threads")) SWIG_fail;
73888 result = (int)omp_get_max_threads();
73889 resultobj = SWIG_From_int(static_cast< int >(result));
73890 return resultobj;
73891 fail:
73892 return NULL;
73893 }
73894
73895
73896 SWIGINTERN PyObject *_wrap_memcpy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73897 PyObject *resultobj = 0;
73898 void *arg1 = (void *) 0 ;
73899 void *arg2 = (void *) 0 ;
73900 size_t arg3 ;
73901 int res1 ;
73902 int res2 ;
73903 size_t val3 ;
73904 int ecode3 = 0 ;
73905 PyObject * obj0 = 0 ;
73906 PyObject * obj1 = 0 ;
73907 PyObject * obj2 = 0 ;
73908 void *result = 0 ;
73909
73910 if (!PyArg_ParseTuple(args,(char *)"OOO:memcpy",&obj0,&obj1,&obj2)) SWIG_fail;
73911 res1 = SWIG_ConvertPtr(obj0,SWIG_as_voidptrptr(&arg1), 0, 0);
73912 if (!SWIG_IsOK(res1)) {
73913 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "memcpy" "', argument " "1"" of type '" "void *""'");
73914 }
73915 res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
73916 if (!SWIG_IsOK(res2)) {
73917 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "memcpy" "', argument " "2"" of type '" "void const *""'");
73918 }
73919 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
73920 if (!SWIG_IsOK(ecode3)) {
73921 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "memcpy" "', argument " "3"" of type '" "size_t""'");
73922 }
73923 arg3 = static_cast< size_t >(val3);
73924 result = (void *)memcpy(arg1,(void const *)arg2,arg3);
73925 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 | 0 );
73926 return resultobj;
73927 fail:
73928 return NULL;
73929 }
73930
73931
73932 SWIGINTERN PyObject *_wrap_cast_integer_to_float_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73933 PyObject *resultobj = 0;
73934 long arg1 ;
73935 long val1 ;
73936 int ecode1 = 0 ;
73937 PyObject * obj0 = 0 ;
73938 float *result = 0 ;
73939
73940 if (!PyArg_ParseTuple(args,(char *)"O:cast_integer_to_float_ptr",&obj0)) SWIG_fail;
73941 ecode1 = SWIG_AsVal_long(obj0, &val1);
73942 if (!SWIG_IsOK(ecode1)) {
73943 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cast_integer_to_float_ptr" "', argument " "1"" of type '" "long""'");
73944 }
73945 arg1 = static_cast< long >(val1);
73946 result = (float *)cast_integer_to_float_ptr(arg1);
73947 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
73948 return resultobj;
73949 fail:
73950 return NULL;
73951 }
73952
73953
73954 SWIGINTERN PyObject *_wrap_cast_integer_to_long_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73955 PyObject *resultobj = 0;
73956 long arg1 ;
73957 long val1 ;
73958 int ecode1 = 0 ;
73959 PyObject * obj0 = 0 ;
73960 long *result = 0 ;
73961
73962 if (!PyArg_ParseTuple(args,(char *)"O:cast_integer_to_long_ptr",&obj0)) SWIG_fail;
73963 ecode1 = SWIG_AsVal_long(obj0, &val1);
73964 if (!SWIG_IsOK(ecode1)) {
73965 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cast_integer_to_long_ptr" "', argument " "1"" of type '" "long""'");
73966 }
73967 arg1 = static_cast< long >(val1);
73968 result = (long *)cast_integer_to_long_ptr(arg1);
73969 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
73970 return resultobj;
73971 fail:
73972 return NULL;
73973 }
73974
73975
73976 SWIGINTERN PyObject *_wrap_cast_integer_to_int_ptr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73977 PyObject *resultobj = 0;
73978 long arg1 ;
73979 long val1 ;
73980 int ecode1 = 0 ;
73981 PyObject * obj0 = 0 ;
73982 int *result = 0 ;
73983
73984 if (!PyArg_ParseTuple(args,(char *)"O:cast_integer_to_int_ptr",&obj0)) SWIG_fail;
73985 ecode1 = SWIG_AsVal_long(obj0, &val1);
73986 if (!SWIG_IsOK(ecode1)) {
73987 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "cast_integer_to_int_ptr" "', argument " "1"" of type '" "long""'");
73988 }
73989 arg1 = static_cast< long >(val1);
73990 result = (int *)cast_integer_to_int_ptr(arg1);
73991 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 | 0 );
73992 return resultobj;
73993 fail:
73994 return NULL;
73995 }
73996
73997
73998 SWIGINTERN PyObject *_wrap_RangeSearchResult_nq_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
73999 PyObject *resultobj = 0;
74000 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74001 size_t arg2 ;
74002 void *argp1 = 0 ;
74003 int res1 = 0 ;
74004 size_t val2 ;
74005 int ecode2 = 0 ;
74006 PyObject * obj0 = 0 ;
74007 PyObject * obj1 = 0 ;
74008
74009 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_nq_set",&obj0,&obj1)) SWIG_fail;
74010 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74011 if (!SWIG_IsOK(res1)) {
74012 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_nq_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74013 }
74014 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74015 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
74016 if (!SWIG_IsOK(ecode2)) {
74017 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RangeSearchResult_nq_set" "', argument " "2"" of type '" "size_t""'");
74018 }
74019 arg2 = static_cast< size_t >(val2);
74020 if (arg1) (arg1)->nq = arg2;
74021 resultobj = SWIG_Py_Void();
74022 return resultobj;
74023 fail:
74024 return NULL;
74025 }
74026
74027
74028 SWIGINTERN PyObject *_wrap_RangeSearchResult_nq_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74029 PyObject *resultobj = 0;
74030 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74031 void *argp1 = 0 ;
74032 int res1 = 0 ;
74033 PyObject * obj0 = 0 ;
74034 size_t result;
74035
74036 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_nq_get",&obj0)) SWIG_fail;
74037 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74038 if (!SWIG_IsOK(res1)) {
74039 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_nq_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74040 }
74041 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74042 result = (size_t) ((arg1)->nq);
74043 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
74044 return resultobj;
74045 fail:
74046 return NULL;
74047 }
74048
74049
74050 SWIGINTERN PyObject *_wrap_RangeSearchResult_lims_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74051 PyObject *resultobj = 0;
74052 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74053 size_t *arg2 = (size_t *) 0 ;
74054 void *argp1 = 0 ;
74055 int res1 = 0 ;
74056 void *argp2 = 0 ;
74057 int res2 = 0 ;
74058 PyObject * obj0 = 0 ;
74059 PyObject * obj1 = 0 ;
74060
74061 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_lims_set",&obj0,&obj1)) SWIG_fail;
74062 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74063 if (!SWIG_IsOK(res1)) {
74064 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_lims_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74065 }
74066 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74067 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_unsigned_long, SWIG_POINTER_DISOWN | 0 );
74068 if (!SWIG_IsOK(res2)) {
74069 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchResult_lims_set" "', argument " "2"" of type '" "size_t *""'");
74070 }
74071 arg2 = reinterpret_cast< size_t * >(argp2);
74072 if (arg1) (arg1)->lims = arg2;
74073 resultobj = SWIG_Py_Void();
74074 return resultobj;
74075 fail:
74076 return NULL;
74077 }
74078
74079
74080 SWIGINTERN PyObject *_wrap_RangeSearchResult_lims_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74081 PyObject *resultobj = 0;
74082 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74083 void *argp1 = 0 ;
74084 int res1 = 0 ;
74085 PyObject * obj0 = 0 ;
74086 size_t *result = 0 ;
74087
74088 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_lims_get",&obj0)) SWIG_fail;
74089 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74090 if (!SWIG_IsOK(res1)) {
74091 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_lims_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74092 }
74093 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74094 result = (size_t *) ((arg1)->lims);
74095 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_unsigned_long, 0 | 0 );
74096 return resultobj;
74097 fail:
74098 return NULL;
74099 }
74100
74101
74102 SWIGINTERN PyObject *_wrap_RangeSearchResult_labels_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74103 PyObject *resultobj = 0;
74104 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74105 faiss::RangeSearchResult::idx_t *arg2 = (faiss::RangeSearchResult::idx_t *) 0 ;
74106 void *argp1 = 0 ;
74107 int res1 = 0 ;
74108 void *argp2 = 0 ;
74109 int res2 = 0 ;
74110 PyObject * obj0 = 0 ;
74111 PyObject * obj1 = 0 ;
74112
74113 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_labels_set",&obj0,&obj1)) SWIG_fail;
74114 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74115 if (!SWIG_IsOK(res1)) {
74116 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_labels_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74117 }
74118 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74119 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, SWIG_POINTER_DISOWN | 0 );
74120 if (!SWIG_IsOK(res2)) {
74121 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchResult_labels_set" "', argument " "2"" of type '" "faiss::RangeSearchResult::idx_t *""'");
74122 }
74123 arg2 = reinterpret_cast< faiss::RangeSearchResult::idx_t * >(argp2);
74124 if (arg1) (arg1)->labels = arg2;
74125 resultobj = SWIG_Py_Void();
74126 return resultobj;
74127 fail:
74128 return NULL;
74129 }
74130
74131
74132 SWIGINTERN PyObject *_wrap_RangeSearchResult_labels_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74133 PyObject *resultobj = 0;
74134 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74135 void *argp1 = 0 ;
74136 int res1 = 0 ;
74137 PyObject * obj0 = 0 ;
74138 faiss::RangeSearchResult::idx_t *result = 0 ;
74139
74140 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_labels_get",&obj0)) SWIG_fail;
74141 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74142 if (!SWIG_IsOK(res1)) {
74143 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_labels_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74144 }
74145 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74146 result = (faiss::RangeSearchResult::idx_t *) ((arg1)->labels);
74147 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_long, 0 | 0 );
74148 return resultobj;
74149 fail:
74150 return NULL;
74151 }
74152
74153
74154 SWIGINTERN PyObject *_wrap_RangeSearchResult_distances_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74155 PyObject *resultobj = 0;
74156 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74157 float *arg2 = (float *) 0 ;
74158 void *argp1 = 0 ;
74159 int res1 = 0 ;
74160 void *argp2 = 0 ;
74161 int res2 = 0 ;
74162 PyObject * obj0 = 0 ;
74163 PyObject * obj1 = 0 ;
74164
74165 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_distances_set",&obj0,&obj1)) SWIG_fail;
74166 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74167 if (!SWIG_IsOK(res1)) {
74168 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_distances_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74169 }
74170 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74171 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_float, SWIG_POINTER_DISOWN | 0 );
74172 if (!SWIG_IsOK(res2)) {
74173 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchResult_distances_set" "', argument " "2"" of type '" "float *""'");
74174 }
74175 arg2 = reinterpret_cast< float * >(argp2);
74176 if (arg1) (arg1)->distances = arg2;
74177 resultobj = SWIG_Py_Void();
74178 return resultobj;
74179 fail:
74180 return NULL;
74181 }
74182
74183
74184 SWIGINTERN PyObject *_wrap_RangeSearchResult_distances_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74185 PyObject *resultobj = 0;
74186 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74187 void *argp1 = 0 ;
74188 int res1 = 0 ;
74189 PyObject * obj0 = 0 ;
74190 float *result = 0 ;
74191
74192 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_distances_get",&obj0)) SWIG_fail;
74193 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74194 if (!SWIG_IsOK(res1)) {
74195 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_distances_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74196 }
74197 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74198 result = (float *) ((arg1)->distances);
74199 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 | 0 );
74200 return resultobj;
74201 fail:
74202 return NULL;
74203 }
74204
74205
74206 SWIGINTERN PyObject *_wrap_RangeSearchResult_buffer_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74207 PyObject *resultobj = 0;
74208 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74209 size_t arg2 ;
74210 void *argp1 = 0 ;
74211 int res1 = 0 ;
74212 size_t val2 ;
74213 int ecode2 = 0 ;
74214 PyObject * obj0 = 0 ;
74215 PyObject * obj1 = 0 ;
74216
74217 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchResult_buffer_size_set",&obj0,&obj1)) SWIG_fail;
74218 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74219 if (!SWIG_IsOK(res1)) {
74220 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_buffer_size_set" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74221 }
74222 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74223 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
74224 if (!SWIG_IsOK(ecode2)) {
74225 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RangeSearchResult_buffer_size_set" "', argument " "2"" of type '" "size_t""'");
74226 }
74227 arg2 = static_cast< size_t >(val2);
74228 if (arg1) (arg1)->buffer_size = arg2;
74229 resultobj = SWIG_Py_Void();
74230 return resultobj;
74231 fail:
74232 return NULL;
74233 }
74234
74235
74236 SWIGINTERN PyObject *_wrap_RangeSearchResult_buffer_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74237 PyObject *resultobj = 0;
74238 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74239 void *argp1 = 0 ;
74240 int res1 = 0 ;
74241 PyObject * obj0 = 0 ;
74242 size_t result;
74243
74244 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_buffer_size_get",&obj0)) SWIG_fail;
74245 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74246 if (!SWIG_IsOK(res1)) {
74247 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_buffer_size_get" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74248 }
74249 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74250 result = (size_t) ((arg1)->buffer_size);
74251 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
74252 return resultobj;
74253 fail:
74254 return NULL;
74255 }
74256
74257
74258 SWIGINTERN PyObject *_wrap_new_RangeSearchResult__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74259 PyObject *resultobj = 0;
74260 faiss::RangeSearchResult::idx_t arg1 ;
74261 bool arg2 ;
74262 long val1 ;
74263 int ecode1 = 0 ;
74264 bool val2 ;
74265 int ecode2 = 0 ;
74266 PyObject * obj0 = 0 ;
74267 PyObject * obj1 = 0 ;
74268 faiss::RangeSearchResult *result = 0 ;
74269
74270 if (!PyArg_ParseTuple(args,(char *)"OO:new_RangeSearchResult",&obj0,&obj1)) SWIG_fail;
74271 ecode1 = SWIG_AsVal_long(obj0, &val1);
74272 if (!SWIG_IsOK(ecode1)) {
74273 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RangeSearchResult" "', argument " "1"" of type '" "faiss::RangeSearchResult::idx_t""'");
74274 }
74275 arg1 = static_cast< faiss::RangeSearchResult::idx_t >(val1);
74276 ecode2 = SWIG_AsVal_bool(obj1, &val2);
74277 if (!SWIG_IsOK(ecode2)) {
74278 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_RangeSearchResult" "', argument " "2"" of type '" "bool""'");
74279 }
74280 arg2 = static_cast< bool >(val2);
74281 result = (faiss::RangeSearchResult *)new faiss::RangeSearchResult(arg1,arg2);
74282 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchResult, SWIG_POINTER_NEW | 0 );
74283 return resultobj;
74284 fail:
74285 return NULL;
74286 }
74287
74288
74289 SWIGINTERN PyObject *_wrap_new_RangeSearchResult__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74290 PyObject *resultobj = 0;
74291 faiss::RangeSearchResult::idx_t arg1 ;
74292 long val1 ;
74293 int ecode1 = 0 ;
74294 PyObject * obj0 = 0 ;
74295 faiss::RangeSearchResult *result = 0 ;
74296
74297 if (!PyArg_ParseTuple(args,(char *)"O:new_RangeSearchResult",&obj0)) SWIG_fail;
74298 ecode1 = SWIG_AsVal_long(obj0, &val1);
74299 if (!SWIG_IsOK(ecode1)) {
74300 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_RangeSearchResult" "', argument " "1"" of type '" "faiss::RangeSearchResult::idx_t""'");
74301 }
74302 arg1 = static_cast< faiss::RangeSearchResult::idx_t >(val1);
74303 result = (faiss::RangeSearchResult *)new faiss::RangeSearchResult(arg1);
74304 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchResult, SWIG_POINTER_NEW | 0 );
74305 return resultobj;
74306 fail:
74307 return NULL;
74308 }
74309
74310
74311 SWIGINTERN PyObject *_wrap_new_RangeSearchResult(PyObject *self, PyObject *args) {
74312 Py_ssize_t argc;
74313 PyObject *argv[3] = {
74314 0
74315 };
74316 Py_ssize_t ii;
74317
74318 if (!PyTuple_Check(args)) SWIG_fail;
74319 argc = args ? PyObject_Length(args) : 0;
74320 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
74321 argv[ii] = PyTuple_GET_ITEM(args,ii);
74322 }
74323 if (argc == 1) {
74324 int _v;
74325 {
74326 int res = SWIG_AsVal_long(argv[0], NULL);
74327 _v = SWIG_CheckState(res);
74328 }
74329 if (_v) {
74330 return _wrap_new_RangeSearchResult__SWIG_1(self, args);
74331 }
74332 }
74333 if (argc == 2) {
74334 int _v;
74335 {
74336 int res = SWIG_AsVal_long(argv[0], NULL);
74337 _v = SWIG_CheckState(res);
74338 }
74339 if (_v) {
74340 {
74341 int res = SWIG_AsVal_bool(argv[1], NULL);
74342 _v = SWIG_CheckState(res);
74343 }
74344 if (_v) {
74345 return _wrap_new_RangeSearchResult__SWIG_0(self, args);
74346 }
74347 }
74348 }
74349
74350 fail:
74351 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'new_RangeSearchResult'.\n"
74352 " Possible C/C++ prototypes are:\n"
74353 " faiss::RangeSearchResult::RangeSearchResult(faiss::RangeSearchResult::idx_t,bool)\n"
74354 " faiss::RangeSearchResult::RangeSearchResult(faiss::RangeSearchResult::idx_t)\n");
74355 return 0;
74356 }
74357
74358
74359 SWIGINTERN PyObject *_wrap_RangeSearchResult_do_allocation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74360 PyObject *resultobj = 0;
74361 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74362 void *argp1 = 0 ;
74363 int res1 = 0 ;
74364 PyObject * obj0 = 0 ;
74365
74366 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchResult_do_allocation",&obj0)) SWIG_fail;
74367 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
74368 if (!SWIG_IsOK(res1)) {
74369 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchResult_do_allocation" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74370 }
74371 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74372 (arg1)->do_allocation();
74373 resultobj = SWIG_Py_Void();
74374 return resultobj;
74375 fail:
74376 return NULL;
74377 }
74378
74379
74380 SWIGINTERN PyObject *_wrap_delete_RangeSearchResult(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74381 PyObject *resultobj = 0;
74382 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
74383 void *argp1 = 0 ;
74384 int res1 = 0 ;
74385 PyObject * obj0 = 0 ;
74386
74387 if (!PyArg_ParseTuple(args,(char *)"O:delete_RangeSearchResult",&obj0)) SWIG_fail;
74388 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, SWIG_POINTER_DISOWN | 0 );
74389 if (!SWIG_IsOK(res1)) {
74390 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RangeSearchResult" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
74391 }
74392 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
74393 delete arg1;
74394 resultobj = SWIG_Py_Void();
74395 return resultobj;
74396 fail:
74397 return NULL;
74398 }
74399
74400
74401 SWIGINTERN PyObject *RangeSearchResult_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74402 PyObject *obj;
74403 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
74404 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RangeSearchResult, SWIG_NewClientData(obj));
74405 return SWIG_Py_Void();
74406 }
74407
74408 SWIGINTERN PyObject *_wrap_IDSelector_is_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74409 PyObject *resultobj = 0;
74410 faiss::IDSelector *arg1 = (faiss::IDSelector *) 0 ;
74411 faiss::IDSelector::idx_t arg2 ;
74412 void *argp1 = 0 ;
74413 int res1 = 0 ;
74414 long val2 ;
74415 int ecode2 = 0 ;
74416 PyObject * obj0 = 0 ;
74417 PyObject * obj1 = 0 ;
74418 bool result;
74419
74420 if (!PyArg_ParseTuple(args,(char *)"OO:IDSelector_is_member",&obj0,&obj1)) SWIG_fail;
74421 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelector, 0 | 0 );
74422 if (!SWIG_IsOK(res1)) {
74423 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelector_is_member" "', argument " "1"" of type '" "faiss::IDSelector const *""'");
74424 }
74425 arg1 = reinterpret_cast< faiss::IDSelector * >(argp1);
74426 ecode2 = SWIG_AsVal_long(obj1, &val2);
74427 if (!SWIG_IsOK(ecode2)) {
74428 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelector_is_member" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
74429 }
74430 arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
74431 result = (bool)((faiss::IDSelector const *)arg1)->is_member(arg2);
74432 resultobj = SWIG_From_bool(static_cast< bool >(result));
74433 return resultobj;
74434 fail:
74435 return NULL;
74436 }
74437
74438
74439 SWIGINTERN PyObject *_wrap_delete_IDSelector(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74440 PyObject *resultobj = 0;
74441 faiss::IDSelector *arg1 = (faiss::IDSelector *) 0 ;
74442 void *argp1 = 0 ;
74443 int res1 = 0 ;
74444 PyObject * obj0 = 0 ;
74445
74446 if (!PyArg_ParseTuple(args,(char *)"O:delete_IDSelector",&obj0)) SWIG_fail;
74447 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelector, SWIG_POINTER_DISOWN | 0 );
74448 if (!SWIG_IsOK(res1)) {
74449 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDSelector" "', argument " "1"" of type '" "faiss::IDSelector *""'");
74450 }
74451 arg1 = reinterpret_cast< faiss::IDSelector * >(argp1);
74452 delete arg1;
74453 resultobj = SWIG_Py_Void();
74454 return resultobj;
74455 fail:
74456 return NULL;
74457 }
74458
74459
74460 SWIGINTERN PyObject *IDSelector_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74461 PyObject *obj;
74462 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
74463 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IDSelector, SWIG_NewClientData(obj));
74464 return SWIG_Py_Void();
74465 }
74466
74467 SWIGINTERN PyObject *_wrap_IDSelectorRange_imin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74468 PyObject *resultobj = 0;
74469 faiss::IDSelectorRange *arg1 = (faiss::IDSelectorRange *) 0 ;
74470 faiss::IDSelector::idx_t arg2 ;
74471 void *argp1 = 0 ;
74472 int res1 = 0 ;
74473 long val2 ;
74474 int ecode2 = 0 ;
74475 PyObject * obj0 = 0 ;
74476 PyObject * obj1 = 0 ;
74477
74478 if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorRange_imin_set",&obj0,&obj1)) SWIG_fail;
74479 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
74480 if (!SWIG_IsOK(res1)) {
74481 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_imin_set" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
74482 }
74483 arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
74484 ecode2 = SWIG_AsVal_long(obj1, &val2);
74485 if (!SWIG_IsOK(ecode2)) {
74486 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorRange_imin_set" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
74487 }
74488 arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
74489 if (arg1) (arg1)->imin = arg2;
74490 resultobj = SWIG_Py_Void();
74491 return resultobj;
74492 fail:
74493 return NULL;
74494 }
74495
74496
74497 SWIGINTERN PyObject *_wrap_IDSelectorRange_imin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74498 PyObject *resultobj = 0;
74499 faiss::IDSelectorRange *arg1 = (faiss::IDSelectorRange *) 0 ;
74500 void *argp1 = 0 ;
74501 int res1 = 0 ;
74502 PyObject * obj0 = 0 ;
74503 faiss::IDSelector::idx_t result;
74504
74505 if (!PyArg_ParseTuple(args,(char *)"O:IDSelectorRange_imin_get",&obj0)) SWIG_fail;
74506 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
74507 if (!SWIG_IsOK(res1)) {
74508 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_imin_get" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
74509 }
74510 arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
74511 result = (faiss::IDSelector::idx_t) ((arg1)->imin);
74512 resultobj = SWIG_From_long(static_cast< long >(result));
74513 return resultobj;
74514 fail:
74515 return NULL;
74516 }
74517
74518
74519 SWIGINTERN PyObject *_wrap_IDSelectorRange_imax_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74520 PyObject *resultobj = 0;
74521 faiss::IDSelectorRange *arg1 = (faiss::IDSelectorRange *) 0 ;
74522 faiss::IDSelector::idx_t arg2 ;
74523 void *argp1 = 0 ;
74524 int res1 = 0 ;
74525 long val2 ;
74526 int ecode2 = 0 ;
74527 PyObject * obj0 = 0 ;
74528 PyObject * obj1 = 0 ;
74529
74530 if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorRange_imax_set",&obj0,&obj1)) SWIG_fail;
74531 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
74532 if (!SWIG_IsOK(res1)) {
74533 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_imax_set" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
74534 }
74535 arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
74536 ecode2 = SWIG_AsVal_long(obj1, &val2);
74537 if (!SWIG_IsOK(ecode2)) {
74538 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorRange_imax_set" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
74539 }
74540 arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
74541 if (arg1) (arg1)->imax = arg2;
74542 resultobj = SWIG_Py_Void();
74543 return resultobj;
74544 fail:
74545 return NULL;
74546 }
74547
74548
74549 SWIGINTERN PyObject *_wrap_IDSelectorRange_imax_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74550 PyObject *resultobj = 0;
74551 faiss::IDSelectorRange *arg1 = (faiss::IDSelectorRange *) 0 ;
74552 void *argp1 = 0 ;
74553 int res1 = 0 ;
74554 PyObject * obj0 = 0 ;
74555 faiss::IDSelector::idx_t result;
74556
74557 if (!PyArg_ParseTuple(args,(char *)"O:IDSelectorRange_imax_get",&obj0)) SWIG_fail;
74558 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
74559 if (!SWIG_IsOK(res1)) {
74560 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_imax_get" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
74561 }
74562 arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
74563 result = (faiss::IDSelector::idx_t) ((arg1)->imax);
74564 resultobj = SWIG_From_long(static_cast< long >(result));
74565 return resultobj;
74566 fail:
74567 return NULL;
74568 }
74569
74570
74571 SWIGINTERN PyObject *_wrap_new_IDSelectorRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74572 PyObject *resultobj = 0;
74573 faiss::IDSelector::idx_t arg1 ;
74574 faiss::IDSelector::idx_t arg2 ;
74575 long val1 ;
74576 int ecode1 = 0 ;
74577 long val2 ;
74578 int ecode2 = 0 ;
74579 PyObject * obj0 = 0 ;
74580 PyObject * obj1 = 0 ;
74581 faiss::IDSelectorRange *result = 0 ;
74582
74583 if (!PyArg_ParseTuple(args,(char *)"OO:new_IDSelectorRange",&obj0,&obj1)) SWIG_fail;
74584 ecode1 = SWIG_AsVal_long(obj0, &val1);
74585 if (!SWIG_IsOK(ecode1)) {
74586 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDSelectorRange" "', argument " "1"" of type '" "faiss::IDSelector::idx_t""'");
74587 }
74588 arg1 = static_cast< faiss::IDSelector::idx_t >(val1);
74589 ecode2 = SWIG_AsVal_long(obj1, &val2);
74590 if (!SWIG_IsOK(ecode2)) {
74591 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_IDSelectorRange" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
74592 }
74593 arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
74594 result = (faiss::IDSelectorRange *)new faiss::IDSelectorRange(arg1,arg2);
74595 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IDSelectorRange, SWIG_POINTER_NEW | 0 );
74596 return resultobj;
74597 fail:
74598 return NULL;
74599 }
74600
74601
74602 SWIGINTERN PyObject *_wrap_IDSelectorRange_is_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74603 PyObject *resultobj = 0;
74604 faiss::IDSelectorRange *arg1 = (faiss::IDSelectorRange *) 0 ;
74605 faiss::IDSelector::idx_t arg2 ;
74606 void *argp1 = 0 ;
74607 int res1 = 0 ;
74608 long val2 ;
74609 int ecode2 = 0 ;
74610 PyObject * obj0 = 0 ;
74611 PyObject * obj1 = 0 ;
74612 bool result;
74613
74614 if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorRange_is_member",&obj0,&obj1)) SWIG_fail;
74615 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, 0 | 0 );
74616 if (!SWIG_IsOK(res1)) {
74617 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorRange_is_member" "', argument " "1"" of type '" "faiss::IDSelectorRange const *""'");
74618 }
74619 arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
74620 ecode2 = SWIG_AsVal_long(obj1, &val2);
74621 if (!SWIG_IsOK(ecode2)) {
74622 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorRange_is_member" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
74623 }
74624 arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
74625 result = (bool)((faiss::IDSelectorRange const *)arg1)->is_member(arg2);
74626 resultobj = SWIG_From_bool(static_cast< bool >(result));
74627 return resultobj;
74628 fail:
74629 return NULL;
74630 }
74631
74632
74633 SWIGINTERN PyObject *_wrap_delete_IDSelectorRange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74634 PyObject *resultobj = 0;
74635 faiss::IDSelectorRange *arg1 = (faiss::IDSelectorRange *) 0 ;
74636 void *argp1 = 0 ;
74637 int res1 = 0 ;
74638 PyObject * obj0 = 0 ;
74639
74640 if (!PyArg_ParseTuple(args,(char *)"O:delete_IDSelectorRange",&obj0)) SWIG_fail;
74641 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorRange, SWIG_POINTER_DISOWN | 0 );
74642 if (!SWIG_IsOK(res1)) {
74643 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDSelectorRange" "', argument " "1"" of type '" "faiss::IDSelectorRange *""'");
74644 }
74645 arg1 = reinterpret_cast< faiss::IDSelectorRange * >(argp1);
74646 delete arg1;
74647 resultobj = SWIG_Py_Void();
74648 return resultobj;
74649 fail:
74650 return NULL;
74651 }
74652
74653
74654 SWIGINTERN PyObject *IDSelectorRange_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74655 PyObject *obj;
74656 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
74657 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IDSelectorRange, SWIG_NewClientData(obj));
74658 return SWIG_Py_Void();
74659 }
74660
74661 SWIGINTERN PyObject *_wrap_IDSelectorBatch_nbits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74662 PyObject *resultobj = 0;
74663 faiss::IDSelectorBatch *arg1 = (faiss::IDSelectorBatch *) 0 ;
74664 int arg2 ;
74665 void *argp1 = 0 ;
74666 int res1 = 0 ;
74667 int val2 ;
74668 int ecode2 = 0 ;
74669 PyObject * obj0 = 0 ;
74670 PyObject * obj1 = 0 ;
74671
74672 if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorBatch_nbits_set",&obj0,&obj1)) SWIG_fail;
74673 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
74674 if (!SWIG_IsOK(res1)) {
74675 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_nbits_set" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
74676 }
74677 arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
74678 ecode2 = SWIG_AsVal_int(obj1, &val2);
74679 if (!SWIG_IsOK(ecode2)) {
74680 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorBatch_nbits_set" "', argument " "2"" of type '" "int""'");
74681 }
74682 arg2 = static_cast< int >(val2);
74683 if (arg1) (arg1)->nbits = arg2;
74684 resultobj = SWIG_Py_Void();
74685 return resultobj;
74686 fail:
74687 return NULL;
74688 }
74689
74690
74691 SWIGINTERN PyObject *_wrap_IDSelectorBatch_nbits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74692 PyObject *resultobj = 0;
74693 faiss::IDSelectorBatch *arg1 = (faiss::IDSelectorBatch *) 0 ;
74694 void *argp1 = 0 ;
74695 int res1 = 0 ;
74696 PyObject * obj0 = 0 ;
74697 int result;
74698
74699 if (!PyArg_ParseTuple(args,(char *)"O:IDSelectorBatch_nbits_get",&obj0)) SWIG_fail;
74700 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
74701 if (!SWIG_IsOK(res1)) {
74702 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_nbits_get" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
74703 }
74704 arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
74705 result = (int) ((arg1)->nbits);
74706 resultobj = SWIG_From_int(static_cast< int >(result));
74707 return resultobj;
74708 fail:
74709 return NULL;
74710 }
74711
74712
74713 SWIGINTERN PyObject *_wrap_IDSelectorBatch_mask_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74714 PyObject *resultobj = 0;
74715 faiss::IDSelectorBatch *arg1 = (faiss::IDSelectorBatch *) 0 ;
74716 faiss::IDSelector::idx_t arg2 ;
74717 void *argp1 = 0 ;
74718 int res1 = 0 ;
74719 long val2 ;
74720 int ecode2 = 0 ;
74721 PyObject * obj0 = 0 ;
74722 PyObject * obj1 = 0 ;
74723
74724 if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorBatch_mask_set",&obj0,&obj1)) SWIG_fail;
74725 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
74726 if (!SWIG_IsOK(res1)) {
74727 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_mask_set" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
74728 }
74729 arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
74730 ecode2 = SWIG_AsVal_long(obj1, &val2);
74731 if (!SWIG_IsOK(ecode2)) {
74732 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorBatch_mask_set" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
74733 }
74734 arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
74735 if (arg1) (arg1)->mask = arg2;
74736 resultobj = SWIG_Py_Void();
74737 return resultobj;
74738 fail:
74739 return NULL;
74740 }
74741
74742
74743 SWIGINTERN PyObject *_wrap_IDSelectorBatch_mask_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74744 PyObject *resultobj = 0;
74745 faiss::IDSelectorBatch *arg1 = (faiss::IDSelectorBatch *) 0 ;
74746 void *argp1 = 0 ;
74747 int res1 = 0 ;
74748 PyObject * obj0 = 0 ;
74749 faiss::IDSelector::idx_t result;
74750
74751 if (!PyArg_ParseTuple(args,(char *)"O:IDSelectorBatch_mask_get",&obj0)) SWIG_fail;
74752 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
74753 if (!SWIG_IsOK(res1)) {
74754 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_mask_get" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
74755 }
74756 arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
74757 result = (faiss::IDSelector::idx_t) ((arg1)->mask);
74758 resultobj = SWIG_From_long(static_cast< long >(result));
74759 return resultobj;
74760 fail:
74761 return NULL;
74762 }
74763
74764
74765 SWIGINTERN PyObject *_wrap_new_IDSelectorBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74766 PyObject *resultobj = 0;
74767 long arg1 ;
74768 faiss::IDSelector::idx_t *arg2 = (faiss::IDSelector::idx_t *) 0 ;
74769 long val1 ;
74770 int ecode1 = 0 ;
74771 void *argp2 = 0 ;
74772 int res2 = 0 ;
74773 PyObject * obj0 = 0 ;
74774 PyObject * obj1 = 0 ;
74775 faiss::IDSelectorBatch *result = 0 ;
74776
74777 if (!PyArg_ParseTuple(args,(char *)"OO:new_IDSelectorBatch",&obj0,&obj1)) SWIG_fail;
74778 ecode1 = SWIG_AsVal_long(obj0, &val1);
74779 if (!SWIG_IsOK(ecode1)) {
74780 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_IDSelectorBatch" "', argument " "1"" of type '" "long""'");
74781 }
74782 arg1 = static_cast< long >(val1);
74783 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_long, 0 | 0 );
74784 if (!SWIG_IsOK(res2)) {
74785 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "new_IDSelectorBatch" "', argument " "2"" of type '" "faiss::IDSelector::idx_t const *""'");
74786 }
74787 arg2 = reinterpret_cast< faiss::IDSelector::idx_t * >(argp2);
74788 result = (faiss::IDSelectorBatch *)new faiss::IDSelectorBatch(arg1,(faiss::IDSelector::idx_t const *)arg2);
74789 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__IDSelectorBatch, SWIG_POINTER_NEW | 0 );
74790 return resultobj;
74791 fail:
74792 return NULL;
74793 }
74794
74795
74796 SWIGINTERN PyObject *_wrap_IDSelectorBatch_is_member(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74797 PyObject *resultobj = 0;
74798 faiss::IDSelectorBatch *arg1 = (faiss::IDSelectorBatch *) 0 ;
74799 faiss::IDSelector::idx_t arg2 ;
74800 void *argp1 = 0 ;
74801 int res1 = 0 ;
74802 long val2 ;
74803 int ecode2 = 0 ;
74804 PyObject * obj0 = 0 ;
74805 PyObject * obj1 = 0 ;
74806 bool result;
74807
74808 if (!PyArg_ParseTuple(args,(char *)"OO:IDSelectorBatch_is_member",&obj0,&obj1)) SWIG_fail;
74809 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, 0 | 0 );
74810 if (!SWIG_IsOK(res1)) {
74811 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IDSelectorBatch_is_member" "', argument " "1"" of type '" "faiss::IDSelectorBatch const *""'");
74812 }
74813 arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
74814 ecode2 = SWIG_AsVal_long(obj1, &val2);
74815 if (!SWIG_IsOK(ecode2)) {
74816 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "IDSelectorBatch_is_member" "', argument " "2"" of type '" "faiss::IDSelector::idx_t""'");
74817 }
74818 arg2 = static_cast< faiss::IDSelector::idx_t >(val2);
74819 result = (bool)((faiss::IDSelectorBatch const *)arg1)->is_member(arg2);
74820 resultobj = SWIG_From_bool(static_cast< bool >(result));
74821 return resultobj;
74822 fail:
74823 return NULL;
74824 }
74825
74826
74827 SWIGINTERN PyObject *_wrap_delete_IDSelectorBatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74828 PyObject *resultobj = 0;
74829 faiss::IDSelectorBatch *arg1 = (faiss::IDSelectorBatch *) 0 ;
74830 void *argp1 = 0 ;
74831 int res1 = 0 ;
74832 PyObject * obj0 = 0 ;
74833
74834 if (!PyArg_ParseTuple(args,(char *)"O:delete_IDSelectorBatch",&obj0)) SWIG_fail;
74835 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IDSelectorBatch, SWIG_POINTER_DISOWN | 0 );
74836 if (!SWIG_IsOK(res1)) {
74837 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IDSelectorBatch" "', argument " "1"" of type '" "faiss::IDSelectorBatch *""'");
74838 }
74839 arg1 = reinterpret_cast< faiss::IDSelectorBatch * >(argp1);
74840 delete arg1;
74841 resultobj = SWIG_Py_Void();
74842 return resultobj;
74843 fail:
74844 return NULL;
74845 }
74846
74847
74848 SWIGINTERN PyObject *IDSelectorBatch_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74849 PyObject *obj;
74850 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
74851 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IDSelectorBatch, SWIG_NewClientData(obj));
74852 return SWIG_Py_Void();
74853 }
74854
74855 SWIGINTERN PyObject *_wrap_BufferList_buffer_size_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74856 PyObject *resultobj = 0;
74857 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
74858 size_t arg2 ;
74859 void *argp1 = 0 ;
74860 int res1 = 0 ;
74861 size_t val2 ;
74862 int ecode2 = 0 ;
74863 PyObject * obj0 = 0 ;
74864 PyObject * obj1 = 0 ;
74865
74866 if (!PyArg_ParseTuple(args,(char *)"OO:BufferList_buffer_size_set",&obj0,&obj1)) SWIG_fail;
74867 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
74868 if (!SWIG_IsOK(res1)) {
74869 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_buffer_size_set" "', argument " "1"" of type '" "faiss::BufferList *""'");
74870 }
74871 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
74872 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
74873 if (!SWIG_IsOK(ecode2)) {
74874 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BufferList_buffer_size_set" "', argument " "2"" of type '" "size_t""'");
74875 }
74876 arg2 = static_cast< size_t >(val2);
74877 if (arg1) (arg1)->buffer_size = arg2;
74878 resultobj = SWIG_Py_Void();
74879 return resultobj;
74880 fail:
74881 return NULL;
74882 }
74883
74884
74885 SWIGINTERN PyObject *_wrap_BufferList_buffer_size_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74886 PyObject *resultobj = 0;
74887 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
74888 void *argp1 = 0 ;
74889 int res1 = 0 ;
74890 PyObject * obj0 = 0 ;
74891 size_t result;
74892
74893 if (!PyArg_ParseTuple(args,(char *)"O:BufferList_buffer_size_get",&obj0)) SWIG_fail;
74894 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
74895 if (!SWIG_IsOK(res1)) {
74896 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_buffer_size_get" "', argument " "1"" of type '" "faiss::BufferList *""'");
74897 }
74898 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
74899 result = (size_t) ((arg1)->buffer_size);
74900 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
74901 return resultobj;
74902 fail:
74903 return NULL;
74904 }
74905
74906
74907 SWIGINTERN PyObject *_wrap_BufferList_buffers_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74908 PyObject *resultobj = 0;
74909 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
74910 std::vector< faiss::BufferList::Buffer > *arg2 = (std::vector< faiss::BufferList::Buffer > *) 0 ;
74911 void *argp1 = 0 ;
74912 int res1 = 0 ;
74913 void *argp2 = 0 ;
74914 int res2 = 0 ;
74915 PyObject * obj0 = 0 ;
74916 PyObject * obj1 = 0 ;
74917
74918 if (!PyArg_ParseTuple(args,(char *)"OO:BufferList_buffers_set",&obj0,&obj1)) SWIG_fail;
74919 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
74920 if (!SWIG_IsOK(res1)) {
74921 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_buffers_set" "', argument " "1"" of type '" "faiss::BufferList *""'");
74922 }
74923 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
74924 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t, 0 | 0 );
74925 if (!SWIG_IsOK(res2)) {
74926 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "BufferList_buffers_set" "', argument " "2"" of type '" "std::vector< faiss::BufferList::Buffer > *""'");
74927 }
74928 arg2 = reinterpret_cast< std::vector< faiss::BufferList::Buffer > * >(argp2);
74929 if (arg1) (arg1)->buffers = *arg2;
74930 resultobj = SWIG_Py_Void();
74931 return resultobj;
74932 fail:
74933 return NULL;
74934 }
74935
74936
74937 SWIGINTERN PyObject *_wrap_BufferList_buffers_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74938 PyObject *resultobj = 0;
74939 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
74940 void *argp1 = 0 ;
74941 int res1 = 0 ;
74942 PyObject * obj0 = 0 ;
74943 std::vector< faiss::BufferList::Buffer > *result = 0 ;
74944
74945 if (!PyArg_ParseTuple(args,(char *)"O:BufferList_buffers_get",&obj0)) SWIG_fail;
74946 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
74947 if (!SWIG_IsOK(res1)) {
74948 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_buffers_get" "', argument " "1"" of type '" "faiss::BufferList *""'");
74949 }
74950 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
74951 result = (std::vector< faiss::BufferList::Buffer > *)& ((arg1)->buffers);
74952 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__BufferList__Buffer_t, 0 | 0 );
74953 return resultobj;
74954 fail:
74955 return NULL;
74956 }
74957
74958
74959 SWIGINTERN PyObject *_wrap_BufferList_wp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74960 PyObject *resultobj = 0;
74961 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
74962 size_t arg2 ;
74963 void *argp1 = 0 ;
74964 int res1 = 0 ;
74965 size_t val2 ;
74966 int ecode2 = 0 ;
74967 PyObject * obj0 = 0 ;
74968 PyObject * obj1 = 0 ;
74969
74970 if (!PyArg_ParseTuple(args,(char *)"OO:BufferList_wp_set",&obj0,&obj1)) SWIG_fail;
74971 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
74972 if (!SWIG_IsOK(res1)) {
74973 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_wp_set" "', argument " "1"" of type '" "faiss::BufferList *""'");
74974 }
74975 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
74976 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
74977 if (!SWIG_IsOK(ecode2)) {
74978 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BufferList_wp_set" "', argument " "2"" of type '" "size_t""'");
74979 }
74980 arg2 = static_cast< size_t >(val2);
74981 if (arg1) (arg1)->wp = arg2;
74982 resultobj = SWIG_Py_Void();
74983 return resultobj;
74984 fail:
74985 return NULL;
74986 }
74987
74988
74989 SWIGINTERN PyObject *_wrap_BufferList_wp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
74990 PyObject *resultobj = 0;
74991 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
74992 void *argp1 = 0 ;
74993 int res1 = 0 ;
74994 PyObject * obj0 = 0 ;
74995 size_t result;
74996
74997 if (!PyArg_ParseTuple(args,(char *)"O:BufferList_wp_get",&obj0)) SWIG_fail;
74998 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
74999 if (!SWIG_IsOK(res1)) {
75000 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_wp_get" "', argument " "1"" of type '" "faiss::BufferList *""'");
75001 }
75002 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
75003 result = (size_t) ((arg1)->wp);
75004 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
75005 return resultobj;
75006 fail:
75007 return NULL;
75008 }
75009
75010
75011 SWIGINTERN PyObject *_wrap_new_BufferList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75012 PyObject *resultobj = 0;
75013 size_t arg1 ;
75014 size_t val1 ;
75015 int ecode1 = 0 ;
75016 PyObject * obj0 = 0 ;
75017 faiss::BufferList *result = 0 ;
75018
75019 if (!PyArg_ParseTuple(args,(char *)"O:new_BufferList",&obj0)) SWIG_fail;
75020 ecode1 = SWIG_AsVal_size_t(obj0, &val1);
75021 if (!SWIG_IsOK(ecode1)) {
75022 SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_BufferList" "', argument " "1"" of type '" "size_t""'");
75023 }
75024 arg1 = static_cast< size_t >(val1);
75025 result = (faiss::BufferList *)new faiss::BufferList(arg1);
75026 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__BufferList, SWIG_POINTER_NEW | 0 );
75027 return resultobj;
75028 fail:
75029 return NULL;
75030 }
75031
75032
75033 SWIGINTERN PyObject *_wrap_delete_BufferList(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75034 PyObject *resultobj = 0;
75035 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
75036 void *argp1 = 0 ;
75037 int res1 = 0 ;
75038 PyObject * obj0 = 0 ;
75039
75040 if (!PyArg_ParseTuple(args,(char *)"O:delete_BufferList",&obj0)) SWIG_fail;
75041 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, SWIG_POINTER_DISOWN | 0 );
75042 if (!SWIG_IsOK(res1)) {
75043 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_BufferList" "', argument " "1"" of type '" "faiss::BufferList *""'");
75044 }
75045 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
75046 delete arg1;
75047 resultobj = SWIG_Py_Void();
75048 return resultobj;
75049 fail:
75050 return NULL;
75051 }
75052
75053
75054 SWIGINTERN PyObject *_wrap_BufferList_append_buffer(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75055 PyObject *resultobj = 0;
75056 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
75057 void *argp1 = 0 ;
75058 int res1 = 0 ;
75059 PyObject * obj0 = 0 ;
75060
75061 if (!PyArg_ParseTuple(args,(char *)"O:BufferList_append_buffer",&obj0)) SWIG_fail;
75062 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
75063 if (!SWIG_IsOK(res1)) {
75064 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_append_buffer" "', argument " "1"" of type '" "faiss::BufferList *""'");
75065 }
75066 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
75067 (arg1)->append_buffer();
75068 resultobj = SWIG_Py_Void();
75069 return resultobj;
75070 fail:
75071 return NULL;
75072 }
75073
75074
75075 SWIGINTERN PyObject *_wrap_BufferList_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75076 PyObject *resultobj = 0;
75077 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
75078 faiss::BufferList::idx_t arg2 ;
75079 float arg3 ;
75080 void *argp1 = 0 ;
75081 int res1 = 0 ;
75082 long val2 ;
75083 int ecode2 = 0 ;
75084 float val3 ;
75085 int ecode3 = 0 ;
75086 PyObject * obj0 = 0 ;
75087 PyObject * obj1 = 0 ;
75088 PyObject * obj2 = 0 ;
75089
75090 if (!PyArg_ParseTuple(args,(char *)"OOO:BufferList_add",&obj0,&obj1,&obj2)) SWIG_fail;
75091 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
75092 if (!SWIG_IsOK(res1)) {
75093 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_add" "', argument " "1"" of type '" "faiss::BufferList *""'");
75094 }
75095 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
75096 ecode2 = SWIG_AsVal_long(obj1, &val2);
75097 if (!SWIG_IsOK(ecode2)) {
75098 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BufferList_add" "', argument " "2"" of type '" "faiss::BufferList::idx_t""'");
75099 }
75100 arg2 = static_cast< faiss::BufferList::idx_t >(val2);
75101 ecode3 = SWIG_AsVal_float(obj2, &val3);
75102 if (!SWIG_IsOK(ecode3)) {
75103 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BufferList_add" "', argument " "3"" of type '" "float""'");
75104 }
75105 arg3 = static_cast< float >(val3);
75106 (arg1)->add(arg2,arg3);
75107 resultobj = SWIG_Py_Void();
75108 return resultobj;
75109 fail:
75110 return NULL;
75111 }
75112
75113
75114 SWIGINTERN PyObject *_wrap_BufferList_copy_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75115 PyObject *resultobj = 0;
75116 faiss::BufferList *arg1 = (faiss::BufferList *) 0 ;
75117 size_t arg2 ;
75118 size_t arg3 ;
75119 faiss::BufferList::idx_t *arg4 = (faiss::BufferList::idx_t *) 0 ;
75120 float *arg5 = (float *) 0 ;
75121 void *argp1 = 0 ;
75122 int res1 = 0 ;
75123 size_t val2 ;
75124 int ecode2 = 0 ;
75125 size_t val3 ;
75126 int ecode3 = 0 ;
75127 void *argp4 = 0 ;
75128 int res4 = 0 ;
75129 void *argp5 = 0 ;
75130 int res5 = 0 ;
75131 PyObject * obj0 = 0 ;
75132 PyObject * obj1 = 0 ;
75133 PyObject * obj2 = 0 ;
75134 PyObject * obj3 = 0 ;
75135 PyObject * obj4 = 0 ;
75136
75137 if (!PyArg_ParseTuple(args,(char *)"OOOOO:BufferList_copy_range",&obj0,&obj1,&obj2,&obj3,&obj4)) SWIG_fail;
75138 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__BufferList, 0 | 0 );
75139 if (!SWIG_IsOK(res1)) {
75140 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "BufferList_copy_range" "', argument " "1"" of type '" "faiss::BufferList *""'");
75141 }
75142 arg1 = reinterpret_cast< faiss::BufferList * >(argp1);
75143 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
75144 if (!SWIG_IsOK(ecode2)) {
75145 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "BufferList_copy_range" "', argument " "2"" of type '" "size_t""'");
75146 }
75147 arg2 = static_cast< size_t >(val2);
75148 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
75149 if (!SWIG_IsOK(ecode3)) {
75150 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "BufferList_copy_range" "', argument " "3"" of type '" "size_t""'");
75151 }
75152 arg3 = static_cast< size_t >(val3);
75153 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
75154 if (!SWIG_IsOK(res4)) {
75155 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "BufferList_copy_range" "', argument " "4"" of type '" "faiss::BufferList::idx_t *""'");
75156 }
75157 arg4 = reinterpret_cast< faiss::BufferList::idx_t * >(argp4);
75158 res5 = SWIG_ConvertPtr(obj4, &argp5,SWIGTYPE_p_float, 0 | 0 );
75159 if (!SWIG_IsOK(res5)) {
75160 SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "BufferList_copy_range" "', argument " "5"" of type '" "float *""'");
75161 }
75162 arg5 = reinterpret_cast< float * >(argp5);
75163 (arg1)->copy_range(arg2,arg3,arg4,arg5);
75164 resultobj = SWIG_Py_Void();
75165 return resultobj;
75166 fail:
75167 return NULL;
75168 }
75169
75170
75171 SWIGINTERN PyObject *BufferList_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75172 PyObject *obj;
75173 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
75174 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__BufferList, SWIG_NewClientData(obj));
75175 return SWIG_Py_Void();
75176 }
75177
75178 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_res_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75179 PyObject *resultobj = 0;
75180 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75181 faiss::RangeSearchResult *arg2 = (faiss::RangeSearchResult *) 0 ;
75182 void *argp1 = 0 ;
75183 int res1 = 0 ;
75184 void *argp2 = 0 ;
75185 int res2 = 0 ;
75186 PyObject * obj0 = 0 ;
75187 PyObject * obj1 = 0 ;
75188
75189 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchPartialResult_res_set",&obj0,&obj1)) SWIG_fail;
75190 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75191 if (!SWIG_IsOK(res1)) {
75192 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_res_set" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75193 }
75194 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75195 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_faiss__RangeSearchResult, SWIG_POINTER_DISOWN | 0 );
75196 if (!SWIG_IsOK(res2)) {
75197 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchPartialResult_res_set" "', argument " "2"" of type '" "faiss::RangeSearchResult *""'");
75198 }
75199 arg2 = reinterpret_cast< faiss::RangeSearchResult * >(argp2);
75200 if (arg1) (arg1)->res = arg2;
75201 resultobj = SWIG_Py_Void();
75202 return resultobj;
75203 fail:
75204 return NULL;
75205 }
75206
75207
75208 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_res_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75209 PyObject *resultobj = 0;
75210 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75211 void *argp1 = 0 ;
75212 int res1 = 0 ;
75213 PyObject * obj0 = 0 ;
75214 faiss::RangeSearchResult *result = 0 ;
75215
75216 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_res_get",&obj0)) SWIG_fail;
75217 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75218 if (!SWIG_IsOK(res1)) {
75219 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_res_get" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75220 }
75221 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75222 result = (faiss::RangeSearchResult *) ((arg1)->res);
75223 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
75224 return resultobj;
75225 fail:
75226 return NULL;
75227 }
75228
75229
75230 SWIGINTERN PyObject *_wrap_new_RangeSearchPartialResult(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75231 PyObject *resultobj = 0;
75232 faiss::RangeSearchResult *arg1 = (faiss::RangeSearchResult *) 0 ;
75233 void *argp1 = 0 ;
75234 int res1 = 0 ;
75235 PyObject * obj0 = 0 ;
75236 faiss::RangeSearchPartialResult *result = 0 ;
75237
75238 if (!PyArg_ParseTuple(args,(char *)"O:new_RangeSearchPartialResult",&obj0)) SWIG_fail;
75239 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchResult, 0 | 0 );
75240 if (!SWIG_IsOK(res1)) {
75241 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_RangeSearchPartialResult" "', argument " "1"" of type '" "faiss::RangeSearchResult *""'");
75242 }
75243 arg1 = reinterpret_cast< faiss::RangeSearchResult * >(argp1);
75244 result = (faiss::RangeSearchPartialResult *)new faiss::RangeSearchPartialResult(arg1);
75245 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchPartialResult, SWIG_POINTER_NEW | 0 );
75246 return resultobj;
75247 fail:
75248 return NULL;
75249 }
75250
75251
75252 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_queries_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75253 PyObject *resultobj = 0;
75254 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75255 std::vector< faiss::RangeSearchPartialResult::QueryResult > *arg2 = (std::vector< faiss::RangeSearchPartialResult::QueryResult > *) 0 ;
75256 void *argp1 = 0 ;
75257 int res1 = 0 ;
75258 void *argp2 = 0 ;
75259 int res2 = 0 ;
75260 PyObject * obj0 = 0 ;
75261 PyObject * obj1 = 0 ;
75262
75263 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchPartialResult_queries_set",&obj0,&obj1)) SWIG_fail;
75264 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75265 if (!SWIG_IsOK(res1)) {
75266 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_queries_set" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75267 }
75268 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75269 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t, 0 | 0 );
75270 if (!SWIG_IsOK(res2)) {
75271 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "RangeSearchPartialResult_queries_set" "', argument " "2"" of type '" "std::vector< faiss::RangeSearchPartialResult::QueryResult > *""'");
75272 }
75273 arg2 = reinterpret_cast< std::vector< faiss::RangeSearchPartialResult::QueryResult > * >(argp2);
75274 if (arg1) (arg1)->queries = *arg2;
75275 resultobj = SWIG_Py_Void();
75276 return resultobj;
75277 fail:
75278 return NULL;
75279 }
75280
75281
75282 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_queries_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75283 PyObject *resultobj = 0;
75284 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75285 void *argp1 = 0 ;
75286 int res1 = 0 ;
75287 PyObject * obj0 = 0 ;
75288 std::vector< faiss::RangeSearchPartialResult::QueryResult > *result = 0 ;
75289
75290 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_queries_get",&obj0)) SWIG_fail;
75291 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75292 if (!SWIG_IsOK(res1)) {
75293 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_queries_get" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75294 }
75295 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75296 result = (std::vector< faiss::RangeSearchPartialResult::QueryResult > *)& ((arg1)->queries);
75297 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t, 0 | 0 );
75298 return resultobj;
75299 fail:
75300 return NULL;
75301 }
75302
75303
75304 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_new_result(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75305 PyObject *resultobj = 0;
75306 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75307 faiss::BufferList::idx_t arg2 ;
75308 void *argp1 = 0 ;
75309 int res1 = 0 ;
75310 long val2 ;
75311 int ecode2 = 0 ;
75312 PyObject * obj0 = 0 ;
75313 PyObject * obj1 = 0 ;
75314 faiss::RangeSearchPartialResult::QueryResult *result = 0 ;
75315
75316 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchPartialResult_new_result",&obj0,&obj1)) SWIG_fail;
75317 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75318 if (!SWIG_IsOK(res1)) {
75319 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_new_result" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75320 }
75321 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75322 ecode2 = SWIG_AsVal_long(obj1, &val2);
75323 if (!SWIG_IsOK(ecode2)) {
75324 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RangeSearchPartialResult_new_result" "', argument " "2"" of type '" "faiss::BufferList::idx_t""'");
75325 }
75326 arg2 = static_cast< faiss::BufferList::idx_t >(val2);
75327 result = (faiss::RangeSearchPartialResult::QueryResult *) &(arg1)->new_result(arg2);
75328 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__RangeSearchPartialResult__QueryResult, 0 | 0 );
75329 return resultobj;
75330 fail:
75331 return NULL;
75332 }
75333
75334
75335 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_finalize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75336 PyObject *resultobj = 0;
75337 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75338 void *argp1 = 0 ;
75339 int res1 = 0 ;
75340 PyObject * obj0 = 0 ;
75341
75342 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_finalize",&obj0)) SWIG_fail;
75343 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75344 if (!SWIG_IsOK(res1)) {
75345 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_finalize" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75346 }
75347 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75348 (arg1)->finalize();
75349 resultobj = SWIG_Py_Void();
75350 return resultobj;
75351 fail:
75352 return NULL;
75353 }
75354
75355
75356 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_set_lims(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75357 PyObject *resultobj = 0;
75358 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75359 void *argp1 = 0 ;
75360 int res1 = 0 ;
75361 PyObject * obj0 = 0 ;
75362
75363 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_set_lims",&obj0)) SWIG_fail;
75364 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75365 if (!SWIG_IsOK(res1)) {
75366 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_set_lims" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75367 }
75368 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75369 (arg1)->set_lims();
75370 resultobj = SWIG_Py_Void();
75371 return resultobj;
75372 fail:
75373 return NULL;
75374 }
75375
75376
75377 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_set_result__SWIG_0(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75378 PyObject *resultobj = 0;
75379 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75380 bool arg2 ;
75381 void *argp1 = 0 ;
75382 int res1 = 0 ;
75383 bool val2 ;
75384 int ecode2 = 0 ;
75385 PyObject * obj0 = 0 ;
75386 PyObject * obj1 = 0 ;
75387
75388 if (!PyArg_ParseTuple(args,(char *)"OO:RangeSearchPartialResult_set_result",&obj0,&obj1)) SWIG_fail;
75389 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75390 if (!SWIG_IsOK(res1)) {
75391 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_set_result" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75392 }
75393 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75394 ecode2 = SWIG_AsVal_bool(obj1, &val2);
75395 if (!SWIG_IsOK(ecode2)) {
75396 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "RangeSearchPartialResult_set_result" "', argument " "2"" of type '" "bool""'");
75397 }
75398 arg2 = static_cast< bool >(val2);
75399 (arg1)->set_result(arg2);
75400 resultobj = SWIG_Py_Void();
75401 return resultobj;
75402 fail:
75403 return NULL;
75404 }
75405
75406
75407 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_set_result__SWIG_1(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75408 PyObject *resultobj = 0;
75409 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75410 void *argp1 = 0 ;
75411 int res1 = 0 ;
75412 PyObject * obj0 = 0 ;
75413
75414 if (!PyArg_ParseTuple(args,(char *)"O:RangeSearchPartialResult_set_result",&obj0)) SWIG_fail;
75415 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, 0 | 0 );
75416 if (!SWIG_IsOK(res1)) {
75417 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "RangeSearchPartialResult_set_result" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75418 }
75419 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75420 (arg1)->set_result();
75421 resultobj = SWIG_Py_Void();
75422 return resultobj;
75423 fail:
75424 return NULL;
75425 }
75426
75427
75428 SWIGINTERN PyObject *_wrap_RangeSearchPartialResult_set_result(PyObject *self, PyObject *args) {
75429 Py_ssize_t argc;
75430 PyObject *argv[3] = {
75431 0
75432 };
75433 Py_ssize_t ii;
75434
75435 if (!PyTuple_Check(args)) SWIG_fail;
75436 argc = args ? PyObject_Length(args) : 0;
75437 for (ii = 0; (ii < 2) && (ii < argc); ii++) {
75438 argv[ii] = PyTuple_GET_ITEM(args,ii);
75439 }
75440 if (argc == 1) {
75441 int _v;
75442 void *vptr = 0;
75443 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RangeSearchPartialResult, 0);
75444 _v = SWIG_CheckState(res);
75445 if (_v) {
75446 return _wrap_RangeSearchPartialResult_set_result__SWIG_1(self, args);
75447 }
75448 }
75449 if (argc == 2) {
75450 int _v;
75451 void *vptr = 0;
75452 int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_faiss__RangeSearchPartialResult, 0);
75453 _v = SWIG_CheckState(res);
75454 if (_v) {
75455 {
75456 int res = SWIG_AsVal_bool(argv[1], NULL);
75457 _v = SWIG_CheckState(res);
75458 }
75459 if (_v) {
75460 return _wrap_RangeSearchPartialResult_set_result__SWIG_0(self, args);
75461 }
75462 }
75463 }
75464
75465 fail:
75466 SWIG_SetErrorMsg(PyExc_NotImplementedError,"Wrong number or type of arguments for overloaded function 'RangeSearchPartialResult_set_result'.\n"
75467 " Possible C/C++ prototypes are:\n"
75468 " faiss::RangeSearchPartialResult::set_result(bool)\n"
75469 " faiss::RangeSearchPartialResult::set_result()\n");
75470 return 0;
75471 }
75472
75473
75474 SWIGINTERN PyObject *_wrap_delete_RangeSearchPartialResult(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75475 PyObject *resultobj = 0;
75476 faiss::RangeSearchPartialResult *arg1 = (faiss::RangeSearchPartialResult *) 0 ;
75477 void *argp1 = 0 ;
75478 int res1 = 0 ;
75479 PyObject * obj0 = 0 ;
75480
75481 if (!PyArg_ParseTuple(args,(char *)"O:delete_RangeSearchPartialResult",&obj0)) SWIG_fail;
75482 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__RangeSearchPartialResult, SWIG_POINTER_DISOWN | 0 );
75483 if (!SWIG_IsOK(res1)) {
75484 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_RangeSearchPartialResult" "', argument " "1"" of type '" "faiss::RangeSearchPartialResult *""'");
75485 }
75486 arg1 = reinterpret_cast< faiss::RangeSearchPartialResult * >(argp1);
75487 delete arg1;
75488 resultobj = SWIG_Py_Void();
75489 return resultobj;
75490 fail:
75491 return NULL;
75492 }
75493
75494
75495 SWIGINTERN PyObject *RangeSearchPartialResult_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75496 PyObject *obj;
75497 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
75498 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__RangeSearchPartialResult, SWIG_NewClientData(obj));
75499 return SWIG_Py_Void();
75500 }
75501
75502 SWIGINTERN PyObject *_wrap_IOReader_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75503 PyObject *resultobj = 0;
75504 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
75505 std::string *arg2 = 0 ;
75506 void *argp1 = 0 ;
75507 int res1 = 0 ;
75508 int res2 = SWIG_OLDOBJ ;
75509 PyObject * obj0 = 0 ;
75510 PyObject * obj1 = 0 ;
75511
75512 if (!PyArg_ParseTuple(args,(char *)"OO:IOReader_name_set",&obj0,&obj1)) SWIG_fail;
75513 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
75514 if (!SWIG_IsOK(res1)) {
75515 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOReader_name_set" "', argument " "1"" of type '" "faiss::IOReader *""'");
75516 }
75517 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
75518 {
75519 std::string *ptr = (std::string *)0;
75520 res2 = SWIG_AsPtr_std_string(obj1, &ptr);
75521 if (!SWIG_IsOK(res2)) {
75522 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOReader_name_set" "', argument " "2"" of type '" "std::string const &""'");
75523 }
75524 if (!ptr) {
75525 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOReader_name_set" "', argument " "2"" of type '" "std::string const &""'");
75526 }
75527 arg2 = ptr;
75528 }
75529 if (arg1) (arg1)->name = *arg2;
75530 resultobj = SWIG_Py_Void();
75531 if (SWIG_IsNewObj(res2)) delete arg2;
75532 return resultobj;
75533 fail:
75534 if (SWIG_IsNewObj(res2)) delete arg2;
75535 return NULL;
75536 }
75537
75538
75539 SWIGINTERN PyObject *_wrap_IOReader_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75540 PyObject *resultobj = 0;
75541 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
75542 void *argp1 = 0 ;
75543 int res1 = 0 ;
75544 PyObject * obj0 = 0 ;
75545 std::string *result = 0 ;
75546
75547 if (!PyArg_ParseTuple(args,(char *)"O:IOReader_name_get",&obj0)) SWIG_fail;
75548 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
75549 if (!SWIG_IsOK(res1)) {
75550 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOReader_name_get" "', argument " "1"" of type '" "faiss::IOReader *""'");
75551 }
75552 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
75553 result = (std::string *) & ((arg1)->name);
75554 resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
75555 return resultobj;
75556 fail:
75557 return NULL;
75558 }
75559
75560
75561 SWIGINTERN PyObject *_wrap_IOReader___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75562 PyObject *resultobj = 0;
75563 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
75564 void *arg2 = (void *) 0 ;
75565 size_t arg3 ;
75566 size_t arg4 ;
75567 void *argp1 = 0 ;
75568 int res1 = 0 ;
75569 int res2 ;
75570 size_t val3 ;
75571 int ecode3 = 0 ;
75572 size_t val4 ;
75573 int ecode4 = 0 ;
75574 PyObject * obj0 = 0 ;
75575 PyObject * obj1 = 0 ;
75576 PyObject * obj2 = 0 ;
75577 PyObject * obj3 = 0 ;
75578 size_t result;
75579
75580 if (!PyArg_ParseTuple(args,(char *)"OOOO:IOReader___call__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
75581 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
75582 if (!SWIG_IsOK(res1)) {
75583 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOReader___call__" "', argument " "1"" of type '" "faiss::IOReader *""'");
75584 }
75585 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
75586 res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
75587 if (!SWIG_IsOK(res2)) {
75588 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOReader___call__" "', argument " "2"" of type '" "void *""'");
75589 }
75590 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
75591 if (!SWIG_IsOK(ecode3)) {
75592 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IOReader___call__" "', argument " "3"" of type '" "size_t""'");
75593 }
75594 arg3 = static_cast< size_t >(val3);
75595 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
75596 if (!SWIG_IsOK(ecode4)) {
75597 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IOReader___call__" "', argument " "4"" of type '" "size_t""'");
75598 }
75599 arg4 = static_cast< size_t >(val4);
75600 result = (size_t)(arg1)->operator ()(arg2,arg3,arg4);
75601 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
75602 return resultobj;
75603 fail:
75604 return NULL;
75605 }
75606
75607
75608 SWIGINTERN PyObject *_wrap_IOReader_fileno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75609 PyObject *resultobj = 0;
75610 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
75611 void *argp1 = 0 ;
75612 int res1 = 0 ;
75613 PyObject * obj0 = 0 ;
75614 int result;
75615
75616 if (!PyArg_ParseTuple(args,(char *)"O:IOReader_fileno",&obj0)) SWIG_fail;
75617 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, 0 | 0 );
75618 if (!SWIG_IsOK(res1)) {
75619 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOReader_fileno" "', argument " "1"" of type '" "faiss::IOReader *""'");
75620 }
75621 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
75622 result = (int)(arg1)->fileno();
75623 resultobj = SWIG_From_int(static_cast< int >(result));
75624 return resultobj;
75625 fail:
75626 return NULL;
75627 }
75628
75629
75630 SWIGINTERN PyObject *_wrap_delete_IOReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75631 PyObject *resultobj = 0;
75632 faiss::IOReader *arg1 = (faiss::IOReader *) 0 ;
75633 void *argp1 = 0 ;
75634 int res1 = 0 ;
75635 PyObject * obj0 = 0 ;
75636
75637 if (!PyArg_ParseTuple(args,(char *)"O:delete_IOReader",&obj0)) SWIG_fail;
75638 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOReader, SWIG_POINTER_DISOWN | 0 );
75639 if (!SWIG_IsOK(res1)) {
75640 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IOReader" "', argument " "1"" of type '" "faiss::IOReader *""'");
75641 }
75642 arg1 = reinterpret_cast< faiss::IOReader * >(argp1);
75643 delete arg1;
75644 resultobj = SWIG_Py_Void();
75645 return resultobj;
75646 fail:
75647 return NULL;
75648 }
75649
75650
75651 SWIGINTERN PyObject *IOReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75652 PyObject *obj;
75653 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
75654 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IOReader, SWIG_NewClientData(obj));
75655 return SWIG_Py_Void();
75656 }
75657
75658 SWIGINTERN PyObject *_wrap_IOWriter_name_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75659 PyObject *resultobj = 0;
75660 faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
75661 std::string *arg2 = 0 ;
75662 void *argp1 = 0 ;
75663 int res1 = 0 ;
75664 int res2 = SWIG_OLDOBJ ;
75665 PyObject * obj0 = 0 ;
75666 PyObject * obj1 = 0 ;
75667
75668 if (!PyArg_ParseTuple(args,(char *)"OO:IOWriter_name_set",&obj0,&obj1)) SWIG_fail;
75669 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
75670 if (!SWIG_IsOK(res1)) {
75671 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOWriter_name_set" "', argument " "1"" of type '" "faiss::IOWriter *""'");
75672 }
75673 arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
75674 {
75675 std::string *ptr = (std::string *)0;
75676 res2 = SWIG_AsPtr_std_string(obj1, &ptr);
75677 if (!SWIG_IsOK(res2)) {
75678 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOWriter_name_set" "', argument " "2"" of type '" "std::string const &""'");
75679 }
75680 if (!ptr) {
75681 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "IOWriter_name_set" "', argument " "2"" of type '" "std::string const &""'");
75682 }
75683 arg2 = ptr;
75684 }
75685 if (arg1) (arg1)->name = *arg2;
75686 resultobj = SWIG_Py_Void();
75687 if (SWIG_IsNewObj(res2)) delete arg2;
75688 return resultobj;
75689 fail:
75690 if (SWIG_IsNewObj(res2)) delete arg2;
75691 return NULL;
75692 }
75693
75694
75695 SWIGINTERN PyObject *_wrap_IOWriter_name_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75696 PyObject *resultobj = 0;
75697 faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
75698 void *argp1 = 0 ;
75699 int res1 = 0 ;
75700 PyObject * obj0 = 0 ;
75701 std::string *result = 0 ;
75702
75703 if (!PyArg_ParseTuple(args,(char *)"O:IOWriter_name_get",&obj0)) SWIG_fail;
75704 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
75705 if (!SWIG_IsOK(res1)) {
75706 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOWriter_name_get" "', argument " "1"" of type '" "faiss::IOWriter *""'");
75707 }
75708 arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
75709 result = (std::string *) & ((arg1)->name);
75710 resultobj = SWIG_From_std_string(static_cast< std::string >(*result));
75711 return resultobj;
75712 fail:
75713 return NULL;
75714 }
75715
75716
75717 SWIGINTERN PyObject *_wrap_IOWriter___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75718 PyObject *resultobj = 0;
75719 faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
75720 void *arg2 = (void *) 0 ;
75721 size_t arg3 ;
75722 size_t arg4 ;
75723 void *argp1 = 0 ;
75724 int res1 = 0 ;
75725 int res2 ;
75726 size_t val3 ;
75727 int ecode3 = 0 ;
75728 size_t val4 ;
75729 int ecode4 = 0 ;
75730 PyObject * obj0 = 0 ;
75731 PyObject * obj1 = 0 ;
75732 PyObject * obj2 = 0 ;
75733 PyObject * obj3 = 0 ;
75734 size_t result;
75735
75736 if (!PyArg_ParseTuple(args,(char *)"OOOO:IOWriter___call__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
75737 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
75738 if (!SWIG_IsOK(res1)) {
75739 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOWriter___call__" "', argument " "1"" of type '" "faiss::IOWriter *""'");
75740 }
75741 arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
75742 res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
75743 if (!SWIG_IsOK(res2)) {
75744 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "IOWriter___call__" "', argument " "2"" of type '" "void const *""'");
75745 }
75746 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
75747 if (!SWIG_IsOK(ecode3)) {
75748 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "IOWriter___call__" "', argument " "3"" of type '" "size_t""'");
75749 }
75750 arg3 = static_cast< size_t >(val3);
75751 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
75752 if (!SWIG_IsOK(ecode4)) {
75753 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "IOWriter___call__" "', argument " "4"" of type '" "size_t""'");
75754 }
75755 arg4 = static_cast< size_t >(val4);
75756 result = (size_t)(arg1)->operator ()((void const *)arg2,arg3,arg4);
75757 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
75758 return resultobj;
75759 fail:
75760 return NULL;
75761 }
75762
75763
75764 SWIGINTERN PyObject *_wrap_IOWriter_fileno(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75765 PyObject *resultobj = 0;
75766 faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
75767 void *argp1 = 0 ;
75768 int res1 = 0 ;
75769 PyObject * obj0 = 0 ;
75770 int result;
75771
75772 if (!PyArg_ParseTuple(args,(char *)"O:IOWriter_fileno",&obj0)) SWIG_fail;
75773 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, 0 | 0 );
75774 if (!SWIG_IsOK(res1)) {
75775 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "IOWriter_fileno" "', argument " "1"" of type '" "faiss::IOWriter *""'");
75776 }
75777 arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
75778 result = (int)(arg1)->fileno();
75779 resultobj = SWIG_From_int(static_cast< int >(result));
75780 return resultobj;
75781 fail:
75782 return NULL;
75783 }
75784
75785
75786 SWIGINTERN PyObject *_wrap_delete_IOWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75787 PyObject *resultobj = 0;
75788 faiss::IOWriter *arg1 = (faiss::IOWriter *) 0 ;
75789 void *argp1 = 0 ;
75790 int res1 = 0 ;
75791 PyObject * obj0 = 0 ;
75792
75793 if (!PyArg_ParseTuple(args,(char *)"O:delete_IOWriter",&obj0)) SWIG_fail;
75794 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__IOWriter, SWIG_POINTER_DISOWN | 0 );
75795 if (!SWIG_IsOK(res1)) {
75796 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_IOWriter" "', argument " "1"" of type '" "faiss::IOWriter *""'");
75797 }
75798 arg1 = reinterpret_cast< faiss::IOWriter * >(argp1);
75799 delete arg1;
75800 resultobj = SWIG_Py_Void();
75801 return resultobj;
75802 fail:
75803 return NULL;
75804 }
75805
75806
75807 SWIGINTERN PyObject *IOWriter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75808 PyObject *obj;
75809 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
75810 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__IOWriter, SWIG_NewClientData(obj));
75811 return SWIG_Py_Void();
75812 }
75813
75814 SWIGINTERN PyObject *_wrap_VectorIOReader_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75815 PyObject *resultobj = 0;
75816 faiss::VectorIOReader *arg1 = (faiss::VectorIOReader *) 0 ;
75817 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
75818 void *argp1 = 0 ;
75819 int res1 = 0 ;
75820 void *argp2 = 0 ;
75821 int res2 = 0 ;
75822 PyObject * obj0 = 0 ;
75823 PyObject * obj1 = 0 ;
75824
75825 if (!PyArg_ParseTuple(args,(char *)"OO:VectorIOReader_data_set",&obj0,&obj1)) SWIG_fail;
75826 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
75827 if (!SWIG_IsOK(res1)) {
75828 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader_data_set" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
75829 }
75830 arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
75831 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
75832 if (!SWIG_IsOK(res2)) {
75833 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorIOReader_data_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
75834 }
75835 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
75836 if (arg1) (arg1)->data = *arg2;
75837 resultobj = SWIG_Py_Void();
75838 return resultobj;
75839 fail:
75840 return NULL;
75841 }
75842
75843
75844 SWIGINTERN PyObject *_wrap_VectorIOReader_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75845 PyObject *resultobj = 0;
75846 faiss::VectorIOReader *arg1 = (faiss::VectorIOReader *) 0 ;
75847 void *argp1 = 0 ;
75848 int res1 = 0 ;
75849 PyObject * obj0 = 0 ;
75850 std::vector< uint8_t > *result = 0 ;
75851
75852 if (!PyArg_ParseTuple(args,(char *)"O:VectorIOReader_data_get",&obj0)) SWIG_fail;
75853 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
75854 if (!SWIG_IsOK(res1)) {
75855 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader_data_get" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
75856 }
75857 arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
75858 result = (std::vector< uint8_t > *)& ((arg1)->data);
75859 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
75860 return resultobj;
75861 fail:
75862 return NULL;
75863 }
75864
75865
75866 SWIGINTERN PyObject *_wrap_VectorIOReader_rp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75867 PyObject *resultobj = 0;
75868 faiss::VectorIOReader *arg1 = (faiss::VectorIOReader *) 0 ;
75869 size_t arg2 ;
75870 void *argp1 = 0 ;
75871 int res1 = 0 ;
75872 size_t val2 ;
75873 int ecode2 = 0 ;
75874 PyObject * obj0 = 0 ;
75875 PyObject * obj1 = 0 ;
75876
75877 if (!PyArg_ParseTuple(args,(char *)"OO:VectorIOReader_rp_set",&obj0,&obj1)) SWIG_fail;
75878 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
75879 if (!SWIG_IsOK(res1)) {
75880 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader_rp_set" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
75881 }
75882 arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
75883 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
75884 if (!SWIG_IsOK(ecode2)) {
75885 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "VectorIOReader_rp_set" "', argument " "2"" of type '" "size_t""'");
75886 }
75887 arg2 = static_cast< size_t >(val2);
75888 if (arg1) (arg1)->rp = arg2;
75889 resultobj = SWIG_Py_Void();
75890 return resultobj;
75891 fail:
75892 return NULL;
75893 }
75894
75895
75896 SWIGINTERN PyObject *_wrap_VectorIOReader_rp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75897 PyObject *resultobj = 0;
75898 faiss::VectorIOReader *arg1 = (faiss::VectorIOReader *) 0 ;
75899 void *argp1 = 0 ;
75900 int res1 = 0 ;
75901 PyObject * obj0 = 0 ;
75902 size_t result;
75903
75904 if (!PyArg_ParseTuple(args,(char *)"O:VectorIOReader_rp_get",&obj0)) SWIG_fail;
75905 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
75906 if (!SWIG_IsOK(res1)) {
75907 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader_rp_get" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
75908 }
75909 arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
75910 result = (size_t) ((arg1)->rp);
75911 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
75912 return resultobj;
75913 fail:
75914 return NULL;
75915 }
75916
75917
75918 SWIGINTERN PyObject *_wrap_VectorIOReader___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75919 PyObject *resultobj = 0;
75920 faiss::VectorIOReader *arg1 = (faiss::VectorIOReader *) 0 ;
75921 void *arg2 = (void *) 0 ;
75922 size_t arg3 ;
75923 size_t arg4 ;
75924 void *argp1 = 0 ;
75925 int res1 = 0 ;
75926 int res2 ;
75927 size_t val3 ;
75928 int ecode3 = 0 ;
75929 size_t val4 ;
75930 int ecode4 = 0 ;
75931 PyObject * obj0 = 0 ;
75932 PyObject * obj1 = 0 ;
75933 PyObject * obj2 = 0 ;
75934 PyObject * obj3 = 0 ;
75935 size_t result;
75936
75937 if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorIOReader___call__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
75938 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, 0 | 0 );
75939 if (!SWIG_IsOK(res1)) {
75940 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOReader___call__" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
75941 }
75942 arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
75943 res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
75944 if (!SWIG_IsOK(res2)) {
75945 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorIOReader___call__" "', argument " "2"" of type '" "void *""'");
75946 }
75947 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
75948 if (!SWIG_IsOK(ecode3)) {
75949 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorIOReader___call__" "', argument " "3"" of type '" "size_t""'");
75950 }
75951 arg3 = static_cast< size_t >(val3);
75952 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
75953 if (!SWIG_IsOK(ecode4)) {
75954 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VectorIOReader___call__" "', argument " "4"" of type '" "size_t""'");
75955 }
75956 arg4 = static_cast< size_t >(val4);
75957 result = (size_t)(arg1)->operator ()(arg2,arg3,arg4);
75958 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
75959 return resultobj;
75960 fail:
75961 return NULL;
75962 }
75963
75964
75965 SWIGINTERN PyObject *_wrap_new_VectorIOReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75966 PyObject *resultobj = 0;
75967 faiss::VectorIOReader *result = 0 ;
75968
75969 if (!PyArg_ParseTuple(args,(char *)":new_VectorIOReader")) SWIG_fail;
75970 result = (faiss::VectorIOReader *)new faiss::VectorIOReader();
75971 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VectorIOReader, SWIG_POINTER_NEW | 0 );
75972 return resultobj;
75973 fail:
75974 return NULL;
75975 }
75976
75977
75978 SWIGINTERN PyObject *_wrap_delete_VectorIOReader(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
75979 PyObject *resultobj = 0;
75980 faiss::VectorIOReader *arg1 = (faiss::VectorIOReader *) 0 ;
75981 void *argp1 = 0 ;
75982 int res1 = 0 ;
75983 PyObject * obj0 = 0 ;
75984
75985 if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorIOReader",&obj0)) SWIG_fail;
75986 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOReader, SWIG_POINTER_DISOWN | 0 );
75987 if (!SWIG_IsOK(res1)) {
75988 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorIOReader" "', argument " "1"" of type '" "faiss::VectorIOReader *""'");
75989 }
75990 arg1 = reinterpret_cast< faiss::VectorIOReader * >(argp1);
75991 delete arg1;
75992 resultobj = SWIG_Py_Void();
75993 return resultobj;
75994 fail:
75995 return NULL;
75996 }
75997
75998
75999 SWIGINTERN PyObject *VectorIOReader_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76000 PyObject *obj;
76001 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
76002 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VectorIOReader, SWIG_NewClientData(obj));
76003 return SWIG_Py_Void();
76004 }
76005
76006 SWIGINTERN PyObject *_wrap_VectorIOWriter_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76007 PyObject *resultobj = 0;
76008 faiss::VectorIOWriter *arg1 = (faiss::VectorIOWriter *) 0 ;
76009 std::vector< uint8_t > *arg2 = (std::vector< uint8_t > *) 0 ;
76010 void *argp1 = 0 ;
76011 int res1 = 0 ;
76012 void *argp2 = 0 ;
76013 int res2 = 0 ;
76014 PyObject * obj0 = 0 ;
76015 PyObject * obj1 = 0 ;
76016
76017 if (!PyArg_ParseTuple(args,(char *)"OO:VectorIOWriter_data_set",&obj0,&obj1)) SWIG_fail;
76018 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOWriter, 0 | 0 );
76019 if (!SWIG_IsOK(res1)) {
76020 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOWriter_data_set" "', argument " "1"" of type '" "faiss::VectorIOWriter *""'");
76021 }
76022 arg1 = reinterpret_cast< faiss::VectorIOWriter * >(argp1);
76023 res2 = SWIG_ConvertPtr(obj1, &argp2,SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
76024 if (!SWIG_IsOK(res2)) {
76025 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorIOWriter_data_set" "', argument " "2"" of type '" "std::vector< uint8_t > *""'");
76026 }
76027 arg2 = reinterpret_cast< std::vector< uint8_t > * >(argp2);
76028 if (arg1) (arg1)->data = *arg2;
76029 resultobj = SWIG_Py_Void();
76030 return resultobj;
76031 fail:
76032 return NULL;
76033 }
76034
76035
76036 SWIGINTERN PyObject *_wrap_VectorIOWriter_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76037 PyObject *resultobj = 0;
76038 faiss::VectorIOWriter *arg1 = (faiss::VectorIOWriter *) 0 ;
76039 void *argp1 = 0 ;
76040 int res1 = 0 ;
76041 PyObject * obj0 = 0 ;
76042 std::vector< uint8_t > *result = 0 ;
76043
76044 if (!PyArg_ParseTuple(args,(char *)"O:VectorIOWriter_data_get",&obj0)) SWIG_fail;
76045 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOWriter, 0 | 0 );
76046 if (!SWIG_IsOK(res1)) {
76047 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOWriter_data_get" "', argument " "1"" of type '" "faiss::VectorIOWriter *""'");
76048 }
76049 arg1 = reinterpret_cast< faiss::VectorIOWriter * >(argp1);
76050 result = (std::vector< uint8_t > *)& ((arg1)->data);
76051 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_std__vectorT_unsigned_char_t, 0 | 0 );
76052 return resultobj;
76053 fail:
76054 return NULL;
76055 }
76056
76057
76058 SWIGINTERN PyObject *_wrap_VectorIOWriter___call__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76059 PyObject *resultobj = 0;
76060 faiss::VectorIOWriter *arg1 = (faiss::VectorIOWriter *) 0 ;
76061 void *arg2 = (void *) 0 ;
76062 size_t arg3 ;
76063 size_t arg4 ;
76064 void *argp1 = 0 ;
76065 int res1 = 0 ;
76066 int res2 ;
76067 size_t val3 ;
76068 int ecode3 = 0 ;
76069 size_t val4 ;
76070 int ecode4 = 0 ;
76071 PyObject * obj0 = 0 ;
76072 PyObject * obj1 = 0 ;
76073 PyObject * obj2 = 0 ;
76074 PyObject * obj3 = 0 ;
76075 size_t result;
76076
76077 if (!PyArg_ParseTuple(args,(char *)"OOOO:VectorIOWriter___call__",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
76078 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOWriter, 0 | 0 );
76079 if (!SWIG_IsOK(res1)) {
76080 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "VectorIOWriter___call__" "', argument " "1"" of type '" "faiss::VectorIOWriter *""'");
76081 }
76082 arg1 = reinterpret_cast< faiss::VectorIOWriter * >(argp1);
76083 res2 = SWIG_ConvertPtr(obj1,SWIG_as_voidptrptr(&arg2), 0, 0);
76084 if (!SWIG_IsOK(res2)) {
76085 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "VectorIOWriter___call__" "', argument " "2"" of type '" "void const *""'");
76086 }
76087 ecode3 = SWIG_AsVal_size_t(obj2, &val3);
76088 if (!SWIG_IsOK(ecode3)) {
76089 SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "VectorIOWriter___call__" "', argument " "3"" of type '" "size_t""'");
76090 }
76091 arg3 = static_cast< size_t >(val3);
76092 ecode4 = SWIG_AsVal_size_t(obj3, &val4);
76093 if (!SWIG_IsOK(ecode4)) {
76094 SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "VectorIOWriter___call__" "', argument " "4"" of type '" "size_t""'");
76095 }
76096 arg4 = static_cast< size_t >(val4);
76097 result = (size_t)(arg1)->operator ()((void const *)arg2,arg3,arg4);
76098 resultobj = SWIG_From_size_t(static_cast< size_t >(result));
76099 return resultobj;
76100 fail:
76101 return NULL;
76102 }
76103
76104
76105 SWIGINTERN PyObject *_wrap_new_VectorIOWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76106 PyObject *resultobj = 0;
76107 faiss::VectorIOWriter *result = 0 ;
76108
76109 if (!PyArg_ParseTuple(args,(char *)":new_VectorIOWriter")) SWIG_fail;
76110 result = (faiss::VectorIOWriter *)new faiss::VectorIOWriter();
76111 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_faiss__VectorIOWriter, SWIG_POINTER_NEW | 0 );
76112 return resultobj;
76113 fail:
76114 return NULL;
76115 }
76116
76117
76118 SWIGINTERN PyObject *_wrap_delete_VectorIOWriter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76119 PyObject *resultobj = 0;
76120 faiss::VectorIOWriter *arg1 = (faiss::VectorIOWriter *) 0 ;
76121 void *argp1 = 0 ;
76122 int res1 = 0 ;
76123 PyObject * obj0 = 0 ;
76124
76125 if (!PyArg_ParseTuple(args,(char *)"O:delete_VectorIOWriter",&obj0)) SWIG_fail;
76126 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_faiss__VectorIOWriter, SWIG_POINTER_DISOWN | 0 );
76127 if (!SWIG_IsOK(res1)) {
76128 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_VectorIOWriter" "', argument " "1"" of type '" "faiss::VectorIOWriter *""'");
76129 }
76130 arg1 = reinterpret_cast< faiss::VectorIOWriter * >(argp1);
76131 delete arg1;
76132 resultobj = SWIG_Py_Void();
76133 return resultobj;
76134 fail:
76135 return NULL;
76136 }
76137
76138
76139 SWIGINTERN PyObject *VectorIOWriter_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76140 PyObject *obj;
76141 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
76142 SWIG_TypeNewClientData(SWIGTYPE_p_faiss__VectorIOWriter, SWIG_NewClientData(obj));
76143 return SWIG_Py_Void();
76144 }
76145
76146 SWIGINTERN PyObject *_wrap_ignore_SIGTTIN(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76147 PyObject *resultobj = 0;
76148
76149 if (!PyArg_ParseTuple(args,(char *)":ignore_SIGTTIN")) SWIG_fail;
76150 ignore_SIGTTIN();
76151 resultobj = SWIG_Py_Void();
76152 return resultobj;
76153 fail:
76154 return NULL;
76155 }
76156
76157
76158 SWIGINTERN PyObject *_wrap_MapLong2Long_map_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76159 PyObject *resultobj = 0;
76160 MapLong2Long *arg1 = (MapLong2Long *) 0 ;
76161 std::unordered_map< long,long > arg2 ;
76162 void *argp1 = 0 ;
76163 int res1 = 0 ;
76164 void *argp2 ;
76165 int res2 = 0 ;
76166 PyObject * obj0 = 0 ;
76167 PyObject * obj1 = 0 ;
76168
76169 if (!PyArg_ParseTuple(args,(char *)"OO:MapLong2Long_map_set",&obj0,&obj1)) SWIG_fail;
76170 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
76171 if (!SWIG_IsOK(res1)) {
76172 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_map_set" "', argument " "1"" of type '" "MapLong2Long *""'");
76173 }
76174 arg1 = reinterpret_cast< MapLong2Long * >(argp1);
76175 {
76176 res2 = SWIG_ConvertPtr(obj1, &argp2, SWIGTYPE_p_std__unordered_mapT_long_long_t, 0 | 0);
76177 if (!SWIG_IsOK(res2)) {
76178 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "MapLong2Long_map_set" "', argument " "2"" of type '" "std::unordered_map< long,long >""'");
76179 }
76180 if (!argp2) {
76181 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "MapLong2Long_map_set" "', argument " "2"" of type '" "std::unordered_map< long,long >""'");
76182 } else {
76183 std::unordered_map< long,long > * temp = reinterpret_cast< std::unordered_map< long,long > * >(argp2);
76184 arg2 = *temp;
76185 if (SWIG_IsNewObj(res2)) delete temp;
76186 }
76187 }
76188 if (arg1) (arg1)->map = arg2;
76189 resultobj = SWIG_Py_Void();
76190 return resultobj;
76191 fail:
76192 return NULL;
76193 }
76194
76195
76196 SWIGINTERN PyObject *_wrap_MapLong2Long_map_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76197 PyObject *resultobj = 0;
76198 MapLong2Long *arg1 = (MapLong2Long *) 0 ;
76199 void *argp1 = 0 ;
76200 int res1 = 0 ;
76201 PyObject * obj0 = 0 ;
76202 std::unordered_map< long,long > result;
76203
76204 if (!PyArg_ParseTuple(args,(char *)"O:MapLong2Long_map_get",&obj0)) SWIG_fail;
76205 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
76206 if (!SWIG_IsOK(res1)) {
76207 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_map_get" "', argument " "1"" of type '" "MapLong2Long *""'");
76208 }
76209 arg1 = reinterpret_cast< MapLong2Long * >(argp1);
76210 result = ((arg1)->map);
76211 resultobj = SWIG_NewPointerObj((new std::unordered_map< long,long >(static_cast< const std::unordered_map< long,long >& >(result))), SWIGTYPE_p_std__unordered_mapT_long_long_t, SWIG_POINTER_OWN | 0 );
76212 return resultobj;
76213 fail:
76214 return NULL;
76215 }
76216
76217
76218 SWIGINTERN PyObject *_wrap_MapLong2Long_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76219 PyObject *resultobj = 0;
76220 MapLong2Long *arg1 = (MapLong2Long *) 0 ;
76221 size_t arg2 ;
76222 long *arg3 = (long *) 0 ;
76223 long *arg4 = (long *) 0 ;
76224 void *argp1 = 0 ;
76225 int res1 = 0 ;
76226 size_t val2 ;
76227 int ecode2 = 0 ;
76228 void *argp3 = 0 ;
76229 int res3 = 0 ;
76230 void *argp4 = 0 ;
76231 int res4 = 0 ;
76232 PyObject * obj0 = 0 ;
76233 PyObject * obj1 = 0 ;
76234 PyObject * obj2 = 0 ;
76235 PyObject * obj3 = 0 ;
76236
76237 if (!PyArg_ParseTuple(args,(char *)"OOOO:MapLong2Long_add",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
76238 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
76239 if (!SWIG_IsOK(res1)) {
76240 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_add" "', argument " "1"" of type '" "MapLong2Long *""'");
76241 }
76242 arg1 = reinterpret_cast< MapLong2Long * >(argp1);
76243 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
76244 if (!SWIG_IsOK(ecode2)) {
76245 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MapLong2Long_add" "', argument " "2"" of type '" "size_t""'");
76246 }
76247 arg2 = static_cast< size_t >(val2);
76248 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
76249 if (!SWIG_IsOK(res3)) {
76250 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MapLong2Long_add" "', argument " "3"" of type '" "long const *""'");
76251 }
76252 arg3 = reinterpret_cast< long * >(argp3);
76253 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
76254 if (!SWIG_IsOK(res4)) {
76255 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MapLong2Long_add" "', argument " "4"" of type '" "long const *""'");
76256 }
76257 arg4 = reinterpret_cast< long * >(argp4);
76258 (arg1)->add(arg2,(long const *)arg3,(long const *)arg4);
76259 resultobj = SWIG_Py_Void();
76260 return resultobj;
76261 fail:
76262 return NULL;
76263 }
76264
76265
76266 SWIGINTERN PyObject *_wrap_MapLong2Long_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76267 PyObject *resultobj = 0;
76268 MapLong2Long *arg1 = (MapLong2Long *) 0 ;
76269 long arg2 ;
76270 void *argp1 = 0 ;
76271 int res1 = 0 ;
76272 long val2 ;
76273 int ecode2 = 0 ;
76274 PyObject * obj0 = 0 ;
76275 PyObject * obj1 = 0 ;
76276 long result;
76277
76278 if (!PyArg_ParseTuple(args,(char *)"OO:MapLong2Long_search",&obj0,&obj1)) SWIG_fail;
76279 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
76280 if (!SWIG_IsOK(res1)) {
76281 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_search" "', argument " "1"" of type '" "MapLong2Long *""'");
76282 }
76283 arg1 = reinterpret_cast< MapLong2Long * >(argp1);
76284 ecode2 = SWIG_AsVal_long(obj1, &val2);
76285 if (!SWIG_IsOK(ecode2)) {
76286 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MapLong2Long_search" "', argument " "2"" of type '" "long""'");
76287 }
76288 arg2 = static_cast< long >(val2);
76289 result = (long)(arg1)->search(arg2);
76290 resultobj = SWIG_From_long(static_cast< long >(result));
76291 return resultobj;
76292 fail:
76293 return NULL;
76294 }
76295
76296
76297 SWIGINTERN PyObject *_wrap_MapLong2Long_search_multiple(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76298 PyObject *resultobj = 0;
76299 MapLong2Long *arg1 = (MapLong2Long *) 0 ;
76300 size_t arg2 ;
76301 long *arg3 = (long *) 0 ;
76302 long *arg4 = (long *) 0 ;
76303 void *argp1 = 0 ;
76304 int res1 = 0 ;
76305 size_t val2 ;
76306 int ecode2 = 0 ;
76307 void *argp3 = 0 ;
76308 int res3 = 0 ;
76309 void *argp4 = 0 ;
76310 int res4 = 0 ;
76311 PyObject * obj0 = 0 ;
76312 PyObject * obj1 = 0 ;
76313 PyObject * obj2 = 0 ;
76314 PyObject * obj3 = 0 ;
76315
76316 if (!PyArg_ParseTuple(args,(char *)"OOOO:MapLong2Long_search_multiple",&obj0,&obj1,&obj2,&obj3)) SWIG_fail;
76317 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, 0 | 0 );
76318 if (!SWIG_IsOK(res1)) {
76319 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "MapLong2Long_search_multiple" "', argument " "1"" of type '" "MapLong2Long *""'");
76320 }
76321 arg1 = reinterpret_cast< MapLong2Long * >(argp1);
76322 ecode2 = SWIG_AsVal_size_t(obj1, &val2);
76323 if (!SWIG_IsOK(ecode2)) {
76324 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "MapLong2Long_search_multiple" "', argument " "2"" of type '" "size_t""'");
76325 }
76326 arg2 = static_cast< size_t >(val2);
76327 res3 = SWIG_ConvertPtr(obj2, &argp3,SWIGTYPE_p_long, 0 | 0 );
76328 if (!SWIG_IsOK(res3)) {
76329 SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "MapLong2Long_search_multiple" "', argument " "3"" of type '" "long const *""'");
76330 }
76331 arg3 = reinterpret_cast< long * >(argp3);
76332 res4 = SWIG_ConvertPtr(obj3, &argp4,SWIGTYPE_p_long, 0 | 0 );
76333 if (!SWIG_IsOK(res4)) {
76334 SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "MapLong2Long_search_multiple" "', argument " "4"" of type '" "long *""'");
76335 }
76336 arg4 = reinterpret_cast< long * >(argp4);
76337 (arg1)->search_multiple(arg2,(long const *)arg3,arg4);
76338 resultobj = SWIG_Py_Void();
76339 return resultobj;
76340 fail:
76341 return NULL;
76342 }
76343
76344
76345 SWIGINTERN PyObject *_wrap_new_MapLong2Long(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76346 PyObject *resultobj = 0;
76347 MapLong2Long *result = 0 ;
76348
76349 if (!PyArg_ParseTuple(args,(char *)":new_MapLong2Long")) SWIG_fail;
76350 result = (MapLong2Long *)new MapLong2Long();
76351 resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_MapLong2Long, SWIG_POINTER_NEW | 0 );
76352 return resultobj;
76353 fail:
76354 return NULL;
76355 }
76356
76357
76358 SWIGINTERN PyObject *_wrap_delete_MapLong2Long(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76359 PyObject *resultobj = 0;
76360 MapLong2Long *arg1 = (MapLong2Long *) 0 ;
76361 void *argp1 = 0 ;
76362 int res1 = 0 ;
76363 PyObject * obj0 = 0 ;
76364
76365 if (!PyArg_ParseTuple(args,(char *)"O:delete_MapLong2Long",&obj0)) SWIG_fail;
76366 res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_MapLong2Long, SWIG_POINTER_DISOWN | 0 );
76367 if (!SWIG_IsOK(res1)) {
76368 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_MapLong2Long" "', argument " "1"" of type '" "MapLong2Long *""'");
76369 }
76370 arg1 = reinterpret_cast< MapLong2Long * >(argp1);
76371 delete arg1;
76372 resultobj = SWIG_Py_Void();
76373 return resultobj;
76374 fail:
76375 return NULL;
76376 }
76377
76378
76379 SWIGINTERN PyObject *MapLong2Long_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
76380 PyObject *obj;
76381 if (!PyArg_ParseTuple(args,(char *)"O:swigregister", &obj)) return NULL;
76382 SWIG_TypeNewClientData(SWIGTYPE_p_MapLong2Long, SWIG_NewClientData(obj));
76383 return SWIG_Py_Void();
76384 }
76385
76386 static PyMethodDef SwigMethods[] = {
76387 { (char *)"SWIG_PyInstanceMethod_New", (PyCFunction)SWIG_PyInstanceMethod_New, METH_O, NULL},
76388 { (char *)"new_FloatVector", _wrap_new_FloatVector, METH_VARARGS, NULL},
76389 { (char *)"FloatVector_push_back", _wrap_FloatVector_push_back, METH_VARARGS, NULL},
76390 { (char *)"FloatVector_clear", _wrap_FloatVector_clear, METH_VARARGS, NULL},
76391 { (char *)"FloatVector_data", _wrap_FloatVector_data, METH_VARARGS, NULL},
76392 { (char *)"FloatVector_size", _wrap_FloatVector_size, METH_VARARGS, NULL},
76393 { (char *)"FloatVector_at", _wrap_FloatVector_at, METH_VARARGS, NULL},
76394 { (char *)"FloatVector_resize", _wrap_FloatVector_resize, METH_VARARGS, NULL},
76395 { (char *)"FloatVector_swap", _wrap_FloatVector_swap, METH_VARARGS, NULL},
76396 { (char *)"delete_FloatVector", _wrap_delete_FloatVector, METH_VARARGS, NULL},
76397 { (char *)"FloatVector_swigregister", FloatVector_swigregister, METH_VARARGS, NULL},
76398 { (char *)"new_DoubleVector", _wrap_new_DoubleVector, METH_VARARGS, NULL},
76399 { (char *)"DoubleVector_push_back", _wrap_DoubleVector_push_back, METH_VARARGS, NULL},
76400 { (char *)"DoubleVector_clear", _wrap_DoubleVector_clear, METH_VARARGS, NULL},
76401 { (char *)"DoubleVector_data", _wrap_DoubleVector_data, METH_VARARGS, NULL},
76402 { (char *)"DoubleVector_size", _wrap_DoubleVector_size, METH_VARARGS, NULL},
76403 { (char *)"DoubleVector_at", _wrap_DoubleVector_at, METH_VARARGS, NULL},
76404 { (char *)"DoubleVector_resize", _wrap_DoubleVector_resize, METH_VARARGS, NULL},
76405 { (char *)"DoubleVector_swap", _wrap_DoubleVector_swap, METH_VARARGS, NULL},
76406 { (char *)"delete_DoubleVector", _wrap_delete_DoubleVector, METH_VARARGS, NULL},
76407 { (char *)"DoubleVector_swigregister", DoubleVector_swigregister, METH_VARARGS, NULL},
76408 { (char *)"new_ByteVector", _wrap_new_ByteVector, METH_VARARGS, NULL},
76409 { (char *)"ByteVector_push_back", _wrap_ByteVector_push_back, METH_VARARGS, NULL},
76410 { (char *)"ByteVector_clear", _wrap_ByteVector_clear, METH_VARARGS, NULL},
76411 { (char *)"ByteVector_data", _wrap_ByteVector_data, METH_VARARGS, NULL},
76412 { (char *)"ByteVector_size", _wrap_ByteVector_size, METH_VARARGS, NULL},
76413 { (char *)"ByteVector_at", _wrap_ByteVector_at, METH_VARARGS, NULL},
76414 { (char *)"ByteVector_resize", _wrap_ByteVector_resize, METH_VARARGS, NULL},
76415 { (char *)"ByteVector_swap", _wrap_ByteVector_swap, METH_VARARGS, NULL},
76416 { (char *)"delete_ByteVector", _wrap_delete_ByteVector, METH_VARARGS, NULL},
76417 { (char *)"ByteVector_swigregister", ByteVector_swigregister, METH_VARARGS, NULL},
76418 { (char *)"new_CharVector", _wrap_new_CharVector, METH_VARARGS, NULL},
76419 { (char *)"CharVector_push_back", _wrap_CharVector_push_back, METH_VARARGS, NULL},
76420 { (char *)"CharVector_clear", _wrap_CharVector_clear, METH_VARARGS, NULL},
76421 { (char *)"CharVector_data", _wrap_CharVector_data, METH_VARARGS, NULL},
76422 { (char *)"CharVector_size", _wrap_CharVector_size, METH_VARARGS, NULL},
76423 { (char *)"CharVector_at", _wrap_CharVector_at, METH_VARARGS, NULL},
76424 { (char *)"CharVector_resize", _wrap_CharVector_resize, METH_VARARGS, NULL},
76425 { (char *)"CharVector_swap", _wrap_CharVector_swap, METH_VARARGS, NULL},
76426 { (char *)"delete_CharVector", _wrap_delete_CharVector, METH_VARARGS, NULL},
76427 { (char *)"CharVector_swigregister", CharVector_swigregister, METH_VARARGS, NULL},
76428 { (char *)"new_Uint64Vector", _wrap_new_Uint64Vector, METH_VARARGS, NULL},
76429 { (char *)"Uint64Vector_push_back", _wrap_Uint64Vector_push_back, METH_VARARGS, NULL},
76430 { (char *)"Uint64Vector_clear", _wrap_Uint64Vector_clear, METH_VARARGS, NULL},
76431 { (char *)"Uint64Vector_data", _wrap_Uint64Vector_data, METH_VARARGS, NULL},
76432 { (char *)"Uint64Vector_size", _wrap_Uint64Vector_size, METH_VARARGS, NULL},
76433 { (char *)"Uint64Vector_at", _wrap_Uint64Vector_at, METH_VARARGS, NULL},
76434 { (char *)"Uint64Vector_resize", _wrap_Uint64Vector_resize, METH_VARARGS, NULL},
76435 { (char *)"Uint64Vector_swap", _wrap_Uint64Vector_swap, METH_VARARGS, NULL},
76436 { (char *)"delete_Uint64Vector", _wrap_delete_Uint64Vector, METH_VARARGS, NULL},
76437 { (char *)"Uint64Vector_swigregister", Uint64Vector_swigregister, METH_VARARGS, NULL},
76438 { (char *)"new_LongVector", _wrap_new_LongVector, METH_VARARGS, NULL},
76439 { (char *)"LongVector_push_back", _wrap_LongVector_push_back, METH_VARARGS, NULL},
76440 { (char *)"LongVector_clear", _wrap_LongVector_clear, METH_VARARGS, NULL},
76441 { (char *)"LongVector_data", _wrap_LongVector_data, METH_VARARGS, NULL},
76442 { (char *)"LongVector_size", _wrap_LongVector_size, METH_VARARGS, NULL},
76443 { (char *)"LongVector_at", _wrap_LongVector_at, METH_VARARGS, NULL},
76444 { (char *)"LongVector_resize", _wrap_LongVector_resize, METH_VARARGS, NULL},
76445 { (char *)"LongVector_swap", _wrap_LongVector_swap, METH_VARARGS, NULL},
76446 { (char *)"delete_LongVector", _wrap_delete_LongVector, METH_VARARGS, NULL},
76447 { (char *)"LongVector_swigregister", LongVector_swigregister, METH_VARARGS, NULL},
76448 { (char *)"new_IntVector", _wrap_new_IntVector, METH_VARARGS, NULL},
76449 { (char *)"IntVector_push_back", _wrap_IntVector_push_back, METH_VARARGS, NULL},
76450 { (char *)"IntVector_clear", _wrap_IntVector_clear, METH_VARARGS, NULL},
76451 { (char *)"IntVector_data", _wrap_IntVector_data, METH_VARARGS, NULL},
76452 { (char *)"IntVector_size", _wrap_IntVector_size, METH_VARARGS, NULL},
76453 { (char *)"IntVector_at", _wrap_IntVector_at, METH_VARARGS, NULL},
76454 { (char *)"IntVector_resize", _wrap_IntVector_resize, METH_VARARGS, NULL},
76455 { (char *)"IntVector_swap", _wrap_IntVector_swap, METH_VARARGS, NULL},
76456 { (char *)"delete_IntVector", _wrap_delete_IntVector, METH_VARARGS, NULL},
76457 { (char *)"IntVector_swigregister", IntVector_swigregister, METH_VARARGS, NULL},
76458 { (char *)"new_VectorTransformVector", _wrap_new_VectorTransformVector, METH_VARARGS, NULL},
76459 { (char *)"VectorTransformVector_push_back", _wrap_VectorTransformVector_push_back, METH_VARARGS, NULL},
76460 { (char *)"VectorTransformVector_clear", _wrap_VectorTransformVector_clear, METH_VARARGS, NULL},
76461 { (char *)"VectorTransformVector_data", _wrap_VectorTransformVector_data, METH_VARARGS, NULL},
76462 { (char *)"VectorTransformVector_size", _wrap_VectorTransformVector_size, METH_VARARGS, NULL},
76463 { (char *)"VectorTransformVector_at", _wrap_VectorTransformVector_at, METH_VARARGS, NULL},
76464 { (char *)"VectorTransformVector_resize", _wrap_VectorTransformVector_resize, METH_VARARGS, NULL},
76465 { (char *)"VectorTransformVector_swap", _wrap_VectorTransformVector_swap, METH_VARARGS, NULL},
76466 { (char *)"delete_VectorTransformVector", _wrap_delete_VectorTransformVector, METH_VARARGS, NULL},
76467 { (char *)"VectorTransformVector_swigregister", VectorTransformVector_swigregister, METH_VARARGS, NULL},
76468 { (char *)"new_OperatingPointVector", _wrap_new_OperatingPointVector, METH_VARARGS, NULL},
76469 { (char *)"OperatingPointVector_push_back", _wrap_OperatingPointVector_push_back, METH_VARARGS, NULL},
76470 { (char *)"OperatingPointVector_clear", _wrap_OperatingPointVector_clear, METH_VARARGS, NULL},
76471 { (char *)"OperatingPointVector_data", _wrap_OperatingPointVector_data, METH_VARARGS, NULL},
76472 { (char *)"OperatingPointVector_size", _wrap_OperatingPointVector_size, METH_VARARGS, NULL},
76473 { (char *)"OperatingPointVector_at", _wrap_OperatingPointVector_at, METH_VARARGS, NULL},
76474 { (char *)"OperatingPointVector_resize", _wrap_OperatingPointVector_resize, METH_VARARGS, NULL},
76475 { (char *)"OperatingPointVector_swap", _wrap_OperatingPointVector_swap, METH_VARARGS, NULL},
76476 { (char *)"delete_OperatingPointVector", _wrap_delete_OperatingPointVector, METH_VARARGS, NULL},
76477 { (char *)"OperatingPointVector_swigregister", OperatingPointVector_swigregister, METH_VARARGS, NULL},
76478 { (char *)"new_InvertedListsPtrVector", _wrap_new_InvertedListsPtrVector, METH_VARARGS, NULL},
76479 { (char *)"InvertedListsPtrVector_push_back", _wrap_InvertedListsPtrVector_push_back, METH_VARARGS, NULL},
76480 { (char *)"InvertedListsPtrVector_clear", _wrap_InvertedListsPtrVector_clear, METH_VARARGS, NULL},
76481 { (char *)"InvertedListsPtrVector_data", _wrap_InvertedListsPtrVector_data, METH_VARARGS, NULL},
76482 { (char *)"InvertedListsPtrVector_size", _wrap_InvertedListsPtrVector_size, METH_VARARGS, NULL},
76483 { (char *)"InvertedListsPtrVector_at", _wrap_InvertedListsPtrVector_at, METH_VARARGS, NULL},
76484 { (char *)"InvertedListsPtrVector_resize", _wrap_InvertedListsPtrVector_resize, METH_VARARGS, NULL},
76485 { (char *)"InvertedListsPtrVector_swap", _wrap_InvertedListsPtrVector_swap, METH_VARARGS, NULL},
76486 { (char *)"delete_InvertedListsPtrVector", _wrap_delete_InvertedListsPtrVector, METH_VARARGS, NULL},
76487 { (char *)"InvertedListsPtrVector_swigregister", InvertedListsPtrVector_swigregister, METH_VARARGS, NULL},
76488 { (char *)"new_FloatVectorVector", _wrap_new_FloatVectorVector, METH_VARARGS, NULL},
76489 { (char *)"FloatVectorVector_push_back", _wrap_FloatVectorVector_push_back, METH_VARARGS, NULL},
76490 { (char *)"FloatVectorVector_clear", _wrap_FloatVectorVector_clear, METH_VARARGS, NULL},
76491 { (char *)"FloatVectorVector_data", _wrap_FloatVectorVector_data, METH_VARARGS, NULL},
76492 { (char *)"FloatVectorVector_size", _wrap_FloatVectorVector_size, METH_VARARGS, NULL},
76493 { (char *)"FloatVectorVector_at", _wrap_FloatVectorVector_at, METH_VARARGS, NULL},
76494 { (char *)"FloatVectorVector_resize", _wrap_FloatVectorVector_resize, METH_VARARGS, NULL},
76495 { (char *)"FloatVectorVector_swap", _wrap_FloatVectorVector_swap, METH_VARARGS, NULL},
76496 { (char *)"delete_FloatVectorVector", _wrap_delete_FloatVectorVector, METH_VARARGS, NULL},
76497 { (char *)"FloatVectorVector_swigregister", FloatVectorVector_swigregister, METH_VARARGS, NULL},
76498 { (char *)"new_ByteVectorVector", _wrap_new_ByteVectorVector, METH_VARARGS, NULL},
76499 { (char *)"ByteVectorVector_push_back", _wrap_ByteVectorVector_push_back, METH_VARARGS, NULL},
76500 { (char *)"ByteVectorVector_clear", _wrap_ByteVectorVector_clear, METH_VARARGS, NULL},
76501 { (char *)"ByteVectorVector_data", _wrap_ByteVectorVector_data, METH_VARARGS, NULL},
76502 { (char *)"ByteVectorVector_size", _wrap_ByteVectorVector_size, METH_VARARGS, NULL},
76503 { (char *)"ByteVectorVector_at", _wrap_ByteVectorVector_at, METH_VARARGS, NULL},
76504 { (char *)"ByteVectorVector_resize", _wrap_ByteVectorVector_resize, METH_VARARGS, NULL},
76505 { (char *)"ByteVectorVector_swap", _wrap_ByteVectorVector_swap, METH_VARARGS, NULL},
76506 { (char *)"delete_ByteVectorVector", _wrap_delete_ByteVectorVector, METH_VARARGS, NULL},
76507 { (char *)"ByteVectorVector_swigregister", ByteVectorVector_swigregister, METH_VARARGS, NULL},
76508 { (char *)"new_LongVectorVector", _wrap_new_LongVectorVector, METH_VARARGS, NULL},
76509 { (char *)"LongVectorVector_push_back", _wrap_LongVectorVector_push_back, METH_VARARGS, NULL},
76510 { (char *)"LongVectorVector_clear", _wrap_LongVectorVector_clear, METH_VARARGS, NULL},
76511 { (char *)"LongVectorVector_data", _wrap_LongVectorVector_data, METH_VARARGS, NULL},
76512 { (char *)"LongVectorVector_size", _wrap_LongVectorVector_size, METH_VARARGS, NULL},
76513 { (char *)"LongVectorVector_at", _wrap_LongVectorVector_at, METH_VARARGS, NULL},
76514 { (char *)"LongVectorVector_resize", _wrap_LongVectorVector_resize, METH_VARARGS, NULL},
76515 { (char *)"LongVectorVector_swap", _wrap_LongVectorVector_swap, METH_VARARGS, NULL},
76516 { (char *)"delete_LongVectorVector", _wrap_delete_LongVectorVector, METH_VARARGS, NULL},
76517 { (char *)"LongVectorVector_swigregister", LongVectorVector_swigregister, METH_VARARGS, NULL},
76518 { (char *)"popcount64", _wrap_popcount64, METH_VARARGS, NULL},
76519 { (char *)"hammings", _wrap_hammings, METH_VARARGS, NULL},
76520 { (char *)"bitvec_print", _wrap_bitvec_print, METH_VARARGS, NULL},
76521 { (char *)"fvecs2bitvecs", _wrap_fvecs2bitvecs, METH_VARARGS, NULL},
76522 { (char *)"fvec2bitvec", _wrap_fvec2bitvec, METH_VARARGS, NULL},
76523 { (char *)"hammings_knn_hc", _wrap_hammings_knn_hc, METH_VARARGS, NULL},
76524 { (char *)"hammings_knn", _wrap_hammings_knn, METH_VARARGS, NULL},
76525 { (char *)"hammings_knn_mc", _wrap_hammings_knn_mc, METH_VARARGS, NULL},
76526 { (char *)"hamming_count_thres", _wrap_hamming_count_thres, METH_VARARGS, NULL},
76527 { (char *)"match_hamming_thres", _wrap_match_hamming_thres, METH_VARARGS, NULL},
76528 { (char *)"crosshamming_count_thres", _wrap_crosshamming_count_thres, METH_VARARGS, NULL},
76529 { (char *)"HammingComputer4_a0_set", _wrap_HammingComputer4_a0_set, METH_VARARGS, NULL},
76530 { (char *)"HammingComputer4_a0_get", _wrap_HammingComputer4_a0_get, METH_VARARGS, NULL},
76531 { (char *)"new_HammingComputer4", _wrap_new_HammingComputer4, METH_VARARGS, NULL},
76532 { (char *)"HammingComputer4_set", _wrap_HammingComputer4_set, METH_VARARGS, NULL},
76533 { (char *)"HammingComputer4_hamming", _wrap_HammingComputer4_hamming, METH_VARARGS, NULL},
76534 { (char *)"delete_HammingComputer4", _wrap_delete_HammingComputer4, METH_VARARGS, NULL},
76535 { (char *)"HammingComputer4_swigregister", HammingComputer4_swigregister, METH_VARARGS, NULL},
76536 { (char *)"HammingComputer8_a0_set", _wrap_HammingComputer8_a0_set, METH_VARARGS, NULL},
76537 { (char *)"HammingComputer8_a0_get", _wrap_HammingComputer8_a0_get, METH_VARARGS, NULL},
76538 { (char *)"new_HammingComputer8", _wrap_new_HammingComputer8, METH_VARARGS, NULL},
76539 { (char *)"HammingComputer8_set", _wrap_HammingComputer8_set, METH_VARARGS, NULL},
76540 { (char *)"HammingComputer8_hamming", _wrap_HammingComputer8_hamming, METH_VARARGS, NULL},
76541 { (char *)"delete_HammingComputer8", _wrap_delete_HammingComputer8, METH_VARARGS, NULL},
76542 { (char *)"HammingComputer8_swigregister", HammingComputer8_swigregister, METH_VARARGS, NULL},
76543 { (char *)"HammingComputer16_a0_set", _wrap_HammingComputer16_a0_set, METH_VARARGS, NULL},
76544 { (char *)"HammingComputer16_a0_get", _wrap_HammingComputer16_a0_get, METH_VARARGS, NULL},
76545 { (char *)"HammingComputer16_a1_set", _wrap_HammingComputer16_a1_set, METH_VARARGS, NULL},
76546 { (char *)"HammingComputer16_a1_get", _wrap_HammingComputer16_a1_get, METH_VARARGS, NULL},
76547 { (char *)"new_HammingComputer16", _wrap_new_HammingComputer16, METH_VARARGS, NULL},
76548 { (char *)"HammingComputer16_set", _wrap_HammingComputer16_set, METH_VARARGS, NULL},
76549 { (char *)"HammingComputer16_hamming", _wrap_HammingComputer16_hamming, METH_VARARGS, NULL},
76550 { (char *)"delete_HammingComputer16", _wrap_delete_HammingComputer16, METH_VARARGS, NULL},
76551 { (char *)"HammingComputer16_swigregister", HammingComputer16_swigregister, METH_VARARGS, NULL},
76552 { (char *)"HammingComputer20_a0_set", _wrap_HammingComputer20_a0_set, METH_VARARGS, NULL},
76553 { (char *)"HammingComputer20_a0_get", _wrap_HammingComputer20_a0_get, METH_VARARGS, NULL},
76554 { (char *)"HammingComputer20_a1_set", _wrap_HammingComputer20_a1_set, METH_VARARGS, NULL},
76555 { (char *)"HammingComputer20_a1_get", _wrap_HammingComputer20_a1_get, METH_VARARGS, NULL},
76556 { (char *)"HammingComputer20_a2_set", _wrap_HammingComputer20_a2_set, METH_VARARGS, NULL},
76557 { (char *)"HammingComputer20_a2_get", _wrap_HammingComputer20_a2_get, METH_VARARGS, NULL},
76558 { (char *)"new_HammingComputer20", _wrap_new_HammingComputer20, METH_VARARGS, NULL},
76559 { (char *)"HammingComputer20_set", _wrap_HammingComputer20_set, METH_VARARGS, NULL},
76560 { (char *)"HammingComputer20_hamming", _wrap_HammingComputer20_hamming, METH_VARARGS, NULL},
76561 { (char *)"delete_HammingComputer20", _wrap_delete_HammingComputer20, METH_VARARGS, NULL},
76562 { (char *)"HammingComputer20_swigregister", HammingComputer20_swigregister, METH_VARARGS, NULL},
76563 { (char *)"HammingComputer32_a0_set", _wrap_HammingComputer32_a0_set, METH_VARARGS, NULL},
76564 { (char *)"HammingComputer32_a0_get", _wrap_HammingComputer32_a0_get, METH_VARARGS, NULL},
76565 { (char *)"HammingComputer32_a1_set", _wrap_HammingComputer32_a1_set, METH_VARARGS, NULL},
76566 { (char *)"HammingComputer32_a1_get", _wrap_HammingComputer32_a1_get, METH_VARARGS, NULL},
76567 { (char *)"HammingComputer32_a2_set", _wrap_HammingComputer32_a2_set, METH_VARARGS, NULL},
76568 { (char *)"HammingComputer32_a2_get", _wrap_HammingComputer32_a2_get, METH_VARARGS, NULL},
76569 { (char *)"HammingComputer32_a3_set", _wrap_HammingComputer32_a3_set, METH_VARARGS, NULL},
76570 { (char *)"HammingComputer32_a3_get", _wrap_HammingComputer32_a3_get, METH_VARARGS, NULL},
76571 { (char *)"new_HammingComputer32", _wrap_new_HammingComputer32, METH_VARARGS, NULL},
76572 { (char *)"HammingComputer32_set", _wrap_HammingComputer32_set, METH_VARARGS, NULL},
76573 { (char *)"HammingComputer32_hamming", _wrap_HammingComputer32_hamming, METH_VARARGS, NULL},
76574 { (char *)"delete_HammingComputer32", _wrap_delete_HammingComputer32, METH_VARARGS, NULL},
76575 { (char *)"HammingComputer32_swigregister", HammingComputer32_swigregister, METH_VARARGS, NULL},
76576 { (char *)"HammingComputer64_a0_set", _wrap_HammingComputer64_a0_set, METH_VARARGS, NULL},
76577 { (char *)"HammingComputer64_a0_get", _wrap_HammingComputer64_a0_get, METH_VARARGS, NULL},
76578 { (char *)"HammingComputer64_a1_set", _wrap_HammingComputer64_a1_set, METH_VARARGS, NULL},
76579 { (char *)"HammingComputer64_a1_get", _wrap_HammingComputer64_a1_get, METH_VARARGS, NULL},
76580 { (char *)"HammingComputer64_a2_set", _wrap_HammingComputer64_a2_set, METH_VARARGS, NULL},
76581 { (char *)"HammingComputer64_a2_get", _wrap_HammingComputer64_a2_get, METH_VARARGS, NULL},
76582 { (char *)"HammingComputer64_a3_set", _wrap_HammingComputer64_a3_set, METH_VARARGS, NULL},
76583 { (char *)"HammingComputer64_a3_get", _wrap_HammingComputer64_a3_get, METH_VARARGS, NULL},
76584 { (char *)"HammingComputer64_a4_set", _wrap_HammingComputer64_a4_set, METH_VARARGS, NULL},
76585 { (char *)"HammingComputer64_a4_get", _wrap_HammingComputer64_a4_get, METH_VARARGS, NULL},
76586 { (char *)"HammingComputer64_a5_set", _wrap_HammingComputer64_a5_set, METH_VARARGS, NULL},
76587 { (char *)"HammingComputer64_a5_get", _wrap_HammingComputer64_a5_get, METH_VARARGS, NULL},
76588 { (char *)"HammingComputer64_a6_set", _wrap_HammingComputer64_a6_set, METH_VARARGS, NULL},
76589 { (char *)"HammingComputer64_a6_get", _wrap_HammingComputer64_a6_get, METH_VARARGS, NULL},
76590 { (char *)"HammingComputer64_a7_set", _wrap_HammingComputer64_a7_set, METH_VARARGS, NULL},
76591 { (char *)"HammingComputer64_a7_get", _wrap_HammingComputer64_a7_get, METH_VARARGS, NULL},
76592 { (char *)"new_HammingComputer64", _wrap_new_HammingComputer64, METH_VARARGS, NULL},
76593 { (char *)"HammingComputer64_set", _wrap_HammingComputer64_set, METH_VARARGS, NULL},
76594 { (char *)"HammingComputer64_hamming", _wrap_HammingComputer64_hamming, METH_VARARGS, NULL},
76595 { (char *)"delete_HammingComputer64", _wrap_delete_HammingComputer64, METH_VARARGS, NULL},
76596 { (char *)"HammingComputer64_swigregister", HammingComputer64_swigregister, METH_VARARGS, NULL},
76597 { (char *)"HammingComputerDefault_a_set", _wrap_HammingComputerDefault_a_set, METH_VARARGS, NULL},
76598 { (char *)"HammingComputerDefault_a_get", _wrap_HammingComputerDefault_a_get, METH_VARARGS, NULL},
76599 { (char *)"HammingComputerDefault_n_set", _wrap_HammingComputerDefault_n_set, METH_VARARGS, NULL},
76600 { (char *)"HammingComputerDefault_n_get", _wrap_HammingComputerDefault_n_get, METH_VARARGS, NULL},
76601 { (char *)"new_HammingComputerDefault", _wrap_new_HammingComputerDefault, METH_VARARGS, NULL},
76602 { (char *)"HammingComputerDefault_set", _wrap_HammingComputerDefault_set, METH_VARARGS, NULL},
76603 { (char *)"HammingComputerDefault_hamming", _wrap_HammingComputerDefault_hamming, METH_VARARGS, NULL},
76604 { (char *)"delete_HammingComputerDefault", _wrap_delete_HammingComputerDefault, METH_VARARGS, NULL},
76605 { (char *)"HammingComputerDefault_swigregister", HammingComputerDefault_swigregister, METH_VARARGS, NULL},
76606 { (char *)"HammingComputerM8_a_set", _wrap_HammingComputerM8_a_set, METH_VARARGS, NULL},
76607 { (char *)"HammingComputerM8_a_get", _wrap_HammingComputerM8_a_get, METH_VARARGS, NULL},
76608 { (char *)"HammingComputerM8_n_set", _wrap_HammingComputerM8_n_set, METH_VARARGS, NULL},
76609 { (char *)"HammingComputerM8_n_get", _wrap_HammingComputerM8_n_get, METH_VARARGS, NULL},
76610 { (char *)"new_HammingComputerM8", _wrap_new_HammingComputerM8, METH_VARARGS, NULL},
76611 { (char *)"HammingComputerM8_set", _wrap_HammingComputerM8_set, METH_VARARGS, NULL},
76612 { (char *)"HammingComputerM8_hamming", _wrap_HammingComputerM8_hamming, METH_VARARGS, NULL},
76613 { (char *)"delete_HammingComputerM8", _wrap_delete_HammingComputerM8, METH_VARARGS, NULL},
76614 { (char *)"HammingComputerM8_swigregister", HammingComputerM8_swigregister, METH_VARARGS, NULL},
76615 { (char *)"HammingComputerM4_a_set", _wrap_HammingComputerM4_a_set, METH_VARARGS, NULL},
76616 { (char *)"HammingComputerM4_a_get", _wrap_HammingComputerM4_a_get, METH_VARARGS, NULL},
76617 { (char *)"HammingComputerM4_n_set", _wrap_HammingComputerM4_n_set, METH_VARARGS, NULL},
76618 { (char *)"HammingComputerM4_n_get", _wrap_HammingComputerM4_n_get, METH_VARARGS, NULL},
76619 { (char *)"new_HammingComputerM4", _wrap_new_HammingComputerM4, METH_VARARGS, NULL},
76620 { (char *)"HammingComputerM4_set", _wrap_HammingComputerM4_set, METH_VARARGS, NULL},
76621 { (char *)"HammingComputerM4_hamming", _wrap_HammingComputerM4_hamming, METH_VARARGS, NULL},
76622 { (char *)"delete_HammingComputerM4", _wrap_delete_HammingComputerM4, METH_VARARGS, NULL},
76623 { (char *)"HammingComputerM4_swigregister", HammingComputerM4_swigregister, METH_VARARGS, NULL},
76624 { (char *)"generalized_hamming_64", _wrap_generalized_hamming_64, METH_VARARGS, NULL},
76625 { (char *)"GenHammingComputer8_a0_set", _wrap_GenHammingComputer8_a0_set, METH_VARARGS, NULL},
76626 { (char *)"GenHammingComputer8_a0_get", _wrap_GenHammingComputer8_a0_get, METH_VARARGS, NULL},
76627 { (char *)"new_GenHammingComputer8", _wrap_new_GenHammingComputer8, METH_VARARGS, NULL},
76628 { (char *)"GenHammingComputer8_hamming", _wrap_GenHammingComputer8_hamming, METH_VARARGS, NULL},
76629 { (char *)"delete_GenHammingComputer8", _wrap_delete_GenHammingComputer8, METH_VARARGS, NULL},
76630 { (char *)"GenHammingComputer8_swigregister", GenHammingComputer8_swigregister, METH_VARARGS, NULL},
76631 { (char *)"GenHammingComputer16_a0_set", _wrap_GenHammingComputer16_a0_set, METH_VARARGS, NULL},
76632 { (char *)"GenHammingComputer16_a0_get", _wrap_GenHammingComputer16_a0_get, METH_VARARGS, NULL},
76633 { (char *)"GenHammingComputer16_a1_set", _wrap_GenHammingComputer16_a1_set, METH_VARARGS, NULL},
76634 { (char *)"GenHammingComputer16_a1_get", _wrap_GenHammingComputer16_a1_get, METH_VARARGS, NULL},
76635 { (char *)"new_GenHammingComputer16", _wrap_new_GenHammingComputer16, METH_VARARGS, NULL},
76636 { (char *)"GenHammingComputer16_hamming", _wrap_GenHammingComputer16_hamming, METH_VARARGS, NULL},
76637 { (char *)"delete_GenHammingComputer16", _wrap_delete_GenHammingComputer16, METH_VARARGS, NULL},
76638 { (char *)"GenHammingComputer16_swigregister", GenHammingComputer16_swigregister, METH_VARARGS, NULL},
76639 { (char *)"GenHammingComputer32_a0_set", _wrap_GenHammingComputer32_a0_set, METH_VARARGS, NULL},
76640 { (char *)"GenHammingComputer32_a0_get", _wrap_GenHammingComputer32_a0_get, METH_VARARGS, NULL},
76641 { (char *)"GenHammingComputer32_a1_set", _wrap_GenHammingComputer32_a1_set, METH_VARARGS, NULL},
76642 { (char *)"GenHammingComputer32_a1_get", _wrap_GenHammingComputer32_a1_get, METH_VARARGS, NULL},
76643 { (char *)"GenHammingComputer32_a2_set", _wrap_GenHammingComputer32_a2_set, METH_VARARGS, NULL},
76644 { (char *)"GenHammingComputer32_a2_get", _wrap_GenHammingComputer32_a2_get, METH_VARARGS, NULL},
76645 { (char *)"GenHammingComputer32_a3_set", _wrap_GenHammingComputer32_a3_set, METH_VARARGS, NULL},
76646 { (char *)"GenHammingComputer32_a3_get", _wrap_GenHammingComputer32_a3_get, METH_VARARGS, NULL},
76647 { (char *)"new_GenHammingComputer32", _wrap_new_GenHammingComputer32, METH_VARARGS, NULL},
76648 { (char *)"GenHammingComputer32_hamming", _wrap_GenHammingComputer32_hamming, METH_VARARGS, NULL},
76649 { (char *)"delete_GenHammingComputer32", _wrap_delete_GenHammingComputer32, METH_VARARGS, NULL},
76650 { (char *)"GenHammingComputer32_swigregister", GenHammingComputer32_swigregister, METH_VARARGS, NULL},
76651 { (char *)"GenHammingComputerM8_a_set", _wrap_GenHammingComputerM8_a_set, METH_VARARGS, NULL},
76652 { (char *)"GenHammingComputerM8_a_get", _wrap_GenHammingComputerM8_a_get, METH_VARARGS, NULL},
76653 { (char *)"GenHammingComputerM8_n_set", _wrap_GenHammingComputerM8_n_set, METH_VARARGS, NULL},
76654 { (char *)"GenHammingComputerM8_n_get", _wrap_GenHammingComputerM8_n_get, METH_VARARGS, NULL},
76655 { (char *)"new_GenHammingComputerM8", _wrap_new_GenHammingComputerM8, METH_VARARGS, NULL},
76656 { (char *)"GenHammingComputerM8_hamming", _wrap_GenHammingComputerM8_hamming, METH_VARARGS, NULL},
76657 { (char *)"delete_GenHammingComputerM8", _wrap_delete_GenHammingComputerM8, METH_VARARGS, NULL},
76658 { (char *)"GenHammingComputerM8_swigregister", GenHammingComputerM8_swigregister, METH_VARARGS, NULL},
76659 { (char *)"generalized_hammings_knn_hc", _wrap_generalized_hammings_knn_hc, METH_VARARGS, NULL},
76660 { (char *)"get_num_gpus", _wrap_get_num_gpus, METH_VARARGS, NULL},
76661 { (char *)"getmillisecs", _wrap_getmillisecs, METH_VARARGS, NULL},
76662 { (char *)"get_mem_usage_kb", _wrap_get_mem_usage_kb, METH_VARARGS, NULL},
76663 { (char *)"RandomGenerator_mt_set", _wrap_RandomGenerator_mt_set, METH_VARARGS, NULL},
76664 { (char *)"RandomGenerator_mt_get", _wrap_RandomGenerator_mt_get, METH_VARARGS, NULL},
76665 { (char *)"RandomGenerator_rand_long", _wrap_RandomGenerator_rand_long, METH_VARARGS, NULL},
76666 { (char *)"RandomGenerator_rand_int", _wrap_RandomGenerator_rand_int, METH_VARARGS, NULL},
76667 { (char *)"RandomGenerator_rand_float", _wrap_RandomGenerator_rand_float, METH_VARARGS, NULL},
76668 { (char *)"RandomGenerator_rand_double", _wrap_RandomGenerator_rand_double, METH_VARARGS, NULL},
76669 { (char *)"new_RandomGenerator", _wrap_new_RandomGenerator, METH_VARARGS, NULL},
76670 { (char *)"delete_RandomGenerator", _wrap_delete_RandomGenerator, METH_VARARGS, NULL},
76671 { (char *)"RandomGenerator_swigregister", RandomGenerator_swigregister, METH_VARARGS, NULL},
76672 { (char *)"float_rand", _wrap_float_rand, METH_VARARGS, NULL},
76673 { (char *)"float_randn", _wrap_float_randn, METH_VARARGS, NULL},
76674 { (char *)"long_rand", _wrap_long_rand, METH_VARARGS, NULL},
76675 { (char *)"byte_rand", _wrap_byte_rand, METH_VARARGS, NULL},
76676 { (char *)"rand_perm", _wrap_rand_perm, METH_VARARGS, NULL},
76677 { (char *)"fvec_L2sqr", _wrap_fvec_L2sqr, METH_VARARGS, NULL},
76678 { (char *)"fvec_inner_product", _wrap_fvec_inner_product, METH_VARARGS, NULL},
76679 { (char *)"imbalance_factor", _wrap_imbalance_factor, METH_VARARGS, NULL},
76680 { (char *)"pairwise_L2sqr", _wrap_pairwise_L2sqr, METH_VARARGS, NULL},
76681 { (char *)"fvec_inner_products_ny", _wrap_fvec_inner_products_ny, METH_VARARGS, NULL},
76682 { (char *)"fvec_L2sqr_ny", _wrap_fvec_L2sqr_ny, METH_VARARGS, NULL},
76683 { (char *)"fvec_norm_L2sqr", _wrap_fvec_norm_L2sqr, METH_VARARGS, NULL},
76684 { (char *)"fvec_norms_L2", _wrap_fvec_norms_L2, METH_VARARGS, NULL},
76685 { (char *)"fvec_norms_L2sqr", _wrap_fvec_norms_L2sqr, METH_VARARGS, NULL},
76686 { (char *)"fvec_renorm_L2", _wrap_fvec_renorm_L2, METH_VARARGS, NULL},
76687 { (char *)"inner_product_to_L2sqr", _wrap_inner_product_to_L2sqr, METH_VARARGS, NULL},
76688 { (char *)"fvec_inner_products_by_idx", _wrap_fvec_inner_products_by_idx, METH_VARARGS, NULL},
76689 { (char *)"fvec_L2sqr_by_idx", _wrap_fvec_L2sqr_by_idx, METH_VARARGS, NULL},
76690 { (char *)"knn_inner_product", _wrap_knn_inner_product, METH_VARARGS, NULL},
76691 { (char *)"knn_L2sqr", _wrap_knn_L2sqr, METH_VARARGS, NULL},
76692 { (char *)"knn_L2sqr_base_shift", _wrap_knn_L2sqr_base_shift, METH_VARARGS, NULL},
76693 { (char *)"knn_inner_products_by_idx", _wrap_knn_inner_products_by_idx, METH_VARARGS, NULL},
76694 { (char *)"knn_L2sqr_by_idx", _wrap_knn_L2sqr_by_idx, METH_VARARGS, NULL},
76695 { (char *)"range_search_L2sqr", _wrap_range_search_L2sqr, METH_VARARGS, NULL},
76696 { (char *)"range_search_inner_product", _wrap_range_search_inner_product, METH_VARARGS, NULL},
76697 { (char *)"fvec_madd", _wrap_fvec_madd, METH_VARARGS, NULL},
76698 { (char *)"fvec_madd_and_argmin", _wrap_fvec_madd_and_argmin, METH_VARARGS, NULL},
76699 { (char *)"reflection", _wrap_reflection, METH_VARARGS, NULL},
76700 { (char *)"km_update_centroids", _wrap_km_update_centroids, METH_VARARGS, NULL},
76701 { (char *)"matrix_qr", _wrap_matrix_qr, METH_VARARGS, NULL},
76702 { (char *)"ranklist_handle_ties", _wrap_ranklist_handle_ties, METH_VARARGS, NULL},
76703 { (char *)"ranklist_intersection_size", _wrap_ranklist_intersection_size, METH_VARARGS, NULL},
76704 { (char *)"merge_result_table_with", _wrap_merge_result_table_with, METH_VARARGS, NULL},
76705 { (char *)"fvec_argsort", _wrap_fvec_argsort, METH_VARARGS, NULL},
76706 { (char *)"fvec_argsort_parallel", _wrap_fvec_argsort_parallel, METH_VARARGS, NULL},
76707 { (char *)"ivec_hist", _wrap_ivec_hist, METH_VARARGS, NULL},
76708 { (char *)"bincode_hist", _wrap_bincode_hist, METH_VARARGS, NULL},
76709 { (char *)"ivec_checksum", _wrap_ivec_checksum, METH_VARARGS, NULL},
76710 { (char *)"fvecs_maybe_subsample", _wrap_fvecs_maybe_subsample, METH_VARARGS, NULL},
76711 { (char *)"binary_to_real", _wrap_binary_to_real, METH_VARARGS, NULL},
76712 { (char *)"real_to_binary", _wrap_real_to_binary, METH_VARARGS, NULL},
76713 { (char *)"Index_d_set", _wrap_Index_d_set, METH_VARARGS, NULL},
76714 { (char *)"Index_d_get", _wrap_Index_d_get, METH_VARARGS, NULL},
76715 { (char *)"Index_ntotal_set", _wrap_Index_ntotal_set, METH_VARARGS, NULL},
76716 { (char *)"Index_ntotal_get", _wrap_Index_ntotal_get, METH_VARARGS, NULL},
76717 { (char *)"Index_verbose_set", _wrap_Index_verbose_set, METH_VARARGS, NULL},
76718 { (char *)"Index_verbose_get", _wrap_Index_verbose_get, METH_VARARGS, NULL},
76719 { (char *)"Index_is_trained_set", _wrap_Index_is_trained_set, METH_VARARGS, NULL},
76720 { (char *)"Index_is_trained_get", _wrap_Index_is_trained_get, METH_VARARGS, NULL},
76721 { (char *)"Index_metric_type_set", _wrap_Index_metric_type_set, METH_VARARGS, NULL},
76722 { (char *)"Index_metric_type_get", _wrap_Index_metric_type_get, METH_VARARGS, NULL},
76723 { (char *)"delete_Index", _wrap_delete_Index, METH_VARARGS, NULL},
76724 { (char *)"Index_train", _wrap_Index_train, METH_VARARGS, NULL},
76725 { (char *)"Index_add", _wrap_Index_add, METH_VARARGS, NULL},
76726 { (char *)"Index_add_with_ids", _wrap_Index_add_with_ids, METH_VARARGS, NULL},
76727 { (char *)"Index_search", _wrap_Index_search, METH_VARARGS, NULL},
76728 { (char *)"Index_range_search", _wrap_Index_range_search, METH_VARARGS, NULL},
76729 { (char *)"Index_assign", _wrap_Index_assign, METH_VARARGS, NULL},
76730 { (char *)"Index_reset", _wrap_Index_reset, METH_VARARGS, NULL},
76731 { (char *)"Index_remove_ids", _wrap_Index_remove_ids, METH_VARARGS, NULL},
76732 { (char *)"Index_reconstruct", _wrap_Index_reconstruct, METH_VARARGS, NULL},
76733 { (char *)"Index_reconstruct_n", _wrap_Index_reconstruct_n, METH_VARARGS, NULL},
76734 { (char *)"Index_search_and_reconstruct", _wrap_Index_search_and_reconstruct, METH_VARARGS, NULL},
76735 { (char *)"Index_compute_residual", _wrap_Index_compute_residual, METH_VARARGS, NULL},
76736 { (char *)"Index_display", _wrap_Index_display, METH_VARARGS, NULL},
76737 { (char *)"Index_swigregister", Index_swigregister, METH_VARARGS, NULL},
76738 { (char *)"ClusteringParameters_niter_set", _wrap_ClusteringParameters_niter_set, METH_VARARGS, NULL},
76739 { (char *)"ClusteringParameters_niter_get", _wrap_ClusteringParameters_niter_get, METH_VARARGS, NULL},
76740 { (char *)"ClusteringParameters_nredo_set", _wrap_ClusteringParameters_nredo_set, METH_VARARGS, NULL},
76741 { (char *)"ClusteringParameters_nredo_get", _wrap_ClusteringParameters_nredo_get, METH_VARARGS, NULL},
76742 { (char *)"ClusteringParameters_verbose_set", _wrap_ClusteringParameters_verbose_set, METH_VARARGS, NULL},
76743 { (char *)"ClusteringParameters_verbose_get", _wrap_ClusteringParameters_verbose_get, METH_VARARGS, NULL},
76744 { (char *)"ClusteringParameters_spherical_set", _wrap_ClusteringParameters_spherical_set, METH_VARARGS, NULL},
76745 { (char *)"ClusteringParameters_spherical_get", _wrap_ClusteringParameters_spherical_get, METH_VARARGS, NULL},
76746 { (char *)"ClusteringParameters_update_index_set", _wrap_ClusteringParameters_update_index_set, METH_VARARGS, NULL},
76747 { (char *)"ClusteringParameters_update_index_get", _wrap_ClusteringParameters_update_index_get, METH_VARARGS, NULL},
76748 { (char *)"ClusteringParameters_frozen_centroids_set", _wrap_ClusteringParameters_frozen_centroids_set, METH_VARARGS, NULL},
76749 { (char *)"ClusteringParameters_frozen_centroids_get", _wrap_ClusteringParameters_frozen_centroids_get, METH_VARARGS, NULL},
76750 { (char *)"ClusteringParameters_min_points_per_centroid_set", _wrap_ClusteringParameters_min_points_per_centroid_set, METH_VARARGS, NULL},
76751 { (char *)"ClusteringParameters_min_points_per_centroid_get", _wrap_ClusteringParameters_min_points_per_centroid_get, METH_VARARGS, NULL},
76752 { (char *)"ClusteringParameters_max_points_per_centroid_set", _wrap_ClusteringParameters_max_points_per_centroid_set, METH_VARARGS, NULL},
76753 { (char *)"ClusteringParameters_max_points_per_centroid_get", _wrap_ClusteringParameters_max_points_per_centroid_get, METH_VARARGS, NULL},
76754 { (char *)"ClusteringParameters_seed_set", _wrap_ClusteringParameters_seed_set, METH_VARARGS, NULL},
76755 { (char *)"ClusteringParameters_seed_get", _wrap_ClusteringParameters_seed_get, METH_VARARGS, NULL},
76756 { (char *)"new_ClusteringParameters", _wrap_new_ClusteringParameters, METH_VARARGS, NULL},
76757 { (char *)"delete_ClusteringParameters", _wrap_delete_ClusteringParameters, METH_VARARGS, NULL},
76758 { (char *)"ClusteringParameters_swigregister", ClusteringParameters_swigregister, METH_VARARGS, NULL},
76759 { (char *)"Clustering_d_set", _wrap_Clustering_d_set, METH_VARARGS, NULL},
76760 { (char *)"Clustering_d_get", _wrap_Clustering_d_get, METH_VARARGS, NULL},
76761 { (char *)"Clustering_k_set", _wrap_Clustering_k_set, METH_VARARGS, NULL},
76762 { (char *)"Clustering_k_get", _wrap_Clustering_k_get, METH_VARARGS, NULL},
76763 { (char *)"Clustering_centroids_set", _wrap_Clustering_centroids_set, METH_VARARGS, NULL},
76764 { (char *)"Clustering_centroids_get", _wrap_Clustering_centroids_get, METH_VARARGS, NULL},
76765 { (char *)"Clustering_obj_set", _wrap_Clustering_obj_set, METH_VARARGS, NULL},
76766 { (char *)"Clustering_obj_get", _wrap_Clustering_obj_get, METH_VARARGS, NULL},
76767 { (char *)"new_Clustering", _wrap_new_Clustering, METH_VARARGS, NULL},
76768 { (char *)"Clustering_train", _wrap_Clustering_train, METH_VARARGS, NULL},
76769 { (char *)"delete_Clustering", _wrap_delete_Clustering, METH_VARARGS, NULL},
76770 { (char *)"Clustering_swigregister", Clustering_swigregister, METH_VARARGS, NULL},
76771 { (char *)"kmeans_clustering", _wrap_kmeans_clustering, METH_VARARGS, NULL},
76772 { (char *)"ProductQuantizer_d_set", _wrap_ProductQuantizer_d_set, METH_VARARGS, NULL},
76773 { (char *)"ProductQuantizer_d_get", _wrap_ProductQuantizer_d_get, METH_VARARGS, NULL},
76774 { (char *)"ProductQuantizer_M_set", _wrap_ProductQuantizer_M_set, METH_VARARGS, NULL},
76775 { (char *)"ProductQuantizer_M_get", _wrap_ProductQuantizer_M_get, METH_VARARGS, NULL},
76776 { (char *)"ProductQuantizer_nbits_set", _wrap_ProductQuantizer_nbits_set, METH_VARARGS, NULL},
76777 { (char *)"ProductQuantizer_nbits_get", _wrap_ProductQuantizer_nbits_get, METH_VARARGS, NULL},
76778 { (char *)"ProductQuantizer_dsub_set", _wrap_ProductQuantizer_dsub_set, METH_VARARGS, NULL},
76779 { (char *)"ProductQuantizer_dsub_get", _wrap_ProductQuantizer_dsub_get, METH_VARARGS, NULL},
76780 { (char *)"ProductQuantizer_byte_per_idx_set", _wrap_ProductQuantizer_byte_per_idx_set, METH_VARARGS, NULL},
76781 { (char *)"ProductQuantizer_byte_per_idx_get", _wrap_ProductQuantizer_byte_per_idx_get, METH_VARARGS, NULL},
76782 { (char *)"ProductQuantizer_code_size_set", _wrap_ProductQuantizer_code_size_set, METH_VARARGS, NULL},
76783 { (char *)"ProductQuantizer_code_size_get", _wrap_ProductQuantizer_code_size_get, METH_VARARGS, NULL},
76784 { (char *)"ProductQuantizer_ksub_set", _wrap_ProductQuantizer_ksub_set, METH_VARARGS, NULL},
76785 { (char *)"ProductQuantizer_ksub_get", _wrap_ProductQuantizer_ksub_get, METH_VARARGS, NULL},
76786 { (char *)"ProductQuantizer_verbose_set", _wrap_ProductQuantizer_verbose_set, METH_VARARGS, NULL},
76787 { (char *)"ProductQuantizer_verbose_get", _wrap_ProductQuantizer_verbose_get, METH_VARARGS, NULL},
76788 { (char *)"ProductQuantizer_train_type_set", _wrap_ProductQuantizer_train_type_set, METH_VARARGS, NULL},
76789 { (char *)"ProductQuantizer_train_type_get", _wrap_ProductQuantizer_train_type_get, METH_VARARGS, NULL},
76790 { (char *)"ProductQuantizer_cp_set", _wrap_ProductQuantizer_cp_set, METH_VARARGS, NULL},
76791 { (char *)"ProductQuantizer_cp_get", _wrap_ProductQuantizer_cp_get, METH_VARARGS, NULL},
76792 { (char *)"ProductQuantizer_assign_index_set", _wrap_ProductQuantizer_assign_index_set, METH_VARARGS, NULL},
76793 { (char *)"ProductQuantizer_assign_index_get", _wrap_ProductQuantizer_assign_index_get, METH_VARARGS, NULL},
76794 { (char *)"ProductQuantizer_centroids_set", _wrap_ProductQuantizer_centroids_set, METH_VARARGS, NULL},
76795 { (char *)"ProductQuantizer_centroids_get", _wrap_ProductQuantizer_centroids_get, METH_VARARGS, NULL},
76796 { (char *)"ProductQuantizer_get_centroids", _wrap_ProductQuantizer_get_centroids, METH_VARARGS, NULL},
76797 { (char *)"ProductQuantizer_train", _wrap_ProductQuantizer_train, METH_VARARGS, NULL},
76798 { (char *)"new_ProductQuantizer", _wrap_new_ProductQuantizer, METH_VARARGS, NULL},
76799 { (char *)"ProductQuantizer_set_derived_values", _wrap_ProductQuantizer_set_derived_values, METH_VARARGS, NULL},
76800 { (char *)"ProductQuantizer_set_params", _wrap_ProductQuantizer_set_params, METH_VARARGS, NULL},
76801 { (char *)"ProductQuantizer_compute_code", _wrap_ProductQuantizer_compute_code, METH_VARARGS, NULL},
76802 { (char *)"ProductQuantizer_compute_codes", _wrap_ProductQuantizer_compute_codes, METH_VARARGS, NULL},
76803 { (char *)"ProductQuantizer_decode", _wrap_ProductQuantizer_decode, METH_VARARGS, NULL},
76804 { (char *)"ProductQuantizer_compute_code_from_distance_table", _wrap_ProductQuantizer_compute_code_from_distance_table, METH_VARARGS, NULL},
76805 { (char *)"ProductQuantizer_compute_distance_table", _wrap_ProductQuantizer_compute_distance_table, METH_VARARGS, NULL},
76806 { (char *)"ProductQuantizer_compute_inner_prod_table", _wrap_ProductQuantizer_compute_inner_prod_table, METH_VARARGS, NULL},
76807 { (char *)"ProductQuantizer_compute_distance_tables", _wrap_ProductQuantizer_compute_distance_tables, METH_VARARGS, NULL},
76808 { (char *)"ProductQuantizer_compute_inner_prod_tables", _wrap_ProductQuantizer_compute_inner_prod_tables, METH_VARARGS, NULL},
76809 { (char *)"ProductQuantizer_search", _wrap_ProductQuantizer_search, METH_VARARGS, NULL},
76810 { (char *)"ProductQuantizer_search_ip", _wrap_ProductQuantizer_search_ip, METH_VARARGS, NULL},
76811 { (char *)"ProductQuantizer_sdc_table_set", _wrap_ProductQuantizer_sdc_table_set, METH_VARARGS, NULL},
76812 { (char *)"ProductQuantizer_sdc_table_get", _wrap_ProductQuantizer_sdc_table_get, METH_VARARGS, NULL},
76813 { (char *)"ProductQuantizer_compute_sdc_table", _wrap_ProductQuantizer_compute_sdc_table, METH_VARARGS, NULL},
76814 { (char *)"ProductQuantizer_search_sdc", _wrap_ProductQuantizer_search_sdc, METH_VARARGS, NULL},
76815 { (char *)"delete_ProductQuantizer", _wrap_delete_ProductQuantizer, METH_VARARGS, NULL},
76816 { (char *)"ProductQuantizer_swigregister", ProductQuantizer_swigregister, METH_VARARGS, NULL},
76817 { (char *)"VectorTransform_d_in_set", _wrap_VectorTransform_d_in_set, METH_VARARGS, NULL},
76818 { (char *)"VectorTransform_d_in_get", _wrap_VectorTransform_d_in_get, METH_VARARGS, NULL},
76819 { (char *)"VectorTransform_d_out_set", _wrap_VectorTransform_d_out_set, METH_VARARGS, NULL},
76820 { (char *)"VectorTransform_d_out_get", _wrap_VectorTransform_d_out_get, METH_VARARGS, NULL},
76821 { (char *)"VectorTransform_is_trained_set", _wrap_VectorTransform_is_trained_set, METH_VARARGS, NULL},
76822 { (char *)"VectorTransform_is_trained_get", _wrap_VectorTransform_is_trained_get, METH_VARARGS, NULL},
76823 { (char *)"VectorTransform_train", _wrap_VectorTransform_train, METH_VARARGS, NULL},
76824 { (char *)"VectorTransform_apply", _wrap_VectorTransform_apply, METH_VARARGS, NULL},
76825 { (char *)"VectorTransform_apply_noalloc", _wrap_VectorTransform_apply_noalloc, METH_VARARGS, NULL},
76826 { (char *)"VectorTransform_reverse_transform", _wrap_VectorTransform_reverse_transform, METH_VARARGS, NULL},
76827 { (char *)"delete_VectorTransform", _wrap_delete_VectorTransform, METH_VARARGS, NULL},
76828 { (char *)"VectorTransform_swigregister", VectorTransform_swigregister, METH_VARARGS, NULL},
76829 { (char *)"LinearTransform_have_bias_set", _wrap_LinearTransform_have_bias_set, METH_VARARGS, NULL},
76830 { (char *)"LinearTransform_have_bias_get", _wrap_LinearTransform_have_bias_get, METH_VARARGS, NULL},
76831 { (char *)"LinearTransform_is_orthonormal_set", _wrap_LinearTransform_is_orthonormal_set, METH_VARARGS, NULL},
76832 { (char *)"LinearTransform_is_orthonormal_get", _wrap_LinearTransform_is_orthonormal_get, METH_VARARGS, NULL},
76833 { (char *)"LinearTransform_A_set", _wrap_LinearTransform_A_set, METH_VARARGS, NULL},
76834 { (char *)"LinearTransform_A_get", _wrap_LinearTransform_A_get, METH_VARARGS, NULL},
76835 { (char *)"LinearTransform_b_set", _wrap_LinearTransform_b_set, METH_VARARGS, NULL},
76836 { (char *)"LinearTransform_b_get", _wrap_LinearTransform_b_get, METH_VARARGS, NULL},
76837 { (char *)"new_LinearTransform", _wrap_new_LinearTransform, METH_VARARGS, NULL},
76838 { (char *)"LinearTransform_apply_noalloc", _wrap_LinearTransform_apply_noalloc, METH_VARARGS, NULL},
76839 { (char *)"LinearTransform_transform_transpose", _wrap_LinearTransform_transform_transpose, METH_VARARGS, NULL},
76840 { (char *)"LinearTransform_reverse_transform", _wrap_LinearTransform_reverse_transform, METH_VARARGS, NULL},
76841 { (char *)"LinearTransform_set_is_orthonormal", _wrap_LinearTransform_set_is_orthonormal, METH_VARARGS, NULL},
76842 { (char *)"LinearTransform_verbose_set", _wrap_LinearTransform_verbose_set, METH_VARARGS, NULL},
76843 { (char *)"LinearTransform_verbose_get", _wrap_LinearTransform_verbose_get, METH_VARARGS, NULL},
76844 { (char *)"delete_LinearTransform", _wrap_delete_LinearTransform, METH_VARARGS, NULL},
76845 { (char *)"LinearTransform_swigregister", LinearTransform_swigregister, METH_VARARGS, NULL},
76846 { (char *)"RandomRotationMatrix_init", _wrap_RandomRotationMatrix_init, METH_VARARGS, NULL},
76847 { (char *)"RandomRotationMatrix_train", _wrap_RandomRotationMatrix_train, METH_VARARGS, NULL},
76848 { (char *)"new_RandomRotationMatrix", _wrap_new_RandomRotationMatrix, METH_VARARGS, NULL},
76849 { (char *)"delete_RandomRotationMatrix", _wrap_delete_RandomRotationMatrix, METH_VARARGS, NULL},
76850 { (char *)"RandomRotationMatrix_swigregister", RandomRotationMatrix_swigregister, METH_VARARGS, NULL},
76851 { (char *)"PCAMatrix_eigen_power_set", _wrap_PCAMatrix_eigen_power_set, METH_VARARGS, NULL},
76852 { (char *)"PCAMatrix_eigen_power_get", _wrap_PCAMatrix_eigen_power_get, METH_VARARGS, NULL},
76853 { (char *)"PCAMatrix_random_rotation_set", _wrap_PCAMatrix_random_rotation_set, METH_VARARGS, NULL},
76854 { (char *)"PCAMatrix_random_rotation_get", _wrap_PCAMatrix_random_rotation_get, METH_VARARGS, NULL},
76855 { (char *)"PCAMatrix_max_points_per_d_set", _wrap_PCAMatrix_max_points_per_d_set, METH_VARARGS, NULL},
76856 { (char *)"PCAMatrix_max_points_per_d_get", _wrap_PCAMatrix_max_points_per_d_get, METH_VARARGS, NULL},
76857 { (char *)"PCAMatrix_balanced_bins_set", _wrap_PCAMatrix_balanced_bins_set, METH_VARARGS, NULL},
76858 { (char *)"PCAMatrix_balanced_bins_get", _wrap_PCAMatrix_balanced_bins_get, METH_VARARGS, NULL},
76859 { (char *)"PCAMatrix_mean_set", _wrap_PCAMatrix_mean_set, METH_VARARGS, NULL},
76860 { (char *)"PCAMatrix_mean_get", _wrap_PCAMatrix_mean_get, METH_VARARGS, NULL},
76861 { (char *)"PCAMatrix_eigenvalues_set", _wrap_PCAMatrix_eigenvalues_set, METH_VARARGS, NULL},
76862 { (char *)"PCAMatrix_eigenvalues_get", _wrap_PCAMatrix_eigenvalues_get, METH_VARARGS, NULL},
76863 { (char *)"PCAMatrix_PCAMat_set", _wrap_PCAMatrix_PCAMat_set, METH_VARARGS, NULL},
76864 { (char *)"PCAMatrix_PCAMat_get", _wrap_PCAMatrix_PCAMat_get, METH_VARARGS, NULL},
76865 { (char *)"new_PCAMatrix", _wrap_new_PCAMatrix, METH_VARARGS, NULL},
76866 { (char *)"PCAMatrix_train", _wrap_PCAMatrix_train, METH_VARARGS, NULL},
76867 { (char *)"PCAMatrix_copy_from", _wrap_PCAMatrix_copy_from, METH_VARARGS, NULL},
76868 { (char *)"PCAMatrix_prepare_Ab", _wrap_PCAMatrix_prepare_Ab, METH_VARARGS, NULL},
76869 { (char *)"delete_PCAMatrix", _wrap_delete_PCAMatrix, METH_VARARGS, NULL},
76870 { (char *)"PCAMatrix_swigregister", PCAMatrix_swigregister, METH_VARARGS, NULL},
76871 { (char *)"OPQMatrix_M_set", _wrap_OPQMatrix_M_set, METH_VARARGS, NULL},
76872 { (char *)"OPQMatrix_M_get", _wrap_OPQMatrix_M_get, METH_VARARGS, NULL},
76873 { (char *)"OPQMatrix_niter_set", _wrap_OPQMatrix_niter_set, METH_VARARGS, NULL},
76874 { (char *)"OPQMatrix_niter_get", _wrap_OPQMatrix_niter_get, METH_VARARGS, NULL},
76875 { (char *)"OPQMatrix_niter_pq_set", _wrap_OPQMatrix_niter_pq_set, METH_VARARGS, NULL},
76876 { (char *)"OPQMatrix_niter_pq_get", _wrap_OPQMatrix_niter_pq_get, METH_VARARGS, NULL},
76877 { (char *)"OPQMatrix_niter_pq_0_set", _wrap_OPQMatrix_niter_pq_0_set, METH_VARARGS, NULL},
76878 { (char *)"OPQMatrix_niter_pq_0_get", _wrap_OPQMatrix_niter_pq_0_get, METH_VARARGS, NULL},
76879 { (char *)"OPQMatrix_max_train_points_set", _wrap_OPQMatrix_max_train_points_set, METH_VARARGS, NULL},
76880 { (char *)"OPQMatrix_max_train_points_get", _wrap_OPQMatrix_max_train_points_get, METH_VARARGS, NULL},
76881 { (char *)"OPQMatrix_verbose_set", _wrap_OPQMatrix_verbose_set, METH_VARARGS, NULL},
76882 { (char *)"OPQMatrix_verbose_get", _wrap_OPQMatrix_verbose_get, METH_VARARGS, NULL},
76883 { (char *)"OPQMatrix_pq_set", _wrap_OPQMatrix_pq_set, METH_VARARGS, NULL},
76884 { (char *)"OPQMatrix_pq_get", _wrap_OPQMatrix_pq_get, METH_VARARGS, NULL},
76885 { (char *)"new_OPQMatrix", _wrap_new_OPQMatrix, METH_VARARGS, NULL},
76886 { (char *)"OPQMatrix_train", _wrap_OPQMatrix_train, METH_VARARGS, NULL},
76887 { (char *)"delete_OPQMatrix", _wrap_delete_OPQMatrix, METH_VARARGS, NULL},
76888 { (char *)"OPQMatrix_swigregister", OPQMatrix_swigregister, METH_VARARGS, NULL},
76889 { (char *)"RemapDimensionsTransform_map_set", _wrap_RemapDimensionsTransform_map_set, METH_VARARGS, NULL},
76890 { (char *)"RemapDimensionsTransform_map_get", _wrap_RemapDimensionsTransform_map_get, METH_VARARGS, NULL},
76891 { (char *)"RemapDimensionsTransform_apply_noalloc", _wrap_RemapDimensionsTransform_apply_noalloc, METH_VARARGS, NULL},
76892 { (char *)"RemapDimensionsTransform_reverse_transform", _wrap_RemapDimensionsTransform_reverse_transform, METH_VARARGS, NULL},
76893 { (char *)"new_RemapDimensionsTransform", _wrap_new_RemapDimensionsTransform, METH_VARARGS, NULL},
76894 { (char *)"delete_RemapDimensionsTransform", _wrap_delete_RemapDimensionsTransform, METH_VARARGS, NULL},
76895 { (char *)"RemapDimensionsTransform_swigregister", RemapDimensionsTransform_swigregister, METH_VARARGS, NULL},
76896 { (char *)"NormalizationTransform_norm_set", _wrap_NormalizationTransform_norm_set, METH_VARARGS, NULL},
76897 { (char *)"NormalizationTransform_norm_get", _wrap_NormalizationTransform_norm_get, METH_VARARGS, NULL},
76898 { (char *)"new_NormalizationTransform", _wrap_new_NormalizationTransform, METH_VARARGS, NULL},
76899 { (char *)"NormalizationTransform_apply_noalloc", _wrap_NormalizationTransform_apply_noalloc, METH_VARARGS, NULL},
76900 { (char *)"NormalizationTransform_reverse_transform", _wrap_NormalizationTransform_reverse_transform, METH_VARARGS, NULL},
76901 { (char *)"delete_NormalizationTransform", _wrap_delete_NormalizationTransform, METH_VARARGS, NULL},
76902 { (char *)"NormalizationTransform_swigregister", NormalizationTransform_swigregister, METH_VARARGS, NULL},
76903 { (char *)"IndexPreTransform_chain_set", _wrap_IndexPreTransform_chain_set, METH_VARARGS, NULL},
76904 { (char *)"IndexPreTransform_chain_get", _wrap_IndexPreTransform_chain_get, METH_VARARGS, NULL},
76905 { (char *)"IndexPreTransform_index_set", _wrap_IndexPreTransform_index_set, METH_VARARGS, NULL},
76906 { (char *)"IndexPreTransform_index_get", _wrap_IndexPreTransform_index_get, METH_VARARGS, NULL},
76907 { (char *)"IndexPreTransform_own_fields_set", _wrap_IndexPreTransform_own_fields_set, METH_VARARGS, NULL},
76908 { (char *)"IndexPreTransform_own_fields_get", _wrap_IndexPreTransform_own_fields_get, METH_VARARGS, NULL},
76909 { (char *)"new_IndexPreTransform", _wrap_new_IndexPreTransform, METH_VARARGS, NULL},
76910 { (char *)"IndexPreTransform_prepend_transform", _wrap_IndexPreTransform_prepend_transform, METH_VARARGS, NULL},
76911 { (char *)"IndexPreTransform_train", _wrap_IndexPreTransform_train, METH_VARARGS, NULL},
76912 { (char *)"IndexPreTransform_add", _wrap_IndexPreTransform_add, METH_VARARGS, NULL},
76913 { (char *)"IndexPreTransform_add_with_ids", _wrap_IndexPreTransform_add_with_ids, METH_VARARGS, NULL},
76914 { (char *)"IndexPreTransform_reset", _wrap_IndexPreTransform_reset, METH_VARARGS, NULL},
76915 { (char *)"IndexPreTransform_remove_ids", _wrap_IndexPreTransform_remove_ids, METH_VARARGS, NULL},
76916 { (char *)"IndexPreTransform_search", _wrap_IndexPreTransform_search, METH_VARARGS, NULL},
76917 { (char *)"IndexPreTransform_reconstruct", _wrap_IndexPreTransform_reconstruct, METH_VARARGS, NULL},
76918 { (char *)"IndexPreTransform_reconstruct_n", _wrap_IndexPreTransform_reconstruct_n, METH_VARARGS, NULL},
76919 { (char *)"IndexPreTransform_search_and_reconstruct", _wrap_IndexPreTransform_search_and_reconstruct, METH_VARARGS, NULL},
76920 { (char *)"IndexPreTransform_apply_chain", _wrap_IndexPreTransform_apply_chain, METH_VARARGS, NULL},
76921 { (char *)"IndexPreTransform_reverse_chain", _wrap_IndexPreTransform_reverse_chain, METH_VARARGS, NULL},
76922 { (char *)"delete_IndexPreTransform", _wrap_delete_IndexPreTransform, METH_VARARGS, NULL},
76923 { (char *)"IndexPreTransform_swigregister", IndexPreTransform_swigregister, METH_VARARGS, NULL},
76924 { (char *)"IndexFlat_xb_set", _wrap_IndexFlat_xb_set, METH_VARARGS, NULL},
76925 { (char *)"IndexFlat_xb_get", _wrap_IndexFlat_xb_get, METH_VARARGS, NULL},
76926 { (char *)"IndexFlat_add", _wrap_IndexFlat_add, METH_VARARGS, NULL},
76927 { (char *)"IndexFlat_reset", _wrap_IndexFlat_reset, METH_VARARGS, NULL},
76928 { (char *)"IndexFlat_search", _wrap_IndexFlat_search, METH_VARARGS, NULL},
76929 { (char *)"IndexFlat_range_search", _wrap_IndexFlat_range_search, METH_VARARGS, NULL},
76930 { (char *)"IndexFlat_reconstruct", _wrap_IndexFlat_reconstruct, METH_VARARGS, NULL},
76931 { (char *)"IndexFlat_compute_distance_subset", _wrap_IndexFlat_compute_distance_subset, METH_VARARGS, NULL},
76932 { (char *)"IndexFlat_remove_ids", _wrap_IndexFlat_remove_ids, METH_VARARGS, NULL},
76933 { (char *)"new_IndexFlat", _wrap_new_IndexFlat, METH_VARARGS, NULL},
76934 { (char *)"delete_IndexFlat", _wrap_delete_IndexFlat, METH_VARARGS, NULL},
76935 { (char *)"IndexFlat_swigregister", IndexFlat_swigregister, METH_VARARGS, NULL},
76936 { (char *)"new_IndexFlatIP", _wrap_new_IndexFlatIP, METH_VARARGS, NULL},
76937 { (char *)"delete_IndexFlatIP", _wrap_delete_IndexFlatIP, METH_VARARGS, NULL},
76938 { (char *)"IndexFlatIP_swigregister", IndexFlatIP_swigregister, METH_VARARGS, NULL},
76939 { (char *)"new_IndexFlatL2", _wrap_new_IndexFlatL2, METH_VARARGS, NULL},
76940 { (char *)"delete_IndexFlatL2", _wrap_delete_IndexFlatL2, METH_VARARGS, NULL},
76941 { (char *)"IndexFlatL2_swigregister", IndexFlatL2_swigregister, METH_VARARGS, NULL},
76942 { (char *)"IndexFlatL2BaseShift_shift_set", _wrap_IndexFlatL2BaseShift_shift_set, METH_VARARGS, NULL},
76943 { (char *)"IndexFlatL2BaseShift_shift_get", _wrap_IndexFlatL2BaseShift_shift_get, METH_VARARGS, NULL},
76944 { (char *)"new_IndexFlatL2BaseShift", _wrap_new_IndexFlatL2BaseShift, METH_VARARGS, NULL},
76945 { (char *)"IndexFlatL2BaseShift_search", _wrap_IndexFlatL2BaseShift_search, METH_VARARGS, NULL},
76946 { (char *)"delete_IndexFlatL2BaseShift", _wrap_delete_IndexFlatL2BaseShift, METH_VARARGS, NULL},
76947 { (char *)"IndexFlatL2BaseShift_swigregister", IndexFlatL2BaseShift_swigregister, METH_VARARGS, NULL},
76948 { (char *)"IndexRefineFlat_refine_index_set", _wrap_IndexRefineFlat_refine_index_set, METH_VARARGS, NULL},
76949 { (char *)"IndexRefineFlat_refine_index_get", _wrap_IndexRefineFlat_refine_index_get, METH_VARARGS, NULL},
76950 { (char *)"IndexRefineFlat_base_index_set", _wrap_IndexRefineFlat_base_index_set, METH_VARARGS, NULL},
76951 { (char *)"IndexRefineFlat_base_index_get", _wrap_IndexRefineFlat_base_index_get, METH_VARARGS, NULL},
76952 { (char *)"IndexRefineFlat_own_fields_set", _wrap_IndexRefineFlat_own_fields_set, METH_VARARGS, NULL},
76953 { (char *)"IndexRefineFlat_own_fields_get", _wrap_IndexRefineFlat_own_fields_get, METH_VARARGS, NULL},
76954 { (char *)"IndexRefineFlat_k_factor_set", _wrap_IndexRefineFlat_k_factor_set, METH_VARARGS, NULL},
76955 { (char *)"IndexRefineFlat_k_factor_get", _wrap_IndexRefineFlat_k_factor_get, METH_VARARGS, NULL},
76956 { (char *)"new_IndexRefineFlat", _wrap_new_IndexRefineFlat, METH_VARARGS, NULL},
76957 { (char *)"IndexRefineFlat_train", _wrap_IndexRefineFlat_train, METH_VARARGS, NULL},
76958 { (char *)"IndexRefineFlat_add", _wrap_IndexRefineFlat_add, METH_VARARGS, NULL},
76959 { (char *)"IndexRefineFlat_reset", _wrap_IndexRefineFlat_reset, METH_VARARGS, NULL},
76960 { (char *)"IndexRefineFlat_search", _wrap_IndexRefineFlat_search, METH_VARARGS, NULL},
76961 { (char *)"delete_IndexRefineFlat", _wrap_delete_IndexRefineFlat, METH_VARARGS, NULL},
76962 { (char *)"IndexRefineFlat_swigregister", IndexRefineFlat_swigregister, METH_VARARGS, NULL},
76963 { (char *)"IndexFlat1D_continuous_update_set", _wrap_IndexFlat1D_continuous_update_set, METH_VARARGS, NULL},
76964 { (char *)"IndexFlat1D_continuous_update_get", _wrap_IndexFlat1D_continuous_update_get, METH_VARARGS, NULL},
76965 { (char *)"IndexFlat1D_perm_set", _wrap_IndexFlat1D_perm_set, METH_VARARGS, NULL},
76966 { (char *)"IndexFlat1D_perm_get", _wrap_IndexFlat1D_perm_get, METH_VARARGS, NULL},
76967 { (char *)"new_IndexFlat1D", _wrap_new_IndexFlat1D, METH_VARARGS, NULL},
76968 { (char *)"IndexFlat1D_update_permutation", _wrap_IndexFlat1D_update_permutation, METH_VARARGS, NULL},
76969 { (char *)"IndexFlat1D_add", _wrap_IndexFlat1D_add, METH_VARARGS, NULL},
76970 { (char *)"IndexFlat1D_reset", _wrap_IndexFlat1D_reset, METH_VARARGS, NULL},
76971 { (char *)"IndexFlat1D_search", _wrap_IndexFlat1D_search, METH_VARARGS, NULL},
76972 { (char *)"delete_IndexFlat1D", _wrap_delete_IndexFlat1D, METH_VARARGS, NULL},
76973 { (char *)"IndexFlat1D_swigregister", IndexFlat1D_swigregister, METH_VARARGS, NULL},
76974 { (char *)"IndexLSH_nbits_set", _wrap_IndexLSH_nbits_set, METH_VARARGS, NULL},
76975 { (char *)"IndexLSH_nbits_get", _wrap_IndexLSH_nbits_get, METH_VARARGS, NULL},
76976 { (char *)"IndexLSH_bytes_per_vec_set", _wrap_IndexLSH_bytes_per_vec_set, METH_VARARGS, NULL},
76977 { (char *)"IndexLSH_bytes_per_vec_get", _wrap_IndexLSH_bytes_per_vec_get, METH_VARARGS, NULL},
76978 { (char *)"IndexLSH_rotate_data_set", _wrap_IndexLSH_rotate_data_set, METH_VARARGS, NULL},
76979 { (char *)"IndexLSH_rotate_data_get", _wrap_IndexLSH_rotate_data_get, METH_VARARGS, NULL},
76980 { (char *)"IndexLSH_train_thresholds_set", _wrap_IndexLSH_train_thresholds_set, METH_VARARGS, NULL},
76981 { (char *)"IndexLSH_train_thresholds_get", _wrap_IndexLSH_train_thresholds_get, METH_VARARGS, NULL},
76982 { (char *)"IndexLSH_rrot_set", _wrap_IndexLSH_rrot_set, METH_VARARGS, NULL},
76983 { (char *)"IndexLSH_rrot_get", _wrap_IndexLSH_rrot_get, METH_VARARGS, NULL},
76984 { (char *)"IndexLSH_thresholds_set", _wrap_IndexLSH_thresholds_set, METH_VARARGS, NULL},
76985 { (char *)"IndexLSH_thresholds_get", _wrap_IndexLSH_thresholds_get, METH_VARARGS, NULL},
76986 { (char *)"IndexLSH_codes_set", _wrap_IndexLSH_codes_set, METH_VARARGS, NULL},
76987 { (char *)"IndexLSH_codes_get", _wrap_IndexLSH_codes_get, METH_VARARGS, NULL},
76988 { (char *)"IndexLSH_apply_preprocess", _wrap_IndexLSH_apply_preprocess, METH_VARARGS, NULL},
76989 { (char *)"IndexLSH_train", _wrap_IndexLSH_train, METH_VARARGS, NULL},
76990 { (char *)"IndexLSH_add", _wrap_IndexLSH_add, METH_VARARGS, NULL},
76991 { (char *)"IndexLSH_search", _wrap_IndexLSH_search, METH_VARARGS, NULL},
76992 { (char *)"IndexLSH_reset", _wrap_IndexLSH_reset, METH_VARARGS, NULL},
76993 { (char *)"IndexLSH_transfer_thresholds", _wrap_IndexLSH_transfer_thresholds, METH_VARARGS, NULL},
76994 { (char *)"delete_IndexLSH", _wrap_delete_IndexLSH, METH_VARARGS, NULL},
76995 { (char *)"new_IndexLSH", _wrap_new_IndexLSH, METH_VARARGS, NULL},
76996 { (char *)"IndexLSH_swigregister", IndexLSH_swigregister, METH_VARARGS, NULL},
76997 { (char *)"SimulatedAnnealingParameters_init_temperature_set", _wrap_SimulatedAnnealingParameters_init_temperature_set, METH_VARARGS, NULL},
76998 { (char *)"SimulatedAnnealingParameters_init_temperature_get", _wrap_SimulatedAnnealingParameters_init_temperature_get, METH_VARARGS, NULL},
76999 { (char *)"SimulatedAnnealingParameters_temperature_decay_set", _wrap_SimulatedAnnealingParameters_temperature_decay_set, METH_VARARGS, NULL},
77000 { (char *)"SimulatedAnnealingParameters_temperature_decay_get", _wrap_SimulatedAnnealingParameters_temperature_decay_get, METH_VARARGS, NULL},
77001 { (char *)"SimulatedAnnealingParameters_n_iter_set", _wrap_SimulatedAnnealingParameters_n_iter_set, METH_VARARGS, NULL},
77002 { (char *)"SimulatedAnnealingParameters_n_iter_get", _wrap_SimulatedAnnealingParameters_n_iter_get, METH_VARARGS, NULL},
77003 { (char *)"SimulatedAnnealingParameters_n_redo_set", _wrap_SimulatedAnnealingParameters_n_redo_set, METH_VARARGS, NULL},
77004 { (char *)"SimulatedAnnealingParameters_n_redo_get", _wrap_SimulatedAnnealingParameters_n_redo_get, METH_VARARGS, NULL},
77005 { (char *)"SimulatedAnnealingParameters_seed_set", _wrap_SimulatedAnnealingParameters_seed_set, METH_VARARGS, NULL},
77006 { (char *)"SimulatedAnnealingParameters_seed_get", _wrap_SimulatedAnnealingParameters_seed_get, METH_VARARGS, NULL},
77007 { (char *)"SimulatedAnnealingParameters_verbose_set", _wrap_SimulatedAnnealingParameters_verbose_set, METH_VARARGS, NULL},
77008 { (char *)"SimulatedAnnealingParameters_verbose_get", _wrap_SimulatedAnnealingParameters_verbose_get, METH_VARARGS, NULL},
77009 { (char *)"SimulatedAnnealingParameters_only_bit_flips_set", _wrap_SimulatedAnnealingParameters_only_bit_flips_set, METH_VARARGS, NULL},
77010 { (char *)"SimulatedAnnealingParameters_only_bit_flips_get", _wrap_SimulatedAnnealingParameters_only_bit_flips_get, METH_VARARGS, NULL},
77011 { (char *)"SimulatedAnnealingParameters_init_random_set", _wrap_SimulatedAnnealingParameters_init_random_set, METH_VARARGS, NULL},
77012 { (char *)"SimulatedAnnealingParameters_init_random_get", _wrap_SimulatedAnnealingParameters_init_random_get, METH_VARARGS, NULL},
77013 { (char *)"new_SimulatedAnnealingParameters", _wrap_new_SimulatedAnnealingParameters, METH_VARARGS, NULL},
77014 { (char *)"delete_SimulatedAnnealingParameters", _wrap_delete_SimulatedAnnealingParameters, METH_VARARGS, NULL},
77015 { (char *)"SimulatedAnnealingParameters_swigregister", SimulatedAnnealingParameters_swigregister, METH_VARARGS, NULL},
77016 { (char *)"PermutationObjective_n_set", _wrap_PermutationObjective_n_set, METH_VARARGS, NULL},
77017 { (char *)"PermutationObjective_n_get", _wrap_PermutationObjective_n_get, METH_VARARGS, NULL},
77018 { (char *)"PermutationObjective_compute_cost", _wrap_PermutationObjective_compute_cost, METH_VARARGS, NULL},
77019 { (char *)"PermutationObjective_cost_update", _wrap_PermutationObjective_cost_update, METH_VARARGS, NULL},
77020 { (char *)"delete_PermutationObjective", _wrap_delete_PermutationObjective, METH_VARARGS, NULL},
77021 { (char *)"PermutationObjective_swigregister", PermutationObjective_swigregister, METH_VARARGS, NULL},
77022 { (char *)"ReproduceDistancesObjective_dis_weight_factor_set", _wrap_ReproduceDistancesObjective_dis_weight_factor_set, METH_VARARGS, NULL},
77023 { (char *)"ReproduceDistancesObjective_dis_weight_factor_get", _wrap_ReproduceDistancesObjective_dis_weight_factor_get, METH_VARARGS, NULL},
77024 { (char *)"ReproduceDistancesObjective_sqr", _wrap_ReproduceDistancesObjective_sqr, METH_VARARGS, NULL},
77025 { (char *)"ReproduceDistancesObjective_dis_weight", _wrap_ReproduceDistancesObjective_dis_weight, METH_VARARGS, NULL},
77026 { (char *)"ReproduceDistancesObjective_source_dis_set", _wrap_ReproduceDistancesObjective_source_dis_set, METH_VARARGS, NULL},
77027 { (char *)"ReproduceDistancesObjective_source_dis_get", _wrap_ReproduceDistancesObjective_source_dis_get, METH_VARARGS, NULL},
77028 { (char *)"ReproduceDistancesObjective_target_dis_set", _wrap_ReproduceDistancesObjective_target_dis_set, METH_VARARGS, NULL},
77029 { (char *)"ReproduceDistancesObjective_target_dis_get", _wrap_ReproduceDistancesObjective_target_dis_get, METH_VARARGS, NULL},
77030 { (char *)"ReproduceDistancesObjective_weights_set", _wrap_ReproduceDistancesObjective_weights_set, METH_VARARGS, NULL},
77031 { (char *)"ReproduceDistancesObjective_weights_get", _wrap_ReproduceDistancesObjective_weights_get, METH_VARARGS, NULL},
77032 { (char *)"ReproduceDistancesObjective_get_source_dis", _wrap_ReproduceDistancesObjective_get_source_dis, METH_VARARGS, NULL},
77033 { (char *)"ReproduceDistancesObjective_compute_cost", _wrap_ReproduceDistancesObjective_compute_cost, METH_VARARGS, NULL},
77034 { (char *)"ReproduceDistancesObjective_cost_update", _wrap_ReproduceDistancesObjective_cost_update, METH_VARARGS, NULL},
77035 { (char *)"new_ReproduceDistancesObjective", _wrap_new_ReproduceDistancesObjective, METH_VARARGS, NULL},
77036 { (char *)"ReproduceDistancesObjective_compute_mean_stdev", _wrap_ReproduceDistancesObjective_compute_mean_stdev, METH_VARARGS, NULL},
77037 { (char *)"ReproduceDistancesObjective_set_affine_target_dis", _wrap_ReproduceDistancesObjective_set_affine_target_dis, METH_VARARGS, NULL},
77038 { (char *)"delete_ReproduceDistancesObjective", _wrap_delete_ReproduceDistancesObjective, METH_VARARGS, NULL},
77039 { (char *)"ReproduceDistancesObjective_swigregister", ReproduceDistancesObjective_swigregister, METH_VARARGS, NULL},
77040 { (char *)"SimulatedAnnealingOptimizer_obj_set", _wrap_SimulatedAnnealingOptimizer_obj_set, METH_VARARGS, NULL},
77041 { (char *)"SimulatedAnnealingOptimizer_obj_get", _wrap_SimulatedAnnealingOptimizer_obj_get, METH_VARARGS, NULL},
77042 { (char *)"SimulatedAnnealingOptimizer_n_set", _wrap_SimulatedAnnealingOptimizer_n_set, METH_VARARGS, NULL},
77043 { (char *)"SimulatedAnnealingOptimizer_n_get", _wrap_SimulatedAnnealingOptimizer_n_get, METH_VARARGS, NULL},
77044 { (char *)"SimulatedAnnealingOptimizer_logfile_set", _wrap_SimulatedAnnealingOptimizer_logfile_set, METH_VARARGS, NULL},
77045 { (char *)"SimulatedAnnealingOptimizer_logfile_get", _wrap_SimulatedAnnealingOptimizer_logfile_get, METH_VARARGS, NULL},
77046 { (char *)"new_SimulatedAnnealingOptimizer", _wrap_new_SimulatedAnnealingOptimizer, METH_VARARGS, NULL},
77047 { (char *)"SimulatedAnnealingOptimizer_rnd_set", _wrap_SimulatedAnnealingOptimizer_rnd_set, METH_VARARGS, NULL},
77048 { (char *)"SimulatedAnnealingOptimizer_rnd_get", _wrap_SimulatedAnnealingOptimizer_rnd_get, METH_VARARGS, NULL},
77049 { (char *)"SimulatedAnnealingOptimizer_init_cost_set", _wrap_SimulatedAnnealingOptimizer_init_cost_set, METH_VARARGS, NULL},
77050 { (char *)"SimulatedAnnealingOptimizer_init_cost_get", _wrap_SimulatedAnnealingOptimizer_init_cost_get, METH_VARARGS, NULL},
77051 { (char *)"SimulatedAnnealingOptimizer_optimize", _wrap_SimulatedAnnealingOptimizer_optimize, METH_VARARGS, NULL},
77052 { (char *)"SimulatedAnnealingOptimizer_run_optimization", _wrap_SimulatedAnnealingOptimizer_run_optimization, METH_VARARGS, NULL},
77053 { (char *)"delete_SimulatedAnnealingOptimizer", _wrap_delete_SimulatedAnnealingOptimizer, METH_VARARGS, NULL},
77054 { (char *)"SimulatedAnnealingOptimizer_swigregister", SimulatedAnnealingOptimizer_swigregister, METH_VARARGS, NULL},
77055 { (char *)"PolysemousTraining_optimization_type_set", _wrap_PolysemousTraining_optimization_type_set, METH_VARARGS, NULL},
77056 { (char *)"PolysemousTraining_optimization_type_get", _wrap_PolysemousTraining_optimization_type_get, METH_VARARGS, NULL},
77057 { (char *)"PolysemousTraining_ntrain_permutation_set", _wrap_PolysemousTraining_ntrain_permutation_set, METH_VARARGS, NULL},
77058 { (char *)"PolysemousTraining_ntrain_permutation_get", _wrap_PolysemousTraining_ntrain_permutation_get, METH_VARARGS, NULL},
77059 { (char *)"PolysemousTraining_dis_weight_factor_set", _wrap_PolysemousTraining_dis_weight_factor_set, METH_VARARGS, NULL},
77060 { (char *)"PolysemousTraining_dis_weight_factor_get", _wrap_PolysemousTraining_dis_weight_factor_get, METH_VARARGS, NULL},
77061 { (char *)"PolysemousTraining_log_pattern_set", _wrap_PolysemousTraining_log_pattern_set, METH_VARARGS, NULL},
77062 { (char *)"PolysemousTraining_log_pattern_get", _wrap_PolysemousTraining_log_pattern_get, METH_VARARGS, NULL},
77063 { (char *)"new_PolysemousTraining", _wrap_new_PolysemousTraining, METH_VARARGS, NULL},
77064 { (char *)"PolysemousTraining_optimize_pq_for_hamming", _wrap_PolysemousTraining_optimize_pq_for_hamming, METH_VARARGS, NULL},
77065 { (char *)"PolysemousTraining_optimize_ranking", _wrap_PolysemousTraining_optimize_ranking, METH_VARARGS, NULL},
77066 { (char *)"PolysemousTraining_optimize_reproduce_distances", _wrap_PolysemousTraining_optimize_reproduce_distances, METH_VARARGS, NULL},
77067 { (char *)"delete_PolysemousTraining", _wrap_delete_PolysemousTraining, METH_VARARGS, NULL},
77068 { (char *)"PolysemousTraining_swigregister", PolysemousTraining_swigregister, METH_VARARGS, NULL},
77069 { (char *)"IndexPQ_pq_set", _wrap_IndexPQ_pq_set, METH_VARARGS, NULL},
77070 { (char *)"IndexPQ_pq_get", _wrap_IndexPQ_pq_get, METH_VARARGS, NULL},
77071 { (char *)"IndexPQ_codes_set", _wrap_IndexPQ_codes_set, METH_VARARGS, NULL},
77072 { (char *)"IndexPQ_codes_get", _wrap_IndexPQ_codes_get, METH_VARARGS, NULL},
77073 { (char *)"new_IndexPQ", _wrap_new_IndexPQ, METH_VARARGS, NULL},
77074 { (char *)"IndexPQ_train", _wrap_IndexPQ_train, METH_VARARGS, NULL},
77075 { (char *)"IndexPQ_add", _wrap_IndexPQ_add, METH_VARARGS, NULL},
77076 { (char *)"IndexPQ_search", _wrap_IndexPQ_search, METH_VARARGS, NULL},
77077 { (char *)"IndexPQ_reset", _wrap_IndexPQ_reset, METH_VARARGS, NULL},
77078 { (char *)"IndexPQ_reconstruct_n", _wrap_IndexPQ_reconstruct_n, METH_VARARGS, NULL},
77079 { (char *)"IndexPQ_reconstruct", _wrap_IndexPQ_reconstruct, METH_VARARGS, NULL},
77080 { (char *)"IndexPQ_remove_ids", _wrap_IndexPQ_remove_ids, METH_VARARGS, NULL},
77081 { (char *)"IndexPQ_do_polysemous_training_set", _wrap_IndexPQ_do_polysemous_training_set, METH_VARARGS, NULL},
77082 { (char *)"IndexPQ_do_polysemous_training_get", _wrap_IndexPQ_do_polysemous_training_get, METH_VARARGS, NULL},
77083 { (char *)"IndexPQ_polysemous_training_set", _wrap_IndexPQ_polysemous_training_set, METH_VARARGS, NULL},
77084 { (char *)"IndexPQ_polysemous_training_get", _wrap_IndexPQ_polysemous_training_get, METH_VARARGS, NULL},
77085 { (char *)"IndexPQ_search_type_set", _wrap_IndexPQ_search_type_set, METH_VARARGS, NULL},
77086 { (char *)"IndexPQ_search_type_get", _wrap_IndexPQ_search_type_get, METH_VARARGS, NULL},
77087 { (char *)"IndexPQ_encode_signs_set", _wrap_IndexPQ_encode_signs_set, METH_VARARGS, NULL},
77088 { (char *)"IndexPQ_encode_signs_get", _wrap_IndexPQ_encode_signs_get, METH_VARARGS, NULL},
77089 { (char *)"IndexPQ_polysemous_ht_set", _wrap_IndexPQ_polysemous_ht_set, METH_VARARGS, NULL},
77090 { (char *)"IndexPQ_polysemous_ht_get", _wrap_IndexPQ_polysemous_ht_get, METH_VARARGS, NULL},
77091 { (char *)"IndexPQ_search_core_polysemous", _wrap_IndexPQ_search_core_polysemous, METH_VARARGS, NULL},
77092 { (char *)"IndexPQ_hamming_distance_histogram", _wrap_IndexPQ_hamming_distance_histogram, METH_VARARGS, NULL},
77093 { (char *)"IndexPQ_hamming_distance_table", _wrap_IndexPQ_hamming_distance_table, METH_VARARGS, NULL},
77094 { (char *)"delete_IndexPQ", _wrap_delete_IndexPQ, METH_VARARGS, NULL},
77095 { (char *)"IndexPQ_swigregister", IndexPQ_swigregister, METH_VARARGS, NULL},
77096 { (char *)"IndexPQStats_nq_set", _wrap_IndexPQStats_nq_set, METH_VARARGS, NULL},
77097 { (char *)"IndexPQStats_nq_get", _wrap_IndexPQStats_nq_get, METH_VARARGS, NULL},
77098 { (char *)"IndexPQStats_ncode_set", _wrap_IndexPQStats_ncode_set, METH_VARARGS, NULL},
77099 { (char *)"IndexPQStats_ncode_get", _wrap_IndexPQStats_ncode_get, METH_VARARGS, NULL},
77100 { (char *)"IndexPQStats_n_hamming_pass_set", _wrap_IndexPQStats_n_hamming_pass_set, METH_VARARGS, NULL},
77101 { (char *)"IndexPQStats_n_hamming_pass_get", _wrap_IndexPQStats_n_hamming_pass_get, METH_VARARGS, NULL},
77102 { (char *)"new_IndexPQStats", _wrap_new_IndexPQStats, METH_VARARGS, NULL},
77103 { (char *)"IndexPQStats_reset", _wrap_IndexPQStats_reset, METH_VARARGS, NULL},
77104 { (char *)"delete_IndexPQStats", _wrap_delete_IndexPQStats, METH_VARARGS, NULL},
77105 { (char *)"IndexPQStats_swigregister", IndexPQStats_swigregister, METH_VARARGS, NULL},
77106 { (char *)"MultiIndexQuantizer_pq_set", _wrap_MultiIndexQuantizer_pq_set, METH_VARARGS, NULL},
77107 { (char *)"MultiIndexQuantizer_pq_get", _wrap_MultiIndexQuantizer_pq_get, METH_VARARGS, NULL},
77108 { (char *)"MultiIndexQuantizer_train", _wrap_MultiIndexQuantizer_train, METH_VARARGS, NULL},
77109 { (char *)"MultiIndexQuantizer_search", _wrap_MultiIndexQuantizer_search, METH_VARARGS, NULL},
77110 { (char *)"MultiIndexQuantizer_add", _wrap_MultiIndexQuantizer_add, METH_VARARGS, NULL},
77111 { (char *)"MultiIndexQuantizer_reset", _wrap_MultiIndexQuantizer_reset, METH_VARARGS, NULL},
77112 { (char *)"new_MultiIndexQuantizer", _wrap_new_MultiIndexQuantizer, METH_VARARGS, NULL},
77113 { (char *)"MultiIndexQuantizer_reconstruct", _wrap_MultiIndexQuantizer_reconstruct, METH_VARARGS, NULL},
77114 { (char *)"delete_MultiIndexQuantizer", _wrap_delete_MultiIndexQuantizer, METH_VARARGS, NULL},
77115 { (char *)"MultiIndexQuantizer_swigregister", MultiIndexQuantizer_swigregister, METH_VARARGS, NULL},
77116 { (char *)"MultiIndexQuantizer2_assign_indexes_set", _wrap_MultiIndexQuantizer2_assign_indexes_set, METH_VARARGS, NULL},
77117 { (char *)"MultiIndexQuantizer2_assign_indexes_get", _wrap_MultiIndexQuantizer2_assign_indexes_get, METH_VARARGS, NULL},
77118 { (char *)"MultiIndexQuantizer2_own_fields_set", _wrap_MultiIndexQuantizer2_own_fields_set, METH_VARARGS, NULL},
77119 { (char *)"MultiIndexQuantizer2_own_fields_get", _wrap_MultiIndexQuantizer2_own_fields_get, METH_VARARGS, NULL},
77120 { (char *)"new_MultiIndexQuantizer2", _wrap_new_MultiIndexQuantizer2, METH_VARARGS, NULL},
77121 { (char *)"MultiIndexQuantizer2_train", _wrap_MultiIndexQuantizer2_train, METH_VARARGS, NULL},
77122 { (char *)"MultiIndexQuantizer2_search", _wrap_MultiIndexQuantizer2_search, METH_VARARGS, NULL},
77123 { (char *)"delete_MultiIndexQuantizer2", _wrap_delete_MultiIndexQuantizer2, METH_VARARGS, NULL},
77124 { (char *)"MultiIndexQuantizer2_swigregister", MultiIndexQuantizer2_swigregister, METH_VARARGS, NULL},
77125 { (char *)"InvertedLists_nlist_set", _wrap_InvertedLists_nlist_set, METH_VARARGS, NULL},
77126 { (char *)"InvertedLists_nlist_get", _wrap_InvertedLists_nlist_get, METH_VARARGS, NULL},
77127 { (char *)"InvertedLists_code_size_set", _wrap_InvertedLists_code_size_set, METH_VARARGS, NULL},
77128 { (char *)"InvertedLists_code_size_get", _wrap_InvertedLists_code_size_get, METH_VARARGS, NULL},
77129 { (char *)"InvertedLists_list_size", _wrap_InvertedLists_list_size, METH_VARARGS, NULL},
77130 { (char *)"InvertedLists_get_codes", _wrap_InvertedLists_get_codes, METH_VARARGS, NULL},
77131 { (char *)"InvertedLists_get_ids", _wrap_InvertedLists_get_ids, METH_VARARGS, NULL},
77132 { (char *)"InvertedLists_release_codes", _wrap_InvertedLists_release_codes, METH_VARARGS, NULL},
77133 { (char *)"InvertedLists_release_ids", _wrap_InvertedLists_release_ids, METH_VARARGS, NULL},
77134 { (char *)"InvertedLists_get_single_id", _wrap_InvertedLists_get_single_id, METH_VARARGS, NULL},
77135 { (char *)"InvertedLists_get_single_code", _wrap_InvertedLists_get_single_code, METH_VARARGS, NULL},
77136 { (char *)"InvertedLists_prefetch_lists", _wrap_InvertedLists_prefetch_lists, METH_VARARGS, NULL},
77137 { (char *)"InvertedLists_add_entry", _wrap_InvertedLists_add_entry, METH_VARARGS, NULL},
77138 { (char *)"InvertedLists_add_entries", _wrap_InvertedLists_add_entries, METH_VARARGS, NULL},
77139 { (char *)"InvertedLists_update_entry", _wrap_InvertedLists_update_entry, METH_VARARGS, NULL},
77140 { (char *)"InvertedLists_update_entries", _wrap_InvertedLists_update_entries, METH_VARARGS, NULL},
77141 { (char *)"InvertedLists_resize", _wrap_InvertedLists_resize, METH_VARARGS, NULL},
77142 { (char *)"InvertedLists_reset", _wrap_InvertedLists_reset, METH_VARARGS, NULL},
77143 { (char *)"InvertedLists_merge_from", _wrap_InvertedLists_merge_from, METH_VARARGS, NULL},
77144 { (char *)"delete_InvertedLists", _wrap_delete_InvertedLists, METH_VARARGS, NULL},
77145 { (char *)"InvertedLists_swigregister", InvertedLists_swigregister, METH_VARARGS, NULL},
77146 { (char *)"ArrayInvertedLists_codes_set", _wrap_ArrayInvertedLists_codes_set, METH_VARARGS, NULL},
77147 { (char *)"ArrayInvertedLists_codes_get", _wrap_ArrayInvertedLists_codes_get, METH_VARARGS, NULL},
77148 { (char *)"ArrayInvertedLists_ids_set", _wrap_ArrayInvertedLists_ids_set, METH_VARARGS, NULL},
77149 { (char *)"ArrayInvertedLists_ids_get", _wrap_ArrayInvertedLists_ids_get, METH_VARARGS, NULL},
77150 { (char *)"new_ArrayInvertedLists", _wrap_new_ArrayInvertedLists, METH_VARARGS, NULL},
77151 { (char *)"ArrayInvertedLists_list_size", _wrap_ArrayInvertedLists_list_size, METH_VARARGS, NULL},
77152 { (char *)"ArrayInvertedLists_get_codes", _wrap_ArrayInvertedLists_get_codes, METH_VARARGS, NULL},
77153 { (char *)"ArrayInvertedLists_get_ids", _wrap_ArrayInvertedLists_get_ids, METH_VARARGS, NULL},
77154 { (char *)"ArrayInvertedLists_add_entries", _wrap_ArrayInvertedLists_add_entries, METH_VARARGS, NULL},
77155 { (char *)"ArrayInvertedLists_update_entries", _wrap_ArrayInvertedLists_update_entries, METH_VARARGS, NULL},
77156 { (char *)"ArrayInvertedLists_resize", _wrap_ArrayInvertedLists_resize, METH_VARARGS, NULL},
77157 { (char *)"delete_ArrayInvertedLists", _wrap_delete_ArrayInvertedLists, METH_VARARGS, NULL},
77158 { (char *)"ArrayInvertedLists_swigregister", ArrayInvertedLists_swigregister, METH_VARARGS, NULL},
77159 { (char *)"ConcatenatedInvertedLists_ils_set", _wrap_ConcatenatedInvertedLists_ils_set, METH_VARARGS, NULL},
77160 { (char *)"ConcatenatedInvertedLists_ils_get", _wrap_ConcatenatedInvertedLists_ils_get, METH_VARARGS, NULL},
77161 { (char *)"new_ConcatenatedInvertedLists", _wrap_new_ConcatenatedInvertedLists, METH_VARARGS, NULL},
77162 { (char *)"ConcatenatedInvertedLists_list_size", _wrap_ConcatenatedInvertedLists_list_size, METH_VARARGS, NULL},
77163 { (char *)"ConcatenatedInvertedLists_get_codes", _wrap_ConcatenatedInvertedLists_get_codes, METH_VARARGS, NULL},
77164 { (char *)"ConcatenatedInvertedLists_get_ids", _wrap_ConcatenatedInvertedLists_get_ids, METH_VARARGS, NULL},
77165 { (char *)"ConcatenatedInvertedLists_release_codes", _wrap_ConcatenatedInvertedLists_release_codes, METH_VARARGS, NULL},
77166 { (char *)"ConcatenatedInvertedLists_release_ids", _wrap_ConcatenatedInvertedLists_release_ids, METH_VARARGS, NULL},
77167 { (char *)"ConcatenatedInvertedLists_get_single_id", _wrap_ConcatenatedInvertedLists_get_single_id, METH_VARARGS, NULL},
77168 { (char *)"ConcatenatedInvertedLists_get_single_code", _wrap_ConcatenatedInvertedLists_get_single_code, METH_VARARGS, NULL},
77169 { (char *)"ConcatenatedInvertedLists_add_entries", _wrap_ConcatenatedInvertedLists_add_entries, METH_VARARGS, NULL},
77170 { (char *)"ConcatenatedInvertedLists_update_entries", _wrap_ConcatenatedInvertedLists_update_entries, METH_VARARGS, NULL},
77171 { (char *)"ConcatenatedInvertedLists_resize", _wrap_ConcatenatedInvertedLists_resize, METH_VARARGS, NULL},
77172 { (char *)"delete_ConcatenatedInvertedLists", _wrap_delete_ConcatenatedInvertedLists, METH_VARARGS, NULL},
77173 { (char *)"ConcatenatedInvertedLists_swigregister", ConcatenatedInvertedLists_swigregister, METH_VARARGS, NULL},
77174 { (char *)"Level1Quantizer_quantizer_set", _wrap_Level1Quantizer_quantizer_set, METH_VARARGS, NULL},
77175 { (char *)"Level1Quantizer_quantizer_get", _wrap_Level1Quantizer_quantizer_get, METH_VARARGS, NULL},
77176 { (char *)"Level1Quantizer_nlist_set", _wrap_Level1Quantizer_nlist_set, METH_VARARGS, NULL},
77177 { (char *)"Level1Quantizer_nlist_get", _wrap_Level1Quantizer_nlist_get, METH_VARARGS, NULL},
77178 { (char *)"Level1Quantizer_quantizer_trains_alone_set", _wrap_Level1Quantizer_quantizer_trains_alone_set, METH_VARARGS, NULL},
77179 { (char *)"Level1Quantizer_quantizer_trains_alone_get", _wrap_Level1Quantizer_quantizer_trains_alone_get, METH_VARARGS, NULL},
77180 { (char *)"Level1Quantizer_own_fields_set", _wrap_Level1Quantizer_own_fields_set, METH_VARARGS, NULL},
77181 { (char *)"Level1Quantizer_own_fields_get", _wrap_Level1Quantizer_own_fields_get, METH_VARARGS, NULL},
77182 { (char *)"Level1Quantizer_cp_set", _wrap_Level1Quantizer_cp_set, METH_VARARGS, NULL},
77183 { (char *)"Level1Quantizer_cp_get", _wrap_Level1Quantizer_cp_get, METH_VARARGS, NULL},
77184 { (char *)"Level1Quantizer_clustering_index_set", _wrap_Level1Quantizer_clustering_index_set, METH_VARARGS, NULL},
77185 { (char *)"Level1Quantizer_clustering_index_get", _wrap_Level1Quantizer_clustering_index_get, METH_VARARGS, NULL},
77186 { (char *)"Level1Quantizer_train_q1", _wrap_Level1Quantizer_train_q1, METH_VARARGS, NULL},
77187 { (char *)"new_Level1Quantizer", _wrap_new_Level1Quantizer, METH_VARARGS, NULL},
77188 { (char *)"delete_Level1Quantizer", _wrap_delete_Level1Quantizer, METH_VARARGS, NULL},
77189 { (char *)"Level1Quantizer_swigregister", Level1Quantizer_swigregister, METH_VARARGS, NULL},
77190 { (char *)"IVFSearchParameters_nprobe_set", _wrap_IVFSearchParameters_nprobe_set, METH_VARARGS, NULL},
77191 { (char *)"IVFSearchParameters_nprobe_get", _wrap_IVFSearchParameters_nprobe_get, METH_VARARGS, NULL},
77192 { (char *)"IVFSearchParameters_max_codes_set", _wrap_IVFSearchParameters_max_codes_set, METH_VARARGS, NULL},
77193 { (char *)"IVFSearchParameters_max_codes_get", _wrap_IVFSearchParameters_max_codes_get, METH_VARARGS, NULL},
77194 { (char *)"delete_IVFSearchParameters", _wrap_delete_IVFSearchParameters, METH_VARARGS, NULL},
77195 { (char *)"new_IVFSearchParameters", _wrap_new_IVFSearchParameters, METH_VARARGS, NULL},
77196 { (char *)"IVFSearchParameters_swigregister", IVFSearchParameters_swigregister, METH_VARARGS, NULL},
77197 { (char *)"IndexIVF_invlists_set", _wrap_IndexIVF_invlists_set, METH_VARARGS, NULL},
77198 { (char *)"IndexIVF_invlists_get", _wrap_IndexIVF_invlists_get, METH_VARARGS, NULL},
77199 { (char *)"IndexIVF_own_invlists_set", _wrap_IndexIVF_own_invlists_set, METH_VARARGS, NULL},
77200 { (char *)"IndexIVF_own_invlists_get", _wrap_IndexIVF_own_invlists_get, METH_VARARGS, NULL},
77201 { (char *)"IndexIVF_code_size_set", _wrap_IndexIVF_code_size_set, METH_VARARGS, NULL},
77202 { (char *)"IndexIVF_code_size_get", _wrap_IndexIVF_code_size_get, METH_VARARGS, NULL},
77203 { (char *)"IndexIVF_nprobe_set", _wrap_IndexIVF_nprobe_set, METH_VARARGS, NULL},
77204 { (char *)"IndexIVF_nprobe_get", _wrap_IndexIVF_nprobe_get, METH_VARARGS, NULL},
77205 { (char *)"IndexIVF_max_codes_set", _wrap_IndexIVF_max_codes_set, METH_VARARGS, NULL},
77206 { (char *)"IndexIVF_max_codes_get", _wrap_IndexIVF_max_codes_get, METH_VARARGS, NULL},
77207 { (char *)"IndexIVF_maintain_direct_map_set", _wrap_IndexIVF_maintain_direct_map_set, METH_VARARGS, NULL},
77208 { (char *)"IndexIVF_maintain_direct_map_get", _wrap_IndexIVF_maintain_direct_map_get, METH_VARARGS, NULL},
77209 { (char *)"IndexIVF_direct_map_set", _wrap_IndexIVF_direct_map_set, METH_VARARGS, NULL},
77210 { (char *)"IndexIVF_direct_map_get", _wrap_IndexIVF_direct_map_get, METH_VARARGS, NULL},
77211 { (char *)"IndexIVF_reset", _wrap_IndexIVF_reset, METH_VARARGS, NULL},
77212 { (char *)"IndexIVF_train", _wrap_IndexIVF_train, METH_VARARGS, NULL},
77213 { (char *)"IndexIVF_add", _wrap_IndexIVF_add, METH_VARARGS, NULL},
77214 { (char *)"IndexIVF_encode_vectors", _wrap_IndexIVF_encode_vectors, METH_VARARGS, NULL},
77215 { (char *)"IndexIVF_train_residual", _wrap_IndexIVF_train_residual, METH_VARARGS, NULL},
77216 { (char *)"IndexIVF_search_preassigned", _wrap_IndexIVF_search_preassigned, METH_VARARGS, NULL},
77217 { (char *)"IndexIVF_search", _wrap_IndexIVF_search, METH_VARARGS, NULL},
77218 { (char *)"IndexIVF_get_InvertedListScanner", _wrap_IndexIVF_get_InvertedListScanner, METH_VARARGS, NULL},
77219 { (char *)"IndexIVF_reconstruct", _wrap_IndexIVF_reconstruct, METH_VARARGS, NULL},
77220 { (char *)"IndexIVF_reconstruct_n", _wrap_IndexIVF_reconstruct_n, METH_VARARGS, NULL},
77221 { (char *)"IndexIVF_search_and_reconstruct", _wrap_IndexIVF_search_and_reconstruct, METH_VARARGS, NULL},
77222 { (char *)"IndexIVF_reconstruct_from_offset", _wrap_IndexIVF_reconstruct_from_offset, METH_VARARGS, NULL},
77223 { (char *)"IndexIVF_remove_ids", _wrap_IndexIVF_remove_ids, METH_VARARGS, NULL},
77224 { (char *)"IndexIVF_check_compatible_for_merge", _wrap_IndexIVF_check_compatible_for_merge, METH_VARARGS, NULL},
77225 { (char *)"IndexIVF_merge_from", _wrap_IndexIVF_merge_from, METH_VARARGS, NULL},
77226 { (char *)"IndexIVF_copy_subset_to", _wrap_IndexIVF_copy_subset_to, METH_VARARGS, NULL},
77227 { (char *)"delete_IndexIVF", _wrap_delete_IndexIVF, METH_VARARGS, NULL},
77228 { (char *)"IndexIVF_get_list_size", _wrap_IndexIVF_get_list_size, METH_VARARGS, NULL},
77229 { (char *)"IndexIVF_make_direct_map", _wrap_IndexIVF_make_direct_map, METH_VARARGS, NULL},
77230 { (char *)"IndexIVF_imbalance_factor", _wrap_IndexIVF_imbalance_factor, METH_VARARGS, NULL},
77231 { (char *)"IndexIVF_print_stats", _wrap_IndexIVF_print_stats, METH_VARARGS, NULL},
77232 { (char *)"IndexIVF_replace_invlists", _wrap_IndexIVF_replace_invlists, METH_VARARGS, NULL},
77233 { (char *)"IndexIVF_swigregister", IndexIVF_swigregister, METH_VARARGS, NULL},
77234 { (char *)"IndexIVFStats_nq_set", _wrap_IndexIVFStats_nq_set, METH_VARARGS, NULL},
77235 { (char *)"IndexIVFStats_nq_get", _wrap_IndexIVFStats_nq_get, METH_VARARGS, NULL},
77236 { (char *)"IndexIVFStats_nlist_set", _wrap_IndexIVFStats_nlist_set, METH_VARARGS, NULL},
77237 { (char *)"IndexIVFStats_nlist_get", _wrap_IndexIVFStats_nlist_get, METH_VARARGS, NULL},
77238 { (char *)"IndexIVFStats_ndis_set", _wrap_IndexIVFStats_ndis_set, METH_VARARGS, NULL},
77239 { (char *)"IndexIVFStats_ndis_get", _wrap_IndexIVFStats_ndis_get, METH_VARARGS, NULL},
77240 { (char *)"IndexIVFStats_nheap_updates_set", _wrap_IndexIVFStats_nheap_updates_set, METH_VARARGS, NULL},
77241 { (char *)"IndexIVFStats_nheap_updates_get", _wrap_IndexIVFStats_nheap_updates_get, METH_VARARGS, NULL},
77242 { (char *)"new_IndexIVFStats", _wrap_new_IndexIVFStats, METH_VARARGS, NULL},
77243 { (char *)"IndexIVFStats_reset", _wrap_IndexIVFStats_reset, METH_VARARGS, NULL},
77244 { (char *)"delete_IndexIVFStats", _wrap_delete_IndexIVFStats, METH_VARARGS, NULL},
77245 { (char *)"IndexIVFStats_swigregister", IndexIVFStats_swigregister, METH_VARARGS, NULL},
77246 { (char *)"check_compatible_for_merge", _wrap_check_compatible_for_merge, METH_VARARGS, NULL},
77247 { (char *)"extract_index_ivf", _wrap_extract_index_ivf, METH_VARARGS, NULL},
77248 { (char *)"merge_into", _wrap_merge_into, METH_VARARGS, NULL},
77249 { (char *)"search_centroid", _wrap_search_centroid, METH_VARARGS, NULL},
77250 { (char *)"search_and_return_centroids", _wrap_search_and_return_centroids, METH_VARARGS, NULL},
77251 { (char *)"SlidingIndexWindow_index_set", _wrap_SlidingIndexWindow_index_set, METH_VARARGS, NULL},
77252 { (char *)"SlidingIndexWindow_index_get", _wrap_SlidingIndexWindow_index_get, METH_VARARGS, NULL},
77253 { (char *)"SlidingIndexWindow_ils_set", _wrap_SlidingIndexWindow_ils_set, METH_VARARGS, NULL},
77254 { (char *)"SlidingIndexWindow_ils_get", _wrap_SlidingIndexWindow_ils_get, METH_VARARGS, NULL},
77255 { (char *)"SlidingIndexWindow_n_slice_set", _wrap_SlidingIndexWindow_n_slice_set, METH_VARARGS, NULL},
77256 { (char *)"SlidingIndexWindow_n_slice_get", _wrap_SlidingIndexWindow_n_slice_get, METH_VARARGS, NULL},
77257 { (char *)"SlidingIndexWindow_nlist_set", _wrap_SlidingIndexWindow_nlist_set, METH_VARARGS, NULL},
77258 { (char *)"SlidingIndexWindow_nlist_get", _wrap_SlidingIndexWindow_nlist_get, METH_VARARGS, NULL},
77259 { (char *)"SlidingIndexWindow_sizes_set", _wrap_SlidingIndexWindow_sizes_set, METH_VARARGS, NULL},
77260 { (char *)"SlidingIndexWindow_sizes_get", _wrap_SlidingIndexWindow_sizes_get, METH_VARARGS, NULL},
77261 { (char *)"new_SlidingIndexWindow", _wrap_new_SlidingIndexWindow, METH_VARARGS, NULL},
77262 { (char *)"SlidingIndexWindow_step", _wrap_SlidingIndexWindow_step, METH_VARARGS, NULL},
77263 { (char *)"delete_SlidingIndexWindow", _wrap_delete_SlidingIndexWindow, METH_VARARGS, NULL},
77264 { (char *)"SlidingIndexWindow_swigregister", SlidingIndexWindow_swigregister, METH_VARARGS, NULL},
77265 { (char *)"get_invlist_range", _wrap_get_invlist_range, METH_VARARGS, NULL},
77266 { (char *)"set_invlist_range", _wrap_set_invlist_range, METH_VARARGS, NULL},
77267 { (char *)"search_with_parameters", _wrap_search_with_parameters, METH_VARARGS, NULL},
77268 { (char *)"ScalarQuantizer_qtype_set", _wrap_ScalarQuantizer_qtype_set, METH_VARARGS, NULL},
77269 { (char *)"ScalarQuantizer_qtype_get", _wrap_ScalarQuantizer_qtype_get, METH_VARARGS, NULL},
77270 { (char *)"ScalarQuantizer_rangestat_set", _wrap_ScalarQuantizer_rangestat_set, METH_VARARGS, NULL},
77271 { (char *)"ScalarQuantizer_rangestat_get", _wrap_ScalarQuantizer_rangestat_get, METH_VARARGS, NULL},
77272 { (char *)"ScalarQuantizer_rangestat_arg_set", _wrap_ScalarQuantizer_rangestat_arg_set, METH_VARARGS, NULL},
77273 { (char *)"ScalarQuantizer_rangestat_arg_get", _wrap_ScalarQuantizer_rangestat_arg_get, METH_VARARGS, NULL},
77274 { (char *)"ScalarQuantizer_d_set", _wrap_ScalarQuantizer_d_set, METH_VARARGS, NULL},
77275 { (char *)"ScalarQuantizer_d_get", _wrap_ScalarQuantizer_d_get, METH_VARARGS, NULL},
77276 { (char *)"ScalarQuantizer_code_size_set", _wrap_ScalarQuantizer_code_size_set, METH_VARARGS, NULL},
77277 { (char *)"ScalarQuantizer_code_size_get", _wrap_ScalarQuantizer_code_size_get, METH_VARARGS, NULL},
77278 { (char *)"ScalarQuantizer_trained_set", _wrap_ScalarQuantizer_trained_set, METH_VARARGS, NULL},
77279 { (char *)"ScalarQuantizer_trained_get", _wrap_ScalarQuantizer_trained_get, METH_VARARGS, NULL},
77280 { (char *)"new_ScalarQuantizer", _wrap_new_ScalarQuantizer, METH_VARARGS, NULL},
77281 { (char *)"ScalarQuantizer_train", _wrap_ScalarQuantizer_train, METH_VARARGS, NULL},
77282 { (char *)"ScalarQuantizer_compute_codes", _wrap_ScalarQuantizer_compute_codes, METH_VARARGS, NULL},
77283 { (char *)"ScalarQuantizer_decode", _wrap_ScalarQuantizer_decode, METH_VARARGS, NULL},
77284 { (char *)"ScalarQuantizer_get_distance_computer", _wrap_ScalarQuantizer_get_distance_computer, METH_VARARGS, NULL},
77285 { (char *)"delete_ScalarQuantizer", _wrap_delete_ScalarQuantizer, METH_VARARGS, NULL},
77286 { (char *)"ScalarQuantizer_swigregister", ScalarQuantizer_swigregister, METH_VARARGS, NULL},
77287 { (char *)"IndexScalarQuantizer_sq_set", _wrap_IndexScalarQuantizer_sq_set, METH_VARARGS, NULL},
77288 { (char *)"IndexScalarQuantizer_sq_get", _wrap_IndexScalarQuantizer_sq_get, METH_VARARGS, NULL},
77289 { (char *)"IndexScalarQuantizer_codes_set", _wrap_IndexScalarQuantizer_codes_set, METH_VARARGS, NULL},
77290 { (char *)"IndexScalarQuantizer_codes_get", _wrap_IndexScalarQuantizer_codes_get, METH_VARARGS, NULL},
77291 { (char *)"IndexScalarQuantizer_code_size_set", _wrap_IndexScalarQuantizer_code_size_set, METH_VARARGS, NULL},
77292 { (char *)"IndexScalarQuantizer_code_size_get", _wrap_IndexScalarQuantizer_code_size_get, METH_VARARGS, NULL},
77293 { (char *)"new_IndexScalarQuantizer", _wrap_new_IndexScalarQuantizer, METH_VARARGS, NULL},
77294 { (char *)"IndexScalarQuantizer_train", _wrap_IndexScalarQuantizer_train, METH_VARARGS, NULL},
77295 { (char *)"IndexScalarQuantizer_add", _wrap_IndexScalarQuantizer_add, METH_VARARGS, NULL},
77296 { (char *)"IndexScalarQuantizer_search", _wrap_IndexScalarQuantizer_search, METH_VARARGS, NULL},
77297 { (char *)"IndexScalarQuantizer_reset", _wrap_IndexScalarQuantizer_reset, METH_VARARGS, NULL},
77298 { (char *)"IndexScalarQuantizer_reconstruct_n", _wrap_IndexScalarQuantizer_reconstruct_n, METH_VARARGS, NULL},
77299 { (char *)"IndexScalarQuantizer_reconstruct", _wrap_IndexScalarQuantizer_reconstruct, METH_VARARGS, NULL},
77300 { (char *)"delete_IndexScalarQuantizer", _wrap_delete_IndexScalarQuantizer, METH_VARARGS, NULL},
77301 { (char *)"IndexScalarQuantizer_swigregister", IndexScalarQuantizer_swigregister, METH_VARARGS, NULL},
77302 { (char *)"IndexIVFScalarQuantizer_sq_set", _wrap_IndexIVFScalarQuantizer_sq_set, METH_VARARGS, NULL},
77303 { (char *)"IndexIVFScalarQuantizer_sq_get", _wrap_IndexIVFScalarQuantizer_sq_get, METH_VARARGS, NULL},
77304 { (char *)"new_IndexIVFScalarQuantizer", _wrap_new_IndexIVFScalarQuantizer, METH_VARARGS, NULL},
77305 { (char *)"IndexIVFScalarQuantizer_train_residual", _wrap_IndexIVFScalarQuantizer_train_residual, METH_VARARGS, NULL},
77306 { (char *)"IndexIVFScalarQuantizer_encode_vectors", _wrap_IndexIVFScalarQuantizer_encode_vectors, METH_VARARGS, NULL},
77307 { (char *)"IndexIVFScalarQuantizer_add_with_ids", _wrap_IndexIVFScalarQuantizer_add_with_ids, METH_VARARGS, NULL},
77308 { (char *)"IndexIVFScalarQuantizer_get_InvertedListScanner", _wrap_IndexIVFScalarQuantizer_get_InvertedListScanner, METH_VARARGS, NULL},
77309 { (char *)"IndexIVFScalarQuantizer_reconstruct_from_offset", _wrap_IndexIVFScalarQuantizer_reconstruct_from_offset, METH_VARARGS, NULL},
77310 { (char *)"delete_IndexIVFScalarQuantizer", _wrap_delete_IndexIVFScalarQuantizer, METH_VARARGS, NULL},
77311 { (char *)"IndexIVFScalarQuantizer_swigregister", IndexIVFScalarQuantizer_swigregister, METH_VARARGS, NULL},
77312 { (char *)"HNSW_assign_probas_set", _wrap_HNSW_assign_probas_set, METH_VARARGS, NULL},
77313 { (char *)"HNSW_assign_probas_get", _wrap_HNSW_assign_probas_get, METH_VARARGS, NULL},
77314 { (char *)"HNSW_cum_nneighbor_per_level_set", _wrap_HNSW_cum_nneighbor_per_level_set, METH_VARARGS, NULL},
77315 { (char *)"HNSW_cum_nneighbor_per_level_get", _wrap_HNSW_cum_nneighbor_per_level_get, METH_VARARGS, NULL},
77316 { (char *)"HNSW_levels_set", _wrap_HNSW_levels_set, METH_VARARGS, NULL},
77317 { (char *)"HNSW_levels_get", _wrap_HNSW_levels_get, METH_VARARGS, NULL},
77318 { (char *)"HNSW_offsets_set", _wrap_HNSW_offsets_set, METH_VARARGS, NULL},
77319 { (char *)"HNSW_offsets_get", _wrap_HNSW_offsets_get, METH_VARARGS, NULL},
77320 { (char *)"HNSW_neighbors_set", _wrap_HNSW_neighbors_set, METH_VARARGS, NULL},
77321 { (char *)"HNSW_neighbors_get", _wrap_HNSW_neighbors_get, METH_VARARGS, NULL},
77322 { (char *)"HNSW_entry_point_set", _wrap_HNSW_entry_point_set, METH_VARARGS, NULL},
77323 { (char *)"HNSW_entry_point_get", _wrap_HNSW_entry_point_get, METH_VARARGS, NULL},
77324 { (char *)"HNSW_rng_set", _wrap_HNSW_rng_set, METH_VARARGS, NULL},
77325 { (char *)"HNSW_rng_get", _wrap_HNSW_rng_get, METH_VARARGS, NULL},
77326 { (char *)"HNSW_max_level_set", _wrap_HNSW_max_level_set, METH_VARARGS, NULL},
77327 { (char *)"HNSW_max_level_get", _wrap_HNSW_max_level_get, METH_VARARGS, NULL},
77328 { (char *)"HNSW_efConstruction_set", _wrap_HNSW_efConstruction_set, METH_VARARGS, NULL},
77329 { (char *)"HNSW_efConstruction_get", _wrap_HNSW_efConstruction_get, METH_VARARGS, NULL},
77330 { (char *)"HNSW_efSearch_set", _wrap_HNSW_efSearch_set, METH_VARARGS, NULL},
77331 { (char *)"HNSW_efSearch_get", _wrap_HNSW_efSearch_get, METH_VARARGS, NULL},
77332 { (char *)"HNSW_upper_beam_set", _wrap_HNSW_upper_beam_set, METH_VARARGS, NULL},
77333 { (char *)"HNSW_upper_beam_get", _wrap_HNSW_upper_beam_get, METH_VARARGS, NULL},
77334 { (char *)"HNSW_set_default_probas", _wrap_HNSW_set_default_probas, METH_VARARGS, NULL},
77335 { (char *)"HNSW_set_nb_neighbors", _wrap_HNSW_set_nb_neighbors, METH_VARARGS, NULL},
77336 { (char *)"HNSW_nb_neighbors", _wrap_HNSW_nb_neighbors, METH_VARARGS, NULL},
77337 { (char *)"HNSW_cum_nb_neighbors", _wrap_HNSW_cum_nb_neighbors, METH_VARARGS, NULL},
77338 { (char *)"HNSW_neighbor_range", _wrap_HNSW_neighbor_range, METH_VARARGS, NULL},
77339 { (char *)"new_HNSW", _wrap_new_HNSW, METH_VARARGS, NULL},
77340 { (char *)"HNSW_random_level", _wrap_HNSW_random_level, METH_VARARGS, NULL},
77341 { (char *)"HNSW_fill_with_random_links", _wrap_HNSW_fill_with_random_links, METH_VARARGS, NULL},
77342 { (char *)"HNSW_add_links_starting_from", _wrap_HNSW_add_links_starting_from, METH_VARARGS, NULL},
77343 { (char *)"HNSW_add_with_locks", _wrap_HNSW_add_with_locks, METH_VARARGS, NULL},
77344 { (char *)"HNSW_search_from_candidates", _wrap_HNSW_search_from_candidates, METH_VARARGS, NULL},
77345 { (char *)"HNSW_search_from", _wrap_HNSW_search_from, METH_VARARGS, NULL},
77346 { (char *)"HNSW_search", _wrap_HNSW_search, METH_VARARGS, NULL},
77347 { (char *)"HNSW_reset", _wrap_HNSW_reset, METH_VARARGS, NULL},
77348 { (char *)"HNSW_clear_neighbor_tables", _wrap_HNSW_clear_neighbor_tables, METH_VARARGS, NULL},
77349 { (char *)"HNSW_print_neighbor_stats", _wrap_HNSW_print_neighbor_stats, METH_VARARGS, NULL},
77350 { (char *)"HNSW_prepare_level_tab", _wrap_HNSW_prepare_level_tab, METH_VARARGS, NULL},
77351 { (char *)"HNSW_shrink_neighbor_list", _wrap_HNSW_shrink_neighbor_list, METH_VARARGS, NULL},
77352 { (char *)"delete_HNSW", _wrap_delete_HNSW, METH_VARARGS, NULL},
77353 { (char *)"HNSW_swigregister", HNSW_swigregister, METH_VARARGS, NULL},
77354 { (char *)"VisitedTable_visited_set", _wrap_VisitedTable_visited_set, METH_VARARGS, NULL},
77355 { (char *)"VisitedTable_visited_get", _wrap_VisitedTable_visited_get, METH_VARARGS, NULL},
77356 { (char *)"VisitedTable_visno_set", _wrap_VisitedTable_visno_set, METH_VARARGS, NULL},
77357 { (char *)"VisitedTable_visno_get", _wrap_VisitedTable_visno_get, METH_VARARGS, NULL},
77358 { (char *)"new_VisitedTable", _wrap_new_VisitedTable, METH_VARARGS, NULL},
77359 { (char *)"VisitedTable_set", _wrap_VisitedTable_set, METH_VARARGS, NULL},
77360 { (char *)"VisitedTable_get", _wrap_VisitedTable_get, METH_VARARGS, NULL},
77361 { (char *)"VisitedTable_advance", _wrap_VisitedTable_advance, METH_VARARGS, NULL},
77362 { (char *)"delete_VisitedTable", _wrap_delete_VisitedTable, METH_VARARGS, NULL},
77363 { (char *)"VisitedTable_swigregister", VisitedTable_swigregister, METH_VARARGS, NULL},
77364 { (char *)"HNSWStats_n1_set", _wrap_HNSWStats_n1_set, METH_VARARGS, NULL},
77365 { (char *)"HNSWStats_n1_get", _wrap_HNSWStats_n1_get, METH_VARARGS, NULL},
77366 { (char *)"HNSWStats_n2_set", _wrap_HNSWStats_n2_set, METH_VARARGS, NULL},
77367 { (char *)"HNSWStats_n2_get", _wrap_HNSWStats_n2_get, METH_VARARGS, NULL},
77368 { (char *)"HNSWStats_n3_set", _wrap_HNSWStats_n3_set, METH_VARARGS, NULL},
77369 { (char *)"HNSWStats_n3_get", _wrap_HNSWStats_n3_get, METH_VARARGS, NULL},
77370 { (char *)"HNSWStats_ndis_set", _wrap_HNSWStats_ndis_set, METH_VARARGS, NULL},
77371 { (char *)"HNSWStats_ndis_get", _wrap_HNSWStats_ndis_get, METH_VARARGS, NULL},
77372 { (char *)"HNSWStats_nreorder_set", _wrap_HNSWStats_nreorder_set, METH_VARARGS, NULL},
77373 { (char *)"HNSWStats_nreorder_get", _wrap_HNSWStats_nreorder_get, METH_VARARGS, NULL},
77374 { (char *)"HNSWStats_view_set", _wrap_HNSWStats_view_set, METH_VARARGS, NULL},
77375 { (char *)"HNSWStats_view_get", _wrap_HNSWStats_view_get, METH_VARARGS, NULL},
77376 { (char *)"new_HNSWStats", _wrap_new_HNSWStats, METH_VARARGS, NULL},
77377 { (char *)"HNSWStats_reset", _wrap_HNSWStats_reset, METH_VARARGS, NULL},
77378 { (char *)"delete_HNSWStats", _wrap_delete_HNSWStats, METH_VARARGS, NULL},
77379 { (char *)"HNSWStats_swigregister", HNSWStats_swigregister, METH_VARARGS, NULL},
77380 { (char *)"ReconstructFromNeighbors_index_get", _wrap_ReconstructFromNeighbors_index_get, METH_VARARGS, NULL},
77381 { (char *)"ReconstructFromNeighbors_M_set", _wrap_ReconstructFromNeighbors_M_set, METH_VARARGS, NULL},
77382 { (char *)"ReconstructFromNeighbors_M_get", _wrap_ReconstructFromNeighbors_M_get, METH_VARARGS, NULL},
77383 { (char *)"ReconstructFromNeighbors_k_set", _wrap_ReconstructFromNeighbors_k_set, METH_VARARGS, NULL},
77384 { (char *)"ReconstructFromNeighbors_k_get", _wrap_ReconstructFromNeighbors_k_get, METH_VARARGS, NULL},
77385 { (char *)"ReconstructFromNeighbors_nsq_set", _wrap_ReconstructFromNeighbors_nsq_set, METH_VARARGS, NULL},
77386 { (char *)"ReconstructFromNeighbors_nsq_get", _wrap_ReconstructFromNeighbors_nsq_get, METH_VARARGS, NULL},
77387 { (char *)"ReconstructFromNeighbors_code_size_set", _wrap_ReconstructFromNeighbors_code_size_set, METH_VARARGS, NULL},
77388 { (char *)"ReconstructFromNeighbors_code_size_get", _wrap_ReconstructFromNeighbors_code_size_get, METH_VARARGS, NULL},
77389 { (char *)"ReconstructFromNeighbors_k_reorder_set", _wrap_ReconstructFromNeighbors_k_reorder_set, METH_VARARGS, NULL},
77390 { (char *)"ReconstructFromNeighbors_k_reorder_get", _wrap_ReconstructFromNeighbors_k_reorder_get, METH_VARARGS, NULL},
77391 { (char *)"ReconstructFromNeighbors_codebook_set", _wrap_ReconstructFromNeighbors_codebook_set, METH_VARARGS, NULL},
77392 { (char *)"ReconstructFromNeighbors_codebook_get", _wrap_ReconstructFromNeighbors_codebook_get, METH_VARARGS, NULL},
77393 { (char *)"ReconstructFromNeighbors_codes_set", _wrap_ReconstructFromNeighbors_codes_set, METH_VARARGS, NULL},
77394 { (char *)"ReconstructFromNeighbors_codes_get", _wrap_ReconstructFromNeighbors_codes_get, METH_VARARGS, NULL},
77395 { (char *)"ReconstructFromNeighbors_ntotal_set", _wrap_ReconstructFromNeighbors_ntotal_set, METH_VARARGS, NULL},
77396 { (char *)"ReconstructFromNeighbors_ntotal_get", _wrap_ReconstructFromNeighbors_ntotal_get, METH_VARARGS, NULL},
77397 { (char *)"ReconstructFromNeighbors_d_set", _wrap_ReconstructFromNeighbors_d_set, METH_VARARGS, NULL},
77398 { (char *)"ReconstructFromNeighbors_d_get", _wrap_ReconstructFromNeighbors_d_get, METH_VARARGS, NULL},
77399 { (char *)"ReconstructFromNeighbors_dsub_set", _wrap_ReconstructFromNeighbors_dsub_set, METH_VARARGS, NULL},
77400 { (char *)"ReconstructFromNeighbors_dsub_get", _wrap_ReconstructFromNeighbors_dsub_get, METH_VARARGS, NULL},
77401 { (char *)"new_ReconstructFromNeighbors", _wrap_new_ReconstructFromNeighbors, METH_VARARGS, NULL},
77402 { (char *)"ReconstructFromNeighbors_add_codes", _wrap_ReconstructFromNeighbors_add_codes, METH_VARARGS, NULL},
77403 { (char *)"ReconstructFromNeighbors_compute_distances", _wrap_ReconstructFromNeighbors_compute_distances, METH_VARARGS, NULL},
77404 { (char *)"ReconstructFromNeighbors_estimate_code", _wrap_ReconstructFromNeighbors_estimate_code, METH_VARARGS, NULL},
77405 { (char *)"ReconstructFromNeighbors_reconstruct", _wrap_ReconstructFromNeighbors_reconstruct, METH_VARARGS, NULL},
77406 { (char *)"ReconstructFromNeighbors_reconstruct_n", _wrap_ReconstructFromNeighbors_reconstruct_n, METH_VARARGS, NULL},
77407 { (char *)"ReconstructFromNeighbors_get_neighbor_table", _wrap_ReconstructFromNeighbors_get_neighbor_table, METH_VARARGS, NULL},
77408 { (char *)"delete_ReconstructFromNeighbors", _wrap_delete_ReconstructFromNeighbors, METH_VARARGS, NULL},
77409 { (char *)"ReconstructFromNeighbors_swigregister", ReconstructFromNeighbors_swigregister, METH_VARARGS, NULL},
77410 { (char *)"IndexHNSW_hnsw_set", _wrap_IndexHNSW_hnsw_set, METH_VARARGS, NULL},
77411 { (char *)"IndexHNSW_hnsw_get", _wrap_IndexHNSW_hnsw_get, METH_VARARGS, NULL},
77412 { (char *)"IndexHNSW_own_fields_set", _wrap_IndexHNSW_own_fields_set, METH_VARARGS, NULL},
77413 { (char *)"IndexHNSW_own_fields_get", _wrap_IndexHNSW_own_fields_get, METH_VARARGS, NULL},
77414 { (char *)"IndexHNSW_storage_set", _wrap_IndexHNSW_storage_set, METH_VARARGS, NULL},
77415 { (char *)"IndexHNSW_storage_get", _wrap_IndexHNSW_storage_get, METH_VARARGS, NULL},
77416 { (char *)"IndexHNSW_reconstruct_from_neighbors_set", _wrap_IndexHNSW_reconstruct_from_neighbors_set, METH_VARARGS, NULL},
77417 { (char *)"IndexHNSW_reconstruct_from_neighbors_get", _wrap_IndexHNSW_reconstruct_from_neighbors_get, METH_VARARGS, NULL},
77418 { (char *)"delete_IndexHNSW", _wrap_delete_IndexHNSW, METH_VARARGS, NULL},
77419 { (char *)"IndexHNSW_get_distance_computer", _wrap_IndexHNSW_get_distance_computer, METH_VARARGS, NULL},
77420 { (char *)"IndexHNSW_add", _wrap_IndexHNSW_add, METH_VARARGS, NULL},
77421 { (char *)"IndexHNSW_train", _wrap_IndexHNSW_train, METH_VARARGS, NULL},
77422 { (char *)"IndexHNSW_search", _wrap_IndexHNSW_search, METH_VARARGS, NULL},
77423 { (char *)"IndexHNSW_reconstruct", _wrap_IndexHNSW_reconstruct, METH_VARARGS, NULL},
77424 { (char *)"IndexHNSW_reset", _wrap_IndexHNSW_reset, METH_VARARGS, NULL},
77425 { (char *)"IndexHNSW_shrink_level_0_neighbors", _wrap_IndexHNSW_shrink_level_0_neighbors, METH_VARARGS, NULL},
77426 { (char *)"IndexHNSW_search_level_0", _wrap_IndexHNSW_search_level_0, METH_VARARGS, NULL},
77427 { (char *)"IndexHNSW_init_level_0_from_knngraph", _wrap_IndexHNSW_init_level_0_from_knngraph, METH_VARARGS, NULL},
77428 { (char *)"IndexHNSW_init_level_0_from_entry_points", _wrap_IndexHNSW_init_level_0_from_entry_points, METH_VARARGS, NULL},
77429 { (char *)"IndexHNSW_reorder_links", _wrap_IndexHNSW_reorder_links, METH_VARARGS, NULL},
77430 { (char *)"IndexHNSW_link_singletons", _wrap_IndexHNSW_link_singletons, METH_VARARGS, NULL},
77431 { (char *)"IndexHNSW_swigregister", IndexHNSW_swigregister, METH_VARARGS, NULL},
77432 { (char *)"new_IndexHNSWFlat", _wrap_new_IndexHNSWFlat, METH_VARARGS, NULL},
77433 { (char *)"IndexHNSWFlat_get_distance_computer", _wrap_IndexHNSWFlat_get_distance_computer, METH_VARARGS, NULL},
77434 { (char *)"delete_IndexHNSWFlat", _wrap_delete_IndexHNSWFlat, METH_VARARGS, NULL},
77435 { (char *)"IndexHNSWFlat_swigregister", IndexHNSWFlat_swigregister, METH_VARARGS, NULL},
77436 { (char *)"new_IndexHNSWPQ", _wrap_new_IndexHNSWPQ, METH_VARARGS, NULL},
77437 { (char *)"IndexHNSWPQ_train", _wrap_IndexHNSWPQ_train, METH_VARARGS, NULL},
77438 { (char *)"IndexHNSWPQ_get_distance_computer", _wrap_IndexHNSWPQ_get_distance_computer, METH_VARARGS, NULL},
77439 { (char *)"delete_IndexHNSWPQ", _wrap_delete_IndexHNSWPQ, METH_VARARGS, NULL},
77440 { (char *)"IndexHNSWPQ_swigregister", IndexHNSWPQ_swigregister, METH_VARARGS, NULL},
77441 { (char *)"new_IndexHNSWSQ", _wrap_new_IndexHNSWSQ, METH_VARARGS, NULL},
77442 { (char *)"IndexHNSWSQ_get_distance_computer", _wrap_IndexHNSWSQ_get_distance_computer, METH_VARARGS, NULL},
77443 { (char *)"delete_IndexHNSWSQ", _wrap_delete_IndexHNSWSQ, METH_VARARGS, NULL},
77444 { (char *)"IndexHNSWSQ_swigregister", IndexHNSWSQ_swigregister, METH_VARARGS, NULL},
77445 { (char *)"new_IndexHNSW2Level", _wrap_new_IndexHNSW2Level, METH_VARARGS, NULL},
77446 { (char *)"IndexHNSW2Level_get_distance_computer", _wrap_IndexHNSW2Level_get_distance_computer, METH_VARARGS, NULL},
77447 { (char *)"IndexHNSW2Level_flip_to_ivf", _wrap_IndexHNSW2Level_flip_to_ivf, METH_VARARGS, NULL},
77448 { (char *)"IndexHNSW2Level_search", _wrap_IndexHNSW2Level_search, METH_VARARGS, NULL},
77449 { (char *)"delete_IndexHNSW2Level", _wrap_delete_IndexHNSW2Level, METH_VARARGS, NULL},
77450 { (char *)"IndexHNSW2Level_swigregister", IndexHNSW2Level_swigregister, METH_VARARGS, NULL},
77451 { (char *)"IndexIVFFlat_add_core", _wrap_IndexIVFFlat_add_core, METH_VARARGS, NULL},
77452 { (char *)"IndexIVFFlat_add_with_ids", _wrap_IndexIVFFlat_add_with_ids, METH_VARARGS, NULL},
77453 { (char *)"IndexIVFFlat_encode_vectors", _wrap_IndexIVFFlat_encode_vectors, METH_VARARGS, NULL},
77454 { (char *)"IndexIVFFlat_get_InvertedListScanner", _wrap_IndexIVFFlat_get_InvertedListScanner, METH_VARARGS, NULL},
77455 { (char *)"IndexIVFFlat_range_search", _wrap_IndexIVFFlat_range_search, METH_VARARGS, NULL},
77456 { (char *)"IndexIVFFlat_update_vectors", _wrap_IndexIVFFlat_update_vectors, METH_VARARGS, NULL},
77457 { (char *)"IndexIVFFlat_reconstruct_from_offset", _wrap_IndexIVFFlat_reconstruct_from_offset, METH_VARARGS, NULL},
77458 { (char *)"new_IndexIVFFlat", _wrap_new_IndexIVFFlat, METH_VARARGS, NULL},
77459 { (char *)"delete_IndexIVFFlat", _wrap_delete_IndexIVFFlat, METH_VARARGS, NULL},
77460 { (char *)"IndexIVFFlat_swigregister", IndexIVFFlat_swigregister, METH_VARARGS, NULL},
77461 { (char *)"IndexIVFFlatDedup_instances_set", _wrap_IndexIVFFlatDedup_instances_set, METH_VARARGS, NULL},
77462 { (char *)"IndexIVFFlatDedup_instances_get", _wrap_IndexIVFFlatDedup_instances_get, METH_VARARGS, NULL},
77463 { (char *)"IndexIVFFlatDedup_train", _wrap_IndexIVFFlatDedup_train, METH_VARARGS, NULL},
77464 { (char *)"IndexIVFFlatDedup_add_with_ids", _wrap_IndexIVFFlatDedup_add_with_ids, METH_VARARGS, NULL},
77465 { (char *)"IndexIVFFlatDedup_search_preassigned", _wrap_IndexIVFFlatDedup_search_preassigned, METH_VARARGS, NULL},
77466 { (char *)"IndexIVFFlatDedup_remove_ids", _wrap_IndexIVFFlatDedup_remove_ids, METH_VARARGS, NULL},
77467 { (char *)"IndexIVFFlatDedup_range_search", _wrap_IndexIVFFlatDedup_range_search, METH_VARARGS, NULL},
77468 { (char *)"IndexIVFFlatDedup_update_vectors", _wrap_IndexIVFFlatDedup_update_vectors, METH_VARARGS, NULL},
77469 { (char *)"IndexIVFFlatDedup_reconstruct_from_offset", _wrap_IndexIVFFlatDedup_reconstruct_from_offset, METH_VARARGS, NULL},
77470 { (char *)"new_IndexIVFFlatDedup", _wrap_new_IndexIVFFlatDedup, METH_VARARGS, NULL},
77471 { (char *)"delete_IndexIVFFlatDedup", _wrap_delete_IndexIVFFlatDedup, METH_VARARGS, NULL},
77472 { (char *)"IndexIVFFlatDedup_swigregister", IndexIVFFlatDedup_swigregister, METH_VARARGS, NULL},
77473 { (char *)"OnDiskInvertedLists_lists_set", _wrap_OnDiskInvertedLists_lists_set, METH_VARARGS, NULL},
77474 { (char *)"OnDiskInvertedLists_lists_get", _wrap_OnDiskInvertedLists_lists_get, METH_VARARGS, NULL},
77475 { (char *)"OnDiskInvertedLists_slots_set", _wrap_OnDiskInvertedLists_slots_set, METH_VARARGS, NULL},
77476 { (char *)"OnDiskInvertedLists_slots_get", _wrap_OnDiskInvertedLists_slots_get, METH_VARARGS, NULL},
77477 { (char *)"OnDiskInvertedLists_filename_set", _wrap_OnDiskInvertedLists_filename_set, METH_VARARGS, NULL},
77478 { (char *)"OnDiskInvertedLists_filename_get", _wrap_OnDiskInvertedLists_filename_get, METH_VARARGS, NULL},
77479 { (char *)"OnDiskInvertedLists_totsize_set", _wrap_OnDiskInvertedLists_totsize_set, METH_VARARGS, NULL},
77480 { (char *)"OnDiskInvertedLists_totsize_get", _wrap_OnDiskInvertedLists_totsize_get, METH_VARARGS, NULL},
77481 { (char *)"OnDiskInvertedLists_ptr_set", _wrap_OnDiskInvertedLists_ptr_set, METH_VARARGS, NULL},
77482 { (char *)"OnDiskInvertedLists_ptr_get", _wrap_OnDiskInvertedLists_ptr_get, METH_VARARGS, NULL},
77483 { (char *)"OnDiskInvertedLists_read_only_set", _wrap_OnDiskInvertedLists_read_only_set, METH_VARARGS, NULL},
77484 { (char *)"OnDiskInvertedLists_read_only_get", _wrap_OnDiskInvertedLists_read_only_get, METH_VARARGS, NULL},
77485 { (char *)"OnDiskInvertedLists_list_size", _wrap_OnDiskInvertedLists_list_size, METH_VARARGS, NULL},
77486 { (char *)"OnDiskInvertedLists_get_codes", _wrap_OnDiskInvertedLists_get_codes, METH_VARARGS, NULL},
77487 { (char *)"OnDiskInvertedLists_get_ids", _wrap_OnDiskInvertedLists_get_ids, METH_VARARGS, NULL},
77488 { (char *)"OnDiskInvertedLists_add_entries", _wrap_OnDiskInvertedLists_add_entries, METH_VARARGS, NULL},
77489 { (char *)"OnDiskInvertedLists_update_entries", _wrap_OnDiskInvertedLists_update_entries, METH_VARARGS, NULL},
77490 { (char *)"OnDiskInvertedLists_resize", _wrap_OnDiskInvertedLists_resize, METH_VARARGS, NULL},
77491 { (char *)"OnDiskInvertedLists_merge_from", _wrap_OnDiskInvertedLists_merge_from, METH_VARARGS, NULL},
77492 { (char *)"OnDiskInvertedLists_prefetch_lists", _wrap_OnDiskInvertedLists_prefetch_lists, METH_VARARGS, NULL},
77493 { (char *)"delete_OnDiskInvertedLists", _wrap_delete_OnDiskInvertedLists, METH_VARARGS, NULL},
77494 { (char *)"OnDiskInvertedLists_locks_set", _wrap_OnDiskInvertedLists_locks_set, METH_VARARGS, NULL},
77495 { (char *)"OnDiskInvertedLists_locks_get", _wrap_OnDiskInvertedLists_locks_get, METH_VARARGS, NULL},
77496 { (char *)"OnDiskInvertedLists_pf_set", _wrap_OnDiskInvertedLists_pf_set, METH_VARARGS, NULL},
77497 { (char *)"OnDiskInvertedLists_pf_get", _wrap_OnDiskInvertedLists_pf_get, METH_VARARGS, NULL},
77498 { (char *)"OnDiskInvertedLists_do_mmap", _wrap_OnDiskInvertedLists_do_mmap, METH_VARARGS, NULL},
77499 { (char *)"OnDiskInvertedLists_update_totsize", _wrap_OnDiskInvertedLists_update_totsize, METH_VARARGS, NULL},
77500 { (char *)"OnDiskInvertedLists_resize_locked", _wrap_OnDiskInvertedLists_resize_locked, METH_VARARGS, NULL},
77501 { (char *)"OnDiskInvertedLists_allocate_slot", _wrap_OnDiskInvertedLists_allocate_slot, METH_VARARGS, NULL},
77502 { (char *)"OnDiskInvertedLists_free_slot", _wrap_OnDiskInvertedLists_free_slot, METH_VARARGS, NULL},
77503 { (char *)"new_OnDiskInvertedLists", _wrap_new_OnDiskInvertedLists, METH_VARARGS, NULL},
77504 { (char *)"OnDiskInvertedLists_swigregister", OnDiskInvertedLists_swigregister, METH_VARARGS, NULL},
77505 { (char *)"IVFPQSearchParameters_scan_table_threshold_set", _wrap_IVFPQSearchParameters_scan_table_threshold_set, METH_VARARGS, NULL},
77506 { (char *)"IVFPQSearchParameters_scan_table_threshold_get", _wrap_IVFPQSearchParameters_scan_table_threshold_get, METH_VARARGS, NULL},
77507 { (char *)"IVFPQSearchParameters_polysemous_ht_set", _wrap_IVFPQSearchParameters_polysemous_ht_set, METH_VARARGS, NULL},
77508 { (char *)"IVFPQSearchParameters_polysemous_ht_get", _wrap_IVFPQSearchParameters_polysemous_ht_get, METH_VARARGS, NULL},
77509 { (char *)"delete_IVFPQSearchParameters", _wrap_delete_IVFPQSearchParameters, METH_VARARGS, NULL},
77510 { (char *)"new_IVFPQSearchParameters", _wrap_new_IVFPQSearchParameters, METH_VARARGS, NULL},
77511 { (char *)"IVFPQSearchParameters_swigregister", IVFPQSearchParameters_swigregister, METH_VARARGS, NULL},
77512 { (char *)"IndexIVFPQ_by_residual_set", _wrap_IndexIVFPQ_by_residual_set, METH_VARARGS, NULL},
77513 { (char *)"IndexIVFPQ_by_residual_get", _wrap_IndexIVFPQ_by_residual_get, METH_VARARGS, NULL},
77514 { (char *)"IndexIVFPQ_pq_set", _wrap_IndexIVFPQ_pq_set, METH_VARARGS, NULL},
77515 { (char *)"IndexIVFPQ_pq_get", _wrap_IndexIVFPQ_pq_get, METH_VARARGS, NULL},
77516 { (char *)"IndexIVFPQ_do_polysemous_training_set", _wrap_IndexIVFPQ_do_polysemous_training_set, METH_VARARGS, NULL},
77517 { (char *)"IndexIVFPQ_do_polysemous_training_get", _wrap_IndexIVFPQ_do_polysemous_training_get, METH_VARARGS, NULL},
77518 { (char *)"IndexIVFPQ_polysemous_training_set", _wrap_IndexIVFPQ_polysemous_training_set, METH_VARARGS, NULL},
77519 { (char *)"IndexIVFPQ_polysemous_training_get", _wrap_IndexIVFPQ_polysemous_training_get, METH_VARARGS, NULL},
77520 { (char *)"IndexIVFPQ_scan_table_threshold_set", _wrap_IndexIVFPQ_scan_table_threshold_set, METH_VARARGS, NULL},
77521 { (char *)"IndexIVFPQ_scan_table_threshold_get", _wrap_IndexIVFPQ_scan_table_threshold_get, METH_VARARGS, NULL},
77522 { (char *)"IndexIVFPQ_polysemous_ht_set", _wrap_IndexIVFPQ_polysemous_ht_set, METH_VARARGS, NULL},
77523 { (char *)"IndexIVFPQ_polysemous_ht_get", _wrap_IndexIVFPQ_polysemous_ht_get, METH_VARARGS, NULL},
77524 { (char *)"IndexIVFPQ_use_precomputed_table_set", _wrap_IndexIVFPQ_use_precomputed_table_set, METH_VARARGS, NULL},
77525 { (char *)"IndexIVFPQ_use_precomputed_table_get", _wrap_IndexIVFPQ_use_precomputed_table_get, METH_VARARGS, NULL},
77526 { (char *)"IndexIVFPQ_precomputed_table_max_bytes_get", _wrap_IndexIVFPQ_precomputed_table_max_bytes_get, METH_VARARGS, NULL},
77527 { (char *)"IndexIVFPQ_precomputed_table_max_bytes_set", _wrap_IndexIVFPQ_precomputed_table_max_bytes_set, METH_VARARGS, NULL},
77528 { (char *)"IndexIVFPQ_precomputed_table_set", _wrap_IndexIVFPQ_precomputed_table_set, METH_VARARGS, NULL},
77529 { (char *)"IndexIVFPQ_precomputed_table_get", _wrap_IndexIVFPQ_precomputed_table_get, METH_VARARGS, NULL},
77530 { (char *)"IndexIVFPQ_add_with_ids", _wrap_IndexIVFPQ_add_with_ids, METH_VARARGS, NULL},
77531 { (char *)"IndexIVFPQ_encode_vectors", _wrap_IndexIVFPQ_encode_vectors, METH_VARARGS, NULL},
77532 { (char *)"IndexIVFPQ_add_core_o", _wrap_IndexIVFPQ_add_core_o, METH_VARARGS, NULL},
77533 { (char *)"IndexIVFPQ_train_residual", _wrap_IndexIVFPQ_train_residual, METH_VARARGS, NULL},
77534 { (char *)"IndexIVFPQ_train_residual_o", _wrap_IndexIVFPQ_train_residual_o, METH_VARARGS, NULL},
77535 { (char *)"IndexIVFPQ_reconstruct_from_offset", _wrap_IndexIVFPQ_reconstruct_from_offset, METH_VARARGS, NULL},
77536 { (char *)"IndexIVFPQ_find_duplicates", _wrap_IndexIVFPQ_find_duplicates, METH_VARARGS, NULL},
77537 { (char *)"IndexIVFPQ_encode", _wrap_IndexIVFPQ_encode, METH_VARARGS, NULL},
77538 { (char *)"IndexIVFPQ_encode_multiple", _wrap_IndexIVFPQ_encode_multiple, METH_VARARGS, NULL},
77539 { (char *)"IndexIVFPQ_decode_multiple", _wrap_IndexIVFPQ_decode_multiple, METH_VARARGS, NULL},
77540 { (char *)"IndexIVFPQ_get_InvertedListScanner", _wrap_IndexIVFPQ_get_InvertedListScanner, METH_VARARGS, NULL},
77541 { (char *)"IndexIVFPQ_precompute_table", _wrap_IndexIVFPQ_precompute_table, METH_VARARGS, NULL},
77542 { (char *)"new_IndexIVFPQ", _wrap_new_IndexIVFPQ, METH_VARARGS, NULL},
77543 { (char *)"delete_IndexIVFPQ", _wrap_delete_IndexIVFPQ, METH_VARARGS, NULL},
77544 { (char *)"IndexIVFPQ_swigregister", IndexIVFPQ_swigregister, METH_VARARGS, NULL},
77545 { (char *)"IndexIVFPQStats_nrefine_set", _wrap_IndexIVFPQStats_nrefine_set, METH_VARARGS, NULL},
77546 { (char *)"IndexIVFPQStats_nrefine_get", _wrap_IndexIVFPQStats_nrefine_get, METH_VARARGS, NULL},
77547 { (char *)"IndexIVFPQStats_n_hamming_pass_set", _wrap_IndexIVFPQStats_n_hamming_pass_set, METH_VARARGS, NULL},
77548 { (char *)"IndexIVFPQStats_n_hamming_pass_get", _wrap_IndexIVFPQStats_n_hamming_pass_get, METH_VARARGS, NULL},
77549 { (char *)"IndexIVFPQStats_search_cycles_set", _wrap_IndexIVFPQStats_search_cycles_set, METH_VARARGS, NULL},
77550 { (char *)"IndexIVFPQStats_search_cycles_get", _wrap_IndexIVFPQStats_search_cycles_get, METH_VARARGS, NULL},
77551 { (char *)"IndexIVFPQStats_refine_cycles_set", _wrap_IndexIVFPQStats_refine_cycles_set, METH_VARARGS, NULL},
77552 { (char *)"IndexIVFPQStats_refine_cycles_get", _wrap_IndexIVFPQStats_refine_cycles_get, METH_VARARGS, NULL},
77553 { (char *)"new_IndexIVFPQStats", _wrap_new_IndexIVFPQStats, METH_VARARGS, NULL},
77554 { (char *)"IndexIVFPQStats_reset", _wrap_IndexIVFPQStats_reset, METH_VARARGS, NULL},
77555 { (char *)"delete_IndexIVFPQStats", _wrap_delete_IndexIVFPQStats, METH_VARARGS, NULL},
77556 { (char *)"IndexIVFPQStats_swigregister", IndexIVFPQStats_swigregister, METH_VARARGS, NULL},
77557 { (char *)"IndexIVFPQR_refine_pq_set", _wrap_IndexIVFPQR_refine_pq_set, METH_VARARGS, NULL},
77558 { (char *)"IndexIVFPQR_refine_pq_get", _wrap_IndexIVFPQR_refine_pq_get, METH_VARARGS, NULL},
77559 { (char *)"IndexIVFPQR_refine_codes_set", _wrap_IndexIVFPQR_refine_codes_set, METH_VARARGS, NULL},
77560 { (char *)"IndexIVFPQR_refine_codes_get", _wrap_IndexIVFPQR_refine_codes_get, METH_VARARGS, NULL},
77561 { (char *)"IndexIVFPQR_k_factor_set", _wrap_IndexIVFPQR_k_factor_set, METH_VARARGS, NULL},
77562 { (char *)"IndexIVFPQR_k_factor_get", _wrap_IndexIVFPQR_k_factor_get, METH_VARARGS, NULL},
77563 { (char *)"IndexIVFPQR_reset", _wrap_IndexIVFPQR_reset, METH_VARARGS, NULL},
77564 { (char *)"IndexIVFPQR_remove_ids", _wrap_IndexIVFPQR_remove_ids, METH_VARARGS, NULL},
77565 { (char *)"IndexIVFPQR_train_residual", _wrap_IndexIVFPQR_train_residual, METH_VARARGS, NULL},
77566 { (char *)"IndexIVFPQR_add_with_ids", _wrap_IndexIVFPQR_add_with_ids, METH_VARARGS, NULL},
77567 { (char *)"IndexIVFPQR_add_core", _wrap_IndexIVFPQR_add_core, METH_VARARGS, NULL},
77568 { (char *)"IndexIVFPQR_reconstruct_from_offset", _wrap_IndexIVFPQR_reconstruct_from_offset, METH_VARARGS, NULL},
77569 { (char *)"IndexIVFPQR_merge_from", _wrap_IndexIVFPQR_merge_from, METH_VARARGS, NULL},
77570 { (char *)"IndexIVFPQR_search_preassigned", _wrap_IndexIVFPQR_search_preassigned, METH_VARARGS, NULL},
77571 { (char *)"new_IndexIVFPQR", _wrap_new_IndexIVFPQR, METH_VARARGS, NULL},
77572 { (char *)"delete_IndexIVFPQR", _wrap_delete_IndexIVFPQR, METH_VARARGS, NULL},
77573 { (char *)"IndexIVFPQR_swigregister", IndexIVFPQR_swigregister, METH_VARARGS, NULL},
77574 { (char *)"Index2Layer_q1_set", _wrap_Index2Layer_q1_set, METH_VARARGS, NULL},
77575 { (char *)"Index2Layer_q1_get", _wrap_Index2Layer_q1_get, METH_VARARGS, NULL},
77576 { (char *)"Index2Layer_pq_set", _wrap_Index2Layer_pq_set, METH_VARARGS, NULL},
77577 { (char *)"Index2Layer_pq_get", _wrap_Index2Layer_pq_get, METH_VARARGS, NULL},
77578 { (char *)"Index2Layer_codes_set", _wrap_Index2Layer_codes_set, METH_VARARGS, NULL},
77579 { (char *)"Index2Layer_codes_get", _wrap_Index2Layer_codes_get, METH_VARARGS, NULL},
77580 { (char *)"Index2Layer_code_size_1_set", _wrap_Index2Layer_code_size_1_set, METH_VARARGS, NULL},
77581 { (char *)"Index2Layer_code_size_1_get", _wrap_Index2Layer_code_size_1_get, METH_VARARGS, NULL},
77582 { (char *)"Index2Layer_code_size_2_set", _wrap_Index2Layer_code_size_2_set, METH_VARARGS, NULL},
77583 { (char *)"Index2Layer_code_size_2_get", _wrap_Index2Layer_code_size_2_get, METH_VARARGS, NULL},
77584 { (char *)"Index2Layer_code_size_set", _wrap_Index2Layer_code_size_set, METH_VARARGS, NULL},
77585 { (char *)"Index2Layer_code_size_get", _wrap_Index2Layer_code_size_get, METH_VARARGS, NULL},
77586 { (char *)"new_Index2Layer", _wrap_new_Index2Layer, METH_VARARGS, NULL},
77587 { (char *)"delete_Index2Layer", _wrap_delete_Index2Layer, METH_VARARGS, NULL},
77588 { (char *)"Index2Layer_train", _wrap_Index2Layer_train, METH_VARARGS, NULL},
77589 { (char *)"Index2Layer_add", _wrap_Index2Layer_add, METH_VARARGS, NULL},
77590 { (char *)"Index2Layer_search", _wrap_Index2Layer_search, METH_VARARGS, NULL},
77591 { (char *)"Index2Layer_reconstruct_n", _wrap_Index2Layer_reconstruct_n, METH_VARARGS, NULL},
77592 { (char *)"Index2Layer_reconstruct", _wrap_Index2Layer_reconstruct, METH_VARARGS, NULL},
77593 { (char *)"Index2Layer_reset", _wrap_Index2Layer_reset, METH_VARARGS, NULL},
77594 { (char *)"Index2Layer_transfer_to_IVFPQ", _wrap_Index2Layer_transfer_to_IVFPQ, METH_VARARGS, NULL},
77595 { (char *)"Index2Layer_swigregister", Index2Layer_swigregister, METH_VARARGS, NULL},
77596 { (char *)"IndexBinary_d_set", _wrap_IndexBinary_d_set, METH_VARARGS, NULL},
77597 { (char *)"IndexBinary_d_get", _wrap_IndexBinary_d_get, METH_VARARGS, NULL},
77598 { (char *)"IndexBinary_code_size_set", _wrap_IndexBinary_code_size_set, METH_VARARGS, NULL},
77599 { (char *)"IndexBinary_code_size_get", _wrap_IndexBinary_code_size_get, METH_VARARGS, NULL},
77600 { (char *)"IndexBinary_ntotal_set", _wrap_IndexBinary_ntotal_set, METH_VARARGS, NULL},
77601 { (char *)"IndexBinary_ntotal_get", _wrap_IndexBinary_ntotal_get, METH_VARARGS, NULL},
77602 { (char *)"IndexBinary_verbose_set", _wrap_IndexBinary_verbose_set, METH_VARARGS, NULL},
77603 { (char *)"IndexBinary_verbose_get", _wrap_IndexBinary_verbose_get, METH_VARARGS, NULL},
77604 { (char *)"IndexBinary_is_trained_set", _wrap_IndexBinary_is_trained_set, METH_VARARGS, NULL},
77605 { (char *)"IndexBinary_is_trained_get", _wrap_IndexBinary_is_trained_get, METH_VARARGS, NULL},
77606 { (char *)"IndexBinary_metric_type_set", _wrap_IndexBinary_metric_type_set, METH_VARARGS, NULL},
77607 { (char *)"IndexBinary_metric_type_get", _wrap_IndexBinary_metric_type_get, METH_VARARGS, NULL},
77608 { (char *)"delete_IndexBinary", _wrap_delete_IndexBinary, METH_VARARGS, NULL},
77609 { (char *)"IndexBinary_train", _wrap_IndexBinary_train, METH_VARARGS, NULL},
77610 { (char *)"IndexBinary_add", _wrap_IndexBinary_add, METH_VARARGS, NULL},
77611 { (char *)"IndexBinary_add_with_ids", _wrap_IndexBinary_add_with_ids, METH_VARARGS, NULL},
77612 { (char *)"IndexBinary_search", _wrap_IndexBinary_search, METH_VARARGS, NULL},
77613 { (char *)"IndexBinary_range_search", _wrap_IndexBinary_range_search, METH_VARARGS, NULL},
77614 { (char *)"IndexBinary_assign", _wrap_IndexBinary_assign, METH_VARARGS, NULL},
77615 { (char *)"IndexBinary_reset", _wrap_IndexBinary_reset, METH_VARARGS, NULL},
77616 { (char *)"IndexBinary_remove_ids", _wrap_IndexBinary_remove_ids, METH_VARARGS, NULL},
77617 { (char *)"IndexBinary_reconstruct", _wrap_IndexBinary_reconstruct, METH_VARARGS, NULL},
77618 { (char *)"IndexBinary_reconstruct_n", _wrap_IndexBinary_reconstruct_n, METH_VARARGS, NULL},
77619 { (char *)"IndexBinary_search_and_reconstruct", _wrap_IndexBinary_search_and_reconstruct, METH_VARARGS, NULL},
77620 { (char *)"IndexBinary_display", _wrap_IndexBinary_display, METH_VARARGS, NULL},
77621 { (char *)"IndexBinary_swigregister", IndexBinary_swigregister, METH_VARARGS, NULL},
77622 { (char *)"IndexBinaryFlat_xb_set", _wrap_IndexBinaryFlat_xb_set, METH_VARARGS, NULL},
77623 { (char *)"IndexBinaryFlat_xb_get", _wrap_IndexBinaryFlat_xb_get, METH_VARARGS, NULL},
77624 { (char *)"IndexBinaryFlat_use_heap_set", _wrap_IndexBinaryFlat_use_heap_set, METH_VARARGS, NULL},
77625 { (char *)"IndexBinaryFlat_use_heap_get", _wrap_IndexBinaryFlat_use_heap_get, METH_VARARGS, NULL},
77626 { (char *)"IndexBinaryFlat_query_batch_size_set", _wrap_IndexBinaryFlat_query_batch_size_set, METH_VARARGS, NULL},
77627 { (char *)"IndexBinaryFlat_query_batch_size_get", _wrap_IndexBinaryFlat_query_batch_size_get, METH_VARARGS, NULL},
77628 { (char *)"IndexBinaryFlat_add", _wrap_IndexBinaryFlat_add, METH_VARARGS, NULL},
77629 { (char *)"IndexBinaryFlat_reset", _wrap_IndexBinaryFlat_reset, METH_VARARGS, NULL},
77630 { (char *)"IndexBinaryFlat_search", _wrap_IndexBinaryFlat_search, METH_VARARGS, NULL},
77631 { (char *)"IndexBinaryFlat_reconstruct", _wrap_IndexBinaryFlat_reconstruct, METH_VARARGS, NULL},
77632 { (char *)"IndexBinaryFlat_remove_ids", _wrap_IndexBinaryFlat_remove_ids, METH_VARARGS, NULL},
77633 { (char *)"new_IndexBinaryFlat", _wrap_new_IndexBinaryFlat, METH_VARARGS, NULL},
77634 { (char *)"delete_IndexBinaryFlat", _wrap_delete_IndexBinaryFlat, METH_VARARGS, NULL},
77635 { (char *)"IndexBinaryFlat_swigregister", IndexBinaryFlat_swigregister, METH_VARARGS, NULL},
77636 { (char *)"IndexBinaryIVF_invlists_set", _wrap_IndexBinaryIVF_invlists_set, METH_VARARGS, NULL},
77637 { (char *)"IndexBinaryIVF_invlists_get", _wrap_IndexBinaryIVF_invlists_get, METH_VARARGS, NULL},
77638 { (char *)"IndexBinaryIVF_own_invlists_set", _wrap_IndexBinaryIVF_own_invlists_set, METH_VARARGS, NULL},
77639 { (char *)"IndexBinaryIVF_own_invlists_get", _wrap_IndexBinaryIVF_own_invlists_get, METH_VARARGS, NULL},
77640 { (char *)"IndexBinaryIVF_nprobe_set", _wrap_IndexBinaryIVF_nprobe_set, METH_VARARGS, NULL},
77641 { (char *)"IndexBinaryIVF_nprobe_get", _wrap_IndexBinaryIVF_nprobe_get, METH_VARARGS, NULL},
77642 { (char *)"IndexBinaryIVF_max_codes_set", _wrap_IndexBinaryIVF_max_codes_set, METH_VARARGS, NULL},
77643 { (char *)"IndexBinaryIVF_max_codes_get", _wrap_IndexBinaryIVF_max_codes_get, METH_VARARGS, NULL},
77644 { (char *)"IndexBinaryIVF_use_heap_set", _wrap_IndexBinaryIVF_use_heap_set, METH_VARARGS, NULL},
77645 { (char *)"IndexBinaryIVF_use_heap_get", _wrap_IndexBinaryIVF_use_heap_get, METH_VARARGS, NULL},
77646 { (char *)"IndexBinaryIVF_maintain_direct_map_set", _wrap_IndexBinaryIVF_maintain_direct_map_set, METH_VARARGS, NULL},
77647 { (char *)"IndexBinaryIVF_maintain_direct_map_get", _wrap_IndexBinaryIVF_maintain_direct_map_get, METH_VARARGS, NULL},
77648 { (char *)"IndexBinaryIVF_direct_map_set", _wrap_IndexBinaryIVF_direct_map_set, METH_VARARGS, NULL},
77649 { (char *)"IndexBinaryIVF_direct_map_get", _wrap_IndexBinaryIVF_direct_map_get, METH_VARARGS, NULL},
77650 { (char *)"IndexBinaryIVF_quantizer_set", _wrap_IndexBinaryIVF_quantizer_set, METH_VARARGS, NULL},
77651 { (char *)"IndexBinaryIVF_quantizer_get", _wrap_IndexBinaryIVF_quantizer_get, METH_VARARGS, NULL},
77652 { (char *)"IndexBinaryIVF_nlist_set", _wrap_IndexBinaryIVF_nlist_set, METH_VARARGS, NULL},
77653 { (char *)"IndexBinaryIVF_nlist_get", _wrap_IndexBinaryIVF_nlist_get, METH_VARARGS, NULL},
77654 { (char *)"IndexBinaryIVF_own_fields_set", _wrap_IndexBinaryIVF_own_fields_set, METH_VARARGS, NULL},
77655 { (char *)"IndexBinaryIVF_own_fields_get", _wrap_IndexBinaryIVF_own_fields_get, METH_VARARGS, NULL},
77656 { (char *)"IndexBinaryIVF_cp_set", _wrap_IndexBinaryIVF_cp_set, METH_VARARGS, NULL},
77657 { (char *)"IndexBinaryIVF_cp_get", _wrap_IndexBinaryIVF_cp_get, METH_VARARGS, NULL},
77658 { (char *)"IndexBinaryIVF_clustering_index_set", _wrap_IndexBinaryIVF_clustering_index_set, METH_VARARGS, NULL},
77659 { (char *)"IndexBinaryIVF_clustering_index_get", _wrap_IndexBinaryIVF_clustering_index_get, METH_VARARGS, NULL},
77660 { (char *)"IndexBinaryIVF_train_q1", _wrap_IndexBinaryIVF_train_q1, METH_VARARGS, NULL},
77661 { (char *)"new_IndexBinaryIVF", _wrap_new_IndexBinaryIVF, METH_VARARGS, NULL},
77662 { (char *)"delete_IndexBinaryIVF", _wrap_delete_IndexBinaryIVF, METH_VARARGS, NULL},
77663 { (char *)"IndexBinaryIVF_reset", _wrap_IndexBinaryIVF_reset, METH_VARARGS, NULL},
77664 { (char *)"IndexBinaryIVF_train", _wrap_IndexBinaryIVF_train, METH_VARARGS, NULL},
77665 { (char *)"IndexBinaryIVF_add", _wrap_IndexBinaryIVF_add, METH_VARARGS, NULL},
77666 { (char *)"IndexBinaryIVF_add_with_ids", _wrap_IndexBinaryIVF_add_with_ids, METH_VARARGS, NULL},
77667 { (char *)"IndexBinaryIVF_add_core", _wrap_IndexBinaryIVF_add_core, METH_VARARGS, NULL},
77668 { (char *)"IndexBinaryIVF_search_preassigned", _wrap_IndexBinaryIVF_search_preassigned, METH_VARARGS, NULL},
77669 { (char *)"IndexBinaryIVF_get_InvertedListScanner", _wrap_IndexBinaryIVF_get_InvertedListScanner, METH_VARARGS, NULL},
77670 { (char *)"IndexBinaryIVF_search", _wrap_IndexBinaryIVF_search, METH_VARARGS, NULL},
77671 { (char *)"IndexBinaryIVF_reconstruct", _wrap_IndexBinaryIVF_reconstruct, METH_VARARGS, NULL},
77672 { (char *)"IndexBinaryIVF_reconstruct_n", _wrap_IndexBinaryIVF_reconstruct_n, METH_VARARGS, NULL},
77673 { (char *)"IndexBinaryIVF_search_and_reconstruct", _wrap_IndexBinaryIVF_search_and_reconstruct, METH_VARARGS, NULL},
77674 { (char *)"IndexBinaryIVF_reconstruct_from_offset", _wrap_IndexBinaryIVF_reconstruct_from_offset, METH_VARARGS, NULL},
77675 { (char *)"IndexBinaryIVF_remove_ids", _wrap_IndexBinaryIVF_remove_ids, METH_VARARGS, NULL},
77676 { (char *)"IndexBinaryIVF_merge_from", _wrap_IndexBinaryIVF_merge_from, METH_VARARGS, NULL},
77677 { (char *)"IndexBinaryIVF_get_list_size", _wrap_IndexBinaryIVF_get_list_size, METH_VARARGS, NULL},
77678 { (char *)"IndexBinaryIVF_make_direct_map", _wrap_IndexBinaryIVF_make_direct_map, METH_VARARGS, NULL},
77679 { (char *)"IndexBinaryIVF_imbalance_factor", _wrap_IndexBinaryIVF_imbalance_factor, METH_VARARGS, NULL},
77680 { (char *)"IndexBinaryIVF_print_stats", _wrap_IndexBinaryIVF_print_stats, METH_VARARGS, NULL},
77681 { (char *)"IndexBinaryIVF_replace_invlists", _wrap_IndexBinaryIVF_replace_invlists, METH_VARARGS, NULL},
77682 { (char *)"IndexBinaryIVF_swigregister", IndexBinaryIVF_swigregister, METH_VARARGS, NULL},
77683 { (char *)"IndexBinaryFromFloat_index_set", _wrap_IndexBinaryFromFloat_index_set, METH_VARARGS, NULL},
77684 { (char *)"IndexBinaryFromFloat_index_get", _wrap_IndexBinaryFromFloat_index_get, METH_VARARGS, NULL},
77685 { (char *)"IndexBinaryFromFloat_own_fields_set", _wrap_IndexBinaryFromFloat_own_fields_set, METH_VARARGS, NULL},
77686 { (char *)"IndexBinaryFromFloat_own_fields_get", _wrap_IndexBinaryFromFloat_own_fields_get, METH_VARARGS, NULL},
77687 { (char *)"new_IndexBinaryFromFloat", _wrap_new_IndexBinaryFromFloat, METH_VARARGS, NULL},
77688 { (char *)"delete_IndexBinaryFromFloat", _wrap_delete_IndexBinaryFromFloat, METH_VARARGS, NULL},
77689 { (char *)"IndexBinaryFromFloat_add", _wrap_IndexBinaryFromFloat_add, METH_VARARGS, NULL},
77690 { (char *)"IndexBinaryFromFloat_reset", _wrap_IndexBinaryFromFloat_reset, METH_VARARGS, NULL},
77691 { (char *)"IndexBinaryFromFloat_search", _wrap_IndexBinaryFromFloat_search, METH_VARARGS, NULL},
77692 { (char *)"IndexBinaryFromFloat_train", _wrap_IndexBinaryFromFloat_train, METH_VARARGS, NULL},
77693 { (char *)"IndexBinaryFromFloat_swigregister", IndexBinaryFromFloat_swigregister, METH_VARARGS, NULL},
77694 { (char *)"IndexBinaryHNSW_hnsw_set", _wrap_IndexBinaryHNSW_hnsw_set, METH_VARARGS, NULL},
77695 { (char *)"IndexBinaryHNSW_hnsw_get", _wrap_IndexBinaryHNSW_hnsw_get, METH_VARARGS, NULL},
77696 { (char *)"IndexBinaryHNSW_own_fields_set", _wrap_IndexBinaryHNSW_own_fields_set, METH_VARARGS, NULL},
77697 { (char *)"IndexBinaryHNSW_own_fields_get", _wrap_IndexBinaryHNSW_own_fields_get, METH_VARARGS, NULL},
77698 { (char *)"IndexBinaryHNSW_storage_set", _wrap_IndexBinaryHNSW_storage_set, METH_VARARGS, NULL},
77699 { (char *)"IndexBinaryHNSW_storage_get", _wrap_IndexBinaryHNSW_storage_get, METH_VARARGS, NULL},
77700 { (char *)"new_IndexBinaryHNSW", _wrap_new_IndexBinaryHNSW, METH_VARARGS, NULL},
77701 { (char *)"delete_IndexBinaryHNSW", _wrap_delete_IndexBinaryHNSW, METH_VARARGS, NULL},
77702 { (char *)"IndexBinaryHNSW_get_distance_computer", _wrap_IndexBinaryHNSW_get_distance_computer, METH_VARARGS, NULL},
77703 { (char *)"IndexBinaryHNSW_add", _wrap_IndexBinaryHNSW_add, METH_VARARGS, NULL},
77704 { (char *)"IndexBinaryHNSW_train", _wrap_IndexBinaryHNSW_train, METH_VARARGS, NULL},
77705 { (char *)"IndexBinaryHNSW_search", _wrap_IndexBinaryHNSW_search, METH_VARARGS, NULL},
77706 { (char *)"IndexBinaryHNSW_reconstruct", _wrap_IndexBinaryHNSW_reconstruct, METH_VARARGS, NULL},
77707 { (char *)"IndexBinaryHNSW_reset", _wrap_IndexBinaryHNSW_reset, METH_VARARGS, NULL},
77708 { (char *)"IndexBinaryHNSW_swigregister", IndexBinaryHNSW_swigregister, METH_VARARGS, NULL},
77709 { (char *)"IndexIDMap_index_set", _wrap_IndexIDMap_index_set, METH_VARARGS, NULL},
77710 { (char *)"IndexIDMap_index_get", _wrap_IndexIDMap_index_get, METH_VARARGS, NULL},
77711 { (char *)"IndexIDMap_own_fields_set", _wrap_IndexIDMap_own_fields_set, METH_VARARGS, NULL},
77712 { (char *)"IndexIDMap_own_fields_get", _wrap_IndexIDMap_own_fields_get, METH_VARARGS, NULL},
77713 { (char *)"IndexIDMap_id_map_set", _wrap_IndexIDMap_id_map_set, METH_VARARGS, NULL},
77714 { (char *)"IndexIDMap_id_map_get", _wrap_IndexIDMap_id_map_get, METH_VARARGS, NULL},
77715 { (char *)"IndexIDMap_add_with_ids", _wrap_IndexIDMap_add_with_ids, METH_VARARGS, NULL},
77716 { (char *)"IndexIDMap_add", _wrap_IndexIDMap_add, METH_VARARGS, NULL},
77717 { (char *)"IndexIDMap_search", _wrap_IndexIDMap_search, METH_VARARGS, NULL},
77718 { (char *)"IndexIDMap_train", _wrap_IndexIDMap_train, METH_VARARGS, NULL},
77719 { (char *)"IndexIDMap_reset", _wrap_IndexIDMap_reset, METH_VARARGS, NULL},
77720 { (char *)"IndexIDMap_remove_ids", _wrap_IndexIDMap_remove_ids, METH_VARARGS, NULL},
77721 { (char *)"IndexIDMap_range_search", _wrap_IndexIDMap_range_search, METH_VARARGS, NULL},
77722 { (char *)"delete_IndexIDMap", _wrap_delete_IndexIDMap, METH_VARARGS, NULL},
77723 { (char *)"new_IndexIDMap", _wrap_new_IndexIDMap, METH_VARARGS, NULL},
77724 { (char *)"IndexIDMap_swigregister", IndexIDMap_swigregister, METH_VARARGS, NULL},
77725 { (char *)"IndexIDMap2_rev_map_set", _wrap_IndexIDMap2_rev_map_set, METH_VARARGS, NULL},
77726 { (char *)"IndexIDMap2_rev_map_get", _wrap_IndexIDMap2_rev_map_get, METH_VARARGS, NULL},
77727 { (char *)"IndexIDMap2_construct_rev_map", _wrap_IndexIDMap2_construct_rev_map, METH_VARARGS, NULL},
77728 { (char *)"IndexIDMap2_add_with_ids", _wrap_IndexIDMap2_add_with_ids, METH_VARARGS, NULL},
77729 { (char *)"IndexIDMap2_remove_ids", _wrap_IndexIDMap2_remove_ids, METH_VARARGS, NULL},
77730 { (char *)"IndexIDMap2_reconstruct", _wrap_IndexIDMap2_reconstruct, METH_VARARGS, NULL},
77731 { (char *)"delete_IndexIDMap2", _wrap_delete_IndexIDMap2, METH_VARARGS, NULL},
77732 { (char *)"new_IndexIDMap2", _wrap_new_IndexIDMap2, METH_VARARGS, NULL},
77733 { (char *)"IndexIDMap2_swigregister", IndexIDMap2_swigregister, METH_VARARGS, NULL},
77734 { (char *)"IndexShards_shard_indexes_set", _wrap_IndexShards_shard_indexes_set, METH_VARARGS, NULL},
77735 { (char *)"IndexShards_shard_indexes_get", _wrap_IndexShards_shard_indexes_get, METH_VARARGS, NULL},
77736 { (char *)"IndexShards_own_fields_set", _wrap_IndexShards_own_fields_set, METH_VARARGS, NULL},
77737 { (char *)"IndexShards_own_fields_get", _wrap_IndexShards_own_fields_get, METH_VARARGS, NULL},
77738 { (char *)"IndexShards_threaded_set", _wrap_IndexShards_threaded_set, METH_VARARGS, NULL},
77739 { (char *)"IndexShards_threaded_get", _wrap_IndexShards_threaded_get, METH_VARARGS, NULL},
77740 { (char *)"IndexShards_successive_ids_set", _wrap_IndexShards_successive_ids_set, METH_VARARGS, NULL},
77741 { (char *)"IndexShards_successive_ids_get", _wrap_IndexShards_successive_ids_get, METH_VARARGS, NULL},
77742 { (char *)"new_IndexShards", _wrap_new_IndexShards, METH_VARARGS, NULL},
77743 { (char *)"IndexShards_add_shard", _wrap_IndexShards_add_shard, METH_VARARGS, NULL},
77744 { (char *)"IndexShards_sync_with_shard_indexes", _wrap_IndexShards_sync_with_shard_indexes, METH_VARARGS, NULL},
77745 { (char *)"IndexShards_at", _wrap_IndexShards_at, METH_VARARGS, NULL},
77746 { (char *)"IndexShards_add", _wrap_IndexShards_add, METH_VARARGS, NULL},
77747 { (char *)"IndexShards_add_with_ids", _wrap_IndexShards_add_with_ids, METH_VARARGS, NULL},
77748 { (char *)"IndexShards_search", _wrap_IndexShards_search, METH_VARARGS, NULL},
77749 { (char *)"IndexShards_train", _wrap_IndexShards_train, METH_VARARGS, NULL},
77750 { (char *)"IndexShards_reset", _wrap_IndexShards_reset, METH_VARARGS, NULL},
77751 { (char *)"delete_IndexShards", _wrap_delete_IndexShards, METH_VARARGS, NULL},
77752 { (char *)"IndexShards_swigregister", IndexShards_swigregister, METH_VARARGS, NULL},
77753 { (char *)"IndexSplitVectors_own_fields_set", _wrap_IndexSplitVectors_own_fields_set, METH_VARARGS, NULL},
77754 { (char *)"IndexSplitVectors_own_fields_get", _wrap_IndexSplitVectors_own_fields_get, METH_VARARGS, NULL},
77755 { (char *)"IndexSplitVectors_threaded_set", _wrap_IndexSplitVectors_threaded_set, METH_VARARGS, NULL},
77756 { (char *)"IndexSplitVectors_threaded_get", _wrap_IndexSplitVectors_threaded_get, METH_VARARGS, NULL},
77757 { (char *)"IndexSplitVectors_sub_indexes_set", _wrap_IndexSplitVectors_sub_indexes_set, METH_VARARGS, NULL},
77758 { (char *)"IndexSplitVectors_sub_indexes_get", _wrap_IndexSplitVectors_sub_indexes_get, METH_VARARGS, NULL},
77759 { (char *)"IndexSplitVectors_sum_d_set", _wrap_IndexSplitVectors_sum_d_set, METH_VARARGS, NULL},
77760 { (char *)"IndexSplitVectors_sum_d_get", _wrap_IndexSplitVectors_sum_d_get, METH_VARARGS, NULL},
77761 { (char *)"new_IndexSplitVectors", _wrap_new_IndexSplitVectors, METH_VARARGS, NULL},
77762 { (char *)"IndexSplitVectors_add_sub_index", _wrap_IndexSplitVectors_add_sub_index, METH_VARARGS, NULL},
77763 { (char *)"IndexSplitVectors_sync_with_sub_indexes", _wrap_IndexSplitVectors_sync_with_sub_indexes, METH_VARARGS, NULL},
77764 { (char *)"IndexSplitVectors_add", _wrap_IndexSplitVectors_add, METH_VARARGS, NULL},
77765 { (char *)"IndexSplitVectors_search", _wrap_IndexSplitVectors_search, METH_VARARGS, NULL},
77766 { (char *)"IndexSplitVectors_train", _wrap_IndexSplitVectors_train, METH_VARARGS, NULL},
77767 { (char *)"IndexSplitVectors_reset", _wrap_IndexSplitVectors_reset, METH_VARARGS, NULL},
77768 { (char *)"delete_IndexSplitVectors", _wrap_delete_IndexSplitVectors, METH_VARARGS, NULL},
77769 { (char *)"IndexSplitVectors_swigregister", IndexSplitVectors_swigregister, METH_VARARGS, NULL},
77770 { (char *)"downcast_index", _wrap_downcast_index, METH_VARARGS, NULL},
77771 { (char *)"downcast_VectorTransform", _wrap_downcast_VectorTransform, METH_VARARGS, NULL},
77772 { (char *)"downcast_IndexBinary", _wrap_downcast_IndexBinary, METH_VARARGS, NULL},
77773 { (char *)"write_index", _wrap_write_index, METH_VARARGS, NULL},
77774 { (char *)"write_index_binary", _wrap_write_index_binary, METH_VARARGS, NULL},
77775 { (char *)"read_index", _wrap_read_index, METH_VARARGS, NULL},
77776 { (char *)"read_index_binary", _wrap_read_index_binary, METH_VARARGS, NULL},
77777 { (char *)"write_VectorTransform", _wrap_write_VectorTransform, METH_VARARGS, NULL},
77778 { (char *)"read_VectorTransform", _wrap_read_VectorTransform, METH_VARARGS, NULL},
77779 { (char *)"read_ProductQuantizer", _wrap_read_ProductQuantizer, METH_VARARGS, NULL},
77780 { (char *)"write_ProductQuantizer", _wrap_write_ProductQuantizer, METH_VARARGS, NULL},
77781 { (char *)"write_InvertedLists", _wrap_write_InvertedLists, METH_VARARGS, NULL},
77782 { (char *)"read_InvertedLists", _wrap_read_InvertedLists, METH_VARARGS, NULL},
77783 { (char *)"clone_index", _wrap_clone_index, METH_VARARGS, NULL},
77784 { (char *)"Cloner_clone_VectorTransform", _wrap_Cloner_clone_VectorTransform, METH_VARARGS, NULL},
77785 { (char *)"Cloner_clone_Index", _wrap_Cloner_clone_Index, METH_VARARGS, NULL},
77786 { (char *)"Cloner_clone_IndexIVF", _wrap_Cloner_clone_IndexIVF, METH_VARARGS, NULL},
77787 { (char *)"delete_Cloner", _wrap_delete_Cloner, METH_VARARGS, NULL},
77788 { (char *)"new_Cloner", _wrap_new_Cloner, METH_VARARGS, NULL},
77789 { (char *)"Cloner_swigregister", Cloner_swigregister, METH_VARARGS, NULL},
77790 { (char *)"AutoTuneCriterion_nq_set", _wrap_AutoTuneCriterion_nq_set, METH_VARARGS, NULL},
77791 { (char *)"AutoTuneCriterion_nq_get", _wrap_AutoTuneCriterion_nq_get, METH_VARARGS, NULL},
77792 { (char *)"AutoTuneCriterion_nnn_set", _wrap_AutoTuneCriterion_nnn_set, METH_VARARGS, NULL},
77793 { (char *)"AutoTuneCriterion_nnn_get", _wrap_AutoTuneCriterion_nnn_get, METH_VARARGS, NULL},
77794 { (char *)"AutoTuneCriterion_gt_nnn_set", _wrap_AutoTuneCriterion_gt_nnn_set, METH_VARARGS, NULL},
77795 { (char *)"AutoTuneCriterion_gt_nnn_get", _wrap_AutoTuneCriterion_gt_nnn_get, METH_VARARGS, NULL},
77796 { (char *)"AutoTuneCriterion_gt_D_set", _wrap_AutoTuneCriterion_gt_D_set, METH_VARARGS, NULL},
77797 { (char *)"AutoTuneCriterion_gt_D_get", _wrap_AutoTuneCriterion_gt_D_get, METH_VARARGS, NULL},
77798 { (char *)"AutoTuneCriterion_gt_I_set", _wrap_AutoTuneCriterion_gt_I_set, METH_VARARGS, NULL},
77799 { (char *)"AutoTuneCriterion_gt_I_get", _wrap_AutoTuneCriterion_gt_I_get, METH_VARARGS, NULL},
77800 { (char *)"AutoTuneCriterion_set_groundtruth", _wrap_AutoTuneCriterion_set_groundtruth, METH_VARARGS, NULL},
77801 { (char *)"AutoTuneCriterion_evaluate", _wrap_AutoTuneCriterion_evaluate, METH_VARARGS, NULL},
77802 { (char *)"delete_AutoTuneCriterion", _wrap_delete_AutoTuneCriterion, METH_VARARGS, NULL},
77803 { (char *)"AutoTuneCriterion_swigregister", AutoTuneCriterion_swigregister, METH_VARARGS, NULL},
77804 { (char *)"OneRecallAtRCriterion_R_set", _wrap_OneRecallAtRCriterion_R_set, METH_VARARGS, NULL},
77805 { (char *)"OneRecallAtRCriterion_R_get", _wrap_OneRecallAtRCriterion_R_get, METH_VARARGS, NULL},
77806 { (char *)"new_OneRecallAtRCriterion", _wrap_new_OneRecallAtRCriterion, METH_VARARGS, NULL},
77807 { (char *)"OneRecallAtRCriterion_evaluate", _wrap_OneRecallAtRCriterion_evaluate, METH_VARARGS, NULL},
77808 { (char *)"delete_OneRecallAtRCriterion", _wrap_delete_OneRecallAtRCriterion, METH_VARARGS, NULL},
77809 { (char *)"OneRecallAtRCriterion_swigregister", OneRecallAtRCriterion_swigregister, METH_VARARGS, NULL},
77810 { (char *)"IntersectionCriterion_R_set", _wrap_IntersectionCriterion_R_set, METH_VARARGS, NULL},
77811 { (char *)"IntersectionCriterion_R_get", _wrap_IntersectionCriterion_R_get, METH_VARARGS, NULL},
77812 { (char *)"new_IntersectionCriterion", _wrap_new_IntersectionCriterion, METH_VARARGS, NULL},
77813 { (char *)"IntersectionCriterion_evaluate", _wrap_IntersectionCriterion_evaluate, METH_VARARGS, NULL},
77814 { (char *)"delete_IntersectionCriterion", _wrap_delete_IntersectionCriterion, METH_VARARGS, NULL},
77815 { (char *)"IntersectionCriterion_swigregister", IntersectionCriterion_swigregister, METH_VARARGS, NULL},
77816 { (char *)"OperatingPoint_perf_set", _wrap_OperatingPoint_perf_set, METH_VARARGS, NULL},
77817 { (char *)"OperatingPoint_perf_get", _wrap_OperatingPoint_perf_get, METH_VARARGS, NULL},
77818 { (char *)"OperatingPoint_t_set", _wrap_OperatingPoint_t_set, METH_VARARGS, NULL},
77819 { (char *)"OperatingPoint_t_get", _wrap_OperatingPoint_t_get, METH_VARARGS, NULL},
77820 { (char *)"OperatingPoint_key_set", _wrap_OperatingPoint_key_set, METH_VARARGS, NULL},
77821 { (char *)"OperatingPoint_key_get", _wrap_OperatingPoint_key_get, METH_VARARGS, NULL},
77822 { (char *)"OperatingPoint_cno_set", _wrap_OperatingPoint_cno_set, METH_VARARGS, NULL},
77823 { (char *)"OperatingPoint_cno_get", _wrap_OperatingPoint_cno_get, METH_VARARGS, NULL},
77824 { (char *)"new_OperatingPoint", _wrap_new_OperatingPoint, METH_VARARGS, NULL},
77825 { (char *)"delete_OperatingPoint", _wrap_delete_OperatingPoint, METH_VARARGS, NULL},
77826 { (char *)"OperatingPoint_swigregister", OperatingPoint_swigregister, METH_VARARGS, NULL},
77827 { (char *)"OperatingPoints_all_pts_set", _wrap_OperatingPoints_all_pts_set, METH_VARARGS, NULL},
77828 { (char *)"OperatingPoints_all_pts_get", _wrap_OperatingPoints_all_pts_get, METH_VARARGS, NULL},
77829 { (char *)"OperatingPoints_optimal_pts_set", _wrap_OperatingPoints_optimal_pts_set, METH_VARARGS, NULL},
77830 { (char *)"OperatingPoints_optimal_pts_get", _wrap_OperatingPoints_optimal_pts_get, METH_VARARGS, NULL},
77831 { (char *)"new_OperatingPoints", _wrap_new_OperatingPoints, METH_VARARGS, NULL},
77832 { (char *)"OperatingPoints_merge_with", _wrap_OperatingPoints_merge_with, METH_VARARGS, NULL},
77833 { (char *)"OperatingPoints_clear", _wrap_OperatingPoints_clear, METH_VARARGS, NULL},
77834 { (char *)"OperatingPoints_add", _wrap_OperatingPoints_add, METH_VARARGS, NULL},
77835 { (char *)"OperatingPoints_t_for_perf", _wrap_OperatingPoints_t_for_perf, METH_VARARGS, NULL},
77836 { (char *)"OperatingPoints_display", _wrap_OperatingPoints_display, METH_VARARGS, NULL},
77837 { (char *)"OperatingPoints_all_to_gnuplot", _wrap_OperatingPoints_all_to_gnuplot, METH_VARARGS, NULL},
77838 { (char *)"OperatingPoints_optimal_to_gnuplot", _wrap_OperatingPoints_optimal_to_gnuplot, METH_VARARGS, NULL},
77839 { (char *)"delete_OperatingPoints", _wrap_delete_OperatingPoints, METH_VARARGS, NULL},
77840 { (char *)"OperatingPoints_swigregister", OperatingPoints_swigregister, METH_VARARGS, NULL},
77841 { (char *)"ParameterRange_name_set", _wrap_ParameterRange_name_set, METH_VARARGS, NULL},
77842 { (char *)"ParameterRange_name_get", _wrap_ParameterRange_name_get, METH_VARARGS, NULL},
77843 { (char *)"ParameterRange_values_set", _wrap_ParameterRange_values_set, METH_VARARGS, NULL},
77844 { (char *)"ParameterRange_values_get", _wrap_ParameterRange_values_get, METH_VARARGS, NULL},
77845 { (char *)"new_ParameterRange", _wrap_new_ParameterRange, METH_VARARGS, NULL},
77846 { (char *)"delete_ParameterRange", _wrap_delete_ParameterRange, METH_VARARGS, NULL},
77847 { (char *)"ParameterRange_swigregister", ParameterRange_swigregister, METH_VARARGS, NULL},
77848 { (char *)"ParameterSpace_parameter_ranges_set", _wrap_ParameterSpace_parameter_ranges_set, METH_VARARGS, NULL},
77849 { (char *)"ParameterSpace_parameter_ranges_get", _wrap_ParameterSpace_parameter_ranges_get, METH_VARARGS, NULL},
77850 { (char *)"ParameterSpace_verbose_set", _wrap_ParameterSpace_verbose_set, METH_VARARGS, NULL},
77851 { (char *)"ParameterSpace_verbose_get", _wrap_ParameterSpace_verbose_get, METH_VARARGS, NULL},
77852 { (char *)"ParameterSpace_n_experiments_set", _wrap_ParameterSpace_n_experiments_set, METH_VARARGS, NULL},
77853 { (char *)"ParameterSpace_n_experiments_get", _wrap_ParameterSpace_n_experiments_get, METH_VARARGS, NULL},
77854 { (char *)"ParameterSpace_batchsize_set", _wrap_ParameterSpace_batchsize_set, METH_VARARGS, NULL},
77855 { (char *)"ParameterSpace_batchsize_get", _wrap_ParameterSpace_batchsize_get, METH_VARARGS, NULL},
77856 { (char *)"ParameterSpace_thread_over_batches_set", _wrap_ParameterSpace_thread_over_batches_set, METH_VARARGS, NULL},
77857 { (char *)"ParameterSpace_thread_over_batches_get", _wrap_ParameterSpace_thread_over_batches_get, METH_VARARGS, NULL},
77858 { (char *)"ParameterSpace_min_test_duration_set", _wrap_ParameterSpace_min_test_duration_set, METH_VARARGS, NULL},
77859 { (char *)"ParameterSpace_min_test_duration_get", _wrap_ParameterSpace_min_test_duration_get, METH_VARARGS, NULL},
77860 { (char *)"new_ParameterSpace", _wrap_new_ParameterSpace, METH_VARARGS, NULL},
77861 { (char *)"ParameterSpace_n_combinations", _wrap_ParameterSpace_n_combinations, METH_VARARGS, NULL},
77862 { (char *)"ParameterSpace_combination_ge", _wrap_ParameterSpace_combination_ge, METH_VARARGS, NULL},
77863 { (char *)"ParameterSpace_combination_name", _wrap_ParameterSpace_combination_name, METH_VARARGS, NULL},
77864 { (char *)"ParameterSpace_display", _wrap_ParameterSpace_display, METH_VARARGS, NULL},
77865 { (char *)"ParameterSpace_add_range", _wrap_ParameterSpace_add_range, METH_VARARGS, NULL},
77866 { (char *)"ParameterSpace_initialize", _wrap_ParameterSpace_initialize, METH_VARARGS, NULL},
77867 { (char *)"ParameterSpace_set_index_parameters", _wrap_ParameterSpace_set_index_parameters, METH_VARARGS, NULL},
77868 { (char *)"ParameterSpace_set_index_parameter", _wrap_ParameterSpace_set_index_parameter, METH_VARARGS, NULL},
77869 { (char *)"ParameterSpace_update_bounds", _wrap_ParameterSpace_update_bounds, METH_VARARGS, NULL},
77870 { (char *)"ParameterSpace_explore", _wrap_ParameterSpace_explore, METH_VARARGS, NULL},
77871 { (char *)"delete_ParameterSpace", _wrap_delete_ParameterSpace, METH_VARARGS, NULL},
77872 { (char *)"ParameterSpace_swigregister", ParameterSpace_swigregister, METH_VARARGS, NULL},
77873 { (char *)"index_factory", _wrap_index_factory, METH_VARARGS, NULL},
77874 { (char *)"index_binary_factory", _wrap_index_binary_factory, METH_VARARGS, NULL},
77875 { (char *)"swig_ptr", _wrap_swig_ptr, METH_VARARGS, NULL},
77876 { (char *)"rev_swig_ptr", _wrap_rev_swig_ptr, METH_VARARGS, NULL},
77877 { (char *)"float_minheap_array_t_nh_set", _wrap_float_minheap_array_t_nh_set, METH_VARARGS, NULL},
77878 { (char *)"float_minheap_array_t_nh_get", _wrap_float_minheap_array_t_nh_get, METH_VARARGS, NULL},
77879 { (char *)"float_minheap_array_t_k_set", _wrap_float_minheap_array_t_k_set, METH_VARARGS, NULL},
77880 { (char *)"float_minheap_array_t_k_get", _wrap_float_minheap_array_t_k_get, METH_VARARGS, NULL},
77881 { (char *)"float_minheap_array_t_ids_set", _wrap_float_minheap_array_t_ids_set, METH_VARARGS, NULL},
77882 { (char *)"float_minheap_array_t_ids_get", _wrap_float_minheap_array_t_ids_get, METH_VARARGS, NULL},
77883 { (char *)"float_minheap_array_t_val_set", _wrap_float_minheap_array_t_val_set, METH_VARARGS, NULL},
77884 { (char *)"float_minheap_array_t_val_get", _wrap_float_minheap_array_t_val_get, METH_VARARGS, NULL},
77885 { (char *)"float_minheap_array_t_get_val", _wrap_float_minheap_array_t_get_val, METH_VARARGS, NULL},
77886 { (char *)"float_minheap_array_t_get_ids", _wrap_float_minheap_array_t_get_ids, METH_VARARGS, NULL},
77887 { (char *)"float_minheap_array_t_heapify", _wrap_float_minheap_array_t_heapify, METH_VARARGS, NULL},
77888 { (char *)"float_minheap_array_t_addn", _wrap_float_minheap_array_t_addn, METH_VARARGS, NULL},
77889 { (char *)"float_minheap_array_t_addn_with_ids", _wrap_float_minheap_array_t_addn_with_ids, METH_VARARGS, NULL},
77890 { (char *)"float_minheap_array_t_reorder", _wrap_float_minheap_array_t_reorder, METH_VARARGS, NULL},
77891 { (char *)"float_minheap_array_t_per_line_extrema", _wrap_float_minheap_array_t_per_line_extrema, METH_VARARGS, NULL},
77892 { (char *)"new_float_minheap_array_t", _wrap_new_float_minheap_array_t, METH_VARARGS, NULL},
77893 { (char *)"delete_float_minheap_array_t", _wrap_delete_float_minheap_array_t, METH_VARARGS, NULL},
77894 { (char *)"float_minheap_array_t_swigregister", float_minheap_array_t_swigregister, METH_VARARGS, NULL},
77895 { (char *)"int_minheap_array_t_nh_set", _wrap_int_minheap_array_t_nh_set, METH_VARARGS, NULL},
77896 { (char *)"int_minheap_array_t_nh_get", _wrap_int_minheap_array_t_nh_get, METH_VARARGS, NULL},
77897 { (char *)"int_minheap_array_t_k_set", _wrap_int_minheap_array_t_k_set, METH_VARARGS, NULL},
77898 { (char *)"int_minheap_array_t_k_get", _wrap_int_minheap_array_t_k_get, METH_VARARGS, NULL},
77899 { (char *)"int_minheap_array_t_ids_set", _wrap_int_minheap_array_t_ids_set, METH_VARARGS, NULL},
77900 { (char *)"int_minheap_array_t_ids_get", _wrap_int_minheap_array_t_ids_get, METH_VARARGS, NULL},
77901 { (char *)"int_minheap_array_t_val_set", _wrap_int_minheap_array_t_val_set, METH_VARARGS, NULL},
77902 { (char *)"int_minheap_array_t_val_get", _wrap_int_minheap_array_t_val_get, METH_VARARGS, NULL},
77903 { (char *)"int_minheap_array_t_get_val", _wrap_int_minheap_array_t_get_val, METH_VARARGS, NULL},
77904 { (char *)"int_minheap_array_t_get_ids", _wrap_int_minheap_array_t_get_ids, METH_VARARGS, NULL},
77905 { (char *)"int_minheap_array_t_heapify", _wrap_int_minheap_array_t_heapify, METH_VARARGS, NULL},
77906 { (char *)"int_minheap_array_t_addn", _wrap_int_minheap_array_t_addn, METH_VARARGS, NULL},
77907 { (char *)"int_minheap_array_t_addn_with_ids", _wrap_int_minheap_array_t_addn_with_ids, METH_VARARGS, NULL},
77908 { (char *)"int_minheap_array_t_reorder", _wrap_int_minheap_array_t_reorder, METH_VARARGS, NULL},
77909 { (char *)"int_minheap_array_t_per_line_extrema", _wrap_int_minheap_array_t_per_line_extrema, METH_VARARGS, NULL},
77910 { (char *)"new_int_minheap_array_t", _wrap_new_int_minheap_array_t, METH_VARARGS, NULL},
77911 { (char *)"delete_int_minheap_array_t", _wrap_delete_int_minheap_array_t, METH_VARARGS, NULL},
77912 { (char *)"int_minheap_array_t_swigregister", int_minheap_array_t_swigregister, METH_VARARGS, NULL},
77913 { (char *)"float_maxheap_array_t_nh_set", _wrap_float_maxheap_array_t_nh_set, METH_VARARGS, NULL},
77914 { (char *)"float_maxheap_array_t_nh_get", _wrap_float_maxheap_array_t_nh_get, METH_VARARGS, NULL},
77915 { (char *)"float_maxheap_array_t_k_set", _wrap_float_maxheap_array_t_k_set, METH_VARARGS, NULL},
77916 { (char *)"float_maxheap_array_t_k_get", _wrap_float_maxheap_array_t_k_get, METH_VARARGS, NULL},
77917 { (char *)"float_maxheap_array_t_ids_set", _wrap_float_maxheap_array_t_ids_set, METH_VARARGS, NULL},
77918 { (char *)"float_maxheap_array_t_ids_get", _wrap_float_maxheap_array_t_ids_get, METH_VARARGS, NULL},
77919 { (char *)"float_maxheap_array_t_val_set", _wrap_float_maxheap_array_t_val_set, METH_VARARGS, NULL},
77920 { (char *)"float_maxheap_array_t_val_get", _wrap_float_maxheap_array_t_val_get, METH_VARARGS, NULL},
77921 { (char *)"float_maxheap_array_t_get_val", _wrap_float_maxheap_array_t_get_val, METH_VARARGS, NULL},
77922 { (char *)"float_maxheap_array_t_get_ids", _wrap_float_maxheap_array_t_get_ids, METH_VARARGS, NULL},
77923 { (char *)"float_maxheap_array_t_heapify", _wrap_float_maxheap_array_t_heapify, METH_VARARGS, NULL},
77924 { (char *)"float_maxheap_array_t_addn", _wrap_float_maxheap_array_t_addn, METH_VARARGS, NULL},
77925 { (char *)"float_maxheap_array_t_addn_with_ids", _wrap_float_maxheap_array_t_addn_with_ids, METH_VARARGS, NULL},
77926 { (char *)"float_maxheap_array_t_reorder", _wrap_float_maxheap_array_t_reorder, METH_VARARGS, NULL},
77927 { (char *)"float_maxheap_array_t_per_line_extrema", _wrap_float_maxheap_array_t_per_line_extrema, METH_VARARGS, NULL},
77928 { (char *)"new_float_maxheap_array_t", _wrap_new_float_maxheap_array_t, METH_VARARGS, NULL},
77929 { (char *)"delete_float_maxheap_array_t", _wrap_delete_float_maxheap_array_t, METH_VARARGS, NULL},
77930 { (char *)"float_maxheap_array_t_swigregister", float_maxheap_array_t_swigregister, METH_VARARGS, NULL},
77931 { (char *)"int_maxheap_array_t_nh_set", _wrap_int_maxheap_array_t_nh_set, METH_VARARGS, NULL},
77932 { (char *)"int_maxheap_array_t_nh_get", _wrap_int_maxheap_array_t_nh_get, METH_VARARGS, NULL},
77933 { (char *)"int_maxheap_array_t_k_set", _wrap_int_maxheap_array_t_k_set, METH_VARARGS, NULL},
77934 { (char *)"int_maxheap_array_t_k_get", _wrap_int_maxheap_array_t_k_get, METH_VARARGS, NULL},
77935 { (char *)"int_maxheap_array_t_ids_set", _wrap_int_maxheap_array_t_ids_set, METH_VARARGS, NULL},
77936 { (char *)"int_maxheap_array_t_ids_get", _wrap_int_maxheap_array_t_ids_get, METH_VARARGS, NULL},
77937 { (char *)"int_maxheap_array_t_val_set", _wrap_int_maxheap_array_t_val_set, METH_VARARGS, NULL},
77938 { (char *)"int_maxheap_array_t_val_get", _wrap_int_maxheap_array_t_val_get, METH_VARARGS, NULL},
77939 { (char *)"int_maxheap_array_t_get_val", _wrap_int_maxheap_array_t_get_val, METH_VARARGS, NULL},
77940 { (char *)"int_maxheap_array_t_get_ids", _wrap_int_maxheap_array_t_get_ids, METH_VARARGS, NULL},
77941 { (char *)"int_maxheap_array_t_heapify", _wrap_int_maxheap_array_t_heapify, METH_VARARGS, NULL},
77942 { (char *)"int_maxheap_array_t_addn", _wrap_int_maxheap_array_t_addn, METH_VARARGS, NULL},
77943 { (char *)"int_maxheap_array_t_addn_with_ids", _wrap_int_maxheap_array_t_addn_with_ids, METH_VARARGS, NULL},
77944 { (char *)"int_maxheap_array_t_reorder", _wrap_int_maxheap_array_t_reorder, METH_VARARGS, NULL},
77945 { (char *)"int_maxheap_array_t_per_line_extrema", _wrap_int_maxheap_array_t_per_line_extrema, METH_VARARGS, NULL},
77946 { (char *)"new_int_maxheap_array_t", _wrap_new_int_maxheap_array_t, METH_VARARGS, NULL},
77947 { (char *)"delete_int_maxheap_array_t", _wrap_delete_int_maxheap_array_t, METH_VARARGS, NULL},
77948 { (char *)"int_maxheap_array_t_swigregister", int_maxheap_array_t_swigregister, METH_VARARGS, NULL},
77949 { (char *)"omp_set_num_threads", _wrap_omp_set_num_threads, METH_VARARGS, NULL},
77950 { (char *)"omp_get_max_threads", _wrap_omp_get_max_threads, METH_VARARGS, NULL},
77951 { (char *)"memcpy", _wrap_memcpy, METH_VARARGS, NULL},
77952 { (char *)"cast_integer_to_float_ptr", _wrap_cast_integer_to_float_ptr, METH_VARARGS, NULL},
77953 { (char *)"cast_integer_to_long_ptr", _wrap_cast_integer_to_long_ptr, METH_VARARGS, NULL},
77954 { (char *)"cast_integer_to_int_ptr", _wrap_cast_integer_to_int_ptr, METH_VARARGS, NULL},
77955 { (char *)"RangeSearchResult_nq_set", _wrap_RangeSearchResult_nq_set, METH_VARARGS, NULL},
77956 { (char *)"RangeSearchResult_nq_get", _wrap_RangeSearchResult_nq_get, METH_VARARGS, NULL},
77957 { (char *)"RangeSearchResult_lims_set", _wrap_RangeSearchResult_lims_set, METH_VARARGS, NULL},
77958 { (char *)"RangeSearchResult_lims_get", _wrap_RangeSearchResult_lims_get, METH_VARARGS, NULL},
77959 { (char *)"RangeSearchResult_labels_set", _wrap_RangeSearchResult_labels_set, METH_VARARGS, NULL},
77960 { (char *)"RangeSearchResult_labels_get", _wrap_RangeSearchResult_labels_get, METH_VARARGS, NULL},
77961 { (char *)"RangeSearchResult_distances_set", _wrap_RangeSearchResult_distances_set, METH_VARARGS, NULL},
77962 { (char *)"RangeSearchResult_distances_get", _wrap_RangeSearchResult_distances_get, METH_VARARGS, NULL},
77963 { (char *)"RangeSearchResult_buffer_size_set", _wrap_RangeSearchResult_buffer_size_set, METH_VARARGS, NULL},
77964 { (char *)"RangeSearchResult_buffer_size_get", _wrap_RangeSearchResult_buffer_size_get, METH_VARARGS, NULL},
77965 { (char *)"new_RangeSearchResult", _wrap_new_RangeSearchResult, METH_VARARGS, NULL},
77966 { (char *)"RangeSearchResult_do_allocation", _wrap_RangeSearchResult_do_allocation, METH_VARARGS, NULL},
77967 { (char *)"delete_RangeSearchResult", _wrap_delete_RangeSearchResult, METH_VARARGS, NULL},
77968 { (char *)"RangeSearchResult_swigregister", RangeSearchResult_swigregister, METH_VARARGS, NULL},
77969 { (char *)"IDSelector_is_member", _wrap_IDSelector_is_member, METH_VARARGS, NULL},
77970 { (char *)"delete_IDSelector", _wrap_delete_IDSelector, METH_VARARGS, NULL},
77971 { (char *)"IDSelector_swigregister", IDSelector_swigregister, METH_VARARGS, NULL},
77972 { (char *)"IDSelectorRange_imin_set", _wrap_IDSelectorRange_imin_set, METH_VARARGS, NULL},
77973 { (char *)"IDSelectorRange_imin_get", _wrap_IDSelectorRange_imin_get, METH_VARARGS, NULL},
77974 { (char *)"IDSelectorRange_imax_set", _wrap_IDSelectorRange_imax_set, METH_VARARGS, NULL},
77975 { (char *)"IDSelectorRange_imax_get", _wrap_IDSelectorRange_imax_get, METH_VARARGS, NULL},
77976 { (char *)"new_IDSelectorRange", _wrap_new_IDSelectorRange, METH_VARARGS, NULL},
77977 { (char *)"IDSelectorRange_is_member", _wrap_IDSelectorRange_is_member, METH_VARARGS, NULL},
77978 { (char *)"delete_IDSelectorRange", _wrap_delete_IDSelectorRange, METH_VARARGS, NULL},
77979 { (char *)"IDSelectorRange_swigregister", IDSelectorRange_swigregister, METH_VARARGS, NULL},
77980 { (char *)"IDSelectorBatch_nbits_set", _wrap_IDSelectorBatch_nbits_set, METH_VARARGS, NULL},
77981 { (char *)"IDSelectorBatch_nbits_get", _wrap_IDSelectorBatch_nbits_get, METH_VARARGS, NULL},
77982 { (char *)"IDSelectorBatch_mask_set", _wrap_IDSelectorBatch_mask_set, METH_VARARGS, NULL},
77983 { (char *)"IDSelectorBatch_mask_get", _wrap_IDSelectorBatch_mask_get, METH_VARARGS, NULL},
77984 { (char *)"new_IDSelectorBatch", _wrap_new_IDSelectorBatch, METH_VARARGS, NULL},
77985 { (char *)"IDSelectorBatch_is_member", _wrap_IDSelectorBatch_is_member, METH_VARARGS, NULL},
77986 { (char *)"delete_IDSelectorBatch", _wrap_delete_IDSelectorBatch, METH_VARARGS, NULL},
77987 { (char *)"IDSelectorBatch_swigregister", IDSelectorBatch_swigregister, METH_VARARGS, NULL},
77988 { (char *)"BufferList_buffer_size_set", _wrap_BufferList_buffer_size_set, METH_VARARGS, NULL},
77989 { (char *)"BufferList_buffer_size_get", _wrap_BufferList_buffer_size_get, METH_VARARGS, NULL},
77990 { (char *)"BufferList_buffers_set", _wrap_BufferList_buffers_set, METH_VARARGS, NULL},
77991 { (char *)"BufferList_buffers_get", _wrap_BufferList_buffers_get, METH_VARARGS, NULL},
77992 { (char *)"BufferList_wp_set", _wrap_BufferList_wp_set, METH_VARARGS, NULL},
77993 { (char *)"BufferList_wp_get", _wrap_BufferList_wp_get, METH_VARARGS, NULL},
77994 { (char *)"new_BufferList", _wrap_new_BufferList, METH_VARARGS, NULL},
77995 { (char *)"delete_BufferList", _wrap_delete_BufferList, METH_VARARGS, NULL},
77996 { (char *)"BufferList_append_buffer", _wrap_BufferList_append_buffer, METH_VARARGS, NULL},
77997 { (char *)"BufferList_add", _wrap_BufferList_add, METH_VARARGS, NULL},
77998 { (char *)"BufferList_copy_range", _wrap_BufferList_copy_range, METH_VARARGS, NULL},
77999 { (char *)"BufferList_swigregister", BufferList_swigregister, METH_VARARGS, NULL},
78000 { (char *)"RangeSearchPartialResult_res_set", _wrap_RangeSearchPartialResult_res_set, METH_VARARGS, NULL},
78001 { (char *)"RangeSearchPartialResult_res_get", _wrap_RangeSearchPartialResult_res_get, METH_VARARGS, NULL},
78002 { (char *)"new_RangeSearchPartialResult", _wrap_new_RangeSearchPartialResult, METH_VARARGS, NULL},
78003 { (char *)"RangeSearchPartialResult_queries_set", _wrap_RangeSearchPartialResult_queries_set, METH_VARARGS, NULL},
78004 { (char *)"RangeSearchPartialResult_queries_get", _wrap_RangeSearchPartialResult_queries_get, METH_VARARGS, NULL},
78005 { (char *)"RangeSearchPartialResult_new_result", _wrap_RangeSearchPartialResult_new_result, METH_VARARGS, NULL},
78006 { (char *)"RangeSearchPartialResult_finalize", _wrap_RangeSearchPartialResult_finalize, METH_VARARGS, NULL},
78007 { (char *)"RangeSearchPartialResult_set_lims", _wrap_RangeSearchPartialResult_set_lims, METH_VARARGS, NULL},
78008 { (char *)"RangeSearchPartialResult_set_result", _wrap_RangeSearchPartialResult_set_result, METH_VARARGS, NULL},
78009 { (char *)"delete_RangeSearchPartialResult", _wrap_delete_RangeSearchPartialResult, METH_VARARGS, NULL},
78010 { (char *)"RangeSearchPartialResult_swigregister", RangeSearchPartialResult_swigregister, METH_VARARGS, NULL},
78011 { (char *)"IOReader_name_set", _wrap_IOReader_name_set, METH_VARARGS, NULL},
78012 { (char *)"IOReader_name_get", _wrap_IOReader_name_get, METH_VARARGS, NULL},
78013 { (char *)"IOReader___call__", _wrap_IOReader___call__, METH_VARARGS, NULL},
78014 { (char *)"IOReader_fileno", _wrap_IOReader_fileno, METH_VARARGS, NULL},
78015 { (char *)"delete_IOReader", _wrap_delete_IOReader, METH_VARARGS, NULL},
78016 { (char *)"IOReader_swigregister", IOReader_swigregister, METH_VARARGS, NULL},
78017 { (char *)"IOWriter_name_set", _wrap_IOWriter_name_set, METH_VARARGS, NULL},
78018 { (char *)"IOWriter_name_get", _wrap_IOWriter_name_get, METH_VARARGS, NULL},
78019 { (char *)"IOWriter___call__", _wrap_IOWriter___call__, METH_VARARGS, NULL},
78020 { (char *)"IOWriter_fileno", _wrap_IOWriter_fileno, METH_VARARGS, NULL},
78021 { (char *)"delete_IOWriter", _wrap_delete_IOWriter, METH_VARARGS, NULL},
78022 { (char *)"IOWriter_swigregister", IOWriter_swigregister, METH_VARARGS, NULL},
78023 { (char *)"VectorIOReader_data_set", _wrap_VectorIOReader_data_set, METH_VARARGS, NULL},
78024 { (char *)"VectorIOReader_data_get", _wrap_VectorIOReader_data_get, METH_VARARGS, NULL},
78025 { (char *)"VectorIOReader_rp_set", _wrap_VectorIOReader_rp_set, METH_VARARGS, NULL},
78026 { (char *)"VectorIOReader_rp_get", _wrap_VectorIOReader_rp_get, METH_VARARGS, NULL},
78027 { (char *)"VectorIOReader___call__", _wrap_VectorIOReader___call__, METH_VARARGS, NULL},
78028 { (char *)"new_VectorIOReader", _wrap_new_VectorIOReader, METH_VARARGS, NULL},
78029 { (char *)"delete_VectorIOReader", _wrap_delete_VectorIOReader, METH_VARARGS, NULL},
78030 { (char *)"VectorIOReader_swigregister", VectorIOReader_swigregister, METH_VARARGS, NULL},
78031 { (char *)"VectorIOWriter_data_set", _wrap_VectorIOWriter_data_set, METH_VARARGS, NULL},
78032 { (char *)"VectorIOWriter_data_get", _wrap_VectorIOWriter_data_get, METH_VARARGS, NULL},
78033 { (char *)"VectorIOWriter___call__", _wrap_VectorIOWriter___call__, METH_VARARGS, NULL},
78034 { (char *)"new_VectorIOWriter", _wrap_new_VectorIOWriter, METH_VARARGS, NULL},
78035 { (char *)"delete_VectorIOWriter", _wrap_delete_VectorIOWriter, METH_VARARGS, NULL},
78036 { (char *)"VectorIOWriter_swigregister", VectorIOWriter_swigregister, METH_VARARGS, NULL},
78037 { (char *)"ignore_SIGTTIN", _wrap_ignore_SIGTTIN, METH_VARARGS, NULL},
78038 { (char *)"MapLong2Long_map_set", _wrap_MapLong2Long_map_set, METH_VARARGS, NULL},
78039 { (char *)"MapLong2Long_map_get", _wrap_MapLong2Long_map_get, METH_VARARGS, NULL},
78040 { (char *)"MapLong2Long_add", _wrap_MapLong2Long_add, METH_VARARGS, NULL},
78041 { (char *)"MapLong2Long_search", _wrap_MapLong2Long_search, METH_VARARGS, NULL},
78042 { (char *)"MapLong2Long_search_multiple", _wrap_MapLong2Long_search_multiple, METH_VARARGS, NULL},
78043 { (char *)"new_MapLong2Long", _wrap_new_MapLong2Long, METH_VARARGS, NULL},
78044 { (char *)"delete_MapLong2Long", _wrap_delete_MapLong2Long, METH_VARARGS, NULL},
78045 { (char *)"MapLong2Long_swigregister", MapLong2Long_swigregister, METH_VARARGS, NULL},
78046 { NULL, NULL, 0, NULL }
78047 };
78048
78049
78050 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */
78051
78052 static void *_p_faiss__IndexHNSWFlatTo_p_faiss__IndexHNSW(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78053 return (void *)((faiss::IndexHNSW *) ((faiss::IndexHNSWFlat *) x));
78054 }
78055 static void *_p_faiss__IndexHNSWSQTo_p_faiss__IndexHNSW(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78056 return (void *)((faiss::IndexHNSW *) ((faiss::IndexHNSWSQ *) x));
78057 }
78058 static void *_p_faiss__IndexHNSWPQTo_p_faiss__IndexHNSW(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78059 return (void *)((faiss::IndexHNSW *) ((faiss::IndexHNSWPQ *) x));
78060 }
78061 static void *_p_faiss__IndexHNSW2LevelTo_p_faiss__IndexHNSW(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78062 return (void *)((faiss::IndexHNSW *) ((faiss::IndexHNSW2Level *) x));
78063 }
78064 static void *_p_faiss__IndexIDMap2To_p_faiss__IndexIDMap(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78065 return (void *)((faiss::IndexIDMap *) ((faiss::IndexIDMap2 *) x));
78066 }
78067 static void *_p_faiss__IndexIVFPQRTo_p_faiss__IndexIVFPQ(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78068 return (void *)((faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR *) x));
78069 }
78070 static void *_p_faiss__RandomRotationMatrixTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78071 return (void *)((faiss::VectorTransform *) (faiss::LinearTransform *) ((faiss::RandomRotationMatrix *) x));
78072 }
78073 static void *_p_faiss__PCAMatrixTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78074 return (void *)((faiss::VectorTransform *) (faiss::LinearTransform *) ((faiss::PCAMatrix *) x));
78075 }
78076 static void *_p_faiss__OPQMatrixTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78077 return (void *)((faiss::VectorTransform *) (faiss::LinearTransform *) ((faiss::OPQMatrix *) x));
78078 }
78079 static void *_p_faiss__LinearTransformTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78080 return (void *)((faiss::VectorTransform *) ((faiss::LinearTransform *) x));
78081 }
78082 static void *_p_faiss__RemapDimensionsTransformTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78083 return (void *)((faiss::VectorTransform *) ((faiss::RemapDimensionsTransform *) x));
78084 }
78085 static void *_p_faiss__NormalizationTransformTo_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78086 return (void *)((faiss::VectorTransform *) ((faiss::NormalizationTransform *) x));
78087 }
78088 static void *_p_faiss__RandomRotationMatrixTo_p_faiss__LinearTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78089 return (void *)((faiss::LinearTransform *) ((faiss::RandomRotationMatrix *) x));
78090 }
78091 static void *_p_faiss__PCAMatrixTo_p_faiss__LinearTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78092 return (void *)((faiss::LinearTransform *) ((faiss::PCAMatrix *) x));
78093 }
78094 static void *_p_faiss__OPQMatrixTo_p_faiss__LinearTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78095 return (void *)((faiss::LinearTransform *) ((faiss::OPQMatrix *) x));
78096 }
78097 static void *_p_p_faiss__RandomRotationMatrixTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78098 return (void *)((faiss::VectorTransform **) (faiss::LinearTransform *) ((faiss::RandomRotationMatrix **) x));
78099 }
78100 static void *_p_p_faiss__PCAMatrixTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78101 return (void *)((faiss::VectorTransform **) (faiss::LinearTransform *) ((faiss::PCAMatrix **) x));
78102 }
78103 static void *_p_p_faiss__OPQMatrixTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78104 return (void *)((faiss::VectorTransform **) (faiss::LinearTransform *) ((faiss::OPQMatrix **) x));
78105 }
78106 static void *_p_p_faiss__LinearTransformTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78107 return (void *)((faiss::VectorTransform **) ((faiss::LinearTransform **) x));
78108 }
78109 static void *_p_p_faiss__RemapDimensionsTransformTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78110 return (void *)((faiss::VectorTransform **) ((faiss::RemapDimensionsTransform **) x));
78111 }
78112 static void *_p_p_faiss__NormalizationTransformTo_p_p_faiss__VectorTransform(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78113 return (void *)((faiss::VectorTransform **) ((faiss::NormalizationTransform **) x));
78114 }
78115 static void *_p_faiss__IndexIVFFlatDedupTo_p_faiss__IndexIVFFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78116 return (void *)((faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup *) x));
78117 }
78118 static void *_p_faiss__IDSelectorBatchTo_p_faiss__IDSelector(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78119 return (void *)((faiss::IDSelector *) ((faiss::IDSelectorBatch *) x));
78120 }
78121 static void *_p_faiss__IDSelectorRangeTo_p_faiss__IDSelector(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78122 return (void *)((faiss::IDSelector *) ((faiss::IDSelectorRange *) x));
78123 }
78124 static void *_p_faiss__RangeSearchPartialResultTo_p_faiss__BufferList(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78125 return (void *)((faiss::BufferList *) ((faiss::RangeSearchPartialResult *) x));
78126 }
78127 static void *_p_faiss__ReproduceDistancesObjectiveTo_p_faiss__PermutationObjective(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78128 return (void *)((faiss::PermutationObjective *) ((faiss::ReproduceDistancesObjective *) x));
78129 }
78130 static void *_p_faiss__IndexFlatL2To_p_faiss__IndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78131 return (void *)((faiss::IndexFlat *) ((faiss::IndexFlatL2 *) x));
78132 }
78133 static void *_p_faiss__IndexFlat1DTo_p_faiss__IndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78134 return (void *)((faiss::IndexFlat *) (faiss::IndexFlatL2 *) ((faiss::IndexFlat1D *) x));
78135 }
78136 static void *_p_faiss__IndexFlatIPTo_p_faiss__IndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78137 return (void *)((faiss::IndexFlat *) ((faiss::IndexFlatIP *) x));
78138 }
78139 static void *_p_faiss__IndexFlatL2BaseShiftTo_p_faiss__IndexFlat(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78140 return (void *)((faiss::IndexFlat *) (faiss::IndexFlatL2 *) ((faiss::IndexFlatL2BaseShift *) x));
78141 }
78142 static void *_p_faiss__ArrayInvertedListsTo_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78143 return (void *)((faiss::InvertedLists *) ((faiss::ArrayInvertedLists *) x));
78144 }
78145 static void *_p_faiss__ConcatenatedInvertedListsTo_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78146 return (void *)((faiss::InvertedLists *) ((faiss::ConcatenatedInvertedLists *) x));
78147 }
78148 static void *_p_faiss__OnDiskInvertedListsTo_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78149 return (void *)((faiss::InvertedLists *) ((faiss::OnDiskInvertedLists *) x));
78150 }
78151 static void *_p_p_faiss__ArrayInvertedListsTo_p_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78152 return (void *)((faiss::InvertedLists **) ((faiss::ArrayInvertedLists **) x));
78153 }
78154 static void *_p_p_faiss__ConcatenatedInvertedListsTo_p_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78155 return (void *)((faiss::InvertedLists **) ((faiss::ConcatenatedInvertedLists **) x));
78156 }
78157 static void *_p_p_faiss__OnDiskInvertedListsTo_p_p_faiss__InvertedLists(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78158 return (void *)((faiss::InvertedLists **) ((faiss::OnDiskInvertedLists **) x));
78159 }
78160 static void *_p_faiss__VectorIOReaderTo_p_faiss__IOReader(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78161 return (void *)((faiss::IOReader *) ((faiss::VectorIOReader *) x));
78162 }
78163 static void *_p_faiss__IndexFlat1DTo_p_faiss__IndexFlatL2(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78164 return (void *)((faiss::IndexFlatL2 *) ((faiss::IndexFlat1D *) x));
78165 }
78166 static void *_p_faiss__IndexFlatL2BaseShiftTo_p_faiss__IndexFlatL2(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78167 return (void *)((faiss::IndexFlatL2 *) ((faiss::IndexFlatL2BaseShift *) x));
78168 }
78169 static void *_p_faiss__IndexIVFScalarQuantizerTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78170 return (void *)((faiss::IndexIVF *) ((faiss::IndexIVFScalarQuantizer *) x));
78171 }
78172 static void *_p_faiss__IndexIVFPQTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78173 return (void *)((faiss::IndexIVF *) ((faiss::IndexIVFPQ *) x));
78174 }
78175 static void *_p_faiss__IndexIVFFlatTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78176 return (void *)((faiss::IndexIVF *) ((faiss::IndexIVFFlat *) x));
78177 }
78178 static void *_p_faiss__IndexIVFFlatDedupTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78179 return (void *)((faiss::IndexIVF *) (faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup *) x));
78180 }
78181 static void *_p_faiss__IndexIVFPQRTo_p_faiss__IndexIVF(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78182 return (void *)((faiss::IndexIVF *) (faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR *) x));
78183 }
78184 static void *_p_faiss__PolysemousTrainingTo_p_faiss__SimulatedAnnealingParameters(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78185 return (void *)((faiss::SimulatedAnnealingParameters *) ((faiss::PolysemousTraining *) x));
78186 }
78187 static void *_p_faiss__SimulatedAnnealingOptimizerTo_p_faiss__SimulatedAnnealingParameters(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78188 return (void *)((faiss::SimulatedAnnealingParameters *) ((faiss::SimulatedAnnealingOptimizer *) x));
78189 }
78190 static void *_p_faiss__ClusteringTo_p_faiss__ClusteringParameters(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78191 return (void *)((faiss::ClusteringParameters *) ((faiss::Clustering *) x));
78192 }
78193 static void *_p_faiss__IVFPQSearchParametersTo_p_faiss__IVFSearchParameters(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78194 return (void *)((faiss::IVFSearchParameters *) ((faiss::IVFPQSearchParameters *) x));
78195 }
78196 static void *_p_p_faiss__IndexPreTransformTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78197 return (void *)((faiss::Index **) ((faiss::IndexPreTransform **) x));
78198 }
78199 static void *_p_p_faiss__IndexIVFTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78200 return (void *)((faiss::Index **) ((faiss::IndexIVF **) x));
78201 }
78202 static void *_p_p_faiss__IndexFlatL2To_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78203 return (void *)((faiss::Index **) (faiss::IndexFlat *) ((faiss::IndexFlatL2 **) x));
78204 }
78205 static void *_p_p_faiss__IndexHNSWFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78206 return (void *)((faiss::Index **) (faiss::IndexHNSW *) ((faiss::IndexHNSWFlat **) x));
78207 }
78208 static void *_p_p_faiss__Index2LayerTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78209 return (void *)((faiss::Index **) ((faiss::Index2Layer **) x));
78210 }
78211 static void *_p_p_faiss__IndexFlatIPTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78212 return (void *)((faiss::Index **) (faiss::IndexFlat *) ((faiss::IndexFlatIP **) x));
78213 }
78214 static void *_p_p_faiss__IndexHNSWTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78215 return (void *)((faiss::Index **) ((faiss::IndexHNSW **) x));
78216 }
78217 static void *_p_p_faiss__IndexHNSWPQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78218 return (void *)((faiss::Index **) (faiss::IndexHNSW *) ((faiss::IndexHNSWPQ **) x));
78219 }
78220 static void *_p_p_faiss__IndexIVFFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78221 return (void *)((faiss::Index **) (faiss::IndexIVF *) ((faiss::IndexIVFFlat **) x));
78222 }
78223 static void *_p_p_faiss__IndexLSHTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78224 return (void *)((faiss::Index **) ((faiss::IndexLSH **) x));
78225 }
78226 static void *_p_p_faiss__IndexFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78227 return (void *)((faiss::Index **) ((faiss::IndexFlat **) x));
78228 }
78229 static void *_p_p_faiss__IndexIVFFlatDedupTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78230 return (void *)((faiss::Index **) (faiss::IndexIVF *)(faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup **) x));
78231 }
78232 static void *_p_p_faiss__IndexIVFPQRTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78233 return (void *)((faiss::Index **) (faiss::IndexIVF *)(faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR **) x));
78234 }
78235 static void *_p_p_faiss__IndexFlat1DTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78236 return (void *)((faiss::Index **) (faiss::IndexFlat *)(faiss::IndexFlatL2 *) ((faiss::IndexFlat1D **) x));
78237 }
78238 static void *_p_p_faiss__IndexFlatL2BaseShiftTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78239 return (void *)((faiss::Index **) (faiss::IndexFlat *)(faiss::IndexFlatL2 *) ((faiss::IndexFlatL2BaseShift **) x));
78240 }
78241 static void *_p_p_faiss__IndexShardsTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78242 return (void *)((faiss::Index **) ((faiss::IndexShards **) x));
78243 }
78244 static void *_p_p_faiss__IndexHNSW2LevelTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78245 return (void *)((faiss::Index **) (faiss::IndexHNSW *) ((faiss::IndexHNSW2Level **) x));
78246 }
78247 static void *_p_p_faiss__IndexIDMap2To_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78248 return (void *)((faiss::Index **) (faiss::IndexIDMap *) ((faiss::IndexIDMap2 **) x));
78249 }
78250 static void *_p_p_faiss__IndexSplitVectorsTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78251 return (void *)((faiss::Index **) ((faiss::IndexSplitVectors **) x));
78252 }
78253 static void *_p_p_faiss__IndexRefineFlatTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78254 return (void *)((faiss::Index **) ((faiss::IndexRefineFlat **) x));
78255 }
78256 static void *_p_p_faiss__IndexHNSWSQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78257 return (void *)((faiss::Index **) (faiss::IndexHNSW *) ((faiss::IndexHNSWSQ **) x));
78258 }
78259 static void *_p_p_faiss__MultiIndexQuantizer2To_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78260 return (void *)((faiss::Index **) (faiss::MultiIndexQuantizer *) ((faiss::MultiIndexQuantizer2 **) x));
78261 }
78262 static void *_p_p_faiss__IndexPQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78263 return (void *)((faiss::Index **) ((faiss::IndexPQ **) x));
78264 }
78265 static void *_p_p_faiss__IndexIDMapTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78266 return (void *)((faiss::Index **) ((faiss::IndexIDMap **) x));
78267 }
78268 static void *_p_p_faiss__IndexIVFPQTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78269 return (void *)((faiss::Index **) (faiss::IndexIVF *) ((faiss::IndexIVFPQ **) x));
78270 }
78271 static void *_p_p_faiss__IndexIVFScalarQuantizerTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78272 return (void *)((faiss::Index **) (faiss::IndexIVF *) ((faiss::IndexIVFScalarQuantizer **) x));
78273 }
78274 static void *_p_p_faiss__IndexScalarQuantizerTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78275 return (void *)((faiss::Index **) ((faiss::IndexScalarQuantizer **) x));
78276 }
78277 static void *_p_p_faiss__MultiIndexQuantizerTo_p_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78278 return (void *)((faiss::Index **) ((faiss::MultiIndexQuantizer **) x));
78279 }
78280 static void *_p_faiss__IndexPreTransformTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78281 return (void *)((faiss::Index *) ((faiss::IndexPreTransform *) x));
78282 }
78283 static void *_p_faiss__IndexIVFTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78284 return (void *)((faiss::Index *) ((faiss::IndexIVF *) x));
78285 }
78286 static void *_p_faiss__IndexFlatL2To_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78287 return (void *)((faiss::Index *) (faiss::IndexFlat *) ((faiss::IndexFlatL2 *) x));
78288 }
78289 static void *_p_faiss__IndexHNSWFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78290 return (void *)((faiss::Index *) (faiss::IndexHNSW *) ((faiss::IndexHNSWFlat *) x));
78291 }
78292 static void *_p_faiss__Index2LayerTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78293 return (void *)((faiss::Index *) ((faiss::Index2Layer *) x));
78294 }
78295 static void *_p_faiss__IndexFlatIPTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78296 return (void *)((faiss::Index *) (faiss::IndexFlat *) ((faiss::IndexFlatIP *) x));
78297 }
78298 static void *_p_faiss__IndexHNSWTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78299 return (void *)((faiss::Index *) ((faiss::IndexHNSW *) x));
78300 }
78301 static void *_p_faiss__IndexHNSWPQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78302 return (void *)((faiss::Index *) (faiss::IndexHNSW *) ((faiss::IndexHNSWPQ *) x));
78303 }
78304 static void *_p_faiss__IndexIVFFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78305 return (void *)((faiss::Index *) (faiss::IndexIVF *) ((faiss::IndexIVFFlat *) x));
78306 }
78307 static void *_p_faiss__IndexLSHTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78308 return (void *)((faiss::Index *) ((faiss::IndexLSH *) x));
78309 }
78310 static void *_p_faiss__IndexFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78311 return (void *)((faiss::Index *) ((faiss::IndexFlat *) x));
78312 }
78313 static void *_p_faiss__IndexIVFFlatDedupTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78314 return (void *)((faiss::Index *) (faiss::IndexIVF *)(faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup *) x));
78315 }
78316 static void *_p_faiss__IndexIVFPQRTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78317 return (void *)((faiss::Index *) (faiss::IndexIVF *)(faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR *) x));
78318 }
78319 static void *_p_faiss__IndexFlat1DTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78320 return (void *)((faiss::Index *) (faiss::IndexFlat *)(faiss::IndexFlatL2 *) ((faiss::IndexFlat1D *) x));
78321 }
78322 static void *_p_faiss__IndexFlatL2BaseShiftTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78323 return (void *)((faiss::Index *) (faiss::IndexFlat *)(faiss::IndexFlatL2 *) ((faiss::IndexFlatL2BaseShift *) x));
78324 }
78325 static void *_p_faiss__IndexShardsTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78326 return (void *)((faiss::Index *) ((faiss::IndexShards *) x));
78327 }
78328 static void *_p_faiss__IndexHNSW2LevelTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78329 return (void *)((faiss::Index *) (faiss::IndexHNSW *) ((faiss::IndexHNSW2Level *) x));
78330 }
78331 static void *_p_faiss__IndexIDMap2To_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78332 return (void *)((faiss::Index *) (faiss::IndexIDMap *) ((faiss::IndexIDMap2 *) x));
78333 }
78334 static void *_p_faiss__IndexSplitVectorsTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78335 return (void *)((faiss::Index *) ((faiss::IndexSplitVectors *) x));
78336 }
78337 static void *_p_faiss__IndexRefineFlatTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78338 return (void *)((faiss::Index *) ((faiss::IndexRefineFlat *) x));
78339 }
78340 static void *_p_faiss__IndexHNSWSQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78341 return (void *)((faiss::Index *) (faiss::IndexHNSW *) ((faiss::IndexHNSWSQ *) x));
78342 }
78343 static void *_p_faiss__MultiIndexQuantizer2To_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78344 return (void *)((faiss::Index *) (faiss::MultiIndexQuantizer *) ((faiss::MultiIndexQuantizer2 *) x));
78345 }
78346 static void *_p_faiss__IndexPQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78347 return (void *)((faiss::Index *) ((faiss::IndexPQ *) x));
78348 }
78349 static void *_p_faiss__IndexIDMapTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78350 return (void *)((faiss::Index *) ((faiss::IndexIDMap *) x));
78351 }
78352 static void *_p_faiss__IndexIVFPQTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78353 return (void *)((faiss::Index *) (faiss::IndexIVF *) ((faiss::IndexIVFPQ *) x));
78354 }
78355 static void *_p_faiss__IndexIVFScalarQuantizerTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78356 return (void *)((faiss::Index *) (faiss::IndexIVF *) ((faiss::IndexIVFScalarQuantizer *) x));
78357 }
78358 static void *_p_faiss__IndexScalarQuantizerTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78359 return (void *)((faiss::Index *) ((faiss::IndexScalarQuantizer *) x));
78360 }
78361 static void *_p_faiss__MultiIndexQuantizerTo_p_faiss__Index(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78362 return (void *)((faiss::Index *) ((faiss::MultiIndexQuantizer *) x));
78363 }
78364 static void *_p_faiss__IndexBinaryFlatTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78365 return (void *)((faiss::IndexBinary *) ((faiss::IndexBinaryFlat *) x));
78366 }
78367 static void *_p_faiss__IndexBinaryHNSWTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78368 return (void *)((faiss::IndexBinary *) ((faiss::IndexBinaryHNSW *) x));
78369 }
78370 static void *_p_faiss__IndexBinaryIVFTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78371 return (void *)((faiss::IndexBinary *) ((faiss::IndexBinaryIVF *) x));
78372 }
78373 static void *_p_faiss__IndexBinaryFromFloatTo_p_faiss__IndexBinary(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78374 return (void *)((faiss::IndexBinary *) ((faiss::IndexBinaryFromFloat *) x));
78375 }
78376 static void *_p_faiss__MultiIndexQuantizer2To_p_faiss__MultiIndexQuantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78377 return (void *)((faiss::MultiIndexQuantizer *) ((faiss::MultiIndexQuantizer2 *) x));
78378 }
78379 static void *_p_faiss__IndexIVFTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78380 return (void *)((faiss::Level1Quantizer *) ((faiss::IndexIVF *) x));
78381 }
78382 static void *_p_faiss__IndexIVFScalarQuantizerTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78383 return (void *)((faiss::Level1Quantizer *) (faiss::IndexIVF *) ((faiss::IndexIVFScalarQuantizer *) x));
78384 }
78385 static void *_p_faiss__IndexIVFPQTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78386 return (void *)((faiss::Level1Quantizer *) (faiss::IndexIVF *) ((faiss::IndexIVFPQ *) x));
78387 }
78388 static void *_p_faiss__IndexIVFFlatTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78389 return (void *)((faiss::Level1Quantizer *) (faiss::IndexIVF *) ((faiss::IndexIVFFlat *) x));
78390 }
78391 static void *_p_faiss__IndexIVFFlatDedupTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78392 return (void *)((faiss::Level1Quantizer *) (faiss::IndexIVF *)(faiss::IndexIVFFlat *) ((faiss::IndexIVFFlatDedup *) x));
78393 }
78394 static void *_p_faiss__IndexIVFPQRTo_p_faiss__Level1Quantizer(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78395 return (void *)((faiss::Level1Quantizer *) (faiss::IndexIVF *)(faiss::IndexIVFPQ *) ((faiss::IndexIVFPQR *) x));
78396 }
78397 static void *_p_faiss__OneRecallAtRCriterionTo_p_faiss__AutoTuneCriterion(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78398 return (void *)((faiss::AutoTuneCriterion *) ((faiss::OneRecallAtRCriterion *) x));
78399 }
78400 static void *_p_faiss__IntersectionCriterionTo_p_faiss__AutoTuneCriterion(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78401 return (void *)((faiss::AutoTuneCriterion *) ((faiss::IntersectionCriterion *) x));
78402 }
78403 static void *_p_faiss__VectorIOWriterTo_p_faiss__IOWriter(void *x, int *SWIGUNUSEDPARM(newmemory)) {
78404 return (void *)((faiss::IOWriter *) ((faiss::VectorIOWriter *) x));
78405 }
78406 static swig_type_info _swigt__p_Crev = {"_p_Crev", "Crev *", 0, 0, (void*)0, 0};
78407 static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
78408 static swig_type_info _swigt__p_MapLong2Long = {"_p_MapLong2Long", "MapLong2Long *", 0, 0, (void*)0, 0};
78409 static swig_type_info _swigt__p_Node = {"_p_Node", "Node *", 0, 0, (void*)0, 0};
78410 static swig_type_info _swigt__p_T = {"_p_T", "T *", 0, 0, (void*)0, 0};
78411 static swig_type_info _swigt__p_TI = {"_p_TI", "TI *", 0, 0, (void*)0, 0};
78412 static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
78413 static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
78414 static swig_type_info _swigt__p_faiss__ArrayInvertedLists = {"_p_faiss__ArrayInvertedLists", "faiss::ArrayInvertedLists *", 0, 0, (void*)0, 0};
78415 static swig_type_info _swigt__p_faiss__AutoTuneCriterion = {"_p_faiss__AutoTuneCriterion", "faiss::AutoTuneCriterion *", 0, 0, (void*)0, 0};
78416 static swig_type_info _swigt__p_faiss__BinaryInvertedListScanner = {"_p_faiss__BinaryInvertedListScanner", "faiss::BinaryInvertedListScanner *", 0, 0, (void*)0, 0};
78417 static swig_type_info _swigt__p_faiss__BufferList = {"_p_faiss__BufferList", "faiss::BufferList *", 0, 0, (void*)0, 0};
78418 static swig_type_info _swigt__p_faiss__Cloner = {"_p_faiss__Cloner", "faiss::Cloner *", 0, 0, (void*)0, 0};
78419 static swig_type_info _swigt__p_faiss__Clustering = {"_p_faiss__Clustering", "faiss::Clustering *", 0, 0, (void*)0, 0};
78420 static swig_type_info _swigt__p_faiss__ClusteringParameters = {"_p_faiss__ClusteringParameters", "faiss::ClusteringParameters *", 0, 0, (void*)0, 0};
78421 static swig_type_info _swigt__p_faiss__ConcatenatedInvertedLists = {"_p_faiss__ConcatenatedInvertedLists", "faiss::ConcatenatedInvertedLists *", 0, 0, (void*)0, 0};
78422 static swig_type_info _swigt__p_faiss__GenHammingComputer16 = {"_p_faiss__GenHammingComputer16", "faiss::GenHammingComputer16 *", 0, 0, (void*)0, 0};
78423 static swig_type_info _swigt__p_faiss__GenHammingComputer32 = {"_p_faiss__GenHammingComputer32", "faiss::GenHammingComputer32 *", 0, 0, (void*)0, 0};
78424 static swig_type_info _swigt__p_faiss__GenHammingComputer8 = {"_p_faiss__GenHammingComputer8", "faiss::GenHammingComputer8 *", 0, 0, (void*)0, 0};
78425 static swig_type_info _swigt__p_faiss__GenHammingComputerM8 = {"_p_faiss__GenHammingComputerM8", "faiss::GenHammingComputerM8 *", 0, 0, (void*)0, 0};
78426 static swig_type_info _swigt__p_faiss__HNSW = {"_p_faiss__HNSW", "faiss::HNSW *", 0, 0, (void*)0, 0};
78427 static swig_type_info _swigt__p_faiss__HNSWStats = {"_p_faiss__HNSWStats", "faiss::HNSWStats *", 0, 0, (void*)0, 0};
78428 static swig_type_info _swigt__p_faiss__HNSW__DistanceComputer = {"_p_faiss__HNSW__DistanceComputer", "faiss::HNSW::DistanceComputer *", 0, 0, (void*)0, 0};
78429 static swig_type_info _swigt__p_faiss__HNSW__MinimaxHeap = {"_p_faiss__HNSW__MinimaxHeap", "faiss::HNSW::MinimaxHeap *", 0, 0, (void*)0, 0};
78430 static swig_type_info _swigt__p_faiss__HammingComputer16 = {"_p_faiss__HammingComputer16", "faiss::HammingComputer16 *", 0, 0, (void*)0, 0};
78431 static swig_type_info _swigt__p_faiss__HammingComputer20 = {"_p_faiss__HammingComputer20", "faiss::HammingComputer20 *", 0, 0, (void*)0, 0};
78432 static swig_type_info _swigt__p_faiss__HammingComputer32 = {"_p_faiss__HammingComputer32", "faiss::HammingComputer32 *", 0, 0, (void*)0, 0};
78433 static swig_type_info _swigt__p_faiss__HammingComputer4 = {"_p_faiss__HammingComputer4", "faiss::HammingComputer4 *", 0, 0, (void*)0, 0};
78434 static swig_type_info _swigt__p_faiss__HammingComputer64 = {"_p_faiss__HammingComputer64", "faiss::HammingComputer64 *", 0, 0, (void*)0, 0};
78435 static swig_type_info _swigt__p_faiss__HammingComputer8 = {"_p_faiss__HammingComputer8", "faiss::HammingComputer8 *", 0, 0, (void*)0, 0};
78436 static swig_type_info _swigt__p_faiss__HammingComputerDefault = {"_p_faiss__HammingComputerDefault", "faiss::HammingComputerDefault *", 0, 0, (void*)0, 0};
78437 static swig_type_info _swigt__p_faiss__HammingComputerM4 = {"_p_faiss__HammingComputerM4", "faiss::HammingComputerM4 *", 0, 0, (void*)0, 0};
78438 static swig_type_info _swigt__p_faiss__HammingComputerM8 = {"_p_faiss__HammingComputerM8", "faiss::HammingComputerM8 *", 0, 0, (void*)0, 0};
78439 static swig_type_info _swigt__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t = {"_p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t", "faiss::HeapArray< faiss::CMax< float,long > > *|faiss::float_maxheap_array_t *", 0, 0, (void*)0, 0};
78440 static swig_type_info _swigt__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t = {"_p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t", "faiss::HeapArray< faiss::CMax< int,long > > *|faiss::int_maxheap_array_t *", 0, 0, (void*)0, 0};
78441 static swig_type_info _swigt__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t = {"_p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t", "faiss::HeapArray< faiss::CMin< float,long > > *|faiss::float_minheap_array_t *", 0, 0, (void*)0, 0};
78442 static swig_type_info _swigt__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t = {"_p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t", "faiss::HeapArray< faiss::CMin< int,long > > *|faiss::int_minheap_array_t *", 0, 0, (void*)0, 0};
78443 static swig_type_info _swigt__p_faiss__IDSelector = {"_p_faiss__IDSelector", "faiss::IDSelector *", 0, 0, (void*)0, 0};
78444 static swig_type_info _swigt__p_faiss__IDSelectorBatch = {"_p_faiss__IDSelectorBatch", "faiss::IDSelectorBatch *", 0, 0, (void*)0, 0};
78445 static swig_type_info _swigt__p_faiss__IDSelectorRange = {"_p_faiss__IDSelectorRange", "faiss::IDSelectorRange *", 0, 0, (void*)0, 0};
78446 static swig_type_info _swigt__p_faiss__IOReader = {"_p_faiss__IOReader", "faiss::IOReader *", 0, 0, (void*)0, 0};
78447 static swig_type_info _swigt__p_faiss__IOWriter = {"_p_faiss__IOWriter", "faiss::IOWriter *", 0, 0, (void*)0, 0};
78448 static swig_type_info _swigt__p_faiss__IVFPQSearchParameters = {"_p_faiss__IVFPQSearchParameters", "faiss::IVFPQSearchParameters *", 0, 0, (void*)0, 0};
78449 static swig_type_info _swigt__p_faiss__IVFSearchParameters = {"_p_faiss__IVFSearchParameters", "faiss::IVFSearchParameters *", 0, 0, (void*)0, 0};
78450 static swig_type_info _swigt__p_faiss__Index = {"_p_faiss__Index", "faiss::Index *", 0, 0, (void*)0, 0};
78451 static swig_type_info _swigt__p_faiss__Index2Layer = {"_p_faiss__Index2Layer", "faiss::Index2Layer *", 0, 0, (void*)0, 0};
78452 static swig_type_info _swigt__p_faiss__IndexBinary = {"_p_faiss__IndexBinary", "faiss::IndexBinary *", 0, 0, (void*)0, 0};
78453 static swig_type_info _swigt__p_faiss__IndexBinaryFlat = {"_p_faiss__IndexBinaryFlat", "faiss::IndexBinaryFlat *", 0, 0, (void*)0, 0};
78454 static swig_type_info _swigt__p_faiss__IndexBinaryFromFloat = {"_p_faiss__IndexBinaryFromFloat", "faiss::IndexBinaryFromFloat *", 0, 0, (void*)0, 0};
78455 static swig_type_info _swigt__p_faiss__IndexBinaryHNSW = {"_p_faiss__IndexBinaryHNSW", "faiss::IndexBinaryHNSW *", 0, 0, (void*)0, 0};
78456 static swig_type_info _swigt__p_faiss__IndexBinaryIVF = {"_p_faiss__IndexBinaryIVF", "faiss::IndexBinaryIVF *", 0, 0, (void*)0, 0};
78457 static swig_type_info _swigt__p_faiss__IndexFlat = {"_p_faiss__IndexFlat", "faiss::IndexFlat *", 0, 0, (void*)0, 0};
78458 static swig_type_info _swigt__p_faiss__IndexFlat1D = {"_p_faiss__IndexFlat1D", "faiss::IndexFlat1D *", 0, 0, (void*)0, 0};
78459 static swig_type_info _swigt__p_faiss__IndexFlatIP = {"_p_faiss__IndexFlatIP", "faiss::IndexFlatIP *", 0, 0, (void*)0, 0};
78460 static swig_type_info _swigt__p_faiss__IndexFlatL2 = {"_p_faiss__IndexFlatL2", "faiss::IndexFlatL2 *", 0, 0, (void*)0, 0};
78461 static swig_type_info _swigt__p_faiss__IndexFlatL2BaseShift = {"_p_faiss__IndexFlatL2BaseShift", "faiss::IndexFlatL2BaseShift *", 0, 0, (void*)0, 0};
78462 static swig_type_info _swigt__p_faiss__IndexHNSW = {"_p_faiss__IndexHNSW", "faiss::IndexHNSW *", 0, 0, (void*)0, 0};
78463 static swig_type_info _swigt__p_faiss__IndexHNSW2Level = {"_p_faiss__IndexHNSW2Level", "faiss::IndexHNSW2Level *", 0, 0, (void*)0, 0};
78464 static swig_type_info _swigt__p_faiss__IndexHNSWFlat = {"_p_faiss__IndexHNSWFlat", "faiss::IndexHNSWFlat *", 0, 0, (void*)0, 0};
78465 static swig_type_info _swigt__p_faiss__IndexHNSWPQ = {"_p_faiss__IndexHNSWPQ", "faiss::IndexHNSWPQ *", 0, 0, (void*)0, 0};
78466 static swig_type_info _swigt__p_faiss__IndexHNSWSQ = {"_p_faiss__IndexHNSWSQ", "faiss::IndexHNSWSQ *", 0, 0, (void*)0, 0};
78467 static swig_type_info _swigt__p_faiss__IndexIDMap = {"_p_faiss__IndexIDMap", "faiss::IndexIDMap *", 0, 0, (void*)0, 0};
78468 static swig_type_info _swigt__p_faiss__IndexIDMap2 = {"_p_faiss__IndexIDMap2", "faiss::IndexIDMap2 *", 0, 0, (void*)0, 0};
78469 static swig_type_info _swigt__p_faiss__IndexIVF = {"_p_faiss__IndexIVF", "faiss::IndexIVF *", 0, 0, (void*)0, 0};
78470 static swig_type_info _swigt__p_faiss__IndexIVFFlat = {"_p_faiss__IndexIVFFlat", "faiss::IndexIVFFlat *", 0, 0, (void*)0, 0};
78471 static swig_type_info _swigt__p_faiss__IndexIVFFlatDedup = {"_p_faiss__IndexIVFFlatDedup", "faiss::IndexIVFFlatDedup *", 0, 0, (void*)0, 0};
78472 static swig_type_info _swigt__p_faiss__IndexIVFPQ = {"_p_faiss__IndexIVFPQ", "faiss::IndexIVFPQ *", 0, 0, (void*)0, 0};
78473 static swig_type_info _swigt__p_faiss__IndexIVFPQR = {"_p_faiss__IndexIVFPQR", "faiss::IndexIVFPQR *", 0, 0, (void*)0, 0};
78474 static swig_type_info _swigt__p_faiss__IndexIVFPQStats = {"_p_faiss__IndexIVFPQStats", "faiss::IndexIVFPQStats *", 0, 0, (void*)0, 0};
78475 static swig_type_info _swigt__p_faiss__IndexIVFScalarQuantizer = {"_p_faiss__IndexIVFScalarQuantizer", "faiss::IndexIVFScalarQuantizer *", 0, 0, (void*)0, 0};
78476 static swig_type_info _swigt__p_faiss__IndexIVFStats = {"_p_faiss__IndexIVFStats", "faiss::IndexIVFStats *", 0, 0, (void*)0, 0};
78477 static swig_type_info _swigt__p_faiss__IndexLSH = {"_p_faiss__IndexLSH", "faiss::IndexLSH *", 0, 0, (void*)0, 0};
78478 static swig_type_info _swigt__p_faiss__IndexPQ = {"_p_faiss__IndexPQ", "faiss::IndexPQ *", 0, 0, (void*)0, 0};
78479 static swig_type_info _swigt__p_faiss__IndexPQStats = {"_p_faiss__IndexPQStats", "faiss::IndexPQStats *", 0, 0, (void*)0, 0};
78480 static swig_type_info _swigt__p_faiss__IndexPreTransform = {"_p_faiss__IndexPreTransform", "faiss::IndexPreTransform *", 0, 0, (void*)0, 0};
78481 static swig_type_info _swigt__p_faiss__IndexRefineFlat = {"_p_faiss__IndexRefineFlat", "faiss::IndexRefineFlat *", 0, 0, (void*)0, 0};
78482 static swig_type_info _swigt__p_faiss__IndexScalarQuantizer = {"_p_faiss__IndexScalarQuantizer", "faiss::IndexScalarQuantizer *", 0, 0, (void*)0, 0};
78483 static swig_type_info _swigt__p_faiss__IndexShards = {"_p_faiss__IndexShards", "faiss::IndexShards *", 0, 0, (void*)0, 0};
78484 static swig_type_info _swigt__p_faiss__IndexSplitVectors = {"_p_faiss__IndexSplitVectors", "faiss::IndexSplitVectors *", 0, 0, (void*)0, 0};
78485 static swig_type_info _swigt__p_faiss__IntersectionCriterion = {"_p_faiss__IntersectionCriterion", "faiss::IntersectionCriterion *", 0, 0, (void*)0, 0};
78486 static swig_type_info _swigt__p_faiss__InvertedListScanner = {"_p_faiss__InvertedListScanner", "faiss::InvertedListScanner *", 0, 0, (void*)0, 0};
78487 static swig_type_info _swigt__p_faiss__InvertedLists = {"_p_faiss__InvertedLists", "faiss::InvertedLists *", 0, 0, (void*)0, 0};
78488 static swig_type_info _swigt__p_faiss__Level1Quantizer = {"_p_faiss__Level1Quantizer", "faiss::Level1Quantizer *", 0, 0, (void*)0, 0};
78489 static swig_type_info _swigt__p_faiss__LinearTransform = {"_p_faiss__LinearTransform", "faiss::LinearTransform *", 0, 0, (void*)0, 0};
78490 static swig_type_info _swigt__p_faiss__LockLevels = {"_p_faiss__LockLevels", "faiss::LockLevels *", 0, 0, (void*)0, 0};
78491 static swig_type_info _swigt__p_faiss__MultiIndexQuantizer = {"_p_faiss__MultiIndexQuantizer", "faiss::MultiIndexQuantizer *", 0, 0, (void*)0, 0};
78492 static swig_type_info _swigt__p_faiss__MultiIndexQuantizer2 = {"_p_faiss__MultiIndexQuantizer2", "faiss::MultiIndexQuantizer2 *", 0, 0, (void*)0, 0};
78493 static swig_type_info _swigt__p_faiss__NormalizationTransform = {"_p_faiss__NormalizationTransform", "faiss::NormalizationTransform *", 0, 0, (void*)0, 0};
78494 static swig_type_info _swigt__p_faiss__OPQMatrix = {"_p_faiss__OPQMatrix", "faiss::OPQMatrix *", 0, 0, (void*)0, 0};
78495 static swig_type_info _swigt__p_faiss__OnDiskInvertedLists = {"_p_faiss__OnDiskInvertedLists", "faiss::OnDiskInvertedLists *", 0, 0, (void*)0, 0};
78496 static swig_type_info _swigt__p_faiss__OnDiskInvertedLists__OngoingPrefetch = {"_p_faiss__OnDiskInvertedLists__OngoingPrefetch", "faiss::OnDiskInvertedLists::OngoingPrefetch *", 0, 0, (void*)0, 0};
78497 static swig_type_info _swigt__p_faiss__OneRecallAtRCriterion = {"_p_faiss__OneRecallAtRCriterion", "faiss::OneRecallAtRCriterion *", 0, 0, (void*)0, 0};
78498 static swig_type_info _swigt__p_faiss__OperatingPoint = {"_p_faiss__OperatingPoint", "faiss::OperatingPoint *", 0, 0, (void*)0, 0};
78499 static swig_type_info _swigt__p_faiss__OperatingPoints = {"_p_faiss__OperatingPoints", "faiss::OperatingPoints *", 0, 0, (void*)0, 0};
78500 static swig_type_info _swigt__p_faiss__PCAMatrix = {"_p_faiss__PCAMatrix", "faiss::PCAMatrix *", 0, 0, (void*)0, 0};
78501 static swig_type_info _swigt__p_faiss__ParameterRange = {"_p_faiss__ParameterRange", "faiss::ParameterRange *", 0, 0, (void*)0, 0};
78502 static swig_type_info _swigt__p_faiss__ParameterSpace = {"_p_faiss__ParameterSpace", "faiss::ParameterSpace *", 0, 0, (void*)0, 0};
78503 static swig_type_info _swigt__p_faiss__PermutationObjective = {"_p_faiss__PermutationObjective", "faiss::PermutationObjective *", 0, 0, (void*)0, 0};
78504 static swig_type_info _swigt__p_faiss__PolysemousTraining = {"_p_faiss__PolysemousTraining", "faiss::PolysemousTraining *", 0, 0, (void*)0, 0};
78505 static swig_type_info _swigt__p_faiss__ProductQuantizer = {"_p_faiss__ProductQuantizer", "faiss::ProductQuantizer *", 0, 0, (void*)0, 0};
78506 static swig_type_info _swigt__p_faiss__RandomGenerator = {"_p_faiss__RandomGenerator", "faiss::RandomGenerator *", 0, 0, (void*)0, 0};
78507 static swig_type_info _swigt__p_faiss__RandomRotationMatrix = {"_p_faiss__RandomRotationMatrix", "faiss::RandomRotationMatrix *", 0, 0, (void*)0, 0};
78508 static swig_type_info _swigt__p_faiss__RangeSearchPartialResult = {"_p_faiss__RangeSearchPartialResult", "faiss::RangeSearchPartialResult *", 0, 0, (void*)0, 0};
78509 static swig_type_info _swigt__p_faiss__RangeSearchPartialResult__QueryResult = {"_p_faiss__RangeSearchPartialResult__QueryResult", "faiss::RangeSearchPartialResult::QueryResult *", 0, 0, (void*)0, 0};
78510 static swig_type_info _swigt__p_faiss__RangeSearchResult = {"_p_faiss__RangeSearchResult", "faiss::RangeSearchResult *", 0, 0, (void*)0, 0};
78511 static swig_type_info _swigt__p_faiss__ReconstructFromNeighbors = {"_p_faiss__ReconstructFromNeighbors", "faiss::ReconstructFromNeighbors *", 0, 0, (void*)0, 0};
78512 static swig_type_info _swigt__p_faiss__RemapDimensionsTransform = {"_p_faiss__RemapDimensionsTransform", "faiss::RemapDimensionsTransform *", 0, 0, (void*)0, 0};
78513 static swig_type_info _swigt__p_faiss__ReproduceDistancesObjective = {"_p_faiss__ReproduceDistancesObjective", "faiss::ReproduceDistancesObjective *", 0, 0, (void*)0, 0};
78514 static swig_type_info _swigt__p_faiss__ScalarQuantizer = {"_p_faiss__ScalarQuantizer", "faiss::ScalarQuantizer *", 0, 0, (void*)0, 0};
78515 static swig_type_info _swigt__p_faiss__ScalarQuantizer__DistanceComputer = {"_p_faiss__ScalarQuantizer__DistanceComputer", "faiss::ScalarQuantizer::DistanceComputer *", 0, 0, (void*)0, 0};
78516 static swig_type_info _swigt__p_faiss__SimulatedAnnealingOptimizer = {"_p_faiss__SimulatedAnnealingOptimizer", "faiss::SimulatedAnnealingOptimizer *", 0, 0, (void*)0, 0};
78517 static swig_type_info _swigt__p_faiss__SimulatedAnnealingParameters = {"_p_faiss__SimulatedAnnealingParameters", "faiss::SimulatedAnnealingParameters *", 0, 0, (void*)0, 0};
78518 static swig_type_info _swigt__p_faiss__VectorIOReader = {"_p_faiss__VectorIOReader", "faiss::VectorIOReader *", 0, 0, (void*)0, 0};
78519 static swig_type_info _swigt__p_faiss__VectorIOWriter = {"_p_faiss__VectorIOWriter", "faiss::VectorIOWriter *", 0, 0, (void*)0, 0};
78520 static swig_type_info _swigt__p_faiss__VectorTransform = {"_p_faiss__VectorTransform", "faiss::VectorTransform *", 0, 0, (void*)0, 0};
78521 static swig_type_info _swigt__p_faiss__VisitedTable = {"_p_faiss__VisitedTable", "faiss::VisitedTable *", 0, 0, (void*)0, 0};
78522 static swig_type_info _swigt__p_faiss__ivflib__SlidingIndexWindow = {"_p_faiss__ivflib__SlidingIndexWindow", "faiss::ivflib::SlidingIndexWindow *", 0, 0, (void*)0, 0};
78523 static swig_type_info _swigt__p_float = {"_p_float", "float *|faiss::HeapArray< faiss::CMin< float,long > >::T *|faiss::HeapArray< faiss::CMax< float,long > >::T *", 0, 0, (void*)0, 0};
78524 static swig_type_info _swigt__p_idx_t = {"_p_idx_t", "idx_t *", 0, 0, (void*)0, 0};
78525 static swig_type_info _swigt__p_int = {"_p_int", "int *|int32_t *|hamdis_t *|faiss::HeapArray< faiss::CMin< int,long > >::T *|faiss::HeapArray< faiss::CMax< int,long > >::T *|faiss::IndexHNSW::storage_idx_t *", 0, 0, (void*)0, 0};
78526 static swig_type_info _swigt__p_long = {"_p_long", "faiss::HeapArray< faiss::CMax< float,long > >::TI *|faiss::HeapArray< faiss::CMin< float,long > >::TI *|faiss::BufferList::idx_t *|faiss::IDSelector::idx_t *|faiss::RangeSearchResult::idx_t *|faiss::Index::idx_t *|faiss::InvertedLists::idx_t *|faiss::ivflib::idx_t *|faiss::HNSW::idx_t *|faiss::ReconstructFromNeighbors::idx_t *|faiss::IndexBinary::idx_t *|faiss::AutoTuneCriterion::idx_t *|faiss::HeapArray< faiss::CMin< int,long > >::TI *|faiss::HeapArray< faiss::CMax< int,long > >::TI *|long *", 0, 0, (void*)0, 0};
78527 static swig_type_info _swigt__p_omp_lock_t = {"_p_omp_lock_t", "omp_lock_t *", 0, 0, (void*)0, 0};
78528 static swig_type_info _swigt__p_p_faiss__Index = {"_p_p_faiss__Index", "faiss::Index **", 0, 0, (void*)0, 0};
78529 static swig_type_info _swigt__p_p_faiss__IndexPreTransform = {"_p_p_faiss__IndexPreTransform", 0, 0, 0, 0, 0};
78530 static swig_type_info _swigt__p_p_faiss__IndexIVF = {"_p_p_faiss__IndexIVF", 0, 0, 0, 0, 0};
78531 static swig_type_info _swigt__p_p_faiss__IndexFlatL2 = {"_p_p_faiss__IndexFlatL2", 0, 0, 0, 0, 0};
78532 static swig_type_info _swigt__p_p_faiss__IndexHNSWFlat = {"_p_p_faiss__IndexHNSWFlat", 0, 0, 0, 0, 0};
78533 static swig_type_info _swigt__p_p_faiss__Index2Layer = {"_p_p_faiss__Index2Layer", 0, 0, 0, 0, 0};
78534 static swig_type_info _swigt__p_p_faiss__IndexHNSWPQ = {"_p_p_faiss__IndexHNSWPQ", 0, 0, 0, 0, 0};
78535 static swig_type_info _swigt__p_p_faiss__IndexFlatIP = {"_p_p_faiss__IndexFlatIP", 0, 0, 0, 0, 0};
78536 static swig_type_info _swigt__p_p_faiss__IndexHNSW = {"_p_p_faiss__IndexHNSW", 0, 0, 0, 0, 0};
78537 static swig_type_info _swigt__p_p_faiss__IndexIVFFlat = {"_p_p_faiss__IndexIVFFlat", 0, 0, 0, 0, 0};
78538 static swig_type_info _swigt__p_p_faiss__IndexLSH = {"_p_p_faiss__IndexLSH", 0, 0, 0, 0, 0};
78539 static swig_type_info _swigt__p_p_faiss__IndexIVFPQR = {"_p_p_faiss__IndexIVFPQR", 0, 0, 0, 0, 0};
78540 static swig_type_info _swigt__p_p_faiss__IndexIVFFlatDedup = {"_p_p_faiss__IndexIVFFlatDedup", 0, 0, 0, 0, 0};
78541 static swig_type_info _swigt__p_p_faiss__IndexFlat = {"_p_p_faiss__IndexFlat", 0, 0, 0, 0, 0};
78542 static swig_type_info _swigt__p_p_faiss__IndexFlat1D = {"_p_p_faiss__IndexFlat1D", 0, 0, 0, 0, 0};
78543 static swig_type_info _swigt__p_p_faiss__IndexFlatL2BaseShift = {"_p_p_faiss__IndexFlatL2BaseShift", 0, 0, 0, 0, 0};
78544 static swig_type_info _swigt__p_p_faiss__IndexShards = {"_p_p_faiss__IndexShards", 0, 0, 0, 0, 0};
78545 static swig_type_info _swigt__p_p_faiss__IndexHNSW2Level = {"_p_p_faiss__IndexHNSW2Level", 0, 0, 0, 0, 0};
78546 static swig_type_info _swigt__p_p_faiss__IndexIDMap2 = {"_p_p_faiss__IndexIDMap2", 0, 0, 0, 0, 0};
78547 static swig_type_info _swigt__p_p_faiss__IndexSplitVectors = {"_p_p_faiss__IndexSplitVectors", 0, 0, 0, 0, 0};
78548 static swig_type_info _swigt__p_p_faiss__IndexRefineFlat = {"_p_p_faiss__IndexRefineFlat", 0, 0, 0, 0, 0};
78549 static swig_type_info _swigt__p_p_faiss__IndexHNSWSQ = {"_p_p_faiss__IndexHNSWSQ", 0, 0, 0, 0, 0};
78550 static swig_type_info _swigt__p_p_faiss__MultiIndexQuantizer2 = {"_p_p_faiss__MultiIndexQuantizer2", 0, 0, 0, 0, 0};
78551 static swig_type_info _swigt__p_p_faiss__IndexPQ = {"_p_p_faiss__IndexPQ", 0, 0, 0, 0, 0};
78552 static swig_type_info _swigt__p_p_faiss__IndexIDMap = {"_p_p_faiss__IndexIDMap", 0, 0, 0, 0, 0};
78553 static swig_type_info _swigt__p_p_faiss__IndexIVFPQ = {"_p_p_faiss__IndexIVFPQ", 0, 0, 0, 0, 0};
78554 static swig_type_info _swigt__p_p_faiss__IndexIVFScalarQuantizer = {"_p_p_faiss__IndexIVFScalarQuantizer", 0, 0, 0, 0, 0};
78555 static swig_type_info _swigt__p_p_faiss__IndexScalarQuantizer = {"_p_p_faiss__IndexScalarQuantizer", 0, 0, 0, 0, 0};
78556 static swig_type_info _swigt__p_p_faiss__MultiIndexQuantizer = {"_p_p_faiss__MultiIndexQuantizer", 0, 0, 0, 0, 0};
78557 static swig_type_info _swigt__p_p_faiss__InvertedLists = {"_p_p_faiss__InvertedLists", "faiss::InvertedLists **", 0, 0, (void*)0, 0};
78558 static swig_type_info _swigt__p_p_faiss__ArrayInvertedLists = {"_p_p_faiss__ArrayInvertedLists", 0, 0, 0, 0, 0};
78559 static swig_type_info _swigt__p_p_faiss__ConcatenatedInvertedLists = {"_p_p_faiss__ConcatenatedInvertedLists", 0, 0, 0, 0, 0};
78560 static swig_type_info _swigt__p_p_faiss__OnDiskInvertedLists = {"_p_p_faiss__OnDiskInvertedLists", 0, 0, 0, 0, 0};
78561 static swig_type_info _swigt__p_p_faiss__VectorTransform = {"_p_p_faiss__VectorTransform", "faiss::VectorTransform **", 0, 0, (void*)0, 0};
78562 static swig_type_info _swigt__p_p_faiss__RandomRotationMatrix = {"_p_p_faiss__RandomRotationMatrix", 0, 0, 0, 0, 0};
78563 static swig_type_info _swigt__p_p_faiss__PCAMatrix = {"_p_p_faiss__PCAMatrix", 0, 0, 0, 0, 0};
78564 static swig_type_info _swigt__p_p_faiss__OPQMatrix = {"_p_p_faiss__OPQMatrix", 0, 0, 0, 0, 0};
78565 static swig_type_info _swigt__p_p_faiss__LinearTransform = {"_p_p_faiss__LinearTransform", 0, 0, 0, 0, 0};
78566 static swig_type_info _swigt__p_p_faiss__RemapDimensionsTransform = {"_p_p_faiss__RemapDimensionsTransform", 0, 0, 0, 0, 0};
78567 static swig_type_info _swigt__p_p_faiss__NormalizationTransform = {"_p_p_faiss__NormalizationTransform", 0, 0, 0, 0, 0};
78568 static swig_type_info _swigt__p_std__listT_faiss__OnDiskInvertedLists__Slot_t = {"_p_std__listT_faiss__OnDiskInvertedLists__Slot_t", "std::list< faiss::OnDiskInvertedLists::Slot > *", 0, 0, (void*)0, 0};
78569 static swig_type_info _swigt__p_std__mt19937 = {"_p_std__mt19937", "std::mt19937 *", 0, 0, (void*)0, 0};
78570 static swig_type_info _swigt__p_std__pairT_float_int_t = {"_p_std__pairT_float_int_t", "std::pair< float,int > *|faiss::HNSW::Node *", 0, 0, (void*)0, 0};
78571 static swig_type_info _swigt__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t = {"_p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t", "std::priority_queue< faiss::HNSW::NodeDistFarther > *", 0, 0, (void*)0, 0};
78572 static swig_type_info _swigt__p_std__priority_queueT_std__pairT_float_int_t_t = {"_p_std__priority_queueT_std__pairT_float_int_t_t", "std::priority_queue< std::pair< float,int > > *|std::priority_queue< faiss::HNSW::Node > *", 0, 0, (void*)0, 0};
78573 static swig_type_info _swigt__p_std__unordered_mapT_long_long_t = {"_p_std__unordered_mapT_long_long_t", "std::unordered_map< long,long > *|std::unordered_map< faiss::Index::idx_t,faiss::Index::idx_t > *", 0, 0, (void*)0, 0};
78574 static swig_type_info _swigt__p_std__unordered_multimapT_long_long_t = {"_p_std__unordered_multimapT_long_long_t", "std::unordered_multimap< long,long > *|std::unordered_multimap< faiss::Index::idx_t,faiss::Index::idx_t > *", 0, 0, (void*)0, 0};
78575 static swig_type_info _swigt__p_std__vectorT_char_t = {"_p_std__vectorT_char_t", "std::vector< char > *", 0, 0, (void*)0, 0};
78576 static swig_type_info _swigt__p_std__vectorT_double_t = {"_p_std__vectorT_double_t", "std::vector< double > *", 0, 0, (void*)0, 0};
78577 static swig_type_info _swigt__p_std__vectorT_faiss__BufferList__Buffer_t = {"_p_std__vectorT_faiss__BufferList__Buffer_t", "std::vector< faiss::BufferList::Buffer > *", 0, 0, (void*)0, 0};
78578 static swig_type_info _swigt__p_std__vectorT_faiss__HNSW__NodeDistFarther_t = {"_p_std__vectorT_faiss__HNSW__NodeDistFarther_t", "std::vector< faiss::HNSW::NodeDistFarther > *", 0, 0, (void*)0, 0};
78579 static swig_type_info _swigt__p_std__vectorT_faiss__Index_p_t = {"_p_std__vectorT_faiss__Index_p_t", "std::vector< faiss::Index * > *", 0, 0, (void*)0, 0};
78580 static swig_type_info _swigt__p_std__vectorT_faiss__InvertedLists_const_p_t = {"_p_std__vectorT_faiss__InvertedLists_const_p_t", "std::vector< faiss::InvertedLists const * > *", 0, 0, (void*)0, 0};
78581 static swig_type_info _swigt__p_std__vectorT_faiss__InvertedLists_p_t = {"_p_std__vectorT_faiss__InvertedLists_p_t", "std::vector< faiss::InvertedLists * > *", 0, 0, (void*)0, 0};
78582 static swig_type_info _swigt__p_std__vectorT_faiss__OnDiskInvertedLists__List_t = {"_p_std__vectorT_faiss__OnDiskInvertedLists__List_t", "std::vector< faiss::OnDiskInvertedLists::List > *", 0, 0, (void*)0, 0};
78583 static swig_type_info _swigt__p_std__vectorT_faiss__OperatingPoint_t = {"_p_std__vectorT_faiss__OperatingPoint_t", "std::vector< faiss::OperatingPoint > *", 0, 0, (void*)0, 0};
78584 static swig_type_info _swigt__p_std__vectorT_faiss__ParameterRange_t = {"_p_std__vectorT_faiss__ParameterRange_t", "std::vector< faiss::ParameterRange > *", 0, 0, (void*)0, 0};
78585 static swig_type_info _swigt__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t = {"_p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t", "std::vector< faiss::RangeSearchPartialResult::QueryResult > *", 0, 0, (void*)0, 0};
78586 static swig_type_info _swigt__p_std__vectorT_faiss__VectorTransform_p_t = {"_p_std__vectorT_faiss__VectorTransform_p_t", "std::vector< faiss::VectorTransform * > *", 0, 0, (void*)0, 0};
78587 static swig_type_info _swigt__p_std__vectorT_float_t = {"_p_std__vectorT_float_t", "std::vector< float > *", 0, 0, (void*)0, 0};
78588 static swig_type_info _swigt__p_std__vectorT_int_t = {"_p_std__vectorT_int_t", "std::vector< faiss::HNSW::storage_idx_t > *|std::vector< int > *", 0, 0, (void*)0, 0};
78589 static swig_type_info _swigt__p_std__vectorT_long_t = {"_p_std__vectorT_long_t", "std::vector< long > *|std::vector< faiss::Index::idx_t > *|std::vector< faiss::AutoTuneCriterion::idx_t > *", 0, 0, (void*)0, 0};
78590 static swig_type_info _swigt__p_std__vectorT_omp_lock_t_t = {"_p_std__vectorT_omp_lock_t_t", "std::vector< omp_lock_t > *", 0, 0, (void*)0, 0};
78591 static swig_type_info _swigt__p_std__vectorT_std__vectorT_float_t_t = {"_p_std__vectorT_std__vectorT_float_t_t", "std::vector< std::vector< float > > *", 0, 0, (void*)0, 0};
78592 static swig_type_info _swigt__p_std__vectorT_std__vectorT_long_t_t = {"_p_std__vectorT_std__vectorT_long_t_t", "std::vector< std::vector< long > > *|std::vector< std::vector< faiss::InvertedLists::idx_t > > *", 0, 0, (void*)0, 0};
78593 static swig_type_info _swigt__p_std__vectorT_std__vectorT_uint8_t_t_t = {"_p_std__vectorT_std__vectorT_uint8_t_t_t", "std::vector< std::vector< unsigned char > > *|std::vector< std::vector< uint8_t > > *", 0, 0, (void*)0, 0};
78594 static swig_type_info _swigt__p_std__vectorT_std__vectorT_unsigned_long_t_t = {"_p_std__vectorT_std__vectorT_unsigned_long_t_t", "std::vector< std::vector< unsigned long > > *|std::vector< std::vector< size_t > > *", 0, 0, (void*)0, 0};
78595 static swig_type_info _swigt__p_std__vectorT_unsigned_char_t = {"_p_std__vectorT_unsigned_char_t", "std::vector< unsigned char > *|std::vector< uint8_t > *|std::vector< faiss::IndexLSH::uint8_t > *", 0, 0, (void*)0, 0};
78596 static swig_type_info _swigt__p_std__vectorT_unsigned_long_t = {"_p_std__vectorT_unsigned_long_t", "std::vector< unsigned long > *|std::vector< size_t > *", 0, 0, (void*)0, 0};
78597 static swig_type_info _swigt__p_storage_idx_t = {"_p_storage_idx_t", "storage_idx_t *", 0, 0, (void*)0, 0};
78598 static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *", 0, 0, (void*)0, 0};
78599 static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "unsigned char *|uint8_t *", 0, 0, (void*)0, 0};
78600 static swig_type_info _swigt__p_unsigned_long = {"_p_unsigned_long", "uint64_t *|size_t *|unsigned long *", 0, 0, (void*)0, 0};
78601 static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};
78602
78603 static swig_type_info *swig_type_initial[] = {
78604 &_swigt__p_Crev,
78605 &_swigt__p_FILE,
78606 &_swigt__p_MapLong2Long,
78607 &_swigt__p_Node,
78608 &_swigt__p_T,
78609 &_swigt__p_TI,
78610 &_swigt__p_char,
78611 &_swigt__p_double,
78612 &_swigt__p_faiss__ArrayInvertedLists,
78613 &_swigt__p_faiss__AutoTuneCriterion,
78614 &_swigt__p_faiss__BinaryInvertedListScanner,
78615 &_swigt__p_faiss__BufferList,
78616 &_swigt__p_faiss__Cloner,
78617 &_swigt__p_faiss__Clustering,
78618 &_swigt__p_faiss__ClusteringParameters,
78619 &_swigt__p_faiss__ConcatenatedInvertedLists,
78620 &_swigt__p_faiss__GenHammingComputer16,
78621 &_swigt__p_faiss__GenHammingComputer32,
78622 &_swigt__p_faiss__GenHammingComputer8,
78623 &_swigt__p_faiss__GenHammingComputerM8,
78624 &_swigt__p_faiss__HNSW,
78625 &_swigt__p_faiss__HNSWStats,
78626 &_swigt__p_faiss__HNSW__DistanceComputer,
78627 &_swigt__p_faiss__HNSW__MinimaxHeap,
78628 &_swigt__p_faiss__HammingComputer16,
78629 &_swigt__p_faiss__HammingComputer20,
78630 &_swigt__p_faiss__HammingComputer32,
78631 &_swigt__p_faiss__HammingComputer4,
78632 &_swigt__p_faiss__HammingComputer64,
78633 &_swigt__p_faiss__HammingComputer8,
78634 &_swigt__p_faiss__HammingComputerDefault,
78635 &_swigt__p_faiss__HammingComputerM4,
78636 &_swigt__p_faiss__HammingComputerM8,
78637 &_swigt__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t,
78638 &_swigt__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t,
78639 &_swigt__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t,
78640 &_swigt__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t,
78641 &_swigt__p_faiss__IDSelector,
78642 &_swigt__p_faiss__IDSelectorBatch,
78643 &_swigt__p_faiss__IDSelectorRange,
78644 &_swigt__p_faiss__IOReader,
78645 &_swigt__p_faiss__IOWriter,
78646 &_swigt__p_faiss__IVFPQSearchParameters,
78647 &_swigt__p_faiss__IVFSearchParameters,
78648 &_swigt__p_faiss__Index,
78649 &_swigt__p_faiss__Index2Layer,
78650 &_swigt__p_faiss__IndexBinary,
78651 &_swigt__p_faiss__IndexBinaryFlat,
78652 &_swigt__p_faiss__IndexBinaryFromFloat,
78653 &_swigt__p_faiss__IndexBinaryHNSW,
78654 &_swigt__p_faiss__IndexBinaryIVF,
78655 &_swigt__p_faiss__IndexFlat,
78656 &_swigt__p_faiss__IndexFlat1D,
78657 &_swigt__p_faiss__IndexFlatIP,
78658 &_swigt__p_faiss__IndexFlatL2,
78659 &_swigt__p_faiss__IndexFlatL2BaseShift,
78660 &_swigt__p_faiss__IndexHNSW,
78661 &_swigt__p_faiss__IndexHNSW2Level,
78662 &_swigt__p_faiss__IndexHNSWFlat,
78663 &_swigt__p_faiss__IndexHNSWPQ,
78664 &_swigt__p_faiss__IndexHNSWSQ,
78665 &_swigt__p_faiss__IndexIDMap,
78666 &_swigt__p_faiss__IndexIDMap2,
78667 &_swigt__p_faiss__IndexIVF,
78668 &_swigt__p_faiss__IndexIVFFlat,
78669 &_swigt__p_faiss__IndexIVFFlatDedup,
78670 &_swigt__p_faiss__IndexIVFPQ,
78671 &_swigt__p_faiss__IndexIVFPQR,
78672 &_swigt__p_faiss__IndexIVFPQStats,
78673 &_swigt__p_faiss__IndexIVFScalarQuantizer,
78674 &_swigt__p_faiss__IndexIVFStats,
78675 &_swigt__p_faiss__IndexLSH,
78676 &_swigt__p_faiss__IndexPQ,
78677 &_swigt__p_faiss__IndexPQStats,
78678 &_swigt__p_faiss__IndexPreTransform,
78679 &_swigt__p_faiss__IndexRefineFlat,
78680 &_swigt__p_faiss__IndexScalarQuantizer,
78681 &_swigt__p_faiss__IndexShards,
78682 &_swigt__p_faiss__IndexSplitVectors,
78683 &_swigt__p_faiss__IntersectionCriterion,
78684 &_swigt__p_faiss__InvertedListScanner,
78685 &_swigt__p_faiss__InvertedLists,
78686 &_swigt__p_faiss__Level1Quantizer,
78687 &_swigt__p_faiss__LinearTransform,
78688 &_swigt__p_faiss__LockLevels,
78689 &_swigt__p_faiss__MultiIndexQuantizer,
78690 &_swigt__p_faiss__MultiIndexQuantizer2,
78691 &_swigt__p_faiss__NormalizationTransform,
78692 &_swigt__p_faiss__OPQMatrix,
78693 &_swigt__p_faiss__OnDiskInvertedLists,
78694 &_swigt__p_faiss__OnDiskInvertedLists__OngoingPrefetch,
78695 &_swigt__p_faiss__OneRecallAtRCriterion,
78696 &_swigt__p_faiss__OperatingPoint,
78697 &_swigt__p_faiss__OperatingPoints,
78698 &_swigt__p_faiss__PCAMatrix,
78699 &_swigt__p_faiss__ParameterRange,
78700 &_swigt__p_faiss__ParameterSpace,
78701 &_swigt__p_faiss__PermutationObjective,
78702 &_swigt__p_faiss__PolysemousTraining,
78703 &_swigt__p_faiss__ProductQuantizer,
78704 &_swigt__p_faiss__RandomGenerator,
78705 &_swigt__p_faiss__RandomRotationMatrix,
78706 &_swigt__p_faiss__RangeSearchPartialResult,
78707 &_swigt__p_faiss__RangeSearchPartialResult__QueryResult,
78708 &_swigt__p_faiss__RangeSearchResult,
78709 &_swigt__p_faiss__ReconstructFromNeighbors,
78710 &_swigt__p_faiss__RemapDimensionsTransform,
78711 &_swigt__p_faiss__ReproduceDistancesObjective,
78712 &_swigt__p_faiss__ScalarQuantizer,
78713 &_swigt__p_faiss__ScalarQuantizer__DistanceComputer,
78714 &_swigt__p_faiss__SimulatedAnnealingOptimizer,
78715 &_swigt__p_faiss__SimulatedAnnealingParameters,
78716 &_swigt__p_faiss__VectorIOReader,
78717 &_swigt__p_faiss__VectorIOWriter,
78718 &_swigt__p_faiss__VectorTransform,
78719 &_swigt__p_faiss__VisitedTable,
78720 &_swigt__p_faiss__ivflib__SlidingIndexWindow,
78721 &_swigt__p_float,
78722 &_swigt__p_idx_t,
78723 &_swigt__p_int,
78724 &_swigt__p_long,
78725 &_swigt__p_omp_lock_t,
78726 &_swigt__p_p_faiss__ArrayInvertedLists,
78727 &_swigt__p_p_faiss__ConcatenatedInvertedLists,
78728 &_swigt__p_p_faiss__Index,
78729 &_swigt__p_p_faiss__Index2Layer,
78730 &_swigt__p_p_faiss__IndexFlat,
78731 &_swigt__p_p_faiss__IndexFlat1D,
78732 &_swigt__p_p_faiss__IndexFlatIP,
78733 &_swigt__p_p_faiss__IndexFlatL2,
78734 &_swigt__p_p_faiss__IndexFlatL2BaseShift,
78735 &_swigt__p_p_faiss__IndexHNSW,
78736 &_swigt__p_p_faiss__IndexHNSW2Level,
78737 &_swigt__p_p_faiss__IndexHNSWFlat,
78738 &_swigt__p_p_faiss__IndexHNSWPQ,
78739 &_swigt__p_p_faiss__IndexHNSWSQ,
78740 &_swigt__p_p_faiss__IndexIDMap,
78741 &_swigt__p_p_faiss__IndexIDMap2,
78742 &_swigt__p_p_faiss__IndexIVF,
78743 &_swigt__p_p_faiss__IndexIVFFlat,
78744 &_swigt__p_p_faiss__IndexIVFFlatDedup,
78745 &_swigt__p_p_faiss__IndexIVFPQ,
78746 &_swigt__p_p_faiss__IndexIVFPQR,
78747 &_swigt__p_p_faiss__IndexIVFScalarQuantizer,
78748 &_swigt__p_p_faiss__IndexLSH,
78749 &_swigt__p_p_faiss__IndexPQ,
78750 &_swigt__p_p_faiss__IndexPreTransform,
78751 &_swigt__p_p_faiss__IndexRefineFlat,
78752 &_swigt__p_p_faiss__IndexScalarQuantizer,
78753 &_swigt__p_p_faiss__IndexShards,
78754 &_swigt__p_p_faiss__IndexSplitVectors,
78755 &_swigt__p_p_faiss__InvertedLists,
78756 &_swigt__p_p_faiss__LinearTransform,
78757 &_swigt__p_p_faiss__MultiIndexQuantizer,
78758 &_swigt__p_p_faiss__MultiIndexQuantizer2,
78759 &_swigt__p_p_faiss__NormalizationTransform,
78760 &_swigt__p_p_faiss__OPQMatrix,
78761 &_swigt__p_p_faiss__OnDiskInvertedLists,
78762 &_swigt__p_p_faiss__PCAMatrix,
78763 &_swigt__p_p_faiss__RandomRotationMatrix,
78764 &_swigt__p_p_faiss__RemapDimensionsTransform,
78765 &_swigt__p_p_faiss__VectorTransform,
78766 &_swigt__p_std__listT_faiss__OnDiskInvertedLists__Slot_t,
78767 &_swigt__p_std__mt19937,
78768 &_swigt__p_std__pairT_float_int_t,
78769 &_swigt__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t,
78770 &_swigt__p_std__priority_queueT_std__pairT_float_int_t_t,
78771 &_swigt__p_std__unordered_mapT_long_long_t,
78772 &_swigt__p_std__unordered_multimapT_long_long_t,
78773 &_swigt__p_std__vectorT_char_t,
78774 &_swigt__p_std__vectorT_double_t,
78775 &_swigt__p_std__vectorT_faiss__BufferList__Buffer_t,
78776 &_swigt__p_std__vectorT_faiss__HNSW__NodeDistFarther_t,
78777 &_swigt__p_std__vectorT_faiss__Index_p_t,
78778 &_swigt__p_std__vectorT_faiss__InvertedLists_const_p_t,
78779 &_swigt__p_std__vectorT_faiss__InvertedLists_p_t,
78780 &_swigt__p_std__vectorT_faiss__OnDiskInvertedLists__List_t,
78781 &_swigt__p_std__vectorT_faiss__OperatingPoint_t,
78782 &_swigt__p_std__vectorT_faiss__ParameterRange_t,
78783 &_swigt__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t,
78784 &_swigt__p_std__vectorT_faiss__VectorTransform_p_t,
78785 &_swigt__p_std__vectorT_float_t,
78786 &_swigt__p_std__vectorT_int_t,
78787 &_swigt__p_std__vectorT_long_t,
78788 &_swigt__p_std__vectorT_omp_lock_t_t,
78789 &_swigt__p_std__vectorT_std__vectorT_float_t_t,
78790 &_swigt__p_std__vectorT_std__vectorT_long_t_t,
78791 &_swigt__p_std__vectorT_std__vectorT_uint8_t_t_t,
78792 &_swigt__p_std__vectorT_std__vectorT_unsigned_long_t_t,
78793 &_swigt__p_std__vectorT_unsigned_char_t,
78794 &_swigt__p_std__vectorT_unsigned_long_t,
78795 &_swigt__p_storage_idx_t,
78796 &_swigt__p_uint32_t,
78797 &_swigt__p_unsigned_char,
78798 &_swigt__p_unsigned_long,
78799 &_swigt__p_void,
78800 };
78801
78802 static swig_cast_info _swigc__p_Crev[] = { {&_swigt__p_Crev, 0, 0, 0},{0, 0, 0, 0}};
78803 static swig_cast_info _swigc__p_FILE[] = { {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
78804 static swig_cast_info _swigc__p_MapLong2Long[] = { {&_swigt__p_MapLong2Long, 0, 0, 0},{0, 0, 0, 0}};
78805 static swig_cast_info _swigc__p_Node[] = { {&_swigt__p_Node, 0, 0, 0},{0, 0, 0, 0}};
78806 static swig_cast_info _swigc__p_T[] = { {&_swigt__p_T, 0, 0, 0},{0, 0, 0, 0}};
78807 static swig_cast_info _swigc__p_TI[] = { {&_swigt__p_TI, 0, 0, 0},{0, 0, 0, 0}};
78808 static swig_cast_info _swigc__p_char[] = { {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
78809 static swig_cast_info _swigc__p_double[] = { {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
78810 static swig_cast_info _swigc__p_faiss__ArrayInvertedLists[] = { {&_swigt__p_faiss__ArrayInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
78811 static swig_cast_info _swigc__p_faiss__AutoTuneCriterion[] = { {&_swigt__p_faiss__AutoTuneCriterion, 0, 0, 0}, {&_swigt__p_faiss__OneRecallAtRCriterion, _p_faiss__OneRecallAtRCriterionTo_p_faiss__AutoTuneCriterion, 0, 0}, {&_swigt__p_faiss__IntersectionCriterion, _p_faiss__IntersectionCriterionTo_p_faiss__AutoTuneCriterion, 0, 0},{0, 0, 0, 0}};
78812 static swig_cast_info _swigc__p_faiss__BinaryInvertedListScanner[] = { {&_swigt__p_faiss__BinaryInvertedListScanner, 0, 0, 0},{0, 0, 0, 0}};
78813 static swig_cast_info _swigc__p_faiss__BufferList[] = { {&_swigt__p_faiss__RangeSearchPartialResult, _p_faiss__RangeSearchPartialResultTo_p_faiss__BufferList, 0, 0}, {&_swigt__p_faiss__BufferList, 0, 0, 0},{0, 0, 0, 0}};
78814 static swig_cast_info _swigc__p_faiss__Cloner[] = { {&_swigt__p_faiss__Cloner, 0, 0, 0},{0, 0, 0, 0}};
78815 static swig_cast_info _swigc__p_faiss__Clustering[] = { {&_swigt__p_faiss__Clustering, 0, 0, 0},{0, 0, 0, 0}};
78816 static swig_cast_info _swigc__p_faiss__ClusteringParameters[] = { {&_swigt__p_faiss__Clustering, _p_faiss__ClusteringTo_p_faiss__ClusteringParameters, 0, 0}, {&_swigt__p_faiss__ClusteringParameters, 0, 0, 0},{0, 0, 0, 0}};
78817 static swig_cast_info _swigc__p_faiss__ConcatenatedInvertedLists[] = { {&_swigt__p_faiss__ConcatenatedInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
78818 static swig_cast_info _swigc__p_faiss__GenHammingComputer16[] = { {&_swigt__p_faiss__GenHammingComputer16, 0, 0, 0},{0, 0, 0, 0}};
78819 static swig_cast_info _swigc__p_faiss__GenHammingComputer32[] = { {&_swigt__p_faiss__GenHammingComputer32, 0, 0, 0},{0, 0, 0, 0}};
78820 static swig_cast_info _swigc__p_faiss__GenHammingComputer8[] = { {&_swigt__p_faiss__GenHammingComputer8, 0, 0, 0},{0, 0, 0, 0}};
78821 static swig_cast_info _swigc__p_faiss__GenHammingComputerM8[] = { {&_swigt__p_faiss__GenHammingComputerM8, 0, 0, 0},{0, 0, 0, 0}};
78822 static swig_cast_info _swigc__p_faiss__HNSW[] = { {&_swigt__p_faiss__HNSW, 0, 0, 0},{0, 0, 0, 0}};
78823 static swig_cast_info _swigc__p_faiss__HNSWStats[] = { {&_swigt__p_faiss__HNSWStats, 0, 0, 0},{0, 0, 0, 0}};
78824 static swig_cast_info _swigc__p_faiss__HNSW__DistanceComputer[] = { {&_swigt__p_faiss__HNSW__DistanceComputer, 0, 0, 0},{0, 0, 0, 0}};
78825 static swig_cast_info _swigc__p_faiss__HNSW__MinimaxHeap[] = { {&_swigt__p_faiss__HNSW__MinimaxHeap, 0, 0, 0},{0, 0, 0, 0}};
78826 static swig_cast_info _swigc__p_faiss__HammingComputer16[] = { {&_swigt__p_faiss__HammingComputer16, 0, 0, 0},{0, 0, 0, 0}};
78827 static swig_cast_info _swigc__p_faiss__HammingComputer20[] = { {&_swigt__p_faiss__HammingComputer20, 0, 0, 0},{0, 0, 0, 0}};
78828 static swig_cast_info _swigc__p_faiss__HammingComputer32[] = { {&_swigt__p_faiss__HammingComputer32, 0, 0, 0},{0, 0, 0, 0}};
78829 static swig_cast_info _swigc__p_faiss__HammingComputer4[] = { {&_swigt__p_faiss__HammingComputer4, 0, 0, 0},{0, 0, 0, 0}};
78830 static swig_cast_info _swigc__p_faiss__HammingComputer64[] = { {&_swigt__p_faiss__HammingComputer64, 0, 0, 0},{0, 0, 0, 0}};
78831 static swig_cast_info _swigc__p_faiss__HammingComputer8[] = { {&_swigt__p_faiss__HammingComputer8, 0, 0, 0},{0, 0, 0, 0}};
78832 static swig_cast_info _swigc__p_faiss__HammingComputerDefault[] = { {&_swigt__p_faiss__HammingComputerDefault, 0, 0, 0},{0, 0, 0, 0}};
78833 static swig_cast_info _swigc__p_faiss__HammingComputerM4[] = { {&_swigt__p_faiss__HammingComputerM4, 0, 0, 0},{0, 0, 0, 0}};
78834 static swig_cast_info _swigc__p_faiss__HammingComputerM8[] = { {&_swigt__p_faiss__HammingComputerM8, 0, 0, 0},{0, 0, 0, 0}};
78835 static swig_cast_info _swigc__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t[] = { {&_swigt__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
78836 static swig_cast_info _swigc__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t[] = { {&_swigt__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
78837 static swig_cast_info _swigc__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t[] = { {&_swigt__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
78838 static swig_cast_info _swigc__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t[] = { {&_swigt__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
78839 static swig_cast_info _swigc__p_faiss__IDSelector[] = { {&_swigt__p_faiss__IDSelector, 0, 0, 0}, {&_swigt__p_faiss__IDSelectorBatch, _p_faiss__IDSelectorBatchTo_p_faiss__IDSelector, 0, 0}, {&_swigt__p_faiss__IDSelectorRange, _p_faiss__IDSelectorRangeTo_p_faiss__IDSelector, 0, 0},{0, 0, 0, 0}};
78840 static swig_cast_info _swigc__p_faiss__IDSelectorBatch[] = { {&_swigt__p_faiss__IDSelectorBatch, 0, 0, 0},{0, 0, 0, 0}};
78841 static swig_cast_info _swigc__p_faiss__IDSelectorRange[] = { {&_swigt__p_faiss__IDSelectorRange, 0, 0, 0},{0, 0, 0, 0}};
78842 static swig_cast_info _swigc__p_faiss__IOReader[] = { {&_swigt__p_faiss__IOReader, 0, 0, 0}, {&_swigt__p_faiss__VectorIOReader, _p_faiss__VectorIOReaderTo_p_faiss__IOReader, 0, 0},{0, 0, 0, 0}};
78843 static swig_cast_info _swigc__p_faiss__IOWriter[] = { {&_swigt__p_faiss__IOWriter, 0, 0, 0}, {&_swigt__p_faiss__VectorIOWriter, _p_faiss__VectorIOWriterTo_p_faiss__IOWriter, 0, 0},{0, 0, 0, 0}};
78844 static swig_cast_info _swigc__p_faiss__IVFPQSearchParameters[] = { {&_swigt__p_faiss__IVFPQSearchParameters, 0, 0, 0},{0, 0, 0, 0}};
78845 static swig_cast_info _swigc__p_faiss__IVFSearchParameters[] = { {&_swigt__p_faiss__IVFSearchParameters, 0, 0, 0}, {&_swigt__p_faiss__IVFPQSearchParameters, _p_faiss__IVFPQSearchParametersTo_p_faiss__IVFSearchParameters, 0, 0},{0, 0, 0, 0}};
78846 static swig_cast_info _swigc__p_faiss__Index[] = { {&_swigt__p_faiss__IndexPreTransform, _p_faiss__IndexPreTransformTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVF, _p_faiss__IndexIVFTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlatL2, _p_faiss__IndexFlatL2To_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSWFlat, _p_faiss__IndexHNSWFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__Index2Layer, _p_faiss__Index2LayerTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSWPQ, _p_faiss__IndexHNSWPQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFFlat, _p_faiss__IndexIVFFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSW, _p_faiss__IndexHNSWTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlatIP, _p_faiss__IndexFlatIPTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFPQR, _p_faiss__IndexIVFPQRTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFFlatDedup, _p_faiss__IndexIVFFlatDedupTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexLSH, _p_faiss__IndexLSHTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlat, _p_faiss__IndexFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlat1D, _p_faiss__IndexFlat1DTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexFlatL2BaseShift, _p_faiss__IndexFlatL2BaseShiftTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexShards, _p_faiss__IndexShardsTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSW2Level, _p_faiss__IndexHNSW2LevelTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIDMap2, _p_faiss__IndexIDMap2To_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexSplitVectors, _p_faiss__IndexSplitVectorsTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__Index, 0, 0, 0}, {&_swigt__p_faiss__IndexRefineFlat, _p_faiss__IndexRefineFlatTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexHNSWSQ, _p_faiss__IndexHNSWSQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__MultiIndexQuantizer2, _p_faiss__MultiIndexQuantizer2To_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexPQ, _p_faiss__IndexPQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIDMap, _p_faiss__IndexIDMapTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFPQ, _p_faiss__IndexIVFPQTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexIVFScalarQuantizer, _p_faiss__IndexIVFScalarQuantizerTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__IndexScalarQuantizer, _p_faiss__IndexScalarQuantizerTo_p_faiss__Index, 0, 0}, {&_swigt__p_faiss__MultiIndexQuantizer, _p_faiss__MultiIndexQuantizerTo_p_faiss__Index, 0, 0},{0, 0, 0, 0}};
78847 static swig_cast_info _swigc__p_faiss__Index2Layer[] = { {&_swigt__p_faiss__Index2Layer, 0, 0, 0},{0, 0, 0, 0}};
78848 static swig_cast_info _swigc__p_faiss__IndexBinary[] = { {&_swigt__p_faiss__IndexBinaryFlat, _p_faiss__IndexBinaryFlatTo_p_faiss__IndexBinary, 0, 0}, {&_swigt__p_faiss__IndexBinary, 0, 0, 0}, {&_swigt__p_faiss__IndexBinaryHNSW, _p_faiss__IndexBinaryHNSWTo_p_faiss__IndexBinary, 0, 0}, {&_swigt__p_faiss__IndexBinaryIVF, _p_faiss__IndexBinaryIVFTo_p_faiss__IndexBinary, 0, 0}, {&_swigt__p_faiss__IndexBinaryFromFloat, _p_faiss__IndexBinaryFromFloatTo_p_faiss__IndexBinary, 0, 0},{0, 0, 0, 0}};
78849 static swig_cast_info _swigc__p_faiss__IndexBinaryFlat[] = { {&_swigt__p_faiss__IndexBinaryFlat, 0, 0, 0},{0, 0, 0, 0}};
78850 static swig_cast_info _swigc__p_faiss__IndexBinaryFromFloat[] = { {&_swigt__p_faiss__IndexBinaryFromFloat, 0, 0, 0},{0, 0, 0, 0}};
78851 static swig_cast_info _swigc__p_faiss__IndexBinaryHNSW[] = { {&_swigt__p_faiss__IndexBinaryHNSW, 0, 0, 0},{0, 0, 0, 0}};
78852 static swig_cast_info _swigc__p_faiss__IndexBinaryIVF[] = { {&_swigt__p_faiss__IndexBinaryIVF, 0, 0, 0},{0, 0, 0, 0}};
78853 static swig_cast_info _swigc__p_faiss__IndexFlat[] = { {&_swigt__p_faiss__IndexFlat, 0, 0, 0}, {&_swigt__p_faiss__IndexFlatL2, _p_faiss__IndexFlatL2To_p_faiss__IndexFlat, 0, 0}, {&_swigt__p_faiss__IndexFlat1D, _p_faiss__IndexFlat1DTo_p_faiss__IndexFlat, 0, 0}, {&_swigt__p_faiss__IndexFlatL2BaseShift, _p_faiss__IndexFlatL2BaseShiftTo_p_faiss__IndexFlat, 0, 0}, {&_swigt__p_faiss__IndexFlatIP, _p_faiss__IndexFlatIPTo_p_faiss__IndexFlat, 0, 0},{0, 0, 0, 0}};
78854 static swig_cast_info _swigc__p_faiss__IndexFlat1D[] = { {&_swigt__p_faiss__IndexFlat1D, 0, 0, 0},{0, 0, 0, 0}};
78855 static swig_cast_info _swigc__p_faiss__IndexFlatIP[] = { {&_swigt__p_faiss__IndexFlatIP, 0, 0, 0},{0, 0, 0, 0}};
78856 static swig_cast_info _swigc__p_faiss__IndexFlatL2[] = { {&_swigt__p_faiss__IndexFlatL2, 0, 0, 0}, {&_swigt__p_faiss__IndexFlat1D, _p_faiss__IndexFlat1DTo_p_faiss__IndexFlatL2, 0, 0}, {&_swigt__p_faiss__IndexFlatL2BaseShift, _p_faiss__IndexFlatL2BaseShiftTo_p_faiss__IndexFlatL2, 0, 0},{0, 0, 0, 0}};
78857 static swig_cast_info _swigc__p_faiss__IndexFlatL2BaseShift[] = { {&_swigt__p_faiss__IndexFlatL2BaseShift, 0, 0, 0},{0, 0, 0, 0}};
78858 static swig_cast_info _swigc__p_faiss__IndexHNSW[] = { {&_swigt__p_faiss__IndexHNSWFlat, _p_faiss__IndexHNSWFlatTo_p_faiss__IndexHNSW, 0, 0}, {&_swigt__p_faiss__IndexHNSW, 0, 0, 0}, {&_swigt__p_faiss__IndexHNSWSQ, _p_faiss__IndexHNSWSQTo_p_faiss__IndexHNSW, 0, 0}, {&_swigt__p_faiss__IndexHNSWPQ, _p_faiss__IndexHNSWPQTo_p_faiss__IndexHNSW, 0, 0}, {&_swigt__p_faiss__IndexHNSW2Level, _p_faiss__IndexHNSW2LevelTo_p_faiss__IndexHNSW, 0, 0},{0, 0, 0, 0}};
78859 static swig_cast_info _swigc__p_faiss__IndexHNSW2Level[] = { {&_swigt__p_faiss__IndexHNSW2Level, 0, 0, 0},{0, 0, 0, 0}};
78860 static swig_cast_info _swigc__p_faiss__IndexHNSWFlat[] = { {&_swigt__p_faiss__IndexHNSWFlat, 0, 0, 0},{0, 0, 0, 0}};
78861 static swig_cast_info _swigc__p_faiss__IndexHNSWPQ[] = { {&_swigt__p_faiss__IndexHNSWPQ, 0, 0, 0},{0, 0, 0, 0}};
78862 static swig_cast_info _swigc__p_faiss__IndexHNSWSQ[] = { {&_swigt__p_faiss__IndexHNSWSQ, 0, 0, 0},{0, 0, 0, 0}};
78863 static swig_cast_info _swigc__p_faiss__IndexIDMap[] = { {&_swigt__p_faiss__IndexIDMap2, _p_faiss__IndexIDMap2To_p_faiss__IndexIDMap, 0, 0}, {&_swigt__p_faiss__IndexIDMap, 0, 0, 0},{0, 0, 0, 0}};
78864 static swig_cast_info _swigc__p_faiss__IndexIDMap2[] = { {&_swigt__p_faiss__IndexIDMap2, 0, 0, 0},{0, 0, 0, 0}};
78865 static swig_cast_info _swigc__p_faiss__IndexIVF[] = { {&_swigt__p_faiss__IndexIVF, 0, 0, 0}, {&_swigt__p_faiss__IndexIVFScalarQuantizer, _p_faiss__IndexIVFScalarQuantizerTo_p_faiss__IndexIVF, 0, 0}, {&_swigt__p_faiss__IndexIVFPQ, _p_faiss__IndexIVFPQTo_p_faiss__IndexIVF, 0, 0}, {&_swigt__p_faiss__IndexIVFFlat, _p_faiss__IndexIVFFlatTo_p_faiss__IndexIVF, 0, 0}, {&_swigt__p_faiss__IndexIVFFlatDedup, _p_faiss__IndexIVFFlatDedupTo_p_faiss__IndexIVF, 0, 0}, {&_swigt__p_faiss__IndexIVFPQR, _p_faiss__IndexIVFPQRTo_p_faiss__IndexIVF, 0, 0},{0, 0, 0, 0}};
78866 static swig_cast_info _swigc__p_faiss__IndexIVFFlat[] = { {&_swigt__p_faiss__IndexIVFFlat, 0, 0, 0}, {&_swigt__p_faiss__IndexIVFFlatDedup, _p_faiss__IndexIVFFlatDedupTo_p_faiss__IndexIVFFlat, 0, 0},{0, 0, 0, 0}};
78867 static swig_cast_info _swigc__p_faiss__IndexIVFFlatDedup[] = { {&_swigt__p_faiss__IndexIVFFlatDedup, 0, 0, 0},{0, 0, 0, 0}};
78868 static swig_cast_info _swigc__p_faiss__IndexIVFPQ[] = { {&_swigt__p_faiss__IndexIVFPQ, 0, 0, 0}, {&_swigt__p_faiss__IndexIVFPQR, _p_faiss__IndexIVFPQRTo_p_faiss__IndexIVFPQ, 0, 0},{0, 0, 0, 0}};
78869 static swig_cast_info _swigc__p_faiss__IndexIVFPQR[] = { {&_swigt__p_faiss__IndexIVFPQR, 0, 0, 0},{0, 0, 0, 0}};
78870 static swig_cast_info _swigc__p_faiss__IndexIVFPQStats[] = { {&_swigt__p_faiss__IndexIVFPQStats, 0, 0, 0},{0, 0, 0, 0}};
78871 static swig_cast_info _swigc__p_faiss__IndexIVFScalarQuantizer[] = { {&_swigt__p_faiss__IndexIVFScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
78872 static swig_cast_info _swigc__p_faiss__IndexIVFStats[] = { {&_swigt__p_faiss__IndexIVFStats, 0, 0, 0},{0, 0, 0, 0}};
78873 static swig_cast_info _swigc__p_faiss__IndexLSH[] = { {&_swigt__p_faiss__IndexLSH, 0, 0, 0},{0, 0, 0, 0}};
78874 static swig_cast_info _swigc__p_faiss__IndexPQ[] = { {&_swigt__p_faiss__IndexPQ, 0, 0, 0},{0, 0, 0, 0}};
78875 static swig_cast_info _swigc__p_faiss__IndexPQStats[] = { {&_swigt__p_faiss__IndexPQStats, 0, 0, 0},{0, 0, 0, 0}};
78876 static swig_cast_info _swigc__p_faiss__IndexPreTransform[] = { {&_swigt__p_faiss__IndexPreTransform, 0, 0, 0},{0, 0, 0, 0}};
78877 static swig_cast_info _swigc__p_faiss__IndexRefineFlat[] = { {&_swigt__p_faiss__IndexRefineFlat, 0, 0, 0},{0, 0, 0, 0}};
78878 static swig_cast_info _swigc__p_faiss__IndexScalarQuantizer[] = { {&_swigt__p_faiss__IndexScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
78879 static swig_cast_info _swigc__p_faiss__IndexShards[] = { {&_swigt__p_faiss__IndexShards, 0, 0, 0},{0, 0, 0, 0}};
78880 static swig_cast_info _swigc__p_faiss__IndexSplitVectors[] = { {&_swigt__p_faiss__IndexSplitVectors, 0, 0, 0},{0, 0, 0, 0}};
78881 static swig_cast_info _swigc__p_faiss__IntersectionCriterion[] = { {&_swigt__p_faiss__IntersectionCriterion, 0, 0, 0},{0, 0, 0, 0}};
78882 static swig_cast_info _swigc__p_faiss__InvertedListScanner[] = { {&_swigt__p_faiss__InvertedListScanner, 0, 0, 0},{0, 0, 0, 0}};
78883 static swig_cast_info _swigc__p_faiss__InvertedLists[] = { {&_swigt__p_faiss__InvertedLists, 0, 0, 0}, {&_swigt__p_faiss__ArrayInvertedLists, _p_faiss__ArrayInvertedListsTo_p_faiss__InvertedLists, 0, 0}, {&_swigt__p_faiss__ConcatenatedInvertedLists, _p_faiss__ConcatenatedInvertedListsTo_p_faiss__InvertedLists, 0, 0}, {&_swigt__p_faiss__OnDiskInvertedLists, _p_faiss__OnDiskInvertedListsTo_p_faiss__InvertedLists, 0, 0},{0, 0, 0, 0}};
78884 static swig_cast_info _swigc__p_faiss__Level1Quantizer[] = { {&_swigt__p_faiss__Level1Quantizer, 0, 0, 0}, {&_swigt__p_faiss__IndexIVF, _p_faiss__IndexIVFTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFScalarQuantizer, _p_faiss__IndexIVFScalarQuantizerTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFPQ, _p_faiss__IndexIVFPQTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFFlat, _p_faiss__IndexIVFFlatTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFFlatDedup, _p_faiss__IndexIVFFlatDedupTo_p_faiss__Level1Quantizer, 0, 0}, {&_swigt__p_faiss__IndexIVFPQR, _p_faiss__IndexIVFPQRTo_p_faiss__Level1Quantizer, 0, 0},{0, 0, 0, 0}};
78885 static swig_cast_info _swigc__p_faiss__LinearTransform[] = { {&_swigt__p_faiss__RandomRotationMatrix, _p_faiss__RandomRotationMatrixTo_p_faiss__LinearTransform, 0, 0}, {&_swigt__p_faiss__PCAMatrix, _p_faiss__PCAMatrixTo_p_faiss__LinearTransform, 0, 0}, {&_swigt__p_faiss__OPQMatrix, _p_faiss__OPQMatrixTo_p_faiss__LinearTransform, 0, 0}, {&_swigt__p_faiss__LinearTransform, 0, 0, 0},{0, 0, 0, 0}};
78886 static swig_cast_info _swigc__p_faiss__LockLevels[] = { {&_swigt__p_faiss__LockLevels, 0, 0, 0},{0, 0, 0, 0}};
78887 static swig_cast_info _swigc__p_faiss__MultiIndexQuantizer[] = { {&_swigt__p_faiss__MultiIndexQuantizer, 0, 0, 0}, {&_swigt__p_faiss__MultiIndexQuantizer2, _p_faiss__MultiIndexQuantizer2To_p_faiss__MultiIndexQuantizer, 0, 0},{0, 0, 0, 0}};
78888 static swig_cast_info _swigc__p_faiss__MultiIndexQuantizer2[] = { {&_swigt__p_faiss__MultiIndexQuantizer2, 0, 0, 0},{0, 0, 0, 0}};
78889 static swig_cast_info _swigc__p_faiss__NormalizationTransform[] = { {&_swigt__p_faiss__NormalizationTransform, 0, 0, 0},{0, 0, 0, 0}};
78890 static swig_cast_info _swigc__p_faiss__OPQMatrix[] = { {&_swigt__p_faiss__OPQMatrix, 0, 0, 0},{0, 0, 0, 0}};
78891 static swig_cast_info _swigc__p_faiss__OnDiskInvertedLists[] = { {&_swigt__p_faiss__OnDiskInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
78892 static swig_cast_info _swigc__p_faiss__OnDiskInvertedLists__OngoingPrefetch[] = { {&_swigt__p_faiss__OnDiskInvertedLists__OngoingPrefetch, 0, 0, 0},{0, 0, 0, 0}};
78893 static swig_cast_info _swigc__p_faiss__OneRecallAtRCriterion[] = { {&_swigt__p_faiss__OneRecallAtRCriterion, 0, 0, 0},{0, 0, 0, 0}};
78894 static swig_cast_info _swigc__p_faiss__OperatingPoint[] = { {&_swigt__p_faiss__OperatingPoint, 0, 0, 0},{0, 0, 0, 0}};
78895 static swig_cast_info _swigc__p_faiss__OperatingPoints[] = { {&_swigt__p_faiss__OperatingPoints, 0, 0, 0},{0, 0, 0, 0}};
78896 static swig_cast_info _swigc__p_faiss__PCAMatrix[] = { {&_swigt__p_faiss__PCAMatrix, 0, 0, 0},{0, 0, 0, 0}};
78897 static swig_cast_info _swigc__p_faiss__ParameterRange[] = { {&_swigt__p_faiss__ParameterRange, 0, 0, 0},{0, 0, 0, 0}};
78898 static swig_cast_info _swigc__p_faiss__ParameterSpace[] = { {&_swigt__p_faiss__ParameterSpace, 0, 0, 0},{0, 0, 0, 0}};
78899 static swig_cast_info _swigc__p_faiss__PermutationObjective[] = { {&_swigt__p_faiss__PermutationObjective, 0, 0, 0}, {&_swigt__p_faiss__ReproduceDistancesObjective, _p_faiss__ReproduceDistancesObjectiveTo_p_faiss__PermutationObjective, 0, 0},{0, 0, 0, 0}};
78900 static swig_cast_info _swigc__p_faiss__PolysemousTraining[] = { {&_swigt__p_faiss__PolysemousTraining, 0, 0, 0},{0, 0, 0, 0}};
78901 static swig_cast_info _swigc__p_faiss__ProductQuantizer[] = { {&_swigt__p_faiss__ProductQuantizer, 0, 0, 0},{0, 0, 0, 0}};
78902 static swig_cast_info _swigc__p_faiss__RandomGenerator[] = { {&_swigt__p_faiss__RandomGenerator, 0, 0, 0},{0, 0, 0, 0}};
78903 static swig_cast_info _swigc__p_faiss__RandomRotationMatrix[] = { {&_swigt__p_faiss__RandomRotationMatrix, 0, 0, 0},{0, 0, 0, 0}};
78904 static swig_cast_info _swigc__p_faiss__RangeSearchPartialResult[] = { {&_swigt__p_faiss__RangeSearchPartialResult, 0, 0, 0},{0, 0, 0, 0}};
78905 static swig_cast_info _swigc__p_faiss__RangeSearchPartialResult__QueryResult[] = { {&_swigt__p_faiss__RangeSearchPartialResult__QueryResult, 0, 0, 0},{0, 0, 0, 0}};
78906 static swig_cast_info _swigc__p_faiss__RangeSearchResult[] = { {&_swigt__p_faiss__RangeSearchResult, 0, 0, 0},{0, 0, 0, 0}};
78907 static swig_cast_info _swigc__p_faiss__ReconstructFromNeighbors[] = { {&_swigt__p_faiss__ReconstructFromNeighbors, 0, 0, 0},{0, 0, 0, 0}};
78908 static swig_cast_info _swigc__p_faiss__RemapDimensionsTransform[] = { {&_swigt__p_faiss__RemapDimensionsTransform, 0, 0, 0},{0, 0, 0, 0}};
78909 static swig_cast_info _swigc__p_faiss__ReproduceDistancesObjective[] = { {&_swigt__p_faiss__ReproduceDistancesObjective, 0, 0, 0},{0, 0, 0, 0}};
78910 static swig_cast_info _swigc__p_faiss__ScalarQuantizer[] = { {&_swigt__p_faiss__ScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
78911 static swig_cast_info _swigc__p_faiss__ScalarQuantizer__DistanceComputer[] = { {&_swigt__p_faiss__ScalarQuantizer__DistanceComputer, 0, 0, 0},{0, 0, 0, 0}};
78912 static swig_cast_info _swigc__p_faiss__SimulatedAnnealingOptimizer[] = { {&_swigt__p_faiss__SimulatedAnnealingOptimizer, 0, 0, 0},{0, 0, 0, 0}};
78913 static swig_cast_info _swigc__p_faiss__SimulatedAnnealingParameters[] = { {&_swigt__p_faiss__SimulatedAnnealingParameters, 0, 0, 0}, {&_swigt__p_faiss__PolysemousTraining, _p_faiss__PolysemousTrainingTo_p_faiss__SimulatedAnnealingParameters, 0, 0}, {&_swigt__p_faiss__SimulatedAnnealingOptimizer, _p_faiss__SimulatedAnnealingOptimizerTo_p_faiss__SimulatedAnnealingParameters, 0, 0},{0, 0, 0, 0}};
78914 static swig_cast_info _swigc__p_faiss__VectorIOReader[] = { {&_swigt__p_faiss__VectorIOReader, 0, 0, 0},{0, 0, 0, 0}};
78915 static swig_cast_info _swigc__p_faiss__VectorIOWriter[] = { {&_swigt__p_faiss__VectorIOWriter, 0, 0, 0},{0, 0, 0, 0}};
78916 static swig_cast_info _swigc__p_faiss__VectorTransform[] = { {&_swigt__p_faiss__RandomRotationMatrix, _p_faiss__RandomRotationMatrixTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__PCAMatrix, _p_faiss__PCAMatrixTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__OPQMatrix, _p_faiss__OPQMatrixTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__VectorTransform, 0, 0, 0}, {&_swigt__p_faiss__LinearTransform, _p_faiss__LinearTransformTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__RemapDimensionsTransform, _p_faiss__RemapDimensionsTransformTo_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_faiss__NormalizationTransform, _p_faiss__NormalizationTransformTo_p_faiss__VectorTransform, 0, 0},{0, 0, 0, 0}};
78917 static swig_cast_info _swigc__p_faiss__VisitedTable[] = { {&_swigt__p_faiss__VisitedTable, 0, 0, 0},{0, 0, 0, 0}};
78918 static swig_cast_info _swigc__p_faiss__ivflib__SlidingIndexWindow[] = { {&_swigt__p_faiss__ivflib__SlidingIndexWindow, 0, 0, 0},{0, 0, 0, 0}};
78919 static swig_cast_info _swigc__p_float[] = { {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
78920 static swig_cast_info _swigc__p_idx_t[] = { {&_swigt__p_idx_t, 0, 0, 0},{0, 0, 0, 0}};
78921 static swig_cast_info _swigc__p_int[] = { {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
78922 static swig_cast_info _swigc__p_long[] = { {&_swigt__p_long, 0, 0, 0},{0, 0, 0, 0}};
78923 static swig_cast_info _swigc__p_omp_lock_t[] = { {&_swigt__p_omp_lock_t, 0, 0, 0},{0, 0, 0, 0}};
78924 static swig_cast_info _swigc__p_p_faiss__IndexPreTransform[] = {{&_swigt__p_p_faiss__IndexPreTransform, 0, 0, 0},{0, 0, 0, 0}};
78925 static swig_cast_info _swigc__p_p_faiss__IndexIVF[] = {{&_swigt__p_p_faiss__IndexIVF, 0, 0, 0},{0, 0, 0, 0}};
78926 static swig_cast_info _swigc__p_p_faiss__IndexFlatL2[] = {{&_swigt__p_p_faiss__IndexFlatL2, 0, 0, 0},{0, 0, 0, 0}};
78927 static swig_cast_info _swigc__p_p_faiss__IndexHNSWFlat[] = {{&_swigt__p_p_faiss__IndexHNSWFlat, 0, 0, 0},{0, 0, 0, 0}};
78928 static swig_cast_info _swigc__p_p_faiss__Index2Layer[] = {{&_swigt__p_p_faiss__Index2Layer, 0, 0, 0},{0, 0, 0, 0}};
78929 static swig_cast_info _swigc__p_p_faiss__IndexHNSWPQ[] = {{&_swigt__p_p_faiss__IndexHNSWPQ, 0, 0, 0},{0, 0, 0, 0}};
78930 static swig_cast_info _swigc__p_p_faiss__IndexFlatIP[] = {{&_swigt__p_p_faiss__IndexFlatIP, 0, 0, 0},{0, 0, 0, 0}};
78931 static swig_cast_info _swigc__p_p_faiss__IndexHNSW[] = {{&_swigt__p_p_faiss__IndexHNSW, 0, 0, 0},{0, 0, 0, 0}};
78932 static swig_cast_info _swigc__p_p_faiss__IndexIVFFlat[] = {{&_swigt__p_p_faiss__IndexIVFFlat, 0, 0, 0},{0, 0, 0, 0}};
78933 static swig_cast_info _swigc__p_p_faiss__IndexLSH[] = {{&_swigt__p_p_faiss__IndexLSH, 0, 0, 0},{0, 0, 0, 0}};
78934 static swig_cast_info _swigc__p_p_faiss__IndexIVFPQR[] = {{&_swigt__p_p_faiss__IndexIVFPQR, 0, 0, 0},{0, 0, 0, 0}};
78935 static swig_cast_info _swigc__p_p_faiss__IndexIVFFlatDedup[] = {{&_swigt__p_p_faiss__IndexIVFFlatDedup, 0, 0, 0},{0, 0, 0, 0}};
78936 static swig_cast_info _swigc__p_p_faiss__IndexFlat[] = {{&_swigt__p_p_faiss__IndexFlat, 0, 0, 0},{0, 0, 0, 0}};
78937 static swig_cast_info _swigc__p_p_faiss__IndexFlat1D[] = {{&_swigt__p_p_faiss__IndexFlat1D, 0, 0, 0},{0, 0, 0, 0}};
78938 static swig_cast_info _swigc__p_p_faiss__IndexFlatL2BaseShift[] = {{&_swigt__p_p_faiss__IndexFlatL2BaseShift, 0, 0, 0},{0, 0, 0, 0}};
78939 static swig_cast_info _swigc__p_p_faiss__IndexShards[] = {{&_swigt__p_p_faiss__IndexShards, 0, 0, 0},{0, 0, 0, 0}};
78940 static swig_cast_info _swigc__p_p_faiss__IndexHNSW2Level[] = {{&_swigt__p_p_faiss__IndexHNSW2Level, 0, 0, 0},{0, 0, 0, 0}};
78941 static swig_cast_info _swigc__p_p_faiss__IndexIDMap2[] = {{&_swigt__p_p_faiss__IndexIDMap2, 0, 0, 0},{0, 0, 0, 0}};
78942 static swig_cast_info _swigc__p_p_faiss__IndexSplitVectors[] = {{&_swigt__p_p_faiss__IndexSplitVectors, 0, 0, 0},{0, 0, 0, 0}};
78943 static swig_cast_info _swigc__p_p_faiss__IndexRefineFlat[] = {{&_swigt__p_p_faiss__IndexRefineFlat, 0, 0, 0},{0, 0, 0, 0}};
78944 static swig_cast_info _swigc__p_p_faiss__IndexHNSWSQ[] = {{&_swigt__p_p_faiss__IndexHNSWSQ, 0, 0, 0},{0, 0, 0, 0}};
78945 static swig_cast_info _swigc__p_p_faiss__MultiIndexQuantizer2[] = {{&_swigt__p_p_faiss__MultiIndexQuantizer2, 0, 0, 0},{0, 0, 0, 0}};
78946 static swig_cast_info _swigc__p_p_faiss__IndexPQ[] = {{&_swigt__p_p_faiss__IndexPQ, 0, 0, 0},{0, 0, 0, 0}};
78947 static swig_cast_info _swigc__p_p_faiss__IndexIDMap[] = {{&_swigt__p_p_faiss__IndexIDMap, 0, 0, 0},{0, 0, 0, 0}};
78948 static swig_cast_info _swigc__p_p_faiss__IndexIVFPQ[] = {{&_swigt__p_p_faiss__IndexIVFPQ, 0, 0, 0},{0, 0, 0, 0}};
78949 static swig_cast_info _swigc__p_p_faiss__IndexIVFScalarQuantizer[] = {{&_swigt__p_p_faiss__IndexIVFScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
78950 static swig_cast_info _swigc__p_p_faiss__IndexScalarQuantizer[] = {{&_swigt__p_p_faiss__IndexScalarQuantizer, 0, 0, 0},{0, 0, 0, 0}};
78951 static swig_cast_info _swigc__p_p_faiss__MultiIndexQuantizer[] = {{&_swigt__p_p_faiss__MultiIndexQuantizer, 0, 0, 0},{0, 0, 0, 0}};
78952 static swig_cast_info _swigc__p_p_faiss__Index[] = { {&_swigt__p_p_faiss__IndexPreTransform, _p_p_faiss__IndexPreTransformTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVF, _p_p_faiss__IndexIVFTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlatL2, _p_p_faiss__IndexFlatL2To_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSWFlat, _p_p_faiss__IndexHNSWFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__Index2Layer, _p_p_faiss__Index2LayerTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSWPQ, _p_p_faiss__IndexHNSWPQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlatIP, _p_p_faiss__IndexFlatIPTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSW, _p_p_faiss__IndexHNSWTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFFlat, _p_p_faiss__IndexIVFFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexLSH, _p_p_faiss__IndexLSHTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFPQR, _p_p_faiss__IndexIVFPQRTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFFlatDedup, _p_p_faiss__IndexIVFFlatDedupTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlat, _p_p_faiss__IndexFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlat1D, _p_p_faiss__IndexFlat1DTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexFlatL2BaseShift, _p_p_faiss__IndexFlatL2BaseShiftTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexShards, _p_p_faiss__IndexShardsTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSW2Level, _p_p_faiss__IndexHNSW2LevelTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIDMap2, _p_p_faiss__IndexIDMap2To_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexSplitVectors, _p_p_faiss__IndexSplitVectorsTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__Index, 0, 0, 0}, {&_swigt__p_p_faiss__IndexRefineFlat, _p_p_faiss__IndexRefineFlatTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexHNSWSQ, _p_p_faiss__IndexHNSWSQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__MultiIndexQuantizer2, _p_p_faiss__MultiIndexQuantizer2To_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexPQ, _p_p_faiss__IndexPQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIDMap, _p_p_faiss__IndexIDMapTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFPQ, _p_p_faiss__IndexIVFPQTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexIVFScalarQuantizer, _p_p_faiss__IndexIVFScalarQuantizerTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__IndexScalarQuantizer, _p_p_faiss__IndexScalarQuantizerTo_p_p_faiss__Index, 0, 0}, {&_swigt__p_p_faiss__MultiIndexQuantizer, _p_p_faiss__MultiIndexQuantizerTo_p_p_faiss__Index, 0, 0},{0, 0, 0, 0}};
78953 static swig_cast_info _swigc__p_p_faiss__ArrayInvertedLists[] = {{&_swigt__p_p_faiss__ArrayInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
78954 static swig_cast_info _swigc__p_p_faiss__ConcatenatedInvertedLists[] = {{&_swigt__p_p_faiss__ConcatenatedInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
78955 static swig_cast_info _swigc__p_p_faiss__OnDiskInvertedLists[] = {{&_swigt__p_p_faiss__OnDiskInvertedLists, 0, 0, 0},{0, 0, 0, 0}};
78956 static swig_cast_info _swigc__p_p_faiss__InvertedLists[] = { {&_swigt__p_p_faiss__InvertedLists, 0, 0, 0}, {&_swigt__p_p_faiss__ArrayInvertedLists, _p_p_faiss__ArrayInvertedListsTo_p_p_faiss__InvertedLists, 0, 0}, {&_swigt__p_p_faiss__ConcatenatedInvertedLists, _p_p_faiss__ConcatenatedInvertedListsTo_p_p_faiss__InvertedLists, 0, 0}, {&_swigt__p_p_faiss__OnDiskInvertedLists, _p_p_faiss__OnDiskInvertedListsTo_p_p_faiss__InvertedLists, 0, 0},{0, 0, 0, 0}};
78957 static swig_cast_info _swigc__p_p_faiss__RandomRotationMatrix[] = {{&_swigt__p_p_faiss__RandomRotationMatrix, 0, 0, 0},{0, 0, 0, 0}};
78958 static swig_cast_info _swigc__p_p_faiss__PCAMatrix[] = {{&_swigt__p_p_faiss__PCAMatrix, 0, 0, 0},{0, 0, 0, 0}};
78959 static swig_cast_info _swigc__p_p_faiss__OPQMatrix[] = {{&_swigt__p_p_faiss__OPQMatrix, 0, 0, 0},{0, 0, 0, 0}};
78960 static swig_cast_info _swigc__p_p_faiss__LinearTransform[] = {{&_swigt__p_p_faiss__LinearTransform, 0, 0, 0},{0, 0, 0, 0}};
78961 static swig_cast_info _swigc__p_p_faiss__RemapDimensionsTransform[] = {{&_swigt__p_p_faiss__RemapDimensionsTransform, 0, 0, 0},{0, 0, 0, 0}};
78962 static swig_cast_info _swigc__p_p_faiss__NormalizationTransform[] = {{&_swigt__p_p_faiss__NormalizationTransform, 0, 0, 0},{0, 0, 0, 0}};
78963 static swig_cast_info _swigc__p_p_faiss__VectorTransform[] = { {&_swigt__p_p_faiss__RandomRotationMatrix, _p_p_faiss__RandomRotationMatrixTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__PCAMatrix, _p_p_faiss__PCAMatrixTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__OPQMatrix, _p_p_faiss__OPQMatrixTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__VectorTransform, 0, 0, 0}, {&_swigt__p_p_faiss__LinearTransform, _p_p_faiss__LinearTransformTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__RemapDimensionsTransform, _p_p_faiss__RemapDimensionsTransformTo_p_p_faiss__VectorTransform, 0, 0}, {&_swigt__p_p_faiss__NormalizationTransform, _p_p_faiss__NormalizationTransformTo_p_p_faiss__VectorTransform, 0, 0},{0, 0, 0, 0}};
78964 static swig_cast_info _swigc__p_std__listT_faiss__OnDiskInvertedLists__Slot_t[] = { {&_swigt__p_std__listT_faiss__OnDiskInvertedLists__Slot_t, 0, 0, 0},{0, 0, 0, 0}};
78965 static swig_cast_info _swigc__p_std__mt19937[] = { {&_swigt__p_std__mt19937, 0, 0, 0},{0, 0, 0, 0}};
78966 static swig_cast_info _swigc__p_std__pairT_float_int_t[] = { {&_swigt__p_std__pairT_float_int_t, 0, 0, 0},{0, 0, 0, 0}};
78967 static swig_cast_info _swigc__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t[] = { {&_swigt__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t, 0, 0, 0},{0, 0, 0, 0}};
78968 static swig_cast_info _swigc__p_std__priority_queueT_std__pairT_float_int_t_t[] = { {&_swigt__p_std__priority_queueT_std__pairT_float_int_t_t, 0, 0, 0},{0, 0, 0, 0}};
78969 static swig_cast_info _swigc__p_std__unordered_mapT_long_long_t[] = { {&_swigt__p_std__unordered_mapT_long_long_t, 0, 0, 0},{0, 0, 0, 0}};
78970 static swig_cast_info _swigc__p_std__unordered_multimapT_long_long_t[] = { {&_swigt__p_std__unordered_multimapT_long_long_t, 0, 0, 0},{0, 0, 0, 0}};
78971 static swig_cast_info _swigc__p_std__vectorT_char_t[] = { {&_swigt__p_std__vectorT_char_t, 0, 0, 0},{0, 0, 0, 0}};
78972 static swig_cast_info _swigc__p_std__vectorT_double_t[] = { {&_swigt__p_std__vectorT_double_t, 0, 0, 0},{0, 0, 0, 0}};
78973 static swig_cast_info _swigc__p_std__vectorT_faiss__BufferList__Buffer_t[] = { {&_swigt__p_std__vectorT_faiss__BufferList__Buffer_t, 0, 0, 0},{0, 0, 0, 0}};
78974 static swig_cast_info _swigc__p_std__vectorT_faiss__HNSW__NodeDistFarther_t[] = { {&_swigt__p_std__vectorT_faiss__HNSW__NodeDistFarther_t, 0, 0, 0},{0, 0, 0, 0}};
78975 static swig_cast_info _swigc__p_std__vectorT_faiss__Index_p_t[] = { {&_swigt__p_std__vectorT_faiss__Index_p_t, 0, 0, 0},{0, 0, 0, 0}};
78976 static swig_cast_info _swigc__p_std__vectorT_faiss__InvertedLists_const_p_t[] = { {&_swigt__p_std__vectorT_faiss__InvertedLists_const_p_t, 0, 0, 0},{0, 0, 0, 0}};
78977 static swig_cast_info _swigc__p_std__vectorT_faiss__InvertedLists_p_t[] = { {&_swigt__p_std__vectorT_faiss__InvertedLists_p_t, 0, 0, 0},{0, 0, 0, 0}};
78978 static swig_cast_info _swigc__p_std__vectorT_faiss__OnDiskInvertedLists__List_t[] = { {&_swigt__p_std__vectorT_faiss__OnDiskInvertedLists__List_t, 0, 0, 0},{0, 0, 0, 0}};
78979 static swig_cast_info _swigc__p_std__vectorT_faiss__OperatingPoint_t[] = { {&_swigt__p_std__vectorT_faiss__OperatingPoint_t, 0, 0, 0},{0, 0, 0, 0}};
78980 static swig_cast_info _swigc__p_std__vectorT_faiss__ParameterRange_t[] = { {&_swigt__p_std__vectorT_faiss__ParameterRange_t, 0, 0, 0},{0, 0, 0, 0}};
78981 static swig_cast_info _swigc__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t[] = { {&_swigt__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t, 0, 0, 0},{0, 0, 0, 0}};
78982 static swig_cast_info _swigc__p_std__vectorT_faiss__VectorTransform_p_t[] = { {&_swigt__p_std__vectorT_faiss__VectorTransform_p_t, 0, 0, 0},{0, 0, 0, 0}};
78983 static swig_cast_info _swigc__p_std__vectorT_float_t[] = { {&_swigt__p_std__vectorT_float_t, 0, 0, 0},{0, 0, 0, 0}};
78984 static swig_cast_info _swigc__p_std__vectorT_int_t[] = { {&_swigt__p_std__vectorT_int_t, 0, 0, 0},{0, 0, 0, 0}};
78985 static swig_cast_info _swigc__p_std__vectorT_long_t[] = { {&_swigt__p_std__vectorT_long_t, 0, 0, 0},{0, 0, 0, 0}};
78986 static swig_cast_info _swigc__p_std__vectorT_omp_lock_t_t[] = { {&_swigt__p_std__vectorT_omp_lock_t_t, 0, 0, 0},{0, 0, 0, 0}};
78987 static swig_cast_info _swigc__p_std__vectorT_std__vectorT_float_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_float_t_t, 0, 0, 0},{0, 0, 0, 0}};
78988 static swig_cast_info _swigc__p_std__vectorT_std__vectorT_long_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
78989 static swig_cast_info _swigc__p_std__vectorT_std__vectorT_uint8_t_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_uint8_t_t_t, 0, 0, 0},{0, 0, 0, 0}};
78990 static swig_cast_info _swigc__p_std__vectorT_std__vectorT_unsigned_long_t_t[] = { {&_swigt__p_std__vectorT_std__vectorT_unsigned_long_t_t, 0, 0, 0},{0, 0, 0, 0}};
78991 static swig_cast_info _swigc__p_std__vectorT_unsigned_char_t[] = { {&_swigt__p_std__vectorT_unsigned_char_t, 0, 0, 0},{0, 0, 0, 0}};
78992 static swig_cast_info _swigc__p_std__vectorT_unsigned_long_t[] = { {&_swigt__p_std__vectorT_unsigned_long_t, 0, 0, 0},{0, 0, 0, 0}};
78993 static swig_cast_info _swigc__p_storage_idx_t[] = { {&_swigt__p_storage_idx_t, 0, 0, 0},{0, 0, 0, 0}};
78994 static swig_cast_info _swigc__p_uint32_t[] = { {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}};
78995 static swig_cast_info _swigc__p_unsigned_char[] = { {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
78996 static swig_cast_info _swigc__p_unsigned_long[] = { {&_swigt__p_unsigned_long, 0, 0, 0},{0, 0, 0, 0}};
78997 static swig_cast_info _swigc__p_void[] = { {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};
78998
78999 static swig_cast_info *swig_cast_initial[] = {
79000 _swigc__p_Crev,
79001 _swigc__p_FILE,
79002 _swigc__p_MapLong2Long,
79003 _swigc__p_Node,
79004 _swigc__p_T,
79005 _swigc__p_TI,
79006 _swigc__p_char,
79007 _swigc__p_double,
79008 _swigc__p_faiss__ArrayInvertedLists,
79009 _swigc__p_faiss__AutoTuneCriterion,
79010 _swigc__p_faiss__BinaryInvertedListScanner,
79011 _swigc__p_faiss__BufferList,
79012 _swigc__p_faiss__Cloner,
79013 _swigc__p_faiss__Clustering,
79014 _swigc__p_faiss__ClusteringParameters,
79015 _swigc__p_faiss__ConcatenatedInvertedLists,
79016 _swigc__p_faiss__GenHammingComputer16,
79017 _swigc__p_faiss__GenHammingComputer32,
79018 _swigc__p_faiss__GenHammingComputer8,
79019 _swigc__p_faiss__GenHammingComputerM8,
79020 _swigc__p_faiss__HNSW,
79021 _swigc__p_faiss__HNSWStats,
79022 _swigc__p_faiss__HNSW__DistanceComputer,
79023 _swigc__p_faiss__HNSW__MinimaxHeap,
79024 _swigc__p_faiss__HammingComputer16,
79025 _swigc__p_faiss__HammingComputer20,
79026 _swigc__p_faiss__HammingComputer32,
79027 _swigc__p_faiss__HammingComputer4,
79028 _swigc__p_faiss__HammingComputer64,
79029 _swigc__p_faiss__HammingComputer8,
79030 _swigc__p_faiss__HammingComputerDefault,
79031 _swigc__p_faiss__HammingComputerM4,
79032 _swigc__p_faiss__HammingComputerM8,
79033 _swigc__p_faiss__HeapArrayT_faiss__CMaxT_float_long_t_t,
79034 _swigc__p_faiss__HeapArrayT_faiss__CMaxT_int_long_t_t,
79035 _swigc__p_faiss__HeapArrayT_faiss__CMinT_float_long_t_t,
79036 _swigc__p_faiss__HeapArrayT_faiss__CMinT_int_long_t_t,
79037 _swigc__p_faiss__IDSelector,
79038 _swigc__p_faiss__IDSelectorBatch,
79039 _swigc__p_faiss__IDSelectorRange,
79040 _swigc__p_faiss__IOReader,
79041 _swigc__p_faiss__IOWriter,
79042 _swigc__p_faiss__IVFPQSearchParameters,
79043 _swigc__p_faiss__IVFSearchParameters,
79044 _swigc__p_faiss__Index,
79045 _swigc__p_faiss__Index2Layer,
79046 _swigc__p_faiss__IndexBinary,
79047 _swigc__p_faiss__IndexBinaryFlat,
79048 _swigc__p_faiss__IndexBinaryFromFloat,
79049 _swigc__p_faiss__IndexBinaryHNSW,
79050 _swigc__p_faiss__IndexBinaryIVF,
79051 _swigc__p_faiss__IndexFlat,
79052 _swigc__p_faiss__IndexFlat1D,
79053 _swigc__p_faiss__IndexFlatIP,
79054 _swigc__p_faiss__IndexFlatL2,
79055 _swigc__p_faiss__IndexFlatL2BaseShift,
79056 _swigc__p_faiss__IndexHNSW,
79057 _swigc__p_faiss__IndexHNSW2Level,
79058 _swigc__p_faiss__IndexHNSWFlat,
79059 _swigc__p_faiss__IndexHNSWPQ,
79060 _swigc__p_faiss__IndexHNSWSQ,
79061 _swigc__p_faiss__IndexIDMap,
79062 _swigc__p_faiss__IndexIDMap2,
79063 _swigc__p_faiss__IndexIVF,
79064 _swigc__p_faiss__IndexIVFFlat,
79065 _swigc__p_faiss__IndexIVFFlatDedup,
79066 _swigc__p_faiss__IndexIVFPQ,
79067 _swigc__p_faiss__IndexIVFPQR,
79068 _swigc__p_faiss__IndexIVFPQStats,
79069 _swigc__p_faiss__IndexIVFScalarQuantizer,
79070 _swigc__p_faiss__IndexIVFStats,
79071 _swigc__p_faiss__IndexLSH,
79072 _swigc__p_faiss__IndexPQ,
79073 _swigc__p_faiss__IndexPQStats,
79074 _swigc__p_faiss__IndexPreTransform,
79075 _swigc__p_faiss__IndexRefineFlat,
79076 _swigc__p_faiss__IndexScalarQuantizer,
79077 _swigc__p_faiss__IndexShards,
79078 _swigc__p_faiss__IndexSplitVectors,
79079 _swigc__p_faiss__IntersectionCriterion,
79080 _swigc__p_faiss__InvertedListScanner,
79081 _swigc__p_faiss__InvertedLists,
79082 _swigc__p_faiss__Level1Quantizer,
79083 _swigc__p_faiss__LinearTransform,
79084 _swigc__p_faiss__LockLevels,
79085 _swigc__p_faiss__MultiIndexQuantizer,
79086 _swigc__p_faiss__MultiIndexQuantizer2,
79087 _swigc__p_faiss__NormalizationTransform,
79088 _swigc__p_faiss__OPQMatrix,
79089 _swigc__p_faiss__OnDiskInvertedLists,
79090 _swigc__p_faiss__OnDiskInvertedLists__OngoingPrefetch,
79091 _swigc__p_faiss__OneRecallAtRCriterion,
79092 _swigc__p_faiss__OperatingPoint,
79093 _swigc__p_faiss__OperatingPoints,
79094 _swigc__p_faiss__PCAMatrix,
79095 _swigc__p_faiss__ParameterRange,
79096 _swigc__p_faiss__ParameterSpace,
79097 _swigc__p_faiss__PermutationObjective,
79098 _swigc__p_faiss__PolysemousTraining,
79099 _swigc__p_faiss__ProductQuantizer,
79100 _swigc__p_faiss__RandomGenerator,
79101 _swigc__p_faiss__RandomRotationMatrix,
79102 _swigc__p_faiss__RangeSearchPartialResult,
79103 _swigc__p_faiss__RangeSearchPartialResult__QueryResult,
79104 _swigc__p_faiss__RangeSearchResult,
79105 _swigc__p_faiss__ReconstructFromNeighbors,
79106 _swigc__p_faiss__RemapDimensionsTransform,
79107 _swigc__p_faiss__ReproduceDistancesObjective,
79108 _swigc__p_faiss__ScalarQuantizer,
79109 _swigc__p_faiss__ScalarQuantizer__DistanceComputer,
79110 _swigc__p_faiss__SimulatedAnnealingOptimizer,
79111 _swigc__p_faiss__SimulatedAnnealingParameters,
79112 _swigc__p_faiss__VectorIOReader,
79113 _swigc__p_faiss__VectorIOWriter,
79114 _swigc__p_faiss__VectorTransform,
79115 _swigc__p_faiss__VisitedTable,
79116 _swigc__p_faiss__ivflib__SlidingIndexWindow,
79117 _swigc__p_float,
79118 _swigc__p_idx_t,
79119 _swigc__p_int,
79120 _swigc__p_long,
79121 _swigc__p_omp_lock_t,
79122 _swigc__p_p_faiss__ArrayInvertedLists,
79123 _swigc__p_p_faiss__ConcatenatedInvertedLists,
79124 _swigc__p_p_faiss__Index,
79125 _swigc__p_p_faiss__Index2Layer,
79126 _swigc__p_p_faiss__IndexFlat,
79127 _swigc__p_p_faiss__IndexFlat1D,
79128 _swigc__p_p_faiss__IndexFlatIP,
79129 _swigc__p_p_faiss__IndexFlatL2,
79130 _swigc__p_p_faiss__IndexFlatL2BaseShift,
79131 _swigc__p_p_faiss__IndexHNSW,
79132 _swigc__p_p_faiss__IndexHNSW2Level,
79133 _swigc__p_p_faiss__IndexHNSWFlat,
79134 _swigc__p_p_faiss__IndexHNSWPQ,
79135 _swigc__p_p_faiss__IndexHNSWSQ,
79136 _swigc__p_p_faiss__IndexIDMap,
79137 _swigc__p_p_faiss__IndexIDMap2,
79138 _swigc__p_p_faiss__IndexIVF,
79139 _swigc__p_p_faiss__IndexIVFFlat,
79140 _swigc__p_p_faiss__IndexIVFFlatDedup,
79141 _swigc__p_p_faiss__IndexIVFPQ,
79142 _swigc__p_p_faiss__IndexIVFPQR,
79143 _swigc__p_p_faiss__IndexIVFScalarQuantizer,
79144 _swigc__p_p_faiss__IndexLSH,
79145 _swigc__p_p_faiss__IndexPQ,
79146 _swigc__p_p_faiss__IndexPreTransform,
79147 _swigc__p_p_faiss__IndexRefineFlat,
79148 _swigc__p_p_faiss__IndexScalarQuantizer,
79149 _swigc__p_p_faiss__IndexShards,
79150 _swigc__p_p_faiss__IndexSplitVectors,
79151 _swigc__p_p_faiss__InvertedLists,
79152 _swigc__p_p_faiss__LinearTransform,
79153 _swigc__p_p_faiss__MultiIndexQuantizer,
79154 _swigc__p_p_faiss__MultiIndexQuantizer2,
79155 _swigc__p_p_faiss__NormalizationTransform,
79156 _swigc__p_p_faiss__OPQMatrix,
79157 _swigc__p_p_faiss__OnDiskInvertedLists,
79158 _swigc__p_p_faiss__PCAMatrix,
79159 _swigc__p_p_faiss__RandomRotationMatrix,
79160 _swigc__p_p_faiss__RemapDimensionsTransform,
79161 _swigc__p_p_faiss__VectorTransform,
79162 _swigc__p_std__listT_faiss__OnDiskInvertedLists__Slot_t,
79163 _swigc__p_std__mt19937,
79164 _swigc__p_std__pairT_float_int_t,
79165 _swigc__p_std__priority_queueT_faiss__HNSW__NodeDistFarther_t,
79166 _swigc__p_std__priority_queueT_std__pairT_float_int_t_t,
79167 _swigc__p_std__unordered_mapT_long_long_t,
79168 _swigc__p_std__unordered_multimapT_long_long_t,
79169 _swigc__p_std__vectorT_char_t,
79170 _swigc__p_std__vectorT_double_t,
79171 _swigc__p_std__vectorT_faiss__BufferList__Buffer_t,
79172 _swigc__p_std__vectorT_faiss__HNSW__NodeDistFarther_t,
79173 _swigc__p_std__vectorT_faiss__Index_p_t,
79174 _swigc__p_std__vectorT_faiss__InvertedLists_const_p_t,
79175 _swigc__p_std__vectorT_faiss__InvertedLists_p_t,
79176 _swigc__p_std__vectorT_faiss__OnDiskInvertedLists__List_t,
79177 _swigc__p_std__vectorT_faiss__OperatingPoint_t,
79178 _swigc__p_std__vectorT_faiss__ParameterRange_t,
79179 _swigc__p_std__vectorT_faiss__RangeSearchPartialResult__QueryResult_t,
79180 _swigc__p_std__vectorT_faiss__VectorTransform_p_t,
79181 _swigc__p_std__vectorT_float_t,
79182 _swigc__p_std__vectorT_int_t,
79183 _swigc__p_std__vectorT_long_t,
79184 _swigc__p_std__vectorT_omp_lock_t_t,
79185 _swigc__p_std__vectorT_std__vectorT_float_t_t,
79186 _swigc__p_std__vectorT_std__vectorT_long_t_t,
79187 _swigc__p_std__vectorT_std__vectorT_uint8_t_t_t,
79188 _swigc__p_std__vectorT_std__vectorT_unsigned_long_t_t,
79189 _swigc__p_std__vectorT_unsigned_char_t,
79190 _swigc__p_std__vectorT_unsigned_long_t,
79191 _swigc__p_storage_idx_t,
79192 _swigc__p_uint32_t,
79193 _swigc__p_unsigned_char,
79194 _swigc__p_unsigned_long,
79195 _swigc__p_void,
79196 };
79197
79198
79199 /* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */
79200
79201 static swig_const_info swig_const_table[] = {
79202 {0, 0, 0, 0.0, 0, 0}};
79203
79204 #ifdef __cplusplus
79205 }
79206 #endif
79207 /* -----------------------------------------------------------------------------
79208 * Type initialization:
79209 * This problem is tough by the requirement that no dynamic
79210 * memory is used. Also, since swig_type_info structures store pointers to
79211 * swig_cast_info structures and swig_cast_info structures store pointers back
79212 * to swig_type_info structures, we need some lookup code at initialization.
79213 * The idea is that swig generates all the structures that are needed.
79214 * The runtime then collects these partially filled structures.
79215 * The SWIG_InitializeModule function takes these initial arrays out of
79216 * swig_module, and does all the lookup, filling in the swig_module.types
79217 * array with the correct data and linking the correct swig_cast_info
79218 * structures together.
79219 *
79220 * The generated swig_type_info structures are assigned statically to an initial
79221 * array. We just loop through that array, and handle each type individually.
79222 * First we lookup if this type has been already loaded, and if so, use the
79223 * loaded structure instead of the generated one. Then we have to fill in the
79224 * cast linked list. The cast data is initially stored in something like a
79225 * two-dimensional array. Each row corresponds to a type (there are the same
79226 * number of rows as there are in the swig_type_initial array). Each entry in
79227 * a column is one of the swig_cast_info structures for that type.
79228 * The cast_initial array is actually an array of arrays, because each row has
79229 * a variable number of columns. So to actually build the cast linked list,
79230 * we find the array of casts associated with the type, and loop through it
79231 * adding the casts to the list. The one last trick we need to do is making
79232 * sure the type pointer in the swig_cast_info struct is correct.
79233 *
79234 * First off, we lookup the cast->type name to see if it is already loaded.
79235 * There are three cases to handle:
79236 * 1) If the cast->type has already been loaded AND the type we are adding
79237 * casting info to has not been loaded (it is in this module), THEN we
79238 * replace the cast->type pointer with the type pointer that has already
79239 * been loaded.
79240 * 2) If BOTH types (the one we are adding casting info to, and the
79241 * cast->type) are loaded, THEN the cast info has already been loaded by
79242 * the previous module so we just ignore it.
79243 * 3) Finally, if cast->type has not already been loaded, then we add that
79244 * swig_cast_info to the linked list (because the cast->type) pointer will
79245 * be correct.
79246 * ----------------------------------------------------------------------------- */
79247
79248 #ifdef __cplusplus
79249 extern "C" {
79250 #if 0
79251 } /* c-mode */
79252 #endif
79253 #endif
79254
79255 #if 0
79256 #define SWIGRUNTIME_DEBUG
79257 #endif
79258
79259
79260 SWIGRUNTIME void
79261 SWIG_InitializeModule(void *clientdata) {
79262 size_t i;
79263 swig_module_info *module_head, *iter;
79264 int init;
79265
79266 /* check to see if the circular list has been setup, if not, set it up */
79267 if (swig_module.next==0) {
79268 /* Initialize the swig_module */
79269 swig_module.type_initial = swig_type_initial;
79270 swig_module.cast_initial = swig_cast_initial;
79271 swig_module.next = &swig_module;
79272 init = 1;
79273 } else {
79274 init = 0;
79275 }
79276
79277 /* Try and load any already created modules */
79278 module_head = SWIG_GetModule(clientdata);
79279 if (!module_head) {
79280 /* This is the first module loaded for this interpreter */
79281 /* so set the swig module into the interpreter */
79282 SWIG_SetModule(clientdata, &swig_module);
79283 } else {
79284 /* the interpreter has loaded a SWIG module, but has it loaded this one? */
79285 iter=module_head;
79286 do {
79287 if (iter==&swig_module) {
79288 /* Our module is already in the list, so there's nothing more to do. */
79289 return;
79290 }
79291 iter=iter->next;
79292 } while (iter!= module_head);
79293
79294 /* otherwise we must add our module into the list */
79295 swig_module.next = module_head->next;
79296 module_head->next = &swig_module;
79297 }
79298
79299 /* When multiple interpreters are used, a module could have already been initialized in
79300 a different interpreter, but not yet have a pointer in this interpreter.
79301 In this case, we do not want to continue adding types... everything should be
79302 set up already */
79303 if (init == 0) return;
79304
79305 /* Now work on filling in swig_module.types */
79306 #ifdef SWIGRUNTIME_DEBUG
79307 printf("SWIG_InitializeModule: size %d\n", swig_module.size);
79308 #endif
79309 for (i = 0; i < swig_module.size; ++i) {
79310 swig_type_info *type = 0;
79311 swig_type_info *ret;
79312 swig_cast_info *cast;
79313
79314 #ifdef SWIGRUNTIME_DEBUG
79315 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
79316 #endif
79317
79318 /* if there is another module already loaded */
79319 if (swig_module.next != &swig_module) {
79320 type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
79321 }
79322 if (type) {
79323 /* Overwrite clientdata field */
79324 #ifdef SWIGRUNTIME_DEBUG
79325 printf("SWIG_InitializeModule: found type %s\n", type->name);
79326 #endif
79327 if (swig_module.type_initial[i]->clientdata) {
79328 type->clientdata = swig_module.type_initial[i]->clientdata;
79329 #ifdef SWIGRUNTIME_DEBUG
79330 printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
79331 #endif
79332 }
79333 } else {
79334 type = swig_module.type_initial[i];
79335 }
79336
79337 /* Insert casting types */
79338 cast = swig_module.cast_initial[i];
79339 while (cast->type) {
79340 /* Don't need to add information already in the list */
79341 ret = 0;
79342 #ifdef SWIGRUNTIME_DEBUG
79343 printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
79344 #endif
79345 if (swig_module.next != &swig_module) {
79346 ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
79347 #ifdef SWIGRUNTIME_DEBUG
79348 if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
79349 #endif
79350 }
79351 if (ret) {
79352 if (type == swig_module.type_initial[i]) {
79353 #ifdef SWIGRUNTIME_DEBUG
79354 printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
79355 #endif
79356 cast->type = ret;
79357 ret = 0;
79358 } else {
79359 /* Check for casting already in the list */
79360 swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
79361 #ifdef SWIGRUNTIME_DEBUG
79362 if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
79363 #endif
79364 if (!ocast) ret = 0;
79365 }
79366 }
79367
79368 if (!ret) {
79369 #ifdef SWIGRUNTIME_DEBUG
79370 printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
79371 #endif
79372 if (type->cast) {
79373 type->cast->prev = cast;
79374 cast->next = type->cast;
79375 }
79376 type->cast = cast;
79377 }
79378 cast++;
79379 }
79380 /* Set entry in modules->types array equal to the type */
79381 swig_module.types[i] = type;
79382 }
79383 swig_module.types[i] = 0;
79384
79385 #ifdef SWIGRUNTIME_DEBUG
79386 printf("**** SWIG_InitializeModule: Cast List ******\n");
79387 for (i = 0; i < swig_module.size; ++i) {
79388 int j = 0;
79389 swig_cast_info *cast = swig_module.cast_initial[i];
79390 printf("SWIG_InitializeModule: type %d %s\n", i, swig_module.type_initial[i]->name);
79391 while (cast->type) {
79392 printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
79393 cast++;
79394 ++j;
79395 }
79396 printf("---- Total casts: %d\n",j);
79397 }
79398 printf("**** SWIG_InitializeModule: Cast List ******\n");
79399 #endif
79400 }
79401
79402 /* This function will propagate the clientdata field of type to
79403 * any new swig_type_info structures that have been added into the list
79404 * of equivalent types. It is like calling
79405 * SWIG_TypeClientData(type, clientdata) a second time.
79406 */
79407 SWIGRUNTIME void
79408 SWIG_PropagateClientData(void) {
79409 size_t i;
79410 swig_cast_info *equiv;
79411 static int init_run = 0;
79412
79413 if (init_run) return;
79414 init_run = 1;
79415
79416 for (i = 0; i < swig_module.size; i++) {
79417 if (swig_module.types[i]->clientdata) {
79418 equiv = swig_module.types[i]->cast;
79419 while (equiv) {
79420 if (!equiv->converter) {
79421 if (equiv->type && !equiv->type->clientdata)
79422 SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
79423 }
79424 equiv = equiv->next;
79425 }
79426 }
79427 }
79428 }
79429
79430 #ifdef __cplusplus
79431 #if 0
79432 {
79433 /* c-mode */
79434 #endif
79435 }
79436 #endif
79437
79438
79439
79440 #ifdef __cplusplus
79441 extern "C" {
79442 #endif
79443
79444 /* Python-specific SWIG API */
79445 #define SWIG_newvarlink() SWIG_Python_newvarlink()
79446 #define SWIG_addvarlink(p, name, get_attr, set_attr) SWIG_Python_addvarlink(p, name, get_attr, set_attr)
79447 #define SWIG_InstallConstants(d, constants) SWIG_Python_InstallConstants(d, constants)
79448
79449 /* -----------------------------------------------------------------------------
79450 * global variable support code.
79451 * ----------------------------------------------------------------------------- */
79452
79453 typedef struct swig_globalvar {
79454 char *name; /* Name of global variable */
79455 PyObject *(*get_attr)(void); /* Return the current value */
79456 int (*set_attr)(PyObject *); /* Set the value */
79457 struct swig_globalvar *next;
79458 } swig_globalvar;
79459
79460 typedef struct swig_varlinkobject {
79461 PyObject_HEAD
79462 swig_globalvar *vars;
79463 } swig_varlinkobject;
79464
79465 SWIGINTERN PyObject *
79466 swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
79467 #if PY_VERSION_HEX >= 0x03000000
79468 return PyUnicode_InternFromString("<Swig global variables>");
79469 #else
79470 return PyString_FromString("<Swig global variables>");
79471 #endif
79472 }
79473
79474 SWIGINTERN PyObject *
79475 swig_varlink_str(swig_varlinkobject *v) {
79476 #if PY_VERSION_HEX >= 0x03000000
79477 PyObject *str = PyUnicode_InternFromString("(");
79478 PyObject *tail;
79479 PyObject *joined;
79480 swig_globalvar *var;
79481 for (var = v->vars; var; var=var->next) {
79482 tail = PyUnicode_FromString(var->name);
79483 joined = PyUnicode_Concat(str, tail);
79484 Py_DecRef(str);
79485 Py_DecRef(tail);
79486 str = joined;
79487 if (var->next) {
79488 tail = PyUnicode_InternFromString(", ");
79489 joined = PyUnicode_Concat(str, tail);
79490 Py_DecRef(str);
79491 Py_DecRef(tail);
79492 str = joined;
79493 }
79494 }
79495 tail = PyUnicode_InternFromString(")");
79496 joined = PyUnicode_Concat(str, tail);
79497 Py_DecRef(str);
79498 Py_DecRef(tail);
79499 str = joined;
79500 #else
79501 PyObject *str = PyString_FromString("(");
79502 swig_globalvar *var;
79503 for (var = v->vars; var; var=var->next) {
79504 PyString_ConcatAndDel(&str,PyString_FromString(var->name));
79505 if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
79506 }
79507 PyString_ConcatAndDel(&str,PyString_FromString(")"));
79508 #endif
79509 return str;
79510 }
79511
79512 SWIGINTERN int
79513 swig_varlink_print(swig_varlinkobject *v, FILE *fp, int SWIGUNUSEDPARM(flags)) {
79514 char *tmp;
79515 PyObject *str = swig_varlink_str(v);
79516 fprintf(fp,"Swig global variables ");
79517 fprintf(fp,"%s\n", tmp = SWIG_Python_str_AsChar(str));
79518 SWIG_Python_str_DelForPy3(tmp);
79519 Py_DECREF(str);
79520 return 0;
79521 }
79522
79523 SWIGINTERN void
79524 swig_varlink_dealloc(swig_varlinkobject *v) {
79525 swig_globalvar *var = v->vars;
79526 while (var) {
79527 swig_globalvar *n = var->next;
79528 free(var->name);
79529 free(var);
79530 var = n;
79531 }
79532 }
79533
79534 SWIGINTERN PyObject *
79535 swig_varlink_getattr(swig_varlinkobject *v, char *n) {
79536 PyObject *res = NULL;
79537 swig_globalvar *var = v->vars;
79538 while (var) {
79539 if (strcmp(var->name,n) == 0) {
79540 res = (*var->get_attr)();
79541 break;
79542 }
79543 var = var->next;
79544 }
79545 if (res == NULL && !PyErr_Occurred()) {
79546 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
79547 }
79548 return res;
79549 }
79550
79551 SWIGINTERN int
79552 swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
79553 int res = 1;
79554 swig_globalvar *var = v->vars;
79555 while (var) {
79556 if (strcmp(var->name,n) == 0) {
79557 res = (*var->set_attr)(p);
79558 break;
79559 }
79560 var = var->next;
79561 }
79562 if (res == 1 && !PyErr_Occurred()) {
79563 PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
79564 }
79565 return res;
79566 }
79567
79568 SWIGINTERN PyTypeObject*
79569 swig_varlink_type(void) {
79570 static char varlink__doc__[] = "Swig var link object";
79571 static PyTypeObject varlink_type;
79572 static int type_init = 0;
79573 if (!type_init) {
79574 const PyTypeObject tmp = {
79575 #if PY_VERSION_HEX >= 0x03000000
79576 PyVarObject_HEAD_INIT(NULL, 0)
79577 #else
79578 PyObject_HEAD_INIT(NULL)
79579 0, /* ob_size */
79580 #endif
79581 (char *)"swigvarlink", /* tp_name */
79582 sizeof(swig_varlinkobject), /* tp_basicsize */
79583 0, /* tp_itemsize */
79584 (destructor) swig_varlink_dealloc, /* tp_dealloc */
79585 (printfunc) swig_varlink_print, /* tp_print */
79586 (getattrfunc) swig_varlink_getattr, /* tp_getattr */
79587 (setattrfunc) swig_varlink_setattr, /* tp_setattr */
79588 0, /* tp_compare */
79589 (reprfunc) swig_varlink_repr, /* tp_repr */
79590 0, /* tp_as_number */
79591 0, /* tp_as_sequence */
79592 0, /* tp_as_mapping */
79593 0, /* tp_hash */
79594 0, /* tp_call */
79595 (reprfunc) swig_varlink_str, /* tp_str */
79596 0, /* tp_getattro */
79597 0, /* tp_setattro */
79598 0, /* tp_as_buffer */
79599 0, /* tp_flags */
79600 varlink__doc__, /* tp_doc */
79601 0, /* tp_traverse */
79602 0, /* tp_clear */
79603 0, /* tp_richcompare */
79604 0, /* tp_weaklistoffset */
79605 #if PY_VERSION_HEX >= 0x02020000
79606 0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
79607 #endif
79608 #if PY_VERSION_HEX >= 0x02030000
79609 0, /* tp_del */
79610 #endif
79611 #if PY_VERSION_HEX >= 0x02060000
79612 0, /* tp_version_tag */
79613 #endif
79614 #if PY_VERSION_HEX >= 0x03040000
79615 0, /* tp_finalize */
79616 #endif
79617 #ifdef COUNT_ALLOCS
79618 0, /* tp_allocs */
79619 0, /* tp_frees */
79620 0, /* tp_maxalloc */
79621 #if PY_VERSION_HEX >= 0x02050000
79622 0, /* tp_prev */
79623 #endif
79624 0 /* tp_next */
79625 #endif
79626 };
79627 varlink_type = tmp;
79628 type_init = 1;
79629 #if PY_VERSION_HEX < 0x02020000
79630 varlink_type.ob_type = &PyType_Type;
79631 #else
79632 if (PyType_Ready(&varlink_type) < 0)
79633 return NULL;
79634 #endif
79635 }
79636 return &varlink_type;
79637 }
79638
79639 /* Create a variable linking object for use later */
79640 SWIGINTERN PyObject *
79641 SWIG_Python_newvarlink(void) {
79642 swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
79643 if (result) {
79644 result->vars = 0;
79645 }
79646 return ((PyObject*) result);
79647 }
79648
79649 SWIGINTERN void
79650 SWIG_Python_addvarlink(PyObject *p, char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
79651 swig_varlinkobject *v = (swig_varlinkobject *) p;
79652 swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
79653 if (gv) {
79654 size_t size = strlen(name)+1;
79655 gv->name = (char *)malloc(size);
79656 if (gv->name) {
79657 strncpy(gv->name,name,size);
79658 gv->get_attr = get_attr;
79659 gv->set_attr = set_attr;
79660 gv->next = v->vars;
79661 }
79662 }
79663 v->vars = gv;
79664 }
79665
79666 SWIGINTERN PyObject *
79667 SWIG_globals(void) {
79668 static PyObject *_SWIG_globals = 0;
79669 if (!_SWIG_globals) _SWIG_globals = SWIG_newvarlink();
79670 return _SWIG_globals;
79671 }
79672
79673 /* -----------------------------------------------------------------------------
79674 * constants/methods manipulation
79675 * ----------------------------------------------------------------------------- */
79676
79677 /* Install Constants */
79678 SWIGINTERN void
79679 SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
79680 PyObject *obj = 0;
79681 size_t i;
79682 for (i = 0; constants[i].type; ++i) {
79683 switch(constants[i].type) {
79684 case SWIG_PY_POINTER:
79685 obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
79686 break;
79687 case SWIG_PY_BINARY:
79688 obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
79689 break;
79690 default:
79691 obj = 0;
79692 break;
79693 }
79694 if (obj) {
79695 PyDict_SetItemString(d, constants[i].name, obj);
79696 Py_DECREF(obj);
79697 }
79698 }
79699 }
79700
79701 /* -----------------------------------------------------------------------------*/
79702 /* Fix SwigMethods to carry the callback ptrs when needed */
79703 /* -----------------------------------------------------------------------------*/
79704
79705 SWIGINTERN void
79706 SWIG_Python_FixMethods(PyMethodDef *methods,
79707 swig_const_info *const_table,
79708 swig_type_info **types,
79709 swig_type_info **types_initial) {
79710 size_t i;
79711 for (i = 0; methods[i].ml_name; ++i) {
79712 const char *c = methods[i].ml_doc;
79713 if (!c) continue;
79714 c = strstr(c, "swig_ptr: ");
79715 if (c) {
79716 int j;
79717 swig_const_info *ci = 0;
79718 const char *name = c + 10;
79719 for (j = 0; const_table[j].type; ++j) {
79720 if (strncmp(const_table[j].name, name,
79721 strlen(const_table[j].name)) == 0) {
79722 ci = &(const_table[j]);
79723 break;
79724 }
79725 }
79726 if (ci) {
79727 void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
79728 if (ptr) {
79729 size_t shift = (ci->ptype) - types;
79730 swig_type_info *ty = types_initial[shift];
79731 size_t ldoc = (c - methods[i].ml_doc);
79732 size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
79733 char *ndoc = (char*)malloc(ldoc + lptr + 10);
79734 if (ndoc) {
79735 char *buff = ndoc;
79736 strncpy(buff, methods[i].ml_doc, ldoc);
79737 buff += ldoc;
79738 strncpy(buff, "swig_ptr: ", 10);
79739 buff += 10;
79740 SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
79741 methods[i].ml_doc = ndoc;
79742 }
79743 }
79744 }
79745 }
79746 }
79747 }
79748
79749 #ifdef __cplusplus
79750 }
79751 #endif
79752
79753 /* -----------------------------------------------------------------------------*
79754 * Partial Init method
79755 * -----------------------------------------------------------------------------*/
79756
79757 #ifdef __cplusplus
79758 extern "C"
79759 #endif
79760
79761 SWIGEXPORT
79762 #if PY_VERSION_HEX >= 0x03000000
79763 PyObject*
79764 #else
79765 void
79766 #endif
79767 SWIG_init(void) {
79768 PyObject *m, *d, *md;
79769 #if PY_VERSION_HEX >= 0x03000000
79770 static struct PyModuleDef SWIG_module = {
79771 # if PY_VERSION_HEX >= 0x03020000
79772 PyModuleDef_HEAD_INIT,
79773 # else
79774 {
79775 PyObject_HEAD_INIT(NULL)
79776 NULL, /* m_init */
79777 0, /* m_index */
79778 NULL, /* m_copy */
79779 },
79780 # endif
79781 (char *) SWIG_name,
79782 NULL,
79783 -1,
79784 SwigMethods,
79785 NULL,
79786 NULL,
79787 NULL,
79788 NULL
79789 };
79790 #endif
79791
79792 #if defined(SWIGPYTHON_BUILTIN)
79793 static SwigPyClientData SwigPyObject_clientdata = {
79794 0, 0, 0, 0, 0, 0, 0
79795 };
79796 static PyGetSetDef this_getset_def = {
79797 (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
79798 };
79799 static SwigPyGetSet thisown_getset_closure = {
79800 (PyCFunction) SwigPyObject_own,
79801 (PyCFunction) SwigPyObject_own
79802 };
79803 static PyGetSetDef thisown_getset_def = {
79804 (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
79805 };
79806 PyTypeObject *builtin_pytype;
79807 int builtin_base_count;
79808 swig_type_info *builtin_basetype;
79809 PyObject *tuple;
79810 PyGetSetDescrObject *static_getset;
79811 PyTypeObject *metatype;
79812 PyTypeObject *swigpyobject;
79813 SwigPyClientData *cd;
79814 PyObject *public_interface, *public_symbol;
79815 PyObject *this_descr;
79816 PyObject *thisown_descr;
79817 PyObject *self = 0;
79818 int i;
79819
79820 (void)builtin_pytype;
79821 (void)builtin_base_count;
79822 (void)builtin_basetype;
79823 (void)tuple;
79824 (void)static_getset;
79825 (void)self;
79826
79827 /* Metaclass is used to implement static member variables */
79828 metatype = SwigPyObjectType();
79829 assert(metatype);
79830 #endif
79831
79832 /* Fix SwigMethods to carry the callback ptrs when needed */
79833 SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
79834
79835 #if PY_VERSION_HEX >= 0x03000000
79836 m = PyModule_Create(&SWIG_module);
79837 #else
79838 m = Py_InitModule((char *) SWIG_name, SwigMethods);
79839 #endif
79840
79841 md = d = PyModule_GetDict(m);
79842 (void)md;
79843
79844 SWIG_InitializeModule(0);
79845
79846 #ifdef SWIGPYTHON_BUILTIN
79847 swigpyobject = SwigPyObject_TypeOnce();
79848
79849 SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
79850 assert(SwigPyObject_stype);
79851 cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
79852 if (!cd) {
79853 SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
79854 SwigPyObject_clientdata.pytype = swigpyobject;
79855 } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
79856 PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
79857 # if PY_VERSION_HEX >= 0x03000000
79858 return NULL;
79859 # else
79860 return;
79861 # endif
79862 }
79863
79864 /* All objects have a 'this' attribute */
79865 this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
79866 (void)this_descr;
79867
79868 /* All objects have a 'thisown' attribute */
79869 thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
79870 (void)thisown_descr;
79871
79872 public_interface = PyList_New(0);
79873 public_symbol = 0;
79874 (void)public_symbol;
79875
79876 PyDict_SetItemString(md, "__all__", public_interface);
79877 Py_DECREF(public_interface);
79878 for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
79879 SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
79880 for (i = 0; swig_const_table[i].name != 0; ++i)
79881 SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
79882 #endif
79883
79884 SWIG_InstallConstants(d,swig_const_table);
79885
79886 PyDict_SetItemString(md,(char *)"cvar", SWIG_globals());
79887 SWIG_addvarlink(SWIG_globals(),(char *)"hamming_batch_size",Swig_var_hamming_batch_size_get, Swig_var_hamming_batch_size_set);
79888 SWIG_addvarlink(SWIG_globals(),(char *)"distance_compute_blas_threshold",Swig_var_distance_compute_blas_threshold_get, Swig_var_distance_compute_blas_threshold_set);
79889 SWIG_Python_SetConstant(d, "FAISS_VERSION_MAJOR",SWIG_From_int(static_cast< int >(1)));
79890 SWIG_Python_SetConstant(d, "FAISS_VERSION_MINOR",SWIG_From_int(static_cast< int >(4)));
79891 SWIG_Python_SetConstant(d, "FAISS_VERSION_PATCH",SWIG_From_int(static_cast< int >(0)));
79892 SWIG_Python_SetConstant(d, "METRIC_INNER_PRODUCT",SWIG_From_int(static_cast< int >(faiss::METRIC_INNER_PRODUCT)));
79893 SWIG_Python_SetConstant(d, "METRIC_L2",SWIG_From_int(static_cast< int >(faiss::METRIC_L2)));
79894 SWIG_Python_SetConstant(d, "ProductQuantizer_Train_default",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_default)));
79895 SWIG_Python_SetConstant(d, "ProductQuantizer_Train_hot_start",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_hot_start)));
79896 SWIG_Python_SetConstant(d, "ProductQuantizer_Train_shared",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_shared)));
79897 SWIG_Python_SetConstant(d, "ProductQuantizer_Train_hypercube",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_hypercube)));
79898 SWIG_Python_SetConstant(d, "ProductQuantizer_Train_hypercube_pca",SWIG_From_int(static_cast< int >(faiss::ProductQuantizer::Train_hypercube_pca)));
79899 SWIG_Python_SetConstant(d, "PolysemousTraining_OT_None",SWIG_From_int(static_cast< int >(faiss::PolysemousTraining::OT_None)));
79900 SWIG_Python_SetConstant(d, "PolysemousTraining_OT_ReproduceDistances_affine",SWIG_From_int(static_cast< int >(faiss::PolysemousTraining::OT_ReproduceDistances_affine)));
79901 SWIG_Python_SetConstant(d, "PolysemousTraining_OT_Ranking_weighted_diff",SWIG_From_int(static_cast< int >(faiss::PolysemousTraining::OT_Ranking_weighted_diff)));
79902 SWIG_Python_SetConstant(d, "IndexPQ_ST_PQ",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_PQ)));
79903 SWIG_Python_SetConstant(d, "IndexPQ_ST_HE",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_HE)));
79904 SWIG_Python_SetConstant(d, "IndexPQ_ST_generalized_HE",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_generalized_HE)));
79905 SWIG_Python_SetConstant(d, "IndexPQ_ST_SDC",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_SDC)));
79906 SWIG_Python_SetConstant(d, "IndexPQ_ST_polysemous",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_polysemous)));
79907 SWIG_Python_SetConstant(d, "IndexPQ_ST_polysemous_generalize",SWIG_From_int(static_cast< int >(faiss::IndexPQ::ST_polysemous_generalize)));
79908 SWIG_addvarlink(SWIG_globals(),(char *)"indexPQ_stats",Swig_var_indexPQ_stats_get, Swig_var_indexPQ_stats_set);
79909 SWIG_addvarlink(SWIG_globals(),(char *)"indexIVF_stats",Swig_var_indexIVF_stats_get, Swig_var_indexIVF_stats_set);
79910 SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_8bit",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_8bit)));
79911 SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_4bit",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_4bit)));
79912 SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_8bit_uniform",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_8bit_uniform)));
79913 SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_4bit_uniform",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_4bit_uniform)));
79914 SWIG_Python_SetConstant(d, "ScalarQuantizer_QT_fp16",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::QT_fp16)));
79915 SWIG_Python_SetConstant(d, "ScalarQuantizer_RS_minmax",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::RS_minmax)));
79916 SWIG_Python_SetConstant(d, "ScalarQuantizer_RS_meanstd",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::RS_meanstd)));
79917 SWIG_Python_SetConstant(d, "ScalarQuantizer_RS_quantiles",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::RS_quantiles)));
79918 SWIG_Python_SetConstant(d, "ScalarQuantizer_RS_optim",SWIG_From_int(static_cast< int >(faiss::ScalarQuantizer::RS_optim)));
79919 SWIG_addvarlink(SWIG_globals(),(char *)"hnsw_stats",Swig_var_hnsw_stats_get, Swig_var_hnsw_stats_set);
79920 SWIG_addvarlink(SWIG_globals(),(char *)"IndexIVFPQ_precomputed_table_max_bytes",Swig_var_IndexIVFPQ_precomputed_table_max_bytes_get, Swig_var_IndexIVFPQ_precomputed_table_max_bytes_set);
79921 SWIG_addvarlink(SWIG_globals(),(char *)"indexIVFPQ_stats",Swig_var_indexIVFPQ_stats_get, Swig_var_indexIVFPQ_stats_set);
79922 SWIG_addvarlink(SWIG_globals(),(char *)"IO_FLAG_MMAP",Swig_var_IO_FLAG_MMAP_get, Swig_var_IO_FLAG_MMAP_set);
79923 SWIG_addvarlink(SWIG_globals(),(char *)"IO_FLAG_READ_ONLY",Swig_var_IO_FLAG_READ_ONLY_get, Swig_var_IO_FLAG_READ_ONLY_set);
79924
79925 /* needed, else crash at runtime */
79926 import_array();
79927
79928 #if PY_VERSION_HEX >= 0x03000000
79929 return m;
79930 #else
79931 return;
79932 #endif
79933 }
79934
faiss::RandomGenerator
random generator that can be used in multithreaded contexts
Definition: utils.h:48
faiss::hammings_knn_hc
void hammings_knn_hc(int_maxheap_array_t *ha, const uint8_t *a, const uint8_t *b, size_t nb, size_t ncodes, int order)
Definition: hamming.cpp:518
faiss::IndexBinaryFlat
Definition: IndexBinaryFlat.h:22
faiss::IndexIVF
Definition: IndexIVF.h:91
faiss::PolysemousTraining::OT_Ranking_weighted_diff
same as _2, but use rank of y+ - rank of y-
Definition: PolysemousTraining.h:127
faiss::Cloner
Definition: index_io.h:68
faiss::ProductQuantizer::Train_hypercube_pca
intialize centroids with nbits-D hypercube
Definition: ProductQuantizer.h:44
faiss::IDSelectorBatch
Definition: AuxIndexStructures.h:78
faiss::HammingComputerM4
Definition: hamming.h:371
faiss::ConcatenatedInvertedLists
Definition: InvertedLists.h:193
faiss::km_update_centroids
int km_update_centroids(const float *x, float *centroids, long *assign, size_t d, size_t k, size_t n, size_t k_frozen)
Definition: utils.cpp:1066
faiss::knn_L2sqr_base_shift
void knn_L2sqr_base_shift(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_maxheap_array_t *res, const float *base_shift)
Definition: utils.cpp:653
faiss::IndexHNSWSQ
Definition: IndexHNSW.h:159
faiss::ScalarQuantizer::QuantizerType
QuantizerType
Definition: IndexScalarQuantizer.h:34
faiss::IndexFlat
Definition: IndexFlat.h:22
faiss::RandomRotationMatrix
Randomly rotate a set of vectors.
Definition: VectorTransform.h:116
faiss::Level1Quantizer
Definition: IndexIVF.h:32
faiss::IndexIDMap2
Definition: MetaIndexes.h:62
faiss::IndexIVFPQR
Definition: IndexIVFPQ.h:156
faiss::HammingComputer20
Definition: hamming.h:246
faiss::IndexPQStats
Definition: IndexPQ.h:120
faiss::ArrayInvertedLists
simple (default) implementation as an array of inverted lists
Definition: InvertedLists.h:168
faiss::IndexPQ::ST_HE
Hamming distance on codes.
Definition: IndexPQ.h:78
faiss::RangeSearchPartialResult::QueryResult
result structure for a single query
Definition: AuxIndexStructures.h:147
faiss::IndexIVF::check_compatible_for_merge
void check_compatible_for_merge(const IndexIVF &other) const
Definition: IndexIVF.cpp:461
faiss::fvec_L2sqr
float fvec_L2sqr(const float *x, const float *y, size_t d)
Squared L2 distance between two vectors.
Definition: utils_simd.cpp:502
faiss::HeapArray::get_val
T * get_val(size_t key)
Return the list of values for a heap.
Definition: Heap.h:360
faiss::CMax
Definition: Heap.h:48
faiss::GenHammingComputer16
Definition: hamming.h:455
faiss::GenHammingComputer8
Definition: hamming.h:440
faiss::OperatingPoint
Definition: AutoTune.h:86
faiss::ScalarQuantizer::RS_optim
alternate optimization of reconstruction error
Definition: IndexScalarQuantizer.h:53
faiss::IndexScalarQuantizer
Definition: IndexScalarQuantizer.h:102
faiss::IndexBinaryIVF
Definition: IndexBinaryIVF.h:36
faiss::ScalarQuantizer::QT_8bit_uniform
same, shared range for all dimensions
Definition: IndexScalarQuantizer.h:37
SwigPyClientData
Definition: swigfaiss_gpu_wrap.cpp:1452
faiss::IndexIVFPQStats
Definition: IndexIVFPQ.h:135
faiss::bincode_hist
void bincode_hist(size_t n, size_t nbits, const uint8_t *codes, int *hist)
Definition: utils.cpp:1314
PyHeapTypeObject
Definition: swigfaiss_gpu_wrap.cpp:955
faiss::fvecs_maybe_subsample
const float * fvecs_maybe_subsample(size_t d, size_t *n, size_t nmax, const float *x, bool verbose, long seed)
Definition: utils.cpp:1528
faiss::OperatingPoints::display
void display(bool only_optimal=true) const
easy-to-read output
Definition: AutoTune.cpp:229
faiss::IndexPQ
Definition: IndexPQ.h:27
SwigPyObject
Definition: swigfaiss_gpu_wrap.cpp:1540
faiss::HNSW::idx_t
Index::idx_t idx_t
Faiss results are 64-bit.
Definition: HNSW.h:52
faiss::ProductQuantizer::Train_hypercube
intialize centroids with nbits-D hypercube
Definition: ProductQuantizer.h:43
faiss::IndexFlat1D
optimized version for 1D &quot;vectors&quot;
Definition: IndexFlat.h:137
faiss::ScalarQuantizer::QT_4bit
4 bits per component
Definition: IndexScalarQuantizer.h:36
faiss::OperatingPoints
Definition: AutoTune.h:93
faiss::hammings_knn_mc
void hammings_knn_mc(const uint8_t *a, const uint8_t *b, size_t na, size_t nb, size_t k, size_t ncodes, int32_t *distances, long *labels)
Definition: hamming.cpp:556
MapLong2Long
Definition: swigfaiss_gpu_wrap.cpp:4217
faiss::IDSelector
Definition: AuxIndexStructures.h:54
faiss::PCAMatrix
Definition: VectorTransform.h:134
faiss::IndexFlatL2
Definition: IndexFlat.h:78
faiss::ReconstructFromNeighbors
Definition: IndexHNSW.h:26
faiss::IndexIVFStats
Definition: IndexIVF.h:295
faiss::ranklist_handle_ties
void ranklist_handle_ties(int k, long *idx, const float *dis)
Definition: utils.cpp:1160
faiss::LockLevels
Definition: OnDiskInvertedLists.cpp:32
faiss::ReproduceDistancesObjective
Definition: PolysemousTraining.h:55
faiss::IndexLSH
Definition: IndexLSH.h:23
faiss::ProductQuantizer::Train_shared
share dictionary accross PQ segments
Definition: ProductQuantizer.h:42
faiss::OPQMatrix
Definition: VectorTransform.h:189
faiss::RandomGenerator::rand_float
float rand_float()
between 0 and 1
Definition: utils.cpp:130
faiss::FaissException::what
const char * what() const noexceptoverride
from std::exception
Definition: FaissException.cpp:31
faiss::HammingComputer8
Definition: hamming.h:201
swig_globalvar
Definition: swigfaiss_gpu_wrap.cpp:89395
faiss::fvec_madd
void fvec_madd(size_t n, const float *a, float bf, const float *b, float *c)
Definition: utils_simd.cpp:589
faiss::HammingComputer64
Definition: hamming.h:292
faiss::IndexPreTransform
Definition: VectorTransform.h:253
faiss::IndexIDMap
Definition: MetaIndexes.h:25
faiss::IndexIVFFlat
Definition: IndexIVFFlat.h:25
faiss::get_mem_usage_kb
size_t get_mem_usage_kb()
get current RSS usage in kB
faiss::IndexFlatIP
Definition: IndexFlat.h:72
faiss::VectorIOReader
Definition: AuxIndexStructures.h:206
faiss::IndexRefineFlat
Definition: IndexFlat.h:102
faiss::ScalarQuantizer
Definition: IndexScalarQuantizer.h:32
faiss::IndexSplitVectors
Definition: MetaIndexes.h:144
faiss::IntersectionCriterion
Definition: AutoTune.h:69
faiss::Index2Layer
Definition: IndexIVFPQ.h:205
faiss::IVFSearchParameters
Definition: IndexIVF.h:61
faiss::InvertedLists
Definition: InvertedLists.h:32
faiss::HammingComputer16
Definition: hamming.h:222
faiss::ivec_hist
int ivec_hist(size_t n, const int *v, int vmax, int *hist)
compute histogram on v
Definition: utils.cpp:1303
faiss::OnDiskInvertedLists::OngoingPrefetch
Definition: OnDiskInvertedLists.cpp:143
faiss::IndexHNSW2Level
Definition: IndexHNSW.h:168
SwigPyPacked
Definition: swigfaiss_gpu_wrap.cpp:2036
faiss::IndexBinary::display
void display() const
Definition: IndexBinary.cpp:73
faiss::FaissException
Base class for Faiss exceptions.
Definition: FaissException.h:20
faiss::HNSWStats
Definition: HNSW.h:264
faiss::HammingComputer4
Definition: hamming.h:181
faiss::VectorIOWriter
Definition: AuxIndexStructures.h:212
faiss::IndexPQ::Search_type_t
Search_type_t
how to perform the search in search_core
Definition: IndexPQ.h:76
faiss::HeapArray::per_line_extrema
void per_line_extrema(T *vals_out, TI *idx_out) const
Definition: Heap.cpp:86
faiss::IndexIVFPQ::precomputed_table_max_bytes
static size_t precomputed_table_max_bytes
2G by default, accommodates tables up to PQ32 w/ 65536 centroids
Definition: IndexIVFPQ.h:56
faiss::VisitedTable
set implementation optimized for fast access.
Definition: HNSW.h:235
faiss::RandomGenerator::rand_long
long rand_long()
random long
Definition: utils.cpp:120
faiss::IndexIVFPQ
Definition: IndexIVFPQ.h:35
faiss::ScalarQuantizer::DistanceComputer
Definition: IndexScalarQuantizer.h:84
faiss::Clustering
Definition: Clustering.h:56
faiss::IndexBinaryFromFloat
Definition: IndexBinaryFromFloat.h:29
faiss::IndexPQ::ST_polysemous_generalize
Filter on generalized Hamming.
Definition: IndexPQ.h:82
faiss::GenHammingComputerM8
Definition: hamming.h:490
faiss::LinearTransform
Definition: VectorTransform.h:76
faiss::merge_result_table_with
size_t merge_result_table_with(size_t n, size_t k, long *I0, float *D0, const long *I1, const float *D1, bool keep_min, long translation)
Definition: utils.cpp:1176
faiss::RandomGenerator::rand_int
int rand_int()
random positive integer
Definition: utils.cpp:115
faiss::HeapArray
Definition: Heap.h:350
faiss::Index::idx_t
long idx_t
all indices are this type
Definition: Index.h:64
faiss::ranklist_intersection_size
size_t ranklist_intersection_size(size_t k1, const long *v1, size_t k2, const long *v2_in)
Definition: utils.cpp:1241
faiss::kmeans_clustering
float kmeans_clustering(size_t d, size_t n, size_t k, const float *x, float *centroids)
Definition: Clustering.cpp:238
faiss::ivflib::SlidingIndexWindow
Definition: IVFlib.h:84
faiss::IDSelectorRange
Definition: AuxIndexStructures.h:63
faiss::pairwise_L2sqr
void pairwise_L2sqr(long d, long nq, const float *xq, long nb, const float *xb, float *dis, long ldq, long ldb, long ldd)
Definition: utils.cpp:1009
faiss::IOReader
Definition: AuxIndexStructures.h:177
faiss::AutoTuneCriterion
Definition: AutoTune.h:26
faiss::range_search_inner_product
void range_search_inner_product(const float *x, const float *y, size_t d, size_t nx, size_t ny, float radius, RangeSearchResult *res)
same as range_search_L2sqr for the inner product similarity
Definition: utils.cpp:947
swig_cast_info
Definition: swigfaiss_gpu_wrap.cpp:371
swig_const_info
Definition: swigfaiss_gpu_wrap.cpp:1137
faiss::IndexPQ::ST_generalized_HE
nb of same codes
Definition: IndexPQ.h:79
faiss::knn_inner_product
void knn_inner_product(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_minheap_array_t *res)
Definition: utils.cpp:613
faiss::ProductQuantizer::Train_hot_start
the centroids are already initialized
Definition: ProductQuantizer.h:41
faiss::getmillisecs
double getmillisecs()
ms elapsed since some arbitrary epoch
Definition: utils.cpp:70
faiss::ScalarQuantizer::RangeStat
RangeStat
Definition: IndexScalarQuantizer.h:49
faiss::PolysemousTraining
optimizes the order of indices in a ProductQuantizer
Definition: PolysemousTraining.h:122
swig_varlinkobject
Definition: swigfaiss_gpu_wrap.cpp:89402
faiss::real_to_binary
void real_to_binary(size_t d, const float *x_in, uint8_t *x_out)
Definition: utils.cpp:1558
faiss::IndexIVFScalarQuantizer
Definition: IndexScalarQuantizer.h:149
faiss::IndexBinaryIVF::print_stats
void print_stats() const
display some stats about the inverted lists
Definition: IndexBinaryIVF.cpp:269
faiss::ScalarQuantizer::RS_quantiles
[Q(rs), Q(1-rs)]
Definition: IndexScalarQuantizer.h:52
faiss::ScalarQuantizer::RS_meanstd
[mean - std * rs, mean + std * rs]
Definition: IndexScalarQuantizer.h:51
faiss::imbalance_factor
double imbalance_factor(int k, const int *hist)
same, takes a histogram as input
Definition: utils.cpp:1279
faiss::MultiIndexQuantizer
Definition: IndexPQ.h:136
faiss::fvec_norm_L2sqr
float fvec_norm_L2sqr(const float *x, size_t d)
Definition: utils_simd.cpp:516
faiss::range_search_L2sqr
void range_search_L2sqr(const float *x, const float *y, size_t d, size_t nx, size_t ny, float radius, RangeSearchResult *res)
Definition: utils.cpp:932
faiss::VectorTransform
Definition: VectorTransform.h:27
faiss::InvertedListScanner
Definition: IndexIVF.h:261
faiss::matrix_qr
void matrix_qr(int m, int n, float *a)
Definition: utils.cpp:987
faiss::IndexBinaryHNSW
Definition: IndexBinaryHNSW.h:24
faiss::MultiIndexQuantizer2
Definition: IndexPQ.h:161
faiss::HNSW
Definition: HNSW.h:47
faiss::RangeSearchPartialResult
the entries in the buffers are split per query
Definition: AuxIndexStructures.h:141
faiss::RangeSearchResult
Definition: AuxIndexStructures.h:31
faiss::IndexHNSWPQ
Definition: IndexHNSW.h:148
faiss::OperatingPoints::merge_with
int merge_with(const OperatingPoints &other, const std::string &prefix="")
add operating points from other to this, with a prefix to the keys
Definition: AutoTune.cpp:167
faiss::Index::display
void display() const
Definition: Index.cpp:95
faiss::ivec_checksum
size_t ivec_checksum(size_t n, const int *a)
compute a checksum on a table.
Definition: utils.cpp:1337
faiss::hammings
void hammings(const uint8_t *a, const uint8_t *b, size_t na, size_t nb, size_t nbytespercode, hamdis_t *dis)
faiss::IndexHNSW
Definition: IndexHNSW.h:70
faiss::SimulatedAnnealingParameters
parameters used for the simulated annealing method
Definition: PolysemousTraining.h:22
faiss::BinaryInvertedListScanner
Definition: IndexBinaryIVF.h:187
swig_type_info
Definition: swigfaiss_gpu_wrap.cpp:361
faiss::IndexFlatL2BaseShift
Definition: IndexFlat.h:85
faiss::HeapArray::get_ids
TI * get_ids(size_t key)
Correspponding identifiers.
Definition: Heap.h:363
faiss::ClusteringParameters
Definition: Clustering.h:23
faiss::IndexBinary
Definition: IndexBinary.h:37
faiss::RemapDimensionsTransform
Definition: VectorTransform.h:214
faiss::IndexIVF::print_stats
void print_stats() const
display some stats about the inverted lists
Definition: IndexIVF.cpp:440
faiss::IOWriter
Definition: AuxIndexStructures.h:191
faiss::HNSW::random_level
int random_level()
pick a random level for a new point
Definition: HNSW.cpp:64
faiss::IndexBinary::idx_t
long idx_t
all indices are this type
Definition: IndexBinary.h:38
faiss::OnDiskInvertedLists
Definition: OnDiskInvertedLists.h:52
faiss::PolysemousTraining::OT_ReproduceDistances_affine
default
Definition: PolysemousTraining.h:126
faiss::IndexHNSWFlat
Definition: IndexHNSW.h:138
faiss::ScalarQuantizer::QT_8bit
8 bits per component
Definition: IndexScalarQuantizer.h:35
faiss::ParameterSpace
Definition: AutoTune.h:132
faiss::PermutationObjective
abstract class for the loss function
Definition: PolysemousTraining.h:41
faiss::Index
Definition: Index.h:62
faiss::IndexPQ::ST_PQ
asymmetric product quantizer (default)
Definition: IndexPQ.h:77
faiss::fvec_madd_and_argmin
int fvec_madd_and_argmin(size_t n, const float *a, float bf, const float *b, float *c)
Definition: utils_simd.cpp:676
faiss::PolysemousTraining::Optimization_type_t
Optimization_type_t
Definition: PolysemousTraining.h:124
faiss::ParameterSpace::display
void display() const
print a description on stdout
Definition: AutoTune.cpp:546
faiss::ScalarQuantizer::RS_minmax
[min - rs*(max-min), max + rs*(max-min)]
Definition: IndexScalarQuantizer.h:50
faiss::fvec_norms_L2
void fvec_norms_L2(float *ip, const float *x, size_t d, size_t nx)
faiss::IndexPQ::ST_polysemous
HE filter (using ht) + PQ combination.
Definition: IndexPQ.h:81
faiss::knn_L2sqr
void knn_L2sqr(const float *x, const float *y, size_t d, size_t nx, size_t ny, float_maxheap_array_t *res)
Definition: utils.cpp:633
faiss::binary_to_real
void binary_to_real(size_t d, const uint8_t *x_in, float *x_out)
Definition: utils.cpp:1552
faiss::fvec_norms_L2sqr
void fvec_norms_L2sqr(float *ip, const float *x, size_t d, size_t nx)
same as fvec_norms_L2, but computes square norms
faiss::IndexShards
Definition: MetaIndexes.h:85
faiss::ProductQuantizer
Definition: ProductQuantizer.h:24
faiss::HNSW::MinimaxHeap
Definition: HNSW.h:78
faiss::BufferList
Definition: AuxIndexStructures.h:99
faiss::HammingComputer32
Definition: hamming.h:269
faiss::NormalizationTransform
Definition: VectorTransform.h:237
faiss::HNSW::storage_idx_t
int storage_idx_t
internal storage of vectors (32 bits: this is expensive)
Definition: HNSW.h:49
faiss::GenHammingComputer32
Definition: hamming.h:471
faiss::HammingComputerDefault
Definition: hamming.h:319
faiss::HNSW::DistanceComputer
Definition: HNSW.h:60
faiss::HammingComputerM8
Definition: hamming.h:344
faiss::ParameterRange
possible values of a parameter, sorted from least to most expensive/accurate
Definition: AutoTune.h:125
faiss::IndexPQ::ST_SDC
symmetric product quantizer (SDC)
Definition: IndexPQ.h:80
faiss::index_factory
Index * index_factory(int d, const char *description_in, MetricType metric)
Definition: AutoTune.cpp:722
faiss::IVFPQSearchParameters
Definition: IndexIVFPQ.h:23
swig_module_info
Definition: swigfaiss_gpu_wrap.cpp:381
faiss::HNSW::shrink_neighbor_list
static void shrink_neighbor_list(DistanceComputer &qdis, std::priority_queue< NodeDistFarther > &input, std::vector< NodeDistFarther > &output, int max_size)
Definition: HNSW.cpp:237
faiss::OneRecallAtRCriterion
Definition: AutoTune.h:57
faiss::SimulatedAnnealingOptimizer
Simulated annealing optimization algorithm for permutations.
Definition: PolysemousTraining.h:95
faiss::MetricType
MetricType
Some algorithms support both an inner product version and a L2 search version.
Definition: Index.h:45
faiss::IndexIVFFlatDedup
Definition: IndexIVFFlat.h:77
faiss::CMin
Definition: Heap.h:53
faiss::ProductQuantizer::train_type_t
train_type_t
initialization
Definition: ProductQuantizer.h:39
faiss::generalized_hammings_knn_hc
void generalized_hammings_knn_hc(int_maxheap_array_t *ha, const uint8_t *a, const uint8_t *b, size_t nb, size_t code_size, int ordered)
Definition: hamming.cpp:729