# This file was automatically generated by SWIG (http://www.swig.org).
# Version 3.0.12
#
# Do not make changes to this file unless you know what you are doing--modify
# the SWIG interface file instead.

from sys import version_info as _swig_python_version_info
if _swig_python_version_info >= (2, 7, 0):
    def swig_import_helper():
        import importlib
        pkg = __name__.rpartition('.')[0]
        mname = '.'.join((pkg, '_swigfaiss_avx2')).lstrip('.')
        try:
            return importlib.import_module(mname)
        except ImportError:
            return importlib.import_module('_swigfaiss_avx2')
    _swigfaiss_avx2 = swig_import_helper()
    del swig_import_helper
elif _swig_python_version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_swigfaiss_avx2', [dirname(__file__)])
        except ImportError:
            import _swigfaiss_avx2
            return _swigfaiss_avx2
        try:
            _mod = imp.load_module('_swigfaiss_avx2', fp, pathname, description)
        finally:
            if fp is not None:
                fp.close()
        return _mod
    _swigfaiss_avx2 = swig_import_helper()
    del swig_import_helper
else:
    import _swigfaiss_avx2
del _swig_python_version_info

try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

def _swig_setattr_nondynamic(self, class_type, name, value, static=1):
    if (name == "thisown"):
        return self.this.own(value)
    if (name == "this"):
        if type(value).__name__ == 'SwigPyObject':
            self.__dict__[name] = value
            return
    method = class_type.__swig_setmethods__.get(name, None)
    if method:
        return method(self, value)
    if (not static):
        if _newclass:
            object.__setattr__(self, name, value)
        else:
            self.__dict__[name] = value
    else:
        raise AttributeError("You cannot add attributes to %s" % self)


def _swig_setattr(self, class_type, name, value):
    return _swig_setattr_nondynamic(self, class_type, name, value, 0)


def _swig_getattr(self, class_type, name):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    raise AttributeError("'%s' object has no attribute '%s'" % (class_type.__name__, name))


def _swig_repr(self):
    try:
        strthis = "proxy of " + self.this.__repr__()
    except __builtin__.Exception:
        strthis = ""
    return "<%s.%s; %s >" % (self.__class__.__module__, self.__class__.__name__, strthis,)

try:
    _object = object
    _newclass = 1
except __builtin__.Exception:
    class _object:
        pass
    _newclass = 0

class FloatVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, FloatVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, FloatVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_FloatVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.FloatVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.FloatVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.FloatVector_data(self)

    def size(self):
        return _swigfaiss_avx2.FloatVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.FloatVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.FloatVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.FloatVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_FloatVector
    __del__ = lambda self: None
FloatVector_swigregister = _swigfaiss_avx2.FloatVector_swigregister
FloatVector_swigregister(FloatVector)

class DoubleVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, DoubleVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, DoubleVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_DoubleVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.DoubleVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.DoubleVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.DoubleVector_data(self)

    def size(self):
        return _swigfaiss_avx2.DoubleVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.DoubleVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.DoubleVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.DoubleVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_DoubleVector
    __del__ = lambda self: None
DoubleVector_swigregister = _swigfaiss_avx2.DoubleVector_swigregister
DoubleVector_swigregister(DoubleVector)

class ByteVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ByteVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ByteVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_ByteVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.ByteVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.ByteVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.ByteVector_data(self)

    def size(self):
        return _swigfaiss_avx2.ByteVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.ByteVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.ByteVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.ByteVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_ByteVector
    __del__ = lambda self: None
ByteVector_swigregister = _swigfaiss_avx2.ByteVector_swigregister
ByteVector_swigregister(ByteVector)

class CharVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, CharVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, CharVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_CharVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.CharVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.CharVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.CharVector_data(self)

    def size(self):
        return _swigfaiss_avx2.CharVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.CharVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.CharVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.CharVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_CharVector
    __del__ = lambda self: None
CharVector_swigregister = _swigfaiss_avx2.CharVector_swigregister
CharVector_swigregister(CharVector)

class Uint64Vector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Uint64Vector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Uint64Vector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_Uint64Vector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.Uint64Vector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.Uint64Vector_clear(self)

    def data(self):
        return _swigfaiss_avx2.Uint64Vector_data(self)

    def size(self):
        return _swigfaiss_avx2.Uint64Vector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.Uint64Vector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.Uint64Vector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.Uint64Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Uint64Vector
    __del__ = lambda self: None
Uint64Vector_swigregister = _swigfaiss_avx2.Uint64Vector_swigregister
Uint64Vector_swigregister(Uint64Vector)

class LongVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, LongVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, LongVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_LongVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.LongVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.LongVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.LongVector_data(self)

    def size(self):
        return _swigfaiss_avx2.LongVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.LongVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.LongVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.LongVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_LongVector
    __del__ = lambda self: None
LongVector_swigregister = _swigfaiss_avx2.LongVector_swigregister
LongVector_swigregister(LongVector)

class LongLongVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, LongLongVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, LongLongVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_LongLongVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.LongLongVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.LongLongVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.LongLongVector_data(self)

    def size(self):
        return _swigfaiss_avx2.LongLongVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.LongLongVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.LongLongVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.LongLongVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_LongLongVector
    __del__ = lambda self: None
LongLongVector_swigregister = _swigfaiss_avx2.LongLongVector_swigregister
LongLongVector_swigregister(LongLongVector)

class IntVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IntVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IntVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_IntVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.IntVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.IntVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.IntVector_data(self)

    def size(self):
        return _swigfaiss_avx2.IntVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.IntVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.IntVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.IntVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_IntVector
    __del__ = lambda self: None
IntVector_swigregister = _swigfaiss_avx2.IntVector_swigregister
IntVector_swigregister(IntVector)

class FloatVectorVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, FloatVectorVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, FloatVectorVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_FloatVectorVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.FloatVectorVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.FloatVectorVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.FloatVectorVector_data(self)

    def size(self):
        return _swigfaiss_avx2.FloatVectorVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.FloatVectorVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.FloatVectorVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.FloatVectorVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_FloatVectorVector
    __del__ = lambda self: None
FloatVectorVector_swigregister = _swigfaiss_avx2.FloatVectorVector_swigregister
FloatVectorVector_swigregister(FloatVectorVector)

class ByteVectorVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ByteVectorVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ByteVectorVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_ByteVectorVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.ByteVectorVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.ByteVectorVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.ByteVectorVector_data(self)

    def size(self):
        return _swigfaiss_avx2.ByteVectorVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.ByteVectorVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.ByteVectorVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.ByteVectorVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_ByteVectorVector
    __del__ = lambda self: None
ByteVectorVector_swigregister = _swigfaiss_avx2.ByteVectorVector_swigregister
ByteVectorVector_swigregister(ByteVectorVector)

class LongVectorVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, LongVectorVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, LongVectorVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_LongVectorVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.LongVectorVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.LongVectorVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.LongVectorVector_data(self)

    def size(self):
        return _swigfaiss_avx2.LongVectorVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.LongVectorVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.LongVectorVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.LongVectorVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_LongVectorVector
    __del__ = lambda self: None
LongVectorVector_swigregister = _swigfaiss_avx2.LongVectorVector_swigregister
LongVectorVector_swigregister(LongVectorVector)

class VectorTransformVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, VectorTransformVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, VectorTransformVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_VectorTransformVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.VectorTransformVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.VectorTransformVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.VectorTransformVector_data(self)

    def size(self):
        return _swigfaiss_avx2.VectorTransformVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.VectorTransformVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.VectorTransformVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.VectorTransformVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_VectorTransformVector
    __del__ = lambda self: None
VectorTransformVector_swigregister = _swigfaiss_avx2.VectorTransformVector_swigregister
VectorTransformVector_swigregister(VectorTransformVector)

class OperatingPointVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, OperatingPointVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, OperatingPointVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_OperatingPointVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.OperatingPointVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.OperatingPointVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.OperatingPointVector_data(self)

    def size(self):
        return _swigfaiss_avx2.OperatingPointVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.OperatingPointVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.OperatingPointVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.OperatingPointVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_OperatingPointVector
    __del__ = lambda self: None
OperatingPointVector_swigregister = _swigfaiss_avx2.OperatingPointVector_swigregister
OperatingPointVector_swigregister(OperatingPointVector)

class InvertedListsPtrVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, InvertedListsPtrVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, InvertedListsPtrVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_InvertedListsPtrVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.InvertedListsPtrVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.InvertedListsPtrVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.InvertedListsPtrVector_data(self)

    def size(self):
        return _swigfaiss_avx2.InvertedListsPtrVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.InvertedListsPtrVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.InvertedListsPtrVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.InvertedListsPtrVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_InvertedListsPtrVector
    __del__ = lambda self: None
InvertedListsPtrVector_swigregister = _swigfaiss_avx2.InvertedListsPtrVector_swigregister
InvertedListsPtrVector_swigregister(InvertedListsPtrVector)

class RepeatVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, RepeatVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, RepeatVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_RepeatVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.RepeatVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.RepeatVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.RepeatVector_data(self)

    def size(self):
        return _swigfaiss_avx2.RepeatVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.RepeatVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.RepeatVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.RepeatVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_RepeatVector
    __del__ = lambda self: None
RepeatVector_swigregister = _swigfaiss_avx2.RepeatVector_swigregister
RepeatVector_swigregister(RepeatVector)

class ClusteringIterationStatsVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ClusteringIterationStatsVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ClusteringIterationStatsVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_ClusteringIterationStatsVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.ClusteringIterationStatsVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.ClusteringIterationStatsVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.ClusteringIterationStatsVector_data(self)

    def size(self):
        return _swigfaiss_avx2.ClusteringIterationStatsVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.ClusteringIterationStatsVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.ClusteringIterationStatsVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.ClusteringIterationStatsVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_ClusteringIterationStatsVector
    __del__ = lambda self: None
ClusteringIterationStatsVector_swigregister = _swigfaiss_avx2.ClusteringIterationStatsVector_swigregister
ClusteringIterationStatsVector_swigregister(ClusteringIterationStatsVector)

class GpuResourcesVector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuResourcesVector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, GpuResourcesVector, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuResourcesVector()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def push_back(self, arg2):
        return _swigfaiss_avx2.GpuResourcesVector_push_back(self, arg2)

    def clear(self):
        return _swigfaiss_avx2.GpuResourcesVector_clear(self)

    def data(self):
        return _swigfaiss_avx2.GpuResourcesVector_data(self)

    def size(self):
        return _swigfaiss_avx2.GpuResourcesVector_size(self)

    def at(self, n):
        return _swigfaiss_avx2.GpuResourcesVector_at(self, n)

    def resize(self, n):
        return _swigfaiss_avx2.GpuResourcesVector_resize(self, n)

    def swap(self, other):
        return _swigfaiss_avx2.GpuResourcesVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuResourcesVector
    __del__ = lambda self: None
GpuResourcesVector_swigregister = _swigfaiss_avx2.GpuResourcesVector_swigregister
GpuResourcesVector_swigregister(GpuResourcesVector)


def bitvec_print(b, d):
    return _swigfaiss_avx2.bitvec_print(b, d)
bitvec_print = _swigfaiss_avx2.bitvec_print

def fvecs2bitvecs(x, b, d, n):
    return _swigfaiss_avx2.fvecs2bitvecs(x, b, d, n)
fvecs2bitvecs = _swigfaiss_avx2.fvecs2bitvecs

def bitvecs2fvecs(b, x, d, n):
    return _swigfaiss_avx2.bitvecs2fvecs(b, x, d, n)
bitvecs2fvecs = _swigfaiss_avx2.bitvecs2fvecs

def fvec2bitvec(x, b, d):
    return _swigfaiss_avx2.fvec2bitvec(x, b, d)
fvec2bitvec = _swigfaiss_avx2.fvec2bitvec

def bitvec_shuffle(n, da, db, order, a, b):
    return _swigfaiss_avx2.bitvec_shuffle(n, da, db, order, a, b)
bitvec_shuffle = _swigfaiss_avx2.bitvec_shuffle
class BitstringWriter(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, BitstringWriter, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, BitstringWriter, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code"] = _swigfaiss_avx2.BitstringWriter_code_set
    __swig_getmethods__["code"] = _swigfaiss_avx2.BitstringWriter_code_get
    if _newclass:
        code = _swig_property(_swigfaiss_avx2.BitstringWriter_code_get, _swigfaiss_avx2.BitstringWriter_code_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.BitstringWriter_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.BitstringWriter_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.BitstringWriter_code_size_get, _swigfaiss_avx2.BitstringWriter_code_size_set)
    __swig_setmethods__["i"] = _swigfaiss_avx2.BitstringWriter_i_set
    __swig_getmethods__["i"] = _swigfaiss_avx2.BitstringWriter_i_get
    if _newclass:
        i = _swig_property(_swigfaiss_avx2.BitstringWriter_i_get, _swigfaiss_avx2.BitstringWriter_i_set)

    def __init__(self, code, code_size):
        this = _swigfaiss_avx2.new_BitstringWriter(code, code_size)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def write(self, x, nbit):
        return _swigfaiss_avx2.BitstringWriter_write(self, x, nbit)
    __swig_destroy__ = _swigfaiss_avx2.delete_BitstringWriter
    __del__ = lambda self: None
BitstringWriter_swigregister = _swigfaiss_avx2.BitstringWriter_swigregister
BitstringWriter_swigregister(BitstringWriter)

class BitstringReader(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, BitstringReader, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, BitstringReader, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code"] = _swigfaiss_avx2.BitstringReader_code_set
    __swig_getmethods__["code"] = _swigfaiss_avx2.BitstringReader_code_get
    if _newclass:
        code = _swig_property(_swigfaiss_avx2.BitstringReader_code_get, _swigfaiss_avx2.BitstringReader_code_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.BitstringReader_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.BitstringReader_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.BitstringReader_code_size_get, _swigfaiss_avx2.BitstringReader_code_size_set)
    __swig_setmethods__["i"] = _swigfaiss_avx2.BitstringReader_i_set
    __swig_getmethods__["i"] = _swigfaiss_avx2.BitstringReader_i_get
    if _newclass:
        i = _swig_property(_swigfaiss_avx2.BitstringReader_i_get, _swigfaiss_avx2.BitstringReader_i_set)

    def __init__(self, code, code_size):
        this = _swigfaiss_avx2.new_BitstringReader(code, code_size)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def read(self, nbit):
        return _swigfaiss_avx2.BitstringReader_read(self, nbit)
    __swig_destroy__ = _swigfaiss_avx2.delete_BitstringReader
    __del__ = lambda self: None
BitstringReader_swigregister = _swigfaiss_avx2.BitstringReader_swigregister
BitstringReader_swigregister(BitstringReader)


def popcount64(x):
    return _swigfaiss_avx2.popcount64(x)
popcount64 = _swigfaiss_avx2.popcount64

def hammings(a, b, na, nb, nbytespercode, dis):
    return _swigfaiss_avx2.hammings(a, b, na, nb, nbytespercode, dis)
hammings = _swigfaiss_avx2.hammings

def hammings_knn_hc(ha, a, b, nb, ncodes, ordered):
    return _swigfaiss_avx2.hammings_knn_hc(ha, a, b, nb, ncodes, ordered)
hammings_knn_hc = _swigfaiss_avx2.hammings_knn_hc

def hammings_knn(ha, a, b, nb, ncodes, ordered):
    return _swigfaiss_avx2.hammings_knn(ha, a, b, nb, ncodes, ordered)
hammings_knn = _swigfaiss_avx2.hammings_knn

def hammings_knn_mc(a, b, na, nb, k, ncodes, distances, labels):
    return _swigfaiss_avx2.hammings_knn_mc(a, b, na, nb, k, ncodes, distances, labels)
hammings_knn_mc = _swigfaiss_avx2.hammings_knn_mc

def hamming_range_search(a, b, na, nb, radius, ncodes, result):
    return _swigfaiss_avx2.hamming_range_search(a, b, na, nb, radius, ncodes, result)
hamming_range_search = _swigfaiss_avx2.hamming_range_search

def hamming_count_thres(bs1, bs2, n1, n2, ht, ncodes, nptr):
    return _swigfaiss_avx2.hamming_count_thres(bs1, bs2, n1, n2, ht, ncodes, nptr)
hamming_count_thres = _swigfaiss_avx2.hamming_count_thres

def match_hamming_thres(bs1, bs2, n1, n2, ht, ncodes, idx, dis):
    return _swigfaiss_avx2.match_hamming_thres(bs1, bs2, n1, n2, ht, ncodes, idx, dis)
match_hamming_thres = _swigfaiss_avx2.match_hamming_thres

def crosshamming_count_thres(dbs, n, ht, ncodes, nptr):
    return _swigfaiss_avx2.crosshamming_count_thres(dbs, n, ht, ncodes, nptr)
crosshamming_count_thres = _swigfaiss_avx2.crosshamming_count_thres

def get_num_gpus():
    return _swigfaiss_avx2.get_num_gpus()
get_num_gpus = _swigfaiss_avx2.get_num_gpus

def gpu_profiler_start():
    return _swigfaiss_avx2.gpu_profiler_start()
gpu_profiler_start = _swigfaiss_avx2.gpu_profiler_start

def gpu_profiler_stop():
    return _swigfaiss_avx2.gpu_profiler_stop()
gpu_profiler_stop = _swigfaiss_avx2.gpu_profiler_stop

def gpu_sync_all_devices():
    return _swigfaiss_avx2.gpu_sync_all_devices()
gpu_sync_all_devices = _swigfaiss_avx2.gpu_sync_all_devices
class GpuResources(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuResources, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, GpuResources, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuResources
    __del__ = lambda self: None

    def initializeForDevice(self, device):
        return _swigfaiss_avx2.GpuResources_initializeForDevice(self, device)

    def getBlasHandle(self, device):
        return _swigfaiss_avx2.GpuResources_getBlasHandle(self, device)

    def getDefaultStream(self, device):
        return _swigfaiss_avx2.GpuResources_getDefaultStream(self, device)

    def getAlternateStreams(self, device):
        return _swigfaiss_avx2.GpuResources_getAlternateStreams(self, device)

    def getPinnedMemory(self):
        return _swigfaiss_avx2.GpuResources_getPinnedMemory(self)

    def getAsyncCopyStream(self, device):
        return _swigfaiss_avx2.GpuResources_getAsyncCopyStream(self, device)

    def getBlasHandleCurrentDevice(self):
        return _swigfaiss_avx2.GpuResources_getBlasHandleCurrentDevice(self)

    def getDefaultStreamCurrentDevice(self):
        return _swigfaiss_avx2.GpuResources_getDefaultStreamCurrentDevice(self)

    def syncDefaultStream(self, device):
        return _swigfaiss_avx2.GpuResources_syncDefaultStream(self, device)

    def syncDefaultStreamCurrentDevice(self):
        return _swigfaiss_avx2.GpuResources_syncDefaultStreamCurrentDevice(self)

    def getAlternateStreamsCurrentDevice(self):
        return _swigfaiss_avx2.GpuResources_getAlternateStreamsCurrentDevice(self)

    def getAsyncCopyStreamCurrentDevice(self):
        return _swigfaiss_avx2.GpuResources_getAsyncCopyStreamCurrentDevice(self)
GpuResources_swigregister = _swigfaiss_avx2.GpuResources_swigregister
GpuResources_swigregister(GpuResources)
cvar = _swigfaiss_avx2.cvar

class StandardGpuResources(GpuResources):
    __swig_setmethods__ = {}
    for _s in [GpuResources]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, StandardGpuResources, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuResources]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, StandardGpuResources, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_StandardGpuResources()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_StandardGpuResources
    __del__ = lambda self: None

    def noTempMemory(self):
        return _swigfaiss_avx2.StandardGpuResources_noTempMemory(self)

    def setTempMemory(self, size):
        return _swigfaiss_avx2.StandardGpuResources_setTempMemory(self, size)

    def setPinnedMemory(self, size):
        return _swigfaiss_avx2.StandardGpuResources_setPinnedMemory(self, size)

    def setDefaultStream(self, device, stream):
        return _swigfaiss_avx2.StandardGpuResources_setDefaultStream(self, device, stream)

    def setDefaultNullStreamAllDevices(self):
        return _swigfaiss_avx2.StandardGpuResources_setDefaultNullStreamAllDevices(self)

    def setCudaMallocWarning(self, b):
        return _swigfaiss_avx2.StandardGpuResources_setCudaMallocWarning(self, b)

    def initializeForDevice(self, device):
        return _swigfaiss_avx2.StandardGpuResources_initializeForDevice(self, device)

    def getBlasHandle(self, device):
        return _swigfaiss_avx2.StandardGpuResources_getBlasHandle(self, device)

    def getDefaultStream(self, device):
        return _swigfaiss_avx2.StandardGpuResources_getDefaultStream(self, device)

    def getAlternateStreams(self, device):
        return _swigfaiss_avx2.StandardGpuResources_getAlternateStreams(self, device)

    def getPinnedMemory(self):
        return _swigfaiss_avx2.StandardGpuResources_getPinnedMemory(self)

    def getAsyncCopyStream(self, device):
        return _swigfaiss_avx2.StandardGpuResources_getAsyncCopyStream(self, device)
StandardGpuResources_swigregister = _swigfaiss_avx2.StandardGpuResources_swigregister
StandardGpuResources_swigregister(StandardGpuResources)


def getmillisecs():
    return _swigfaiss_avx2.getmillisecs()
getmillisecs = _swigfaiss_avx2.getmillisecs

def get_mem_usage_kb():
    return _swigfaiss_avx2.get_mem_usage_kb()
get_mem_usage_kb = _swigfaiss_avx2.get_mem_usage_kb

def get_cycles():
    return _swigfaiss_avx2.get_cycles()
get_cycles = _swigfaiss_avx2.get_cycles

def fvec_madd(n, a, bf, b, c):
    return _swigfaiss_avx2.fvec_madd(n, a, bf, b, c)
fvec_madd = _swigfaiss_avx2.fvec_madd

def fvec_madd_and_argmin(n, a, bf, b, c):
    return _swigfaiss_avx2.fvec_madd_and_argmin(n, a, bf, b, c)
fvec_madd_and_argmin = _swigfaiss_avx2.fvec_madd_and_argmin

def reflection(u, x, n, d, nu):
    return _swigfaiss_avx2.reflection(u, x, n, d, nu)
reflection = _swigfaiss_avx2.reflection

def matrix_qr(m, n, a):
    return _swigfaiss_avx2.matrix_qr(m, n, a)
matrix_qr = _swigfaiss_avx2.matrix_qr

def ranklist_handle_ties(k, idx, dis):
    return _swigfaiss_avx2.ranklist_handle_ties(k, idx, dis)
ranklist_handle_ties = _swigfaiss_avx2.ranklist_handle_ties

def ranklist_intersection_size(k1, v1, k2, v2):
    return _swigfaiss_avx2.ranklist_intersection_size(k1, v1, k2, v2)
ranklist_intersection_size = _swigfaiss_avx2.ranklist_intersection_size

def merge_result_table_with(n, k, I0, D0, I1, D1, keep_min=True, translation=0):
    return _swigfaiss_avx2.merge_result_table_with(n, k, I0, D0, I1, D1, keep_min, translation)
merge_result_table_with = _swigfaiss_avx2.merge_result_table_with

def imbalance_factor(*args):
    return _swigfaiss_avx2.imbalance_factor(*args)
imbalance_factor = _swigfaiss_avx2.imbalance_factor

def fvec_argsort(n, vals, perm):
    return _swigfaiss_avx2.fvec_argsort(n, vals, perm)
fvec_argsort = _swigfaiss_avx2.fvec_argsort

def fvec_argsort_parallel(n, vals, perm):
    return _swigfaiss_avx2.fvec_argsort_parallel(n, vals, perm)
fvec_argsort_parallel = _swigfaiss_avx2.fvec_argsort_parallel

def ivec_hist(n, v, vmax, hist):
    return _swigfaiss_avx2.ivec_hist(n, v, vmax, hist)
ivec_hist = _swigfaiss_avx2.ivec_hist

def bincode_hist(n, nbits, codes, hist):
    return _swigfaiss_avx2.bincode_hist(n, nbits, codes, hist)
bincode_hist = _swigfaiss_avx2.bincode_hist

def ivec_checksum(n, a):
    return _swigfaiss_avx2.ivec_checksum(n, a)
ivec_checksum = _swigfaiss_avx2.ivec_checksum

def fvecs_maybe_subsample(d, n, nmax, x, verbose=False, seed=1234):
    return _swigfaiss_avx2.fvecs_maybe_subsample(d, n, nmax, x, verbose, seed)
fvecs_maybe_subsample = _swigfaiss_avx2.fvecs_maybe_subsample

def binary_to_real(d, x_in, x_out):
    return _swigfaiss_avx2.binary_to_real(d, x_in, x_out)
binary_to_real = _swigfaiss_avx2.binary_to_real

def real_to_binary(d, x_in, x_out):
    return _swigfaiss_avx2.real_to_binary(d, x_in, x_out)
real_to_binary = _swigfaiss_avx2.real_to_binary

def hash_bytes(bytes, n):
    return _swigfaiss_avx2.hash_bytes(bytes, n)
hash_bytes = _swigfaiss_avx2.hash_bytes

def check_openmp():
    return _swigfaiss_avx2.check_openmp()
check_openmp = _swigfaiss_avx2.check_openmp

def fvec_L2sqr(x, y, d):
    return _swigfaiss_avx2.fvec_L2sqr(x, y, d)
fvec_L2sqr = _swigfaiss_avx2.fvec_L2sqr

def fvec_inner_product(x, y, d):
    return _swigfaiss_avx2.fvec_inner_product(x, y, d)
fvec_inner_product = _swigfaiss_avx2.fvec_inner_product

def fvec_L1(x, y, d):
    return _swigfaiss_avx2.fvec_L1(x, y, d)
fvec_L1 = _swigfaiss_avx2.fvec_L1

def fvec_Linf(x, y, d):
    return _swigfaiss_avx2.fvec_Linf(x, y, d)
fvec_Linf = _swigfaiss_avx2.fvec_Linf

def pairwise_L2sqr(d, nq, xq, nb, xb, dis, ldq=-1, ldb=-1, ldd=-1):
    return _swigfaiss_avx2.pairwise_L2sqr(d, nq, xq, nb, xb, dis, ldq, ldb, ldd)
pairwise_L2sqr = _swigfaiss_avx2.pairwise_L2sqr

def fvec_inner_products_ny(ip, x, y, d, ny):
    return _swigfaiss_avx2.fvec_inner_products_ny(ip, x, y, d, ny)
fvec_inner_products_ny = _swigfaiss_avx2.fvec_inner_products_ny

def fvec_L2sqr_ny(dis, x, y, d, ny):
    return _swigfaiss_avx2.fvec_L2sqr_ny(dis, x, y, d, ny)
fvec_L2sqr_ny = _swigfaiss_avx2.fvec_L2sqr_ny

def fvec_norm_L2sqr(x, d):
    return _swigfaiss_avx2.fvec_norm_L2sqr(x, d)
fvec_norm_L2sqr = _swigfaiss_avx2.fvec_norm_L2sqr

def fvec_norms_L2(ip, x, d, nx):
    return _swigfaiss_avx2.fvec_norms_L2(ip, x, d, nx)
fvec_norms_L2 = _swigfaiss_avx2.fvec_norms_L2

def fvec_norms_L2sqr(ip, x, d, nx):
    return _swigfaiss_avx2.fvec_norms_L2sqr(ip, x, d, nx)
fvec_norms_L2sqr = _swigfaiss_avx2.fvec_norms_L2sqr

def fvec_renorm_L2(d, nx, x):
    return _swigfaiss_avx2.fvec_renorm_L2(d, nx, x)
fvec_renorm_L2 = _swigfaiss_avx2.fvec_renorm_L2

def inner_product_to_L2sqr(dis, nr1, nr2, n1, n2):
    return _swigfaiss_avx2.inner_product_to_L2sqr(dis, nr1, nr2, n1, n2)
inner_product_to_L2sqr = _swigfaiss_avx2.inner_product_to_L2sqr

def fvec_inner_products_by_idx(ip, x, y, ids, d, nx, ny):
    return _swigfaiss_avx2.fvec_inner_products_by_idx(ip, x, y, ids, d, nx, ny)
fvec_inner_products_by_idx = _swigfaiss_avx2.fvec_inner_products_by_idx

def fvec_L2sqr_by_idx(dis, x, y, ids, d, nx, ny):
    return _swigfaiss_avx2.fvec_L2sqr_by_idx(dis, x, y, ids, d, nx, ny)
fvec_L2sqr_by_idx = _swigfaiss_avx2.fvec_L2sqr_by_idx

def pairwise_indexed_L2sqr(d, n, x, ix, y, iy, dis):
    return _swigfaiss_avx2.pairwise_indexed_L2sqr(d, n, x, ix, y, iy, dis)
pairwise_indexed_L2sqr = _swigfaiss_avx2.pairwise_indexed_L2sqr

def pairwise_indexed_inner_product(d, n, x, ix, y, iy, dis):
    return _swigfaiss_avx2.pairwise_indexed_inner_product(d, n, x, ix, y, iy, dis)
pairwise_indexed_inner_product = _swigfaiss_avx2.pairwise_indexed_inner_product

def knn_inner_product(x, y, d, nx, ny, res):
    return _swigfaiss_avx2.knn_inner_product(x, y, d, nx, ny, res)
knn_inner_product = _swigfaiss_avx2.knn_inner_product

def knn_L2sqr(x, y, d, nx, ny, res):
    return _swigfaiss_avx2.knn_L2sqr(x, y, d, nx, ny, res)
knn_L2sqr = _swigfaiss_avx2.knn_L2sqr

def knn_L2sqr_base_shift(x, y, d, nx, ny, res, base_shift):
    return _swigfaiss_avx2.knn_L2sqr_base_shift(x, y, d, nx, ny, res, base_shift)
knn_L2sqr_base_shift = _swigfaiss_avx2.knn_L2sqr_base_shift

def knn_inner_products_by_idx(x, y, ids, d, nx, ny, res):
    return _swigfaiss_avx2.knn_inner_products_by_idx(x, y, ids, d, nx, ny, res)
knn_inner_products_by_idx = _swigfaiss_avx2.knn_inner_products_by_idx

def knn_L2sqr_by_idx(x, y, ids, d, nx, ny, res):
    return _swigfaiss_avx2.knn_L2sqr_by_idx(x, y, ids, d, nx, ny, res)
knn_L2sqr_by_idx = _swigfaiss_avx2.knn_L2sqr_by_idx

def range_search_L2sqr(x, y, d, nx, ny, radius, result):
    return _swigfaiss_avx2.range_search_L2sqr(x, y, d, nx, ny, radius, result)
range_search_L2sqr = _swigfaiss_avx2.range_search_L2sqr

def range_search_inner_product(x, y, d, nx, ny, radius, result):
    return _swigfaiss_avx2.range_search_inner_product(x, y, d, nx, ny, radius, result)
range_search_inner_product = _swigfaiss_avx2.range_search_inner_product
class RandomGenerator(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, RandomGenerator, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, RandomGenerator, name)
    __repr__ = _swig_repr
    __swig_setmethods__["mt"] = _swigfaiss_avx2.RandomGenerator_mt_set
    __swig_getmethods__["mt"] = _swigfaiss_avx2.RandomGenerator_mt_get
    if _newclass:
        mt = _swig_property(_swigfaiss_avx2.RandomGenerator_mt_get, _swigfaiss_avx2.RandomGenerator_mt_set)

    def rand_int64(self):
        return _swigfaiss_avx2.RandomGenerator_rand_int64(self)

    def rand_int(self, *args):
        return _swigfaiss_avx2.RandomGenerator_rand_int(self, *args)

    def rand_float(self):
        return _swigfaiss_avx2.RandomGenerator_rand_float(self)

    def rand_double(self):
        return _swigfaiss_avx2.RandomGenerator_rand_double(self)

    def __init__(self, seed=1234):
        this = _swigfaiss_avx2.new_RandomGenerator(seed)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_RandomGenerator
    __del__ = lambda self: None
RandomGenerator_swigregister = _swigfaiss_avx2.RandomGenerator_swigregister
RandomGenerator_swigregister(RandomGenerator)


def float_rand(x, n, seed):
    return _swigfaiss_avx2.float_rand(x, n, seed)
float_rand = _swigfaiss_avx2.float_rand

def float_randn(x, n, seed):
    return _swigfaiss_avx2.float_randn(x, n, seed)
float_randn = _swigfaiss_avx2.float_randn

def int64_rand(x, n, seed):
    return _swigfaiss_avx2.int64_rand(x, n, seed)
int64_rand = _swigfaiss_avx2.int64_rand

def byte_rand(x, n, seed):
    return _swigfaiss_avx2.byte_rand(x, n, seed)
byte_rand = _swigfaiss_avx2.byte_rand

def int64_rand_max(x, n, max, seed):
    return _swigfaiss_avx2.int64_rand_max(x, n, max, seed)
int64_rand_max = _swigfaiss_avx2.int64_rand_max

def rand_perm(perm, n, seed):
    return _swigfaiss_avx2.rand_perm(perm, n, seed)
rand_perm = _swigfaiss_avx2.rand_perm
METRIC_INNER_PRODUCT = _swigfaiss_avx2.METRIC_INNER_PRODUCT
METRIC_L2 = _swigfaiss_avx2.METRIC_L2
METRIC_L1 = _swigfaiss_avx2.METRIC_L1
METRIC_Linf = _swigfaiss_avx2.METRIC_Linf
METRIC_Lp = _swigfaiss_avx2.METRIC_Lp
METRIC_Canberra = _swigfaiss_avx2.METRIC_Canberra
METRIC_BrayCurtis = _swigfaiss_avx2.METRIC_BrayCurtis
METRIC_JensenShannon = _swigfaiss_avx2.METRIC_JensenShannon
FAISS_VERSION_MAJOR = _swigfaiss_avx2.FAISS_VERSION_MAJOR
FAISS_VERSION_MINOR = _swigfaiss_avx2.FAISS_VERSION_MINOR
FAISS_VERSION_PATCH = _swigfaiss_avx2.FAISS_VERSION_PATCH
class Index(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Index, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Index, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["d"] = _swigfaiss_avx2.Index_d_set
    __swig_getmethods__["d"] = _swigfaiss_avx2.Index_d_get
    if _newclass:
        d = _swig_property(_swigfaiss_avx2.Index_d_get, _swigfaiss_avx2.Index_d_set)
    __swig_setmethods__["ntotal"] = _swigfaiss_avx2.Index_ntotal_set
    __swig_getmethods__["ntotal"] = _swigfaiss_avx2.Index_ntotal_get
    if _newclass:
        ntotal = _swig_property(_swigfaiss_avx2.Index_ntotal_get, _swigfaiss_avx2.Index_ntotal_set)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.Index_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.Index_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.Index_verbose_get, _swigfaiss_avx2.Index_verbose_set)
    __swig_setmethods__["is_trained"] = _swigfaiss_avx2.Index_is_trained_set
    __swig_getmethods__["is_trained"] = _swigfaiss_avx2.Index_is_trained_get
    if _newclass:
        is_trained = _swig_property(_swigfaiss_avx2.Index_is_trained_get, _swigfaiss_avx2.Index_is_trained_set)
    __swig_setmethods__["metric_type"] = _swigfaiss_avx2.Index_metric_type_set
    __swig_getmethods__["metric_type"] = _swigfaiss_avx2.Index_metric_type_get
    if _newclass:
        metric_type = _swig_property(_swigfaiss_avx2.Index_metric_type_get, _swigfaiss_avx2.Index_metric_type_set)
    __swig_setmethods__["metric_arg"] = _swigfaiss_avx2.Index_metric_arg_set
    __swig_getmethods__["metric_arg"] = _swigfaiss_avx2.Index_metric_arg_get
    if _newclass:
        metric_arg = _swig_property(_swigfaiss_avx2.Index_metric_arg_get, _swigfaiss_avx2.Index_metric_arg_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_Index
    __del__ = lambda self: None

    def train(self, n, x):
        return _swigfaiss_avx2.Index_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.Index_add(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.Index_add_with_ids(self, n, x, xids)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.Index_search(self, n, x, k, distances, labels)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.Index_range_search(self, n, x, radius, result)

    def assign(self, n, x, labels, k=1):
        return _swigfaiss_avx2.Index_assign(self, n, x, labels, k)

    def reset(self):
        return _swigfaiss_avx2.Index_reset(self)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.Index_remove_ids(self, sel)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.Index_reconstruct(self, key, recons)

    def reconstruct_n(self, i0, ni, recons):
        return _swigfaiss_avx2.Index_reconstruct_n(self, i0, ni, recons)

    def search_and_reconstruct(self, n, x, k, distances, labels, recons):
        return _swigfaiss_avx2.Index_search_and_reconstruct(self, n, x, k, distances, labels, recons)

    def compute_residual(self, x, residual, key):
        return _swigfaiss_avx2.Index_compute_residual(self, x, residual, key)

    def compute_residual_n(self, n, xs, residuals, keys):
        return _swigfaiss_avx2.Index_compute_residual_n(self, n, xs, residuals, keys)

    def get_distance_computer(self):
        return _swigfaiss_avx2.Index_get_distance_computer(self)

    def sa_code_size(self):
        return _swigfaiss_avx2.Index_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.Index_sa_encode(self, n, x, bytes)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.Index_sa_decode(self, n, bytes, x)
Index_swigregister = _swigfaiss_avx2.Index_swigregister
Index_swigregister(Index)

class ClusteringParameters(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ClusteringParameters, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ClusteringParameters, name)
    __repr__ = _swig_repr
    __swig_setmethods__["niter"] = _swigfaiss_avx2.ClusteringParameters_niter_set
    __swig_getmethods__["niter"] = _swigfaiss_avx2.ClusteringParameters_niter_get
    if _newclass:
        niter = _swig_property(_swigfaiss_avx2.ClusteringParameters_niter_get, _swigfaiss_avx2.ClusteringParameters_niter_set)
    __swig_setmethods__["nredo"] = _swigfaiss_avx2.ClusteringParameters_nredo_set
    __swig_getmethods__["nredo"] = _swigfaiss_avx2.ClusteringParameters_nredo_get
    if _newclass:
        nredo = _swig_property(_swigfaiss_avx2.ClusteringParameters_nredo_get, _swigfaiss_avx2.ClusteringParameters_nredo_set)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.ClusteringParameters_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.ClusteringParameters_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.ClusteringParameters_verbose_get, _swigfaiss_avx2.ClusteringParameters_verbose_set)
    __swig_setmethods__["spherical"] = _swigfaiss_avx2.ClusteringParameters_spherical_set
    __swig_getmethods__["spherical"] = _swigfaiss_avx2.ClusteringParameters_spherical_get
    if _newclass:
        spherical = _swig_property(_swigfaiss_avx2.ClusteringParameters_spherical_get, _swigfaiss_avx2.ClusteringParameters_spherical_set)
    __swig_setmethods__["int_centroids"] = _swigfaiss_avx2.ClusteringParameters_int_centroids_set
    __swig_getmethods__["int_centroids"] = _swigfaiss_avx2.ClusteringParameters_int_centroids_get
    if _newclass:
        int_centroids = _swig_property(_swigfaiss_avx2.ClusteringParameters_int_centroids_get, _swigfaiss_avx2.ClusteringParameters_int_centroids_set)
    __swig_setmethods__["update_index"] = _swigfaiss_avx2.ClusteringParameters_update_index_set
    __swig_getmethods__["update_index"] = _swigfaiss_avx2.ClusteringParameters_update_index_get
    if _newclass:
        update_index = _swig_property(_swigfaiss_avx2.ClusteringParameters_update_index_get, _swigfaiss_avx2.ClusteringParameters_update_index_set)
    __swig_setmethods__["frozen_centroids"] = _swigfaiss_avx2.ClusteringParameters_frozen_centroids_set
    __swig_getmethods__["frozen_centroids"] = _swigfaiss_avx2.ClusteringParameters_frozen_centroids_get
    if _newclass:
        frozen_centroids = _swig_property(_swigfaiss_avx2.ClusteringParameters_frozen_centroids_get, _swigfaiss_avx2.ClusteringParameters_frozen_centroids_set)
    __swig_setmethods__["min_points_per_centroid"] = _swigfaiss_avx2.ClusteringParameters_min_points_per_centroid_set
    __swig_getmethods__["min_points_per_centroid"] = _swigfaiss_avx2.ClusteringParameters_min_points_per_centroid_get
    if _newclass:
        min_points_per_centroid = _swig_property(_swigfaiss_avx2.ClusteringParameters_min_points_per_centroid_get, _swigfaiss_avx2.ClusteringParameters_min_points_per_centroid_set)
    __swig_setmethods__["max_points_per_centroid"] = _swigfaiss_avx2.ClusteringParameters_max_points_per_centroid_set
    __swig_getmethods__["max_points_per_centroid"] = _swigfaiss_avx2.ClusteringParameters_max_points_per_centroid_get
    if _newclass:
        max_points_per_centroid = _swig_property(_swigfaiss_avx2.ClusteringParameters_max_points_per_centroid_get, _swigfaiss_avx2.ClusteringParameters_max_points_per_centroid_set)
    __swig_setmethods__["seed"] = _swigfaiss_avx2.ClusteringParameters_seed_set
    __swig_getmethods__["seed"] = _swigfaiss_avx2.ClusteringParameters_seed_get
    if _newclass:
        seed = _swig_property(_swigfaiss_avx2.ClusteringParameters_seed_get, _swigfaiss_avx2.ClusteringParameters_seed_set)
    __swig_setmethods__["decode_block_size"] = _swigfaiss_avx2.ClusteringParameters_decode_block_size_set
    __swig_getmethods__["decode_block_size"] = _swigfaiss_avx2.ClusteringParameters_decode_block_size_get
    if _newclass:
        decode_block_size = _swig_property(_swigfaiss_avx2.ClusteringParameters_decode_block_size_get, _swigfaiss_avx2.ClusteringParameters_decode_block_size_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_ClusteringParameters()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_ClusteringParameters
    __del__ = lambda self: None
ClusteringParameters_swigregister = _swigfaiss_avx2.ClusteringParameters_swigregister
ClusteringParameters_swigregister(ClusteringParameters)

class ClusteringIterationStats(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ClusteringIterationStats, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ClusteringIterationStats, name)
    __repr__ = _swig_repr
    __swig_setmethods__["obj"] = _swigfaiss_avx2.ClusteringIterationStats_obj_set
    __swig_getmethods__["obj"] = _swigfaiss_avx2.ClusteringIterationStats_obj_get
    if _newclass:
        obj = _swig_property(_swigfaiss_avx2.ClusteringIterationStats_obj_get, _swigfaiss_avx2.ClusteringIterationStats_obj_set)
    __swig_setmethods__["time"] = _swigfaiss_avx2.ClusteringIterationStats_time_set
    __swig_getmethods__["time"] = _swigfaiss_avx2.ClusteringIterationStats_time_get
    if _newclass:
        time = _swig_property(_swigfaiss_avx2.ClusteringIterationStats_time_get, _swigfaiss_avx2.ClusteringIterationStats_time_set)
    __swig_setmethods__["time_search"] = _swigfaiss_avx2.ClusteringIterationStats_time_search_set
    __swig_getmethods__["time_search"] = _swigfaiss_avx2.ClusteringIterationStats_time_search_get
    if _newclass:
        time_search = _swig_property(_swigfaiss_avx2.ClusteringIterationStats_time_search_get, _swigfaiss_avx2.ClusteringIterationStats_time_search_set)
    __swig_setmethods__["imbalance_factor"] = _swigfaiss_avx2.ClusteringIterationStats_imbalance_factor_set
    __swig_getmethods__["imbalance_factor"] = _swigfaiss_avx2.ClusteringIterationStats_imbalance_factor_get
    if _newclass:
        imbalance_factor = _swig_property(_swigfaiss_avx2.ClusteringIterationStats_imbalance_factor_get, _swigfaiss_avx2.ClusteringIterationStats_imbalance_factor_set)
    __swig_setmethods__["nsplit"] = _swigfaiss_avx2.ClusteringIterationStats_nsplit_set
    __swig_getmethods__["nsplit"] = _swigfaiss_avx2.ClusteringIterationStats_nsplit_get
    if _newclass:
        nsplit = _swig_property(_swigfaiss_avx2.ClusteringIterationStats_nsplit_get, _swigfaiss_avx2.ClusteringIterationStats_nsplit_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_ClusteringIterationStats()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_ClusteringIterationStats
    __del__ = lambda self: None
ClusteringIterationStats_swigregister = _swigfaiss_avx2.ClusteringIterationStats_swigregister
ClusteringIterationStats_swigregister(ClusteringIterationStats)

class Clustering(ClusteringParameters):
    __swig_setmethods__ = {}
    for _s in [ClusteringParameters]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Clustering, name, value)
    __swig_getmethods__ = {}
    for _s in [ClusteringParameters]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Clustering, name)
    __repr__ = _swig_repr
    __swig_setmethods__["d"] = _swigfaiss_avx2.Clustering_d_set
    __swig_getmethods__["d"] = _swigfaiss_avx2.Clustering_d_get
    if _newclass:
        d = _swig_property(_swigfaiss_avx2.Clustering_d_get, _swigfaiss_avx2.Clustering_d_set)
    __swig_setmethods__["k"] = _swigfaiss_avx2.Clustering_k_set
    __swig_getmethods__["k"] = _swigfaiss_avx2.Clustering_k_get
    if _newclass:
        k = _swig_property(_swigfaiss_avx2.Clustering_k_get, _swigfaiss_avx2.Clustering_k_set)
    __swig_setmethods__["centroids"] = _swigfaiss_avx2.Clustering_centroids_set
    __swig_getmethods__["centroids"] = _swigfaiss_avx2.Clustering_centroids_get
    if _newclass:
        centroids = _swig_property(_swigfaiss_avx2.Clustering_centroids_get, _swigfaiss_avx2.Clustering_centroids_set)
    __swig_setmethods__["iteration_stats"] = _swigfaiss_avx2.Clustering_iteration_stats_set
    __swig_getmethods__["iteration_stats"] = _swigfaiss_avx2.Clustering_iteration_stats_get
    if _newclass:
        iteration_stats = _swig_property(_swigfaiss_avx2.Clustering_iteration_stats_get, _swigfaiss_avx2.Clustering_iteration_stats_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_Clustering(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x, index, x_weights=None):
        return _swigfaiss_avx2.Clustering_train(self, n, x, index, x_weights)

    def train_encoded(self, nx, x_in, codec, index, weights=None):
        return _swigfaiss_avx2.Clustering_train_encoded(self, nx, x_in, codec, index, weights)

    def post_process_centroids(self):
        return _swigfaiss_avx2.Clustering_post_process_centroids(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_Clustering
    __del__ = lambda self: None
Clustering_swigregister = _swigfaiss_avx2.Clustering_swigregister
Clustering_swigregister(Clustering)


def kmeans_clustering(d, n, k, x, centroids):
    return _swigfaiss_avx2.kmeans_clustering(d, n, k, x, centroids)
kmeans_clustering = _swigfaiss_avx2.kmeans_clustering

def pairwise_extra_distances(d, nq, xq, nb, xb, mt, metric_arg, dis, ldq=-1, ldb=-1, ldd=-1):
    return _swigfaiss_avx2.pairwise_extra_distances(d, nq, xq, nb, xb, mt, metric_arg, dis, ldq, ldb, ldd)
pairwise_extra_distances = _swigfaiss_avx2.pairwise_extra_distances

def knn_extra_metrics(x, y, d, nx, ny, mt, metric_arg, res):
    return _swigfaiss_avx2.knn_extra_metrics(x, y, d, nx, ny, mt, metric_arg, res)
knn_extra_metrics = _swigfaiss_avx2.knn_extra_metrics

def get_extra_distance_computer(d, mt, metric_arg, nb, xb):
    return _swigfaiss_avx2.get_extra_distance_computer(d, mt, metric_arg, nb, xb)
get_extra_distance_computer = _swigfaiss_avx2.get_extra_distance_computer
class ProductQuantizer(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ProductQuantizer, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ProductQuantizer, name)
    __repr__ = _swig_repr
    __swig_setmethods__["d"] = _swigfaiss_avx2.ProductQuantizer_d_set
    __swig_getmethods__["d"] = _swigfaiss_avx2.ProductQuantizer_d_get
    if _newclass:
        d = _swig_property(_swigfaiss_avx2.ProductQuantizer_d_get, _swigfaiss_avx2.ProductQuantizer_d_set)
    __swig_setmethods__["M"] = _swigfaiss_avx2.ProductQuantizer_M_set
    __swig_getmethods__["M"] = _swigfaiss_avx2.ProductQuantizer_M_get
    if _newclass:
        M = _swig_property(_swigfaiss_avx2.ProductQuantizer_M_get, _swigfaiss_avx2.ProductQuantizer_M_set)
    __swig_setmethods__["nbits"] = _swigfaiss_avx2.ProductQuantizer_nbits_set
    __swig_getmethods__["nbits"] = _swigfaiss_avx2.ProductQuantizer_nbits_get
    if _newclass:
        nbits = _swig_property(_swigfaiss_avx2.ProductQuantizer_nbits_get, _swigfaiss_avx2.ProductQuantizer_nbits_set)
    __swig_setmethods__["dsub"] = _swigfaiss_avx2.ProductQuantizer_dsub_set
    __swig_getmethods__["dsub"] = _swigfaiss_avx2.ProductQuantizer_dsub_get
    if _newclass:
        dsub = _swig_property(_swigfaiss_avx2.ProductQuantizer_dsub_get, _swigfaiss_avx2.ProductQuantizer_dsub_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.ProductQuantizer_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.ProductQuantizer_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.ProductQuantizer_code_size_get, _swigfaiss_avx2.ProductQuantizer_code_size_set)
    __swig_setmethods__["ksub"] = _swigfaiss_avx2.ProductQuantizer_ksub_set
    __swig_getmethods__["ksub"] = _swigfaiss_avx2.ProductQuantizer_ksub_get
    if _newclass:
        ksub = _swig_property(_swigfaiss_avx2.ProductQuantizer_ksub_get, _swigfaiss_avx2.ProductQuantizer_ksub_set)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.ProductQuantizer_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.ProductQuantizer_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.ProductQuantizer_verbose_get, _swigfaiss_avx2.ProductQuantizer_verbose_set)
    Train_default = _swigfaiss_avx2.ProductQuantizer_Train_default
    Train_hot_start = _swigfaiss_avx2.ProductQuantizer_Train_hot_start
    Train_shared = _swigfaiss_avx2.ProductQuantizer_Train_shared
    Train_hypercube = _swigfaiss_avx2.ProductQuantizer_Train_hypercube
    Train_hypercube_pca = _swigfaiss_avx2.ProductQuantizer_Train_hypercube_pca
    __swig_setmethods__["train_type"] = _swigfaiss_avx2.ProductQuantizer_train_type_set
    __swig_getmethods__["train_type"] = _swigfaiss_avx2.ProductQuantizer_train_type_get
    if _newclass:
        train_type = _swig_property(_swigfaiss_avx2.ProductQuantizer_train_type_get, _swigfaiss_avx2.ProductQuantizer_train_type_set)
    __swig_setmethods__["cp"] = _swigfaiss_avx2.ProductQuantizer_cp_set
    __swig_getmethods__["cp"] = _swigfaiss_avx2.ProductQuantizer_cp_get
    if _newclass:
        cp = _swig_property(_swigfaiss_avx2.ProductQuantizer_cp_get, _swigfaiss_avx2.ProductQuantizer_cp_set)
    __swig_setmethods__["assign_index"] = _swigfaiss_avx2.ProductQuantizer_assign_index_set
    __swig_getmethods__["assign_index"] = _swigfaiss_avx2.ProductQuantizer_assign_index_get
    if _newclass:
        assign_index = _swig_property(_swigfaiss_avx2.ProductQuantizer_assign_index_get, _swigfaiss_avx2.ProductQuantizer_assign_index_set)
    __swig_setmethods__["centroids"] = _swigfaiss_avx2.ProductQuantizer_centroids_set
    __swig_getmethods__["centroids"] = _swigfaiss_avx2.ProductQuantizer_centroids_get
    if _newclass:
        centroids = _swig_property(_swigfaiss_avx2.ProductQuantizer_centroids_get, _swigfaiss_avx2.ProductQuantizer_centroids_set)

    def get_centroids(self, m, i):
        return _swigfaiss_avx2.ProductQuantizer_get_centroids(self, m, i)

    def train(self, n, x):
        return _swigfaiss_avx2.ProductQuantizer_train(self, n, x)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_ProductQuantizer(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def set_derived_values(self):
        return _swigfaiss_avx2.ProductQuantizer_set_derived_values(self)

    def set_params(self, centroids, m):
        return _swigfaiss_avx2.ProductQuantizer_set_params(self, centroids, m)

    def compute_code(self, x, code):
        return _swigfaiss_avx2.ProductQuantizer_compute_code(self, x, code)

    def compute_codes(self, x, codes, n):
        return _swigfaiss_avx2.ProductQuantizer_compute_codes(self, x, codes, n)

    def compute_codes_with_assign_index(self, x, codes, n):
        return _swigfaiss_avx2.ProductQuantizer_compute_codes_with_assign_index(self, x, codes, n)

    def decode(self, *args):
        return _swigfaiss_avx2.ProductQuantizer_decode(self, *args)

    def compute_code_from_distance_table(self, tab, code):
        return _swigfaiss_avx2.ProductQuantizer_compute_code_from_distance_table(self, tab, code)

    def compute_distance_table(self, x, dis_table):
        return _swigfaiss_avx2.ProductQuantizer_compute_distance_table(self, x, dis_table)

    def compute_inner_prod_table(self, x, dis_table):
        return _swigfaiss_avx2.ProductQuantizer_compute_inner_prod_table(self, x, dis_table)

    def compute_distance_tables(self, nx, x, dis_tables):
        return _swigfaiss_avx2.ProductQuantizer_compute_distance_tables(self, nx, x, dis_tables)

    def compute_inner_prod_tables(self, nx, x, dis_tables):
        return _swigfaiss_avx2.ProductQuantizer_compute_inner_prod_tables(self, nx, x, dis_tables)

    def search(self, x, nx, codes, ncodes, res, init_finalize_heap=True):
        return _swigfaiss_avx2.ProductQuantizer_search(self, x, nx, codes, ncodes, res, init_finalize_heap)

    def search_ip(self, x, nx, codes, ncodes, res, init_finalize_heap=True):
        return _swigfaiss_avx2.ProductQuantizer_search_ip(self, x, nx, codes, ncodes, res, init_finalize_heap)
    __swig_setmethods__["sdc_table"] = _swigfaiss_avx2.ProductQuantizer_sdc_table_set
    __swig_getmethods__["sdc_table"] = _swigfaiss_avx2.ProductQuantizer_sdc_table_get
    if _newclass:
        sdc_table = _swig_property(_swigfaiss_avx2.ProductQuantizer_sdc_table_get, _swigfaiss_avx2.ProductQuantizer_sdc_table_set)

    def compute_sdc_table(self):
        return _swigfaiss_avx2.ProductQuantizer_compute_sdc_table(self)

    def search_sdc(self, qcodes, nq, bcodes, ncodes, res, init_finalize_heap=True):
        return _swigfaiss_avx2.ProductQuantizer_search_sdc(self, qcodes, nq, bcodes, ncodes, res, init_finalize_heap)
    __swig_destroy__ = _swigfaiss_avx2.delete_ProductQuantizer
    __del__ = lambda self: None
ProductQuantizer_swigregister = _swigfaiss_avx2.ProductQuantizer_swigregister
ProductQuantizer_swigregister(ProductQuantizer)

class PQEncoderGeneric(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, PQEncoderGeneric, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, PQEncoderGeneric, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code"] = _swigfaiss_avx2.PQEncoderGeneric_code_set
    __swig_getmethods__["code"] = _swigfaiss_avx2.PQEncoderGeneric_code_get
    if _newclass:
        code = _swig_property(_swigfaiss_avx2.PQEncoderGeneric_code_get, _swigfaiss_avx2.PQEncoderGeneric_code_set)
    __swig_setmethods__["offset"] = _swigfaiss_avx2.PQEncoderGeneric_offset_set
    __swig_getmethods__["offset"] = _swigfaiss_avx2.PQEncoderGeneric_offset_get
    if _newclass:
        offset = _swig_property(_swigfaiss_avx2.PQEncoderGeneric_offset_get, _swigfaiss_avx2.PQEncoderGeneric_offset_set)
    __swig_getmethods__["nbits"] = _swigfaiss_avx2.PQEncoderGeneric_nbits_get
    if _newclass:
        nbits = _swig_property(_swigfaiss_avx2.PQEncoderGeneric_nbits_get)
    __swig_setmethods__["reg"] = _swigfaiss_avx2.PQEncoderGeneric_reg_set
    __swig_getmethods__["reg"] = _swigfaiss_avx2.PQEncoderGeneric_reg_get
    if _newclass:
        reg = _swig_property(_swigfaiss_avx2.PQEncoderGeneric_reg_get, _swigfaiss_avx2.PQEncoderGeneric_reg_set)

    def __init__(self, code, nbits, offset=0):
        this = _swigfaiss_avx2.new_PQEncoderGeneric(code, nbits, offset)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def encode(self, x):
        return _swigfaiss_avx2.PQEncoderGeneric_encode(self, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQEncoderGeneric
    __del__ = lambda self: None
PQEncoderGeneric_swigregister = _swigfaiss_avx2.PQEncoderGeneric_swigregister
PQEncoderGeneric_swigregister(PQEncoderGeneric)

class PQEncoder8(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, PQEncoder8, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, PQEncoder8, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code"] = _swigfaiss_avx2.PQEncoder8_code_set
    __swig_getmethods__["code"] = _swigfaiss_avx2.PQEncoder8_code_get
    if _newclass:
        code = _swig_property(_swigfaiss_avx2.PQEncoder8_code_get, _swigfaiss_avx2.PQEncoder8_code_set)

    def __init__(self, code, nbits):
        this = _swigfaiss_avx2.new_PQEncoder8(code, nbits)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def encode(self, x):
        return _swigfaiss_avx2.PQEncoder8_encode(self, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQEncoder8
    __del__ = lambda self: None
PQEncoder8_swigregister = _swigfaiss_avx2.PQEncoder8_swigregister
PQEncoder8_swigregister(PQEncoder8)

class PQEncoder16(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, PQEncoder16, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, PQEncoder16, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code"] = _swigfaiss_avx2.PQEncoder16_code_set
    __swig_getmethods__["code"] = _swigfaiss_avx2.PQEncoder16_code_get
    if _newclass:
        code = _swig_property(_swigfaiss_avx2.PQEncoder16_code_get, _swigfaiss_avx2.PQEncoder16_code_set)

    def __init__(self, code, nbits):
        this = _swigfaiss_avx2.new_PQEncoder16(code, nbits)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def encode(self, x):
        return _swigfaiss_avx2.PQEncoder16_encode(self, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQEncoder16
    __del__ = lambda self: None
PQEncoder16_swigregister = _swigfaiss_avx2.PQEncoder16_swigregister
PQEncoder16_swigregister(PQEncoder16)

class PQDecoderGeneric(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, PQDecoderGeneric, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, PQDecoderGeneric, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code"] = _swigfaiss_avx2.PQDecoderGeneric_code_set
    __swig_getmethods__["code"] = _swigfaiss_avx2.PQDecoderGeneric_code_get
    if _newclass:
        code = _swig_property(_swigfaiss_avx2.PQDecoderGeneric_code_get, _swigfaiss_avx2.PQDecoderGeneric_code_set)
    __swig_setmethods__["offset"] = _swigfaiss_avx2.PQDecoderGeneric_offset_set
    __swig_getmethods__["offset"] = _swigfaiss_avx2.PQDecoderGeneric_offset_get
    if _newclass:
        offset = _swig_property(_swigfaiss_avx2.PQDecoderGeneric_offset_get, _swigfaiss_avx2.PQDecoderGeneric_offset_set)
    __swig_getmethods__["nbits"] = _swigfaiss_avx2.PQDecoderGeneric_nbits_get
    if _newclass:
        nbits = _swig_property(_swigfaiss_avx2.PQDecoderGeneric_nbits_get)
    __swig_getmethods__["mask"] = _swigfaiss_avx2.PQDecoderGeneric_mask_get
    if _newclass:
        mask = _swig_property(_swigfaiss_avx2.PQDecoderGeneric_mask_get)
    __swig_setmethods__["reg"] = _swigfaiss_avx2.PQDecoderGeneric_reg_set
    __swig_getmethods__["reg"] = _swigfaiss_avx2.PQDecoderGeneric_reg_get
    if _newclass:
        reg = _swig_property(_swigfaiss_avx2.PQDecoderGeneric_reg_get, _swigfaiss_avx2.PQDecoderGeneric_reg_set)

    def __init__(self, code, nbits):
        this = _swigfaiss_avx2.new_PQDecoderGeneric(code, nbits)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def decode(self):
        return _swigfaiss_avx2.PQDecoderGeneric_decode(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQDecoderGeneric
    __del__ = lambda self: None
PQDecoderGeneric_swigregister = _swigfaiss_avx2.PQDecoderGeneric_swigregister
PQDecoderGeneric_swigregister(PQDecoderGeneric)

class PQDecoder8(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, PQDecoder8, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, PQDecoder8, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code"] = _swigfaiss_avx2.PQDecoder8_code_set
    __swig_getmethods__["code"] = _swigfaiss_avx2.PQDecoder8_code_get
    if _newclass:
        code = _swig_property(_swigfaiss_avx2.PQDecoder8_code_get, _swigfaiss_avx2.PQDecoder8_code_set)

    def __init__(self, code, nbits):
        this = _swigfaiss_avx2.new_PQDecoder8(code, nbits)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def decode(self):
        return _swigfaiss_avx2.PQDecoder8_decode(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQDecoder8
    __del__ = lambda self: None
PQDecoder8_swigregister = _swigfaiss_avx2.PQDecoder8_swigregister
PQDecoder8_swigregister(PQDecoder8)

class PQDecoder16(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, PQDecoder16, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, PQDecoder16, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code"] = _swigfaiss_avx2.PQDecoder16_code_set
    __swig_getmethods__["code"] = _swigfaiss_avx2.PQDecoder16_code_get
    if _newclass:
        code = _swig_property(_swigfaiss_avx2.PQDecoder16_code_get, _swigfaiss_avx2.PQDecoder16_code_set)

    def __init__(self, code, nbits):
        this = _swigfaiss_avx2.new_PQDecoder16(code, nbits)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def decode(self):
        return _swigfaiss_avx2.PQDecoder16_decode(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQDecoder16
    __del__ = lambda self: None
PQDecoder16_swigregister = _swigfaiss_avx2.PQDecoder16_swigregister
PQDecoder16_swigregister(PQDecoder16)

class VectorTransform(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, VectorTransform, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, VectorTransform, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["d_in"] = _swigfaiss_avx2.VectorTransform_d_in_set
    __swig_getmethods__["d_in"] = _swigfaiss_avx2.VectorTransform_d_in_get
    if _newclass:
        d_in = _swig_property(_swigfaiss_avx2.VectorTransform_d_in_get, _swigfaiss_avx2.VectorTransform_d_in_set)
    __swig_setmethods__["d_out"] = _swigfaiss_avx2.VectorTransform_d_out_set
    __swig_getmethods__["d_out"] = _swigfaiss_avx2.VectorTransform_d_out_get
    if _newclass:
        d_out = _swig_property(_swigfaiss_avx2.VectorTransform_d_out_get, _swigfaiss_avx2.VectorTransform_d_out_set)
    __swig_setmethods__["is_trained"] = _swigfaiss_avx2.VectorTransform_is_trained_set
    __swig_getmethods__["is_trained"] = _swigfaiss_avx2.VectorTransform_is_trained_get
    if _newclass:
        is_trained = _swig_property(_swigfaiss_avx2.VectorTransform_is_trained_get, _swigfaiss_avx2.VectorTransform_is_trained_set)

    def train(self, n, x):
        return _swigfaiss_avx2.VectorTransform_train(self, n, x)

    def apply(self, n, x):
        return _swigfaiss_avx2.VectorTransform_apply(self, n, x)

    def apply_noalloc(self, n, x, xt):
        return _swigfaiss_avx2.VectorTransform_apply_noalloc(self, n, x, xt)

    def reverse_transform(self, n, xt, x):
        return _swigfaiss_avx2.VectorTransform_reverse_transform(self, n, xt, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_VectorTransform
    __del__ = lambda self: None
VectorTransform_swigregister = _swigfaiss_avx2.VectorTransform_swigregister
VectorTransform_swigregister(VectorTransform)

class LinearTransform(VectorTransform):
    __swig_setmethods__ = {}
    for _s in [VectorTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, LinearTransform, name, value)
    __swig_getmethods__ = {}
    for _s in [VectorTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, LinearTransform, name)
    __repr__ = _swig_repr
    __swig_setmethods__["have_bias"] = _swigfaiss_avx2.LinearTransform_have_bias_set
    __swig_getmethods__["have_bias"] = _swigfaiss_avx2.LinearTransform_have_bias_get
    if _newclass:
        have_bias = _swig_property(_swigfaiss_avx2.LinearTransform_have_bias_get, _swigfaiss_avx2.LinearTransform_have_bias_set)
    __swig_setmethods__["is_orthonormal"] = _swigfaiss_avx2.LinearTransform_is_orthonormal_set
    __swig_getmethods__["is_orthonormal"] = _swigfaiss_avx2.LinearTransform_is_orthonormal_get
    if _newclass:
        is_orthonormal = _swig_property(_swigfaiss_avx2.LinearTransform_is_orthonormal_get, _swigfaiss_avx2.LinearTransform_is_orthonormal_set)
    __swig_setmethods__["A"] = _swigfaiss_avx2.LinearTransform_A_set
    __swig_getmethods__["A"] = _swigfaiss_avx2.LinearTransform_A_get
    if _newclass:
        A = _swig_property(_swigfaiss_avx2.LinearTransform_A_get, _swigfaiss_avx2.LinearTransform_A_set)
    __swig_setmethods__["b"] = _swigfaiss_avx2.LinearTransform_b_set
    __swig_getmethods__["b"] = _swigfaiss_avx2.LinearTransform_b_get
    if _newclass:
        b = _swig_property(_swigfaiss_avx2.LinearTransform_b_get, _swigfaiss_avx2.LinearTransform_b_set)

    def __init__(self, d_in=0, d_out=0, have_bias=False):
        this = _swigfaiss_avx2.new_LinearTransform(d_in, d_out, have_bias)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def apply_noalloc(self, n, x, xt):
        return _swigfaiss_avx2.LinearTransform_apply_noalloc(self, n, x, xt)

    def transform_transpose(self, n, y, x):
        return _swigfaiss_avx2.LinearTransform_transform_transpose(self, n, y, x)

    def reverse_transform(self, n, xt, x):
        return _swigfaiss_avx2.LinearTransform_reverse_transform(self, n, xt, x)

    def set_is_orthonormal(self):
        return _swigfaiss_avx2.LinearTransform_set_is_orthonormal(self)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.LinearTransform_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.LinearTransform_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.LinearTransform_verbose_get, _swigfaiss_avx2.LinearTransform_verbose_set)

    def print_if_verbose(self, name, mat, n, d):
        return _swigfaiss_avx2.LinearTransform_print_if_verbose(self, name, mat, n, d)
    __swig_destroy__ = _swigfaiss_avx2.delete_LinearTransform
    __del__ = lambda self: None
LinearTransform_swigregister = _swigfaiss_avx2.LinearTransform_swigregister
LinearTransform_swigregister(LinearTransform)

class RandomRotationMatrix(LinearTransform):
    __swig_setmethods__ = {}
    for _s in [LinearTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, RandomRotationMatrix, name, value)
    __swig_getmethods__ = {}
    for _s in [LinearTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, RandomRotationMatrix, name)
    __repr__ = _swig_repr

    def init(self, seed):
        return _swigfaiss_avx2.RandomRotationMatrix_init(self, seed)

    def train(self, n, x):
        return _swigfaiss_avx2.RandomRotationMatrix_train(self, n, x)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_RandomRotationMatrix(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_RandomRotationMatrix
    __del__ = lambda self: None
RandomRotationMatrix_swigregister = _swigfaiss_avx2.RandomRotationMatrix_swigregister
RandomRotationMatrix_swigregister(RandomRotationMatrix)

class PCAMatrix(LinearTransform):
    __swig_setmethods__ = {}
    for _s in [LinearTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PCAMatrix, name, value)
    __swig_getmethods__ = {}
    for _s in [LinearTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, PCAMatrix, name)
    __repr__ = _swig_repr
    __swig_setmethods__["eigen_power"] = _swigfaiss_avx2.PCAMatrix_eigen_power_set
    __swig_getmethods__["eigen_power"] = _swigfaiss_avx2.PCAMatrix_eigen_power_get
    if _newclass:
        eigen_power = _swig_property(_swigfaiss_avx2.PCAMatrix_eigen_power_get, _swigfaiss_avx2.PCAMatrix_eigen_power_set)
    __swig_setmethods__["random_rotation"] = _swigfaiss_avx2.PCAMatrix_random_rotation_set
    __swig_getmethods__["random_rotation"] = _swigfaiss_avx2.PCAMatrix_random_rotation_get
    if _newclass:
        random_rotation = _swig_property(_swigfaiss_avx2.PCAMatrix_random_rotation_get, _swigfaiss_avx2.PCAMatrix_random_rotation_set)
    __swig_setmethods__["max_points_per_d"] = _swigfaiss_avx2.PCAMatrix_max_points_per_d_set
    __swig_getmethods__["max_points_per_d"] = _swigfaiss_avx2.PCAMatrix_max_points_per_d_get
    if _newclass:
        max_points_per_d = _swig_property(_swigfaiss_avx2.PCAMatrix_max_points_per_d_get, _swigfaiss_avx2.PCAMatrix_max_points_per_d_set)
    __swig_setmethods__["balanced_bins"] = _swigfaiss_avx2.PCAMatrix_balanced_bins_set
    __swig_getmethods__["balanced_bins"] = _swigfaiss_avx2.PCAMatrix_balanced_bins_get
    if _newclass:
        balanced_bins = _swig_property(_swigfaiss_avx2.PCAMatrix_balanced_bins_get, _swigfaiss_avx2.PCAMatrix_balanced_bins_set)
    __swig_setmethods__["mean"] = _swigfaiss_avx2.PCAMatrix_mean_set
    __swig_getmethods__["mean"] = _swigfaiss_avx2.PCAMatrix_mean_get
    if _newclass:
        mean = _swig_property(_swigfaiss_avx2.PCAMatrix_mean_get, _swigfaiss_avx2.PCAMatrix_mean_set)
    __swig_setmethods__["eigenvalues"] = _swigfaiss_avx2.PCAMatrix_eigenvalues_set
    __swig_getmethods__["eigenvalues"] = _swigfaiss_avx2.PCAMatrix_eigenvalues_get
    if _newclass:
        eigenvalues = _swig_property(_swigfaiss_avx2.PCAMatrix_eigenvalues_get, _swigfaiss_avx2.PCAMatrix_eigenvalues_set)
    __swig_setmethods__["PCAMat"] = _swigfaiss_avx2.PCAMatrix_PCAMat_set
    __swig_getmethods__["PCAMat"] = _swigfaiss_avx2.PCAMatrix_PCAMat_get
    if _newclass:
        PCAMat = _swig_property(_swigfaiss_avx2.PCAMatrix_PCAMat_get, _swigfaiss_avx2.PCAMatrix_PCAMat_set)

    def __init__(self, d_in=0, d_out=0, eigen_power=0, random_rotation=False):
        this = _swigfaiss_avx2.new_PCAMatrix(d_in, d_out, eigen_power, random_rotation)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.PCAMatrix_train(self, n, x)

    def copy_from(self, other):
        return _swigfaiss_avx2.PCAMatrix_copy_from(self, other)

    def prepare_Ab(self):
        return _swigfaiss_avx2.PCAMatrix_prepare_Ab(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_PCAMatrix
    __del__ = lambda self: None
PCAMatrix_swigregister = _swigfaiss_avx2.PCAMatrix_swigregister
PCAMatrix_swigregister(PCAMatrix)

class ITQMatrix(LinearTransform):
    __swig_setmethods__ = {}
    for _s in [LinearTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ITQMatrix, name, value)
    __swig_getmethods__ = {}
    for _s in [LinearTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ITQMatrix, name)
    __repr__ = _swig_repr
    __swig_setmethods__["max_iter"] = _swigfaiss_avx2.ITQMatrix_max_iter_set
    __swig_getmethods__["max_iter"] = _swigfaiss_avx2.ITQMatrix_max_iter_get
    if _newclass:
        max_iter = _swig_property(_swigfaiss_avx2.ITQMatrix_max_iter_get, _swigfaiss_avx2.ITQMatrix_max_iter_set)
    __swig_setmethods__["seed"] = _swigfaiss_avx2.ITQMatrix_seed_set
    __swig_getmethods__["seed"] = _swigfaiss_avx2.ITQMatrix_seed_get
    if _newclass:
        seed = _swig_property(_swigfaiss_avx2.ITQMatrix_seed_get, _swigfaiss_avx2.ITQMatrix_seed_set)
    __swig_setmethods__["init_rotation"] = _swigfaiss_avx2.ITQMatrix_init_rotation_set
    __swig_getmethods__["init_rotation"] = _swigfaiss_avx2.ITQMatrix_init_rotation_get
    if _newclass:
        init_rotation = _swig_property(_swigfaiss_avx2.ITQMatrix_init_rotation_get, _swigfaiss_avx2.ITQMatrix_init_rotation_set)

    def __init__(self, d=0):
        this = _swigfaiss_avx2.new_ITQMatrix(d)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.ITQMatrix_train(self, n, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_ITQMatrix
    __del__ = lambda self: None
ITQMatrix_swigregister = _swigfaiss_avx2.ITQMatrix_swigregister
ITQMatrix_swigregister(ITQMatrix)

class ITQTransform(VectorTransform):
    __swig_setmethods__ = {}
    for _s in [VectorTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ITQTransform, name, value)
    __swig_getmethods__ = {}
    for _s in [VectorTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ITQTransform, name)
    __repr__ = _swig_repr
    __swig_setmethods__["mean"] = _swigfaiss_avx2.ITQTransform_mean_set
    __swig_getmethods__["mean"] = _swigfaiss_avx2.ITQTransform_mean_get
    if _newclass:
        mean = _swig_property(_swigfaiss_avx2.ITQTransform_mean_get, _swigfaiss_avx2.ITQTransform_mean_set)
    __swig_setmethods__["do_pca"] = _swigfaiss_avx2.ITQTransform_do_pca_set
    __swig_getmethods__["do_pca"] = _swigfaiss_avx2.ITQTransform_do_pca_get
    if _newclass:
        do_pca = _swig_property(_swigfaiss_avx2.ITQTransform_do_pca_get, _swigfaiss_avx2.ITQTransform_do_pca_set)
    __swig_setmethods__["itq"] = _swigfaiss_avx2.ITQTransform_itq_set
    __swig_getmethods__["itq"] = _swigfaiss_avx2.ITQTransform_itq_get
    if _newclass:
        itq = _swig_property(_swigfaiss_avx2.ITQTransform_itq_get, _swigfaiss_avx2.ITQTransform_itq_set)
    __swig_setmethods__["max_train_per_dim"] = _swigfaiss_avx2.ITQTransform_max_train_per_dim_set
    __swig_getmethods__["max_train_per_dim"] = _swigfaiss_avx2.ITQTransform_max_train_per_dim_get
    if _newclass:
        max_train_per_dim = _swig_property(_swigfaiss_avx2.ITQTransform_max_train_per_dim_get, _swigfaiss_avx2.ITQTransform_max_train_per_dim_set)
    __swig_setmethods__["pca_then_itq"] = _swigfaiss_avx2.ITQTransform_pca_then_itq_set
    __swig_getmethods__["pca_then_itq"] = _swigfaiss_avx2.ITQTransform_pca_then_itq_get
    if _newclass:
        pca_then_itq = _swig_property(_swigfaiss_avx2.ITQTransform_pca_then_itq_get, _swigfaiss_avx2.ITQTransform_pca_then_itq_set)

    def __init__(self, d_in=0, d_out=0, do_pca=False):
        this = _swigfaiss_avx2.new_ITQTransform(d_in, d_out, do_pca)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.ITQTransform_train(self, n, x)

    def apply_noalloc(self, n, x, xt):
        return _swigfaiss_avx2.ITQTransform_apply_noalloc(self, n, x, xt)
    __swig_destroy__ = _swigfaiss_avx2.delete_ITQTransform
    __del__ = lambda self: None
ITQTransform_swigregister = _swigfaiss_avx2.ITQTransform_swigregister
ITQTransform_swigregister(ITQTransform)

class OPQMatrix(LinearTransform):
    __swig_setmethods__ = {}
    for _s in [LinearTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, OPQMatrix, name, value)
    __swig_getmethods__ = {}
    for _s in [LinearTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, OPQMatrix, name)
    __repr__ = _swig_repr
    __swig_setmethods__["M"] = _swigfaiss_avx2.OPQMatrix_M_set
    __swig_getmethods__["M"] = _swigfaiss_avx2.OPQMatrix_M_get
    if _newclass:
        M = _swig_property(_swigfaiss_avx2.OPQMatrix_M_get, _swigfaiss_avx2.OPQMatrix_M_set)
    __swig_setmethods__["niter"] = _swigfaiss_avx2.OPQMatrix_niter_set
    __swig_getmethods__["niter"] = _swigfaiss_avx2.OPQMatrix_niter_get
    if _newclass:
        niter = _swig_property(_swigfaiss_avx2.OPQMatrix_niter_get, _swigfaiss_avx2.OPQMatrix_niter_set)
    __swig_setmethods__["niter_pq"] = _swigfaiss_avx2.OPQMatrix_niter_pq_set
    __swig_getmethods__["niter_pq"] = _swigfaiss_avx2.OPQMatrix_niter_pq_get
    if _newclass:
        niter_pq = _swig_property(_swigfaiss_avx2.OPQMatrix_niter_pq_get, _swigfaiss_avx2.OPQMatrix_niter_pq_set)
    __swig_setmethods__["niter_pq_0"] = _swigfaiss_avx2.OPQMatrix_niter_pq_0_set
    __swig_getmethods__["niter_pq_0"] = _swigfaiss_avx2.OPQMatrix_niter_pq_0_get
    if _newclass:
        niter_pq_0 = _swig_property(_swigfaiss_avx2.OPQMatrix_niter_pq_0_get, _swigfaiss_avx2.OPQMatrix_niter_pq_0_set)
    __swig_setmethods__["max_train_points"] = _swigfaiss_avx2.OPQMatrix_max_train_points_set
    __swig_getmethods__["max_train_points"] = _swigfaiss_avx2.OPQMatrix_max_train_points_get
    if _newclass:
        max_train_points = _swig_property(_swigfaiss_avx2.OPQMatrix_max_train_points_get, _swigfaiss_avx2.OPQMatrix_max_train_points_set)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.OPQMatrix_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.OPQMatrix_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.OPQMatrix_verbose_get, _swigfaiss_avx2.OPQMatrix_verbose_set)
    __swig_setmethods__["pq"] = _swigfaiss_avx2.OPQMatrix_pq_set
    __swig_getmethods__["pq"] = _swigfaiss_avx2.OPQMatrix_pq_get
    if _newclass:
        pq = _swig_property(_swigfaiss_avx2.OPQMatrix_pq_get, _swigfaiss_avx2.OPQMatrix_pq_set)

    def __init__(self, d=0, M=1, d2=-1):
        this = _swigfaiss_avx2.new_OPQMatrix(d, M, d2)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.OPQMatrix_train(self, n, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_OPQMatrix
    __del__ = lambda self: None
OPQMatrix_swigregister = _swigfaiss_avx2.OPQMatrix_swigregister
OPQMatrix_swigregister(OPQMatrix)

class RemapDimensionsTransform(VectorTransform):
    __swig_setmethods__ = {}
    for _s in [VectorTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, RemapDimensionsTransform, name, value)
    __swig_getmethods__ = {}
    for _s in [VectorTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, RemapDimensionsTransform, name)
    __repr__ = _swig_repr
    __swig_setmethods__["map"] = _swigfaiss_avx2.RemapDimensionsTransform_map_set
    __swig_getmethods__["map"] = _swigfaiss_avx2.RemapDimensionsTransform_map_get
    if _newclass:
        map = _swig_property(_swigfaiss_avx2.RemapDimensionsTransform_map_get, _swigfaiss_avx2.RemapDimensionsTransform_map_set)

    def apply_noalloc(self, n, x, xt):
        return _swigfaiss_avx2.RemapDimensionsTransform_apply_noalloc(self, n, x, xt)

    def reverse_transform(self, n, xt, x):
        return _swigfaiss_avx2.RemapDimensionsTransform_reverse_transform(self, n, xt, x)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_RemapDimensionsTransform(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_RemapDimensionsTransform
    __del__ = lambda self: None
RemapDimensionsTransform_swigregister = _swigfaiss_avx2.RemapDimensionsTransform_swigregister
RemapDimensionsTransform_swigregister(RemapDimensionsTransform)

class NormalizationTransform(VectorTransform):
    __swig_setmethods__ = {}
    for _s in [VectorTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, NormalizationTransform, name, value)
    __swig_getmethods__ = {}
    for _s in [VectorTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, NormalizationTransform, name)
    __repr__ = _swig_repr
    __swig_setmethods__["norm"] = _swigfaiss_avx2.NormalizationTransform_norm_set
    __swig_getmethods__["norm"] = _swigfaiss_avx2.NormalizationTransform_norm_get
    if _newclass:
        norm = _swig_property(_swigfaiss_avx2.NormalizationTransform_norm_get, _swigfaiss_avx2.NormalizationTransform_norm_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_NormalizationTransform(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def apply_noalloc(self, n, x, xt):
        return _swigfaiss_avx2.NormalizationTransform_apply_noalloc(self, n, x, xt)

    def reverse_transform(self, n, xt, x):
        return _swigfaiss_avx2.NormalizationTransform_reverse_transform(self, n, xt, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_NormalizationTransform
    __del__ = lambda self: None
NormalizationTransform_swigregister = _swigfaiss_avx2.NormalizationTransform_swigregister
NormalizationTransform_swigregister(NormalizationTransform)

class CenteringTransform(VectorTransform):
    __swig_setmethods__ = {}
    for _s in [VectorTransform]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, CenteringTransform, name, value)
    __swig_getmethods__ = {}
    for _s in [VectorTransform]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, CenteringTransform, name)
    __repr__ = _swig_repr
    __swig_setmethods__["mean"] = _swigfaiss_avx2.CenteringTransform_mean_set
    __swig_getmethods__["mean"] = _swigfaiss_avx2.CenteringTransform_mean_get
    if _newclass:
        mean = _swig_property(_swigfaiss_avx2.CenteringTransform_mean_get, _swigfaiss_avx2.CenteringTransform_mean_set)

    def __init__(self, d=0):
        this = _swigfaiss_avx2.new_CenteringTransform(d)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.CenteringTransform_train(self, n, x)

    def apply_noalloc(self, n, x, xt):
        return _swigfaiss_avx2.CenteringTransform_apply_noalloc(self, n, x, xt)

    def reverse_transform(self, n, xt, x):
        return _swigfaiss_avx2.CenteringTransform_reverse_transform(self, n, xt, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_CenteringTransform
    __del__ = lambda self: None
CenteringTransform_swigregister = _swigfaiss_avx2.CenteringTransform_swigregister
CenteringTransform_swigregister(CenteringTransform)

class IndexPreTransform(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexPreTransform, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexPreTransform, name)
    __repr__ = _swig_repr
    __swig_setmethods__["chain"] = _swigfaiss_avx2.IndexPreTransform_chain_set
    __swig_getmethods__["chain"] = _swigfaiss_avx2.IndexPreTransform_chain_get
    if _newclass:
        chain = _swig_property(_swigfaiss_avx2.IndexPreTransform_chain_get, _swigfaiss_avx2.IndexPreTransform_chain_set)
    __swig_setmethods__["index"] = _swigfaiss_avx2.IndexPreTransform_index_set
    __swig_getmethods__["index"] = _swigfaiss_avx2.IndexPreTransform_index_get
    if _newclass:
        index = _swig_property(_swigfaiss_avx2.IndexPreTransform_index_get, _swigfaiss_avx2.IndexPreTransform_index_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexPreTransform_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexPreTransform_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexPreTransform_own_fields_get, _swigfaiss_avx2.IndexPreTransform_own_fields_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexPreTransform(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def prepend_transform(self, ltrans):
        return _swigfaiss_avx2.IndexPreTransform_prepend_transform(self, ltrans)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexPreTransform_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexPreTransform_add(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexPreTransform_add_with_ids(self, n, x, xids)

    def reset(self):
        return _swigfaiss_avx2.IndexPreTransform_reset(self)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexPreTransform_remove_ids(self, sel)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexPreTransform_search(self, n, x, k, distances, labels)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexPreTransform_range_search(self, n, x, radius, result)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexPreTransform_reconstruct(self, key, recons)

    def reconstruct_n(self, i0, ni, recons):
        return _swigfaiss_avx2.IndexPreTransform_reconstruct_n(self, i0, ni, recons)

    def search_and_reconstruct(self, n, x, k, distances, labels, recons):
        return _swigfaiss_avx2.IndexPreTransform_search_and_reconstruct(self, n, x, k, distances, labels, recons)

    def apply_chain(self, n, x):
        return _swigfaiss_avx2.IndexPreTransform_apply_chain(self, n, x)

    def reverse_chain(self, n, xt, x):
        return _swigfaiss_avx2.IndexPreTransform_reverse_chain(self, n, xt, x)

    def sa_code_size(self):
        return _swigfaiss_avx2.IndexPreTransform_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.IndexPreTransform_sa_encode(self, n, x, bytes)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexPreTransform_sa_decode(self, n, bytes, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexPreTransform
    __del__ = lambda self: None
IndexPreTransform_swigregister = _swigfaiss_avx2.IndexPreTransform_swigregister
IndexPreTransform_swigregister(IndexPreTransform)

class IndexFlat(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexFlat, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexFlat, name)
    __repr__ = _swig_repr
    __swig_setmethods__["xb"] = _swigfaiss_avx2.IndexFlat_xb_set
    __swig_getmethods__["xb"] = _swigfaiss_avx2.IndexFlat_xb_get
    if _newclass:
        xb = _swig_property(_swigfaiss_avx2.IndexFlat_xb_get, _swigfaiss_avx2.IndexFlat_xb_set)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexFlat_add(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.IndexFlat_reset(self)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexFlat_search(self, n, x, k, distances, labels)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexFlat_range_search(self, n, x, radius, result)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexFlat_reconstruct(self, key, recons)

    def compute_distance_subset(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexFlat_compute_distance_subset(self, n, x, k, distances, labels)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexFlat_remove_ids(self, sel)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexFlat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def get_distance_computer(self):
        return _swigfaiss_avx2.IndexFlat_get_distance_computer(self)

    def sa_code_size(self):
        return _swigfaiss_avx2.IndexFlat_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.IndexFlat_sa_encode(self, n, x, bytes)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexFlat_sa_decode(self, n, bytes, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexFlat
    __del__ = lambda self: None
IndexFlat_swigregister = _swigfaiss_avx2.IndexFlat_swigregister
IndexFlat_swigregister(IndexFlat)

class IndexFlatIP(IndexFlat):
    __swig_setmethods__ = {}
    for _s in [IndexFlat]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexFlatIP, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexFlat]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexFlatIP, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexFlatIP(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexFlatIP
    __del__ = lambda self: None
IndexFlatIP_swigregister = _swigfaiss_avx2.IndexFlatIP_swigregister
IndexFlatIP_swigregister(IndexFlatIP)

class IndexFlatL2(IndexFlat):
    __swig_setmethods__ = {}
    for _s in [IndexFlat]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexFlatL2, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexFlat]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexFlatL2, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexFlatL2(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexFlatL2
    __del__ = lambda self: None
IndexFlatL2_swigregister = _swigfaiss_avx2.IndexFlatL2_swigregister
IndexFlatL2_swigregister(IndexFlatL2)

class IndexFlatL2BaseShift(IndexFlatL2):
    __swig_setmethods__ = {}
    for _s in [IndexFlatL2]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexFlatL2BaseShift, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexFlatL2]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexFlatL2BaseShift, name)
    __repr__ = _swig_repr
    __swig_setmethods__["shift"] = _swigfaiss_avx2.IndexFlatL2BaseShift_shift_set
    __swig_getmethods__["shift"] = _swigfaiss_avx2.IndexFlatL2BaseShift_shift_get
    if _newclass:
        shift = _swig_property(_swigfaiss_avx2.IndexFlatL2BaseShift_shift_get, _swigfaiss_avx2.IndexFlatL2BaseShift_shift_set)

    def __init__(self, d, nshift, shift):
        this = _swigfaiss_avx2.new_IndexFlatL2BaseShift(d, nshift, shift)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexFlatL2BaseShift_search(self, n, x, k, distances, labels)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexFlatL2BaseShift
    __del__ = lambda self: None
IndexFlatL2BaseShift_swigregister = _swigfaiss_avx2.IndexFlatL2BaseShift_swigregister
IndexFlatL2BaseShift_swigregister(IndexFlatL2BaseShift)

class IndexRefineFlat(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexRefineFlat, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexRefineFlat, name)
    __repr__ = _swig_repr
    __swig_setmethods__["refine_index"] = _swigfaiss_avx2.IndexRefineFlat_refine_index_set
    __swig_getmethods__["refine_index"] = _swigfaiss_avx2.IndexRefineFlat_refine_index_get
    if _newclass:
        refine_index = _swig_property(_swigfaiss_avx2.IndexRefineFlat_refine_index_get, _swigfaiss_avx2.IndexRefineFlat_refine_index_set)
    __swig_setmethods__["base_index"] = _swigfaiss_avx2.IndexRefineFlat_base_index_set
    __swig_getmethods__["base_index"] = _swigfaiss_avx2.IndexRefineFlat_base_index_get
    if _newclass:
        base_index = _swig_property(_swigfaiss_avx2.IndexRefineFlat_base_index_get, _swigfaiss_avx2.IndexRefineFlat_base_index_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexRefineFlat_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexRefineFlat_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexRefineFlat_own_fields_get, _swigfaiss_avx2.IndexRefineFlat_own_fields_set)
    __swig_setmethods__["k_factor"] = _swigfaiss_avx2.IndexRefineFlat_k_factor_set
    __swig_getmethods__["k_factor"] = _swigfaiss_avx2.IndexRefineFlat_k_factor_get
    if _newclass:
        k_factor = _swig_property(_swigfaiss_avx2.IndexRefineFlat_k_factor_get, _swigfaiss_avx2.IndexRefineFlat_k_factor_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexRefineFlat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.IndexRefineFlat_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexRefineFlat_add(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.IndexRefineFlat_reset(self)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexRefineFlat_search(self, n, x, k, distances, labels)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexRefineFlat
    __del__ = lambda self: None
IndexRefineFlat_swigregister = _swigfaiss_avx2.IndexRefineFlat_swigregister
IndexRefineFlat_swigregister(IndexRefineFlat)

class IndexFlat1D(IndexFlatL2):
    __swig_setmethods__ = {}
    for _s in [IndexFlatL2]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexFlat1D, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexFlatL2]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexFlat1D, name)
    __repr__ = _swig_repr
    __swig_setmethods__["continuous_update"] = _swigfaiss_avx2.IndexFlat1D_continuous_update_set
    __swig_getmethods__["continuous_update"] = _swigfaiss_avx2.IndexFlat1D_continuous_update_get
    if _newclass:
        continuous_update = _swig_property(_swigfaiss_avx2.IndexFlat1D_continuous_update_get, _swigfaiss_avx2.IndexFlat1D_continuous_update_set)
    __swig_setmethods__["perm"] = _swigfaiss_avx2.IndexFlat1D_perm_set
    __swig_getmethods__["perm"] = _swigfaiss_avx2.IndexFlat1D_perm_get
    if _newclass:
        perm = _swig_property(_swigfaiss_avx2.IndexFlat1D_perm_get, _swigfaiss_avx2.IndexFlat1D_perm_set)

    def __init__(self, continuous_update=True):
        this = _swigfaiss_avx2.new_IndexFlat1D(continuous_update)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def update_permutation(self):
        return _swigfaiss_avx2.IndexFlat1D_update_permutation(self)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexFlat1D_add(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.IndexFlat1D_reset(self)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexFlat1D_search(self, n, x, k, distances, labels)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexFlat1D
    __del__ = lambda self: None
IndexFlat1D_swigregister = _swigfaiss_avx2.IndexFlat1D_swigregister
IndexFlat1D_swigregister(IndexFlat1D)

class IndexLSH(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexLSH, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexLSH, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nbits"] = _swigfaiss_avx2.IndexLSH_nbits_set
    __swig_getmethods__["nbits"] = _swigfaiss_avx2.IndexLSH_nbits_get
    if _newclass:
        nbits = _swig_property(_swigfaiss_avx2.IndexLSH_nbits_get, _swigfaiss_avx2.IndexLSH_nbits_set)
    __swig_setmethods__["bytes_per_vec"] = _swigfaiss_avx2.IndexLSH_bytes_per_vec_set
    __swig_getmethods__["bytes_per_vec"] = _swigfaiss_avx2.IndexLSH_bytes_per_vec_get
    if _newclass:
        bytes_per_vec = _swig_property(_swigfaiss_avx2.IndexLSH_bytes_per_vec_get, _swigfaiss_avx2.IndexLSH_bytes_per_vec_set)
    __swig_setmethods__["rotate_data"] = _swigfaiss_avx2.IndexLSH_rotate_data_set
    __swig_getmethods__["rotate_data"] = _swigfaiss_avx2.IndexLSH_rotate_data_get
    if _newclass:
        rotate_data = _swig_property(_swigfaiss_avx2.IndexLSH_rotate_data_get, _swigfaiss_avx2.IndexLSH_rotate_data_set)
    __swig_setmethods__["train_thresholds"] = _swigfaiss_avx2.IndexLSH_train_thresholds_set
    __swig_getmethods__["train_thresholds"] = _swigfaiss_avx2.IndexLSH_train_thresholds_get
    if _newclass:
        train_thresholds = _swig_property(_swigfaiss_avx2.IndexLSH_train_thresholds_get, _swigfaiss_avx2.IndexLSH_train_thresholds_set)
    __swig_setmethods__["rrot"] = _swigfaiss_avx2.IndexLSH_rrot_set
    __swig_getmethods__["rrot"] = _swigfaiss_avx2.IndexLSH_rrot_get
    if _newclass:
        rrot = _swig_property(_swigfaiss_avx2.IndexLSH_rrot_get, _swigfaiss_avx2.IndexLSH_rrot_set)
    __swig_setmethods__["thresholds"] = _swigfaiss_avx2.IndexLSH_thresholds_set
    __swig_getmethods__["thresholds"] = _swigfaiss_avx2.IndexLSH_thresholds_get
    if _newclass:
        thresholds = _swig_property(_swigfaiss_avx2.IndexLSH_thresholds_get, _swigfaiss_avx2.IndexLSH_thresholds_set)
    __swig_setmethods__["codes"] = _swigfaiss_avx2.IndexLSH_codes_set
    __swig_getmethods__["codes"] = _swigfaiss_avx2.IndexLSH_codes_get
    if _newclass:
        codes = _swig_property(_swigfaiss_avx2.IndexLSH_codes_get, _swigfaiss_avx2.IndexLSH_codes_set)

    def apply_preprocess(self, n, x):
        return _swigfaiss_avx2.IndexLSH_apply_preprocess(self, n, x)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexLSH_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexLSH_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexLSH_search(self, n, x, k, distances, labels)

    def reset(self):
        return _swigfaiss_avx2.IndexLSH_reset(self)

    def transfer_thresholds(self, vt):
        return _swigfaiss_avx2.IndexLSH_transfer_thresholds(self, vt)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexLSH
    __del__ = lambda self: None

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexLSH(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def sa_code_size(self):
        return _swigfaiss_avx2.IndexLSH_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.IndexLSH_sa_encode(self, n, x, bytes)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexLSH_sa_decode(self, n, bytes, x)
IndexLSH_swigregister = _swigfaiss_avx2.IndexLSH_swigregister
IndexLSH_swigregister(IndexLSH)

class SimulatedAnnealingParameters(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SimulatedAnnealingParameters, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SimulatedAnnealingParameters, name)
    __repr__ = _swig_repr
    __swig_setmethods__["init_temperature"] = _swigfaiss_avx2.SimulatedAnnealingParameters_init_temperature_set
    __swig_getmethods__["init_temperature"] = _swigfaiss_avx2.SimulatedAnnealingParameters_init_temperature_get
    if _newclass:
        init_temperature = _swig_property(_swigfaiss_avx2.SimulatedAnnealingParameters_init_temperature_get, _swigfaiss_avx2.SimulatedAnnealingParameters_init_temperature_set)
    __swig_setmethods__["temperature_decay"] = _swigfaiss_avx2.SimulatedAnnealingParameters_temperature_decay_set
    __swig_getmethods__["temperature_decay"] = _swigfaiss_avx2.SimulatedAnnealingParameters_temperature_decay_get
    if _newclass:
        temperature_decay = _swig_property(_swigfaiss_avx2.SimulatedAnnealingParameters_temperature_decay_get, _swigfaiss_avx2.SimulatedAnnealingParameters_temperature_decay_set)
    __swig_setmethods__["n_iter"] = _swigfaiss_avx2.SimulatedAnnealingParameters_n_iter_set
    __swig_getmethods__["n_iter"] = _swigfaiss_avx2.SimulatedAnnealingParameters_n_iter_get
    if _newclass:
        n_iter = _swig_property(_swigfaiss_avx2.SimulatedAnnealingParameters_n_iter_get, _swigfaiss_avx2.SimulatedAnnealingParameters_n_iter_set)
    __swig_setmethods__["n_redo"] = _swigfaiss_avx2.SimulatedAnnealingParameters_n_redo_set
    __swig_getmethods__["n_redo"] = _swigfaiss_avx2.SimulatedAnnealingParameters_n_redo_get
    if _newclass:
        n_redo = _swig_property(_swigfaiss_avx2.SimulatedAnnealingParameters_n_redo_get, _swigfaiss_avx2.SimulatedAnnealingParameters_n_redo_set)
    __swig_setmethods__["seed"] = _swigfaiss_avx2.SimulatedAnnealingParameters_seed_set
    __swig_getmethods__["seed"] = _swigfaiss_avx2.SimulatedAnnealingParameters_seed_get
    if _newclass:
        seed = _swig_property(_swigfaiss_avx2.SimulatedAnnealingParameters_seed_get, _swigfaiss_avx2.SimulatedAnnealingParameters_seed_set)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.SimulatedAnnealingParameters_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.SimulatedAnnealingParameters_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.SimulatedAnnealingParameters_verbose_get, _swigfaiss_avx2.SimulatedAnnealingParameters_verbose_set)
    __swig_setmethods__["only_bit_flips"] = _swigfaiss_avx2.SimulatedAnnealingParameters_only_bit_flips_set
    __swig_getmethods__["only_bit_flips"] = _swigfaiss_avx2.SimulatedAnnealingParameters_only_bit_flips_get
    if _newclass:
        only_bit_flips = _swig_property(_swigfaiss_avx2.SimulatedAnnealingParameters_only_bit_flips_get, _swigfaiss_avx2.SimulatedAnnealingParameters_only_bit_flips_set)
    __swig_setmethods__["init_random"] = _swigfaiss_avx2.SimulatedAnnealingParameters_init_random_set
    __swig_getmethods__["init_random"] = _swigfaiss_avx2.SimulatedAnnealingParameters_init_random_get
    if _newclass:
        init_random = _swig_property(_swigfaiss_avx2.SimulatedAnnealingParameters_init_random_get, _swigfaiss_avx2.SimulatedAnnealingParameters_init_random_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_SimulatedAnnealingParameters()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_SimulatedAnnealingParameters
    __del__ = lambda self: None
SimulatedAnnealingParameters_swigregister = _swigfaiss_avx2.SimulatedAnnealingParameters_swigregister
SimulatedAnnealingParameters_swigregister(SimulatedAnnealingParameters)

class PermutationObjective(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, PermutationObjective, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, PermutationObjective, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["n"] = _swigfaiss_avx2.PermutationObjective_n_set
    __swig_getmethods__["n"] = _swigfaiss_avx2.PermutationObjective_n_get
    if _newclass:
        n = _swig_property(_swigfaiss_avx2.PermutationObjective_n_get, _swigfaiss_avx2.PermutationObjective_n_set)

    def compute_cost(self, perm):
        return _swigfaiss_avx2.PermutationObjective_compute_cost(self, perm)

    def cost_update(self, perm, iw, jw):
        return _swigfaiss_avx2.PermutationObjective_cost_update(self, perm, iw, jw)
    __swig_destroy__ = _swigfaiss_avx2.delete_PermutationObjective
    __del__ = lambda self: None
PermutationObjective_swigregister = _swigfaiss_avx2.PermutationObjective_swigregister
PermutationObjective_swigregister(PermutationObjective)

class ReproduceDistancesObjective(PermutationObjective):
    __swig_setmethods__ = {}
    for _s in [PermutationObjective]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ReproduceDistancesObjective, name, value)
    __swig_getmethods__ = {}
    for _s in [PermutationObjective]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ReproduceDistancesObjective, name)
    __repr__ = _swig_repr
    __swig_setmethods__["dis_weight_factor"] = _swigfaiss_avx2.ReproduceDistancesObjective_dis_weight_factor_set
    __swig_getmethods__["dis_weight_factor"] = _swigfaiss_avx2.ReproduceDistancesObjective_dis_weight_factor_get
    if _newclass:
        dis_weight_factor = _swig_property(_swigfaiss_avx2.ReproduceDistancesObjective_dis_weight_factor_get, _swigfaiss_avx2.ReproduceDistancesObjective_dis_weight_factor_set)
    if _newclass:
        sqr = staticmethod(_swigfaiss_avx2.ReproduceDistancesObjective_sqr)
    else:
        sqr = _swigfaiss_avx2.ReproduceDistancesObjective_sqr

    def dis_weight(self, x):
        return _swigfaiss_avx2.ReproduceDistancesObjective_dis_weight(self, x)
    __swig_setmethods__["source_dis"] = _swigfaiss_avx2.ReproduceDistancesObjective_source_dis_set
    __swig_getmethods__["source_dis"] = _swigfaiss_avx2.ReproduceDistancesObjective_source_dis_get
    if _newclass:
        source_dis = _swig_property(_swigfaiss_avx2.ReproduceDistancesObjective_source_dis_get, _swigfaiss_avx2.ReproduceDistancesObjective_source_dis_set)
    __swig_setmethods__["target_dis"] = _swigfaiss_avx2.ReproduceDistancesObjective_target_dis_set
    __swig_getmethods__["target_dis"] = _swigfaiss_avx2.ReproduceDistancesObjective_target_dis_get
    if _newclass:
        target_dis = _swig_property(_swigfaiss_avx2.ReproduceDistancesObjective_target_dis_get, _swigfaiss_avx2.ReproduceDistancesObjective_target_dis_set)
    __swig_setmethods__["weights"] = _swigfaiss_avx2.ReproduceDistancesObjective_weights_set
    __swig_getmethods__["weights"] = _swigfaiss_avx2.ReproduceDistancesObjective_weights_get
    if _newclass:
        weights = _swig_property(_swigfaiss_avx2.ReproduceDistancesObjective_weights_get, _swigfaiss_avx2.ReproduceDistancesObjective_weights_set)

    def get_source_dis(self, i, j):
        return _swigfaiss_avx2.ReproduceDistancesObjective_get_source_dis(self, i, j)

    def compute_cost(self, perm):
        return _swigfaiss_avx2.ReproduceDistancesObjective_compute_cost(self, perm)

    def cost_update(self, perm, iw, jw):
        return _swigfaiss_avx2.ReproduceDistancesObjective_cost_update(self, perm, iw, jw)

    def __init__(self, n, source_dis_in, target_dis_in, dis_weight_factor):
        this = _swigfaiss_avx2.new_ReproduceDistancesObjective(n, source_dis_in, target_dis_in, dis_weight_factor)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    if _newclass:
        compute_mean_stdev = staticmethod(_swigfaiss_avx2.ReproduceDistancesObjective_compute_mean_stdev)
    else:
        compute_mean_stdev = _swigfaiss_avx2.ReproduceDistancesObjective_compute_mean_stdev

    def set_affine_target_dis(self, source_dis_in):
        return _swigfaiss_avx2.ReproduceDistancesObjective_set_affine_target_dis(self, source_dis_in)
    __swig_destroy__ = _swigfaiss_avx2.delete_ReproduceDistancesObjective
    __del__ = lambda self: None
ReproduceDistancesObjective_swigregister = _swigfaiss_avx2.ReproduceDistancesObjective_swigregister
ReproduceDistancesObjective_swigregister(ReproduceDistancesObjective)

def ReproduceDistancesObjective_sqr(x):
    return _swigfaiss_avx2.ReproduceDistancesObjective_sqr(x)
ReproduceDistancesObjective_sqr = _swigfaiss_avx2.ReproduceDistancesObjective_sqr

def ReproduceDistancesObjective_compute_mean_stdev(tab, n2, mean_out, stddev_out):
    return _swigfaiss_avx2.ReproduceDistancesObjective_compute_mean_stdev(tab, n2, mean_out, stddev_out)
ReproduceDistancesObjective_compute_mean_stdev = _swigfaiss_avx2.ReproduceDistancesObjective_compute_mean_stdev

class SimulatedAnnealingOptimizer(SimulatedAnnealingParameters):
    __swig_setmethods__ = {}
    for _s in [SimulatedAnnealingParameters]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SimulatedAnnealingOptimizer, name, value)
    __swig_getmethods__ = {}
    for _s in [SimulatedAnnealingParameters]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SimulatedAnnealingOptimizer, name)
    __repr__ = _swig_repr
    __swig_setmethods__["obj"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_obj_set
    __swig_getmethods__["obj"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_obj_get
    if _newclass:
        obj = _swig_property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_obj_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_obj_set)
    __swig_setmethods__["n"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_n_set
    __swig_getmethods__["n"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_n_get
    if _newclass:
        n = _swig_property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_n_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_n_set)
    __swig_setmethods__["logfile"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_logfile_set
    __swig_getmethods__["logfile"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_logfile_get
    if _newclass:
        logfile = _swig_property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_logfile_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_logfile_set)

    def __init__(self, obj, p):
        this = _swigfaiss_avx2.new_SimulatedAnnealingOptimizer(obj, p)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["rnd"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_rnd_set
    __swig_getmethods__["rnd"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_rnd_get
    if _newclass:
        rnd = _swig_property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_rnd_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_rnd_set)
    __swig_setmethods__["init_cost"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_init_cost_set
    __swig_getmethods__["init_cost"] = _swigfaiss_avx2.SimulatedAnnealingOptimizer_init_cost_get
    if _newclass:
        init_cost = _swig_property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_init_cost_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_init_cost_set)

    def optimize(self, perm):
        return _swigfaiss_avx2.SimulatedAnnealingOptimizer_optimize(self, perm)

    def run_optimization(self, best_perm):
        return _swigfaiss_avx2.SimulatedAnnealingOptimizer_run_optimization(self, best_perm)
    __swig_destroy__ = _swigfaiss_avx2.delete_SimulatedAnnealingOptimizer
    __del__ = lambda self: None
SimulatedAnnealingOptimizer_swigregister = _swigfaiss_avx2.SimulatedAnnealingOptimizer_swigregister
SimulatedAnnealingOptimizer_swigregister(SimulatedAnnealingOptimizer)

class PolysemousTraining(SimulatedAnnealingParameters):
    __swig_setmethods__ = {}
    for _s in [SimulatedAnnealingParameters]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PolysemousTraining, name, value)
    __swig_getmethods__ = {}
    for _s in [SimulatedAnnealingParameters]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, PolysemousTraining, name)
    __repr__ = _swig_repr
    OT_None = _swigfaiss_avx2.PolysemousTraining_OT_None
    OT_ReproduceDistances_affine = _swigfaiss_avx2.PolysemousTraining_OT_ReproduceDistances_affine
    OT_Ranking_weighted_diff = _swigfaiss_avx2.PolysemousTraining_OT_Ranking_weighted_diff
    __swig_setmethods__["optimization_type"] = _swigfaiss_avx2.PolysemousTraining_optimization_type_set
    __swig_getmethods__["optimization_type"] = _swigfaiss_avx2.PolysemousTraining_optimization_type_get
    if _newclass:
        optimization_type = _swig_property(_swigfaiss_avx2.PolysemousTraining_optimization_type_get, _swigfaiss_avx2.PolysemousTraining_optimization_type_set)
    __swig_setmethods__["ntrain_permutation"] = _swigfaiss_avx2.PolysemousTraining_ntrain_permutation_set
    __swig_getmethods__["ntrain_permutation"] = _swigfaiss_avx2.PolysemousTraining_ntrain_permutation_get
    if _newclass:
        ntrain_permutation = _swig_property(_swigfaiss_avx2.PolysemousTraining_ntrain_permutation_get, _swigfaiss_avx2.PolysemousTraining_ntrain_permutation_set)
    __swig_setmethods__["dis_weight_factor"] = _swigfaiss_avx2.PolysemousTraining_dis_weight_factor_set
    __swig_getmethods__["dis_weight_factor"] = _swigfaiss_avx2.PolysemousTraining_dis_weight_factor_get
    if _newclass:
        dis_weight_factor = _swig_property(_swigfaiss_avx2.PolysemousTraining_dis_weight_factor_get, _swigfaiss_avx2.PolysemousTraining_dis_weight_factor_set)
    __swig_setmethods__["log_pattern"] = _swigfaiss_avx2.PolysemousTraining_log_pattern_set
    __swig_getmethods__["log_pattern"] = _swigfaiss_avx2.PolysemousTraining_log_pattern_get
    if _newclass:
        log_pattern = _swig_property(_swigfaiss_avx2.PolysemousTraining_log_pattern_get, _swigfaiss_avx2.PolysemousTraining_log_pattern_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_PolysemousTraining()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def optimize_pq_for_hamming(self, pq, n, x):
        return _swigfaiss_avx2.PolysemousTraining_optimize_pq_for_hamming(self, pq, n, x)

    def optimize_ranking(self, pq, n, x):
        return _swigfaiss_avx2.PolysemousTraining_optimize_ranking(self, pq, n, x)

    def optimize_reproduce_distances(self, pq):
        return _swigfaiss_avx2.PolysemousTraining_optimize_reproduce_distances(self, pq)
    __swig_destroy__ = _swigfaiss_avx2.delete_PolysemousTraining
    __del__ = lambda self: None
PolysemousTraining_swigregister = _swigfaiss_avx2.PolysemousTraining_swigregister
PolysemousTraining_swigregister(PolysemousTraining)

class IndexPQ(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexPQ, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexPQ, name)
    __repr__ = _swig_repr
    __swig_setmethods__["pq"] = _swigfaiss_avx2.IndexPQ_pq_set
    __swig_getmethods__["pq"] = _swigfaiss_avx2.IndexPQ_pq_get
    if _newclass:
        pq = _swig_property(_swigfaiss_avx2.IndexPQ_pq_get, _swigfaiss_avx2.IndexPQ_pq_set)
    __swig_setmethods__["codes"] = _swigfaiss_avx2.IndexPQ_codes_set
    __swig_getmethods__["codes"] = _swigfaiss_avx2.IndexPQ_codes_get
    if _newclass:
        codes = _swig_property(_swigfaiss_avx2.IndexPQ_codes_get, _swigfaiss_avx2.IndexPQ_codes_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexPQ(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.IndexPQ_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexPQ_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexPQ_search(self, n, x, k, distances, labels)

    def reset(self):
        return _swigfaiss_avx2.IndexPQ_reset(self)

    def reconstruct_n(self, i0, ni, recons):
        return _swigfaiss_avx2.IndexPQ_reconstruct_n(self, i0, ni, recons)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexPQ_reconstruct(self, key, recons)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexPQ_remove_ids(self, sel)

    def sa_code_size(self):
        return _swigfaiss_avx2.IndexPQ_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.IndexPQ_sa_encode(self, n, x, bytes)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexPQ_sa_decode(self, n, bytes, x)

    def get_distance_computer(self):
        return _swigfaiss_avx2.IndexPQ_get_distance_computer(self)
    __swig_setmethods__["do_polysemous_training"] = _swigfaiss_avx2.IndexPQ_do_polysemous_training_set
    __swig_getmethods__["do_polysemous_training"] = _swigfaiss_avx2.IndexPQ_do_polysemous_training_get
    if _newclass:
        do_polysemous_training = _swig_property(_swigfaiss_avx2.IndexPQ_do_polysemous_training_get, _swigfaiss_avx2.IndexPQ_do_polysemous_training_set)
    __swig_setmethods__["polysemous_training"] = _swigfaiss_avx2.IndexPQ_polysemous_training_set
    __swig_getmethods__["polysemous_training"] = _swigfaiss_avx2.IndexPQ_polysemous_training_get
    if _newclass:
        polysemous_training = _swig_property(_swigfaiss_avx2.IndexPQ_polysemous_training_get, _swigfaiss_avx2.IndexPQ_polysemous_training_set)
    ST_PQ = _swigfaiss_avx2.IndexPQ_ST_PQ
    ST_HE = _swigfaiss_avx2.IndexPQ_ST_HE
    ST_generalized_HE = _swigfaiss_avx2.IndexPQ_ST_generalized_HE
    ST_SDC = _swigfaiss_avx2.IndexPQ_ST_SDC
    ST_polysemous = _swigfaiss_avx2.IndexPQ_ST_polysemous
    ST_polysemous_generalize = _swigfaiss_avx2.IndexPQ_ST_polysemous_generalize
    __swig_setmethods__["search_type"] = _swigfaiss_avx2.IndexPQ_search_type_set
    __swig_getmethods__["search_type"] = _swigfaiss_avx2.IndexPQ_search_type_get
    if _newclass:
        search_type = _swig_property(_swigfaiss_avx2.IndexPQ_search_type_get, _swigfaiss_avx2.IndexPQ_search_type_set)
    __swig_setmethods__["encode_signs"] = _swigfaiss_avx2.IndexPQ_encode_signs_set
    __swig_getmethods__["encode_signs"] = _swigfaiss_avx2.IndexPQ_encode_signs_get
    if _newclass:
        encode_signs = _swig_property(_swigfaiss_avx2.IndexPQ_encode_signs_get, _swigfaiss_avx2.IndexPQ_encode_signs_set)
    __swig_setmethods__["polysemous_ht"] = _swigfaiss_avx2.IndexPQ_polysemous_ht_set
    __swig_getmethods__["polysemous_ht"] = _swigfaiss_avx2.IndexPQ_polysemous_ht_get
    if _newclass:
        polysemous_ht = _swig_property(_swigfaiss_avx2.IndexPQ_polysemous_ht_get, _swigfaiss_avx2.IndexPQ_polysemous_ht_set)

    def search_core_polysemous(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexPQ_search_core_polysemous(self, n, x, k, distances, labels)

    def hamming_distance_histogram(self, n, x, nb, xb, dist_histogram):
        return _swigfaiss_avx2.IndexPQ_hamming_distance_histogram(self, n, x, nb, xb, dist_histogram)

    def hamming_distance_table(self, n, x, dis):
        return _swigfaiss_avx2.IndexPQ_hamming_distance_table(self, n, x, dis)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexPQ
    __del__ = lambda self: None
IndexPQ_swigregister = _swigfaiss_avx2.IndexPQ_swigregister
IndexPQ_swigregister(IndexPQ)

class IndexPQStats(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexPQStats, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IndexPQStats, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nq"] = _swigfaiss_avx2.IndexPQStats_nq_set
    __swig_getmethods__["nq"] = _swigfaiss_avx2.IndexPQStats_nq_get
    if _newclass:
        nq = _swig_property(_swigfaiss_avx2.IndexPQStats_nq_get, _swigfaiss_avx2.IndexPQStats_nq_set)
    __swig_setmethods__["ncode"] = _swigfaiss_avx2.IndexPQStats_ncode_set
    __swig_getmethods__["ncode"] = _swigfaiss_avx2.IndexPQStats_ncode_get
    if _newclass:
        ncode = _swig_property(_swigfaiss_avx2.IndexPQStats_ncode_get, _swigfaiss_avx2.IndexPQStats_ncode_set)
    __swig_setmethods__["n_hamming_pass"] = _swigfaiss_avx2.IndexPQStats_n_hamming_pass_set
    __swig_getmethods__["n_hamming_pass"] = _swigfaiss_avx2.IndexPQStats_n_hamming_pass_get
    if _newclass:
        n_hamming_pass = _swig_property(_swigfaiss_avx2.IndexPQStats_n_hamming_pass_get, _swigfaiss_avx2.IndexPQStats_n_hamming_pass_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_IndexPQStats()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def reset(self):
        return _swigfaiss_avx2.IndexPQStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexPQStats
    __del__ = lambda self: None
IndexPQStats_swigregister = _swigfaiss_avx2.IndexPQStats_swigregister
IndexPQStats_swigregister(IndexPQStats)

class MultiIndexQuantizer(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MultiIndexQuantizer, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MultiIndexQuantizer, name)
    __repr__ = _swig_repr
    __swig_setmethods__["pq"] = _swigfaiss_avx2.MultiIndexQuantizer_pq_set
    __swig_getmethods__["pq"] = _swigfaiss_avx2.MultiIndexQuantizer_pq_get
    if _newclass:
        pq = _swig_property(_swigfaiss_avx2.MultiIndexQuantizer_pq_get, _swigfaiss_avx2.MultiIndexQuantizer_pq_set)

    def train(self, n, x):
        return _swigfaiss_avx2.MultiIndexQuantizer_train(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.MultiIndexQuantizer_search(self, n, x, k, distances, labels)

    def add(self, n, x):
        return _swigfaiss_avx2.MultiIndexQuantizer_add(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.MultiIndexQuantizer_reset(self)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_MultiIndexQuantizer(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.MultiIndexQuantizer_reconstruct(self, key, recons)
    __swig_destroy__ = _swigfaiss_avx2.delete_MultiIndexQuantizer
    __del__ = lambda self: None
MultiIndexQuantizer_swigregister = _swigfaiss_avx2.MultiIndexQuantizer_swigregister
MultiIndexQuantizer_swigregister(MultiIndexQuantizer)

class MultiIndexQuantizer2(MultiIndexQuantizer):
    __swig_setmethods__ = {}
    for _s in [MultiIndexQuantizer]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MultiIndexQuantizer2, name, value)
    __swig_getmethods__ = {}
    for _s in [MultiIndexQuantizer]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MultiIndexQuantizer2, name)
    __repr__ = _swig_repr
    __swig_setmethods__["assign_indexes"] = _swigfaiss_avx2.MultiIndexQuantizer2_assign_indexes_set
    __swig_getmethods__["assign_indexes"] = _swigfaiss_avx2.MultiIndexQuantizer2_assign_indexes_get
    if _newclass:
        assign_indexes = _swig_property(_swigfaiss_avx2.MultiIndexQuantizer2_assign_indexes_get, _swigfaiss_avx2.MultiIndexQuantizer2_assign_indexes_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.MultiIndexQuantizer2_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.MultiIndexQuantizer2_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.MultiIndexQuantizer2_own_fields_get, _swigfaiss_avx2.MultiIndexQuantizer2_own_fields_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_MultiIndexQuantizer2(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.MultiIndexQuantizer2_train(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.MultiIndexQuantizer2_search(self, n, x, k, distances, labels)
    __swig_destroy__ = _swigfaiss_avx2.delete_MultiIndexQuantizer2
    __del__ = lambda self: None
MultiIndexQuantizer2_swigregister = _swigfaiss_avx2.MultiIndexQuantizer2_swigregister
MultiIndexQuantizer2_swigregister(MultiIndexQuantizer2)

class InvertedLists(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, InvertedLists, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, InvertedLists, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["nlist"] = _swigfaiss_avx2.InvertedLists_nlist_set
    __swig_getmethods__["nlist"] = _swigfaiss_avx2.InvertedLists_nlist_get
    if _newclass:
        nlist = _swig_property(_swigfaiss_avx2.InvertedLists_nlist_get, _swigfaiss_avx2.InvertedLists_nlist_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.InvertedLists_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.InvertedLists_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.InvertedLists_code_size_get, _swigfaiss_avx2.InvertedLists_code_size_set)

    def list_size(self, list_no):
        return _swigfaiss_avx2.InvertedLists_list_size(self, list_no)

    def get_codes(self, list_no):
        return _swigfaiss_avx2.InvertedLists_get_codes(self, list_no)

    def get_ids(self, list_no):
        return _swigfaiss_avx2.InvertedLists_get_ids(self, list_no)

    def release_codes(self, list_no, codes):
        return _swigfaiss_avx2.InvertedLists_release_codes(self, list_no, codes)

    def release_ids(self, list_no, ids):
        return _swigfaiss_avx2.InvertedLists_release_ids(self, list_no, ids)

    def get_single_id(self, list_no, offset):
        return _swigfaiss_avx2.InvertedLists_get_single_id(self, list_no, offset)

    def get_single_code(self, list_no, offset):
        return _swigfaiss_avx2.InvertedLists_get_single_code(self, list_no, offset)

    def prefetch_lists(self, list_nos, nlist):
        return _swigfaiss_avx2.InvertedLists_prefetch_lists(self, list_nos, nlist)

    def add_entry(self, list_no, theid, code):
        return _swigfaiss_avx2.InvertedLists_add_entry(self, list_no, theid, code)

    def add_entries(self, list_no, n_entry, ids, code):
        return _swigfaiss_avx2.InvertedLists_add_entries(self, list_no, n_entry, ids, code)

    def update_entry(self, list_no, offset, id, code):
        return _swigfaiss_avx2.InvertedLists_update_entry(self, list_no, offset, id, code)

    def update_entries(self, list_no, offset, n_entry, ids, code):
        return _swigfaiss_avx2.InvertedLists_update_entries(self, list_no, offset, n_entry, ids, code)

    def resize(self, list_no, new_size):
        return _swigfaiss_avx2.InvertedLists_resize(self, list_no, new_size)

    def reset(self):
        return _swigfaiss_avx2.InvertedLists_reset(self)

    def merge_from(self, oivf, add_id):
        return _swigfaiss_avx2.InvertedLists_merge_from(self, oivf, add_id)
    __swig_destroy__ = _swigfaiss_avx2.delete_InvertedLists
    __del__ = lambda self: None

    def imbalance_factor(self):
        return _swigfaiss_avx2.InvertedLists_imbalance_factor(self)

    def print_stats(self):
        return _swigfaiss_avx2.InvertedLists_print_stats(self)

    def compute_ntotal(self):
        return _swigfaiss_avx2.InvertedLists_compute_ntotal(self)
InvertedLists_swigregister = _swigfaiss_avx2.InvertedLists_swigregister
InvertedLists_swigregister(InvertedLists)

class ArrayInvertedLists(InvertedLists):
    __swig_setmethods__ = {}
    for _s in [InvertedLists]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ArrayInvertedLists, name, value)
    __swig_getmethods__ = {}
    for _s in [InvertedLists]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ArrayInvertedLists, name)
    __repr__ = _swig_repr
    __swig_setmethods__["codes"] = _swigfaiss_avx2.ArrayInvertedLists_codes_set
    __swig_getmethods__["codes"] = _swigfaiss_avx2.ArrayInvertedLists_codes_get
    if _newclass:
        codes = _swig_property(_swigfaiss_avx2.ArrayInvertedLists_codes_get, _swigfaiss_avx2.ArrayInvertedLists_codes_set)
    __swig_setmethods__["ids"] = _swigfaiss_avx2.ArrayInvertedLists_ids_set
    __swig_getmethods__["ids"] = _swigfaiss_avx2.ArrayInvertedLists_ids_get
    if _newclass:
        ids = _swig_property(_swigfaiss_avx2.ArrayInvertedLists_ids_get, _swigfaiss_avx2.ArrayInvertedLists_ids_set)

    def __init__(self, nlist, code_size):
        this = _swigfaiss_avx2.new_ArrayInvertedLists(nlist, code_size)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def list_size(self, list_no):
        return _swigfaiss_avx2.ArrayInvertedLists_list_size(self, list_no)

    def get_codes(self, list_no):
        return _swigfaiss_avx2.ArrayInvertedLists_get_codes(self, list_no)

    def get_ids(self, list_no):
        return _swigfaiss_avx2.ArrayInvertedLists_get_ids(self, list_no)

    def add_entries(self, list_no, n_entry, ids, code):
        return _swigfaiss_avx2.ArrayInvertedLists_add_entries(self, list_no, n_entry, ids, code)

    def update_entries(self, list_no, offset, n_entry, ids, code):
        return _swigfaiss_avx2.ArrayInvertedLists_update_entries(self, list_no, offset, n_entry, ids, code)

    def resize(self, list_no, new_size):
        return _swigfaiss_avx2.ArrayInvertedLists_resize(self, list_no, new_size)
    __swig_destroy__ = _swigfaiss_avx2.delete_ArrayInvertedLists
    __del__ = lambda self: None
ArrayInvertedLists_swigregister = _swigfaiss_avx2.ArrayInvertedLists_swigregister
ArrayInvertedLists_swigregister(ArrayInvertedLists)

class ReadOnlyInvertedLists(InvertedLists):
    __swig_setmethods__ = {}
    for _s in [InvertedLists]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ReadOnlyInvertedLists, name, value)
    __swig_getmethods__ = {}
    for _s in [InvertedLists]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ReadOnlyInvertedLists, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def add_entries(self, list_no, n_entry, ids, code):
        return _swigfaiss_avx2.ReadOnlyInvertedLists_add_entries(self, list_no, n_entry, ids, code)

    def update_entries(self, list_no, offset, n_entry, ids, code):
        return _swigfaiss_avx2.ReadOnlyInvertedLists_update_entries(self, list_no, offset, n_entry, ids, code)

    def resize(self, list_no, new_size):
        return _swigfaiss_avx2.ReadOnlyInvertedLists_resize(self, list_no, new_size)
    __swig_destroy__ = _swigfaiss_avx2.delete_ReadOnlyInvertedLists
    __del__ = lambda self: None
ReadOnlyInvertedLists_swigregister = _swigfaiss_avx2.ReadOnlyInvertedLists_swigregister
ReadOnlyInvertedLists_swigregister(ReadOnlyInvertedLists)

class HStackInvertedLists(ReadOnlyInvertedLists):
    __swig_setmethods__ = {}
    for _s in [ReadOnlyInvertedLists]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, HStackInvertedLists, name, value)
    __swig_getmethods__ = {}
    for _s in [ReadOnlyInvertedLists]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, HStackInvertedLists, name)
    __repr__ = _swig_repr
    __swig_setmethods__["ils"] = _swigfaiss_avx2.HStackInvertedLists_ils_set
    __swig_getmethods__["ils"] = _swigfaiss_avx2.HStackInvertedLists_ils_get
    if _newclass:
        ils = _swig_property(_swigfaiss_avx2.HStackInvertedLists_ils_get, _swigfaiss_avx2.HStackInvertedLists_ils_set)

    def __init__(self, nil, ils):
        this = _swigfaiss_avx2.new_HStackInvertedLists(nil, ils)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def list_size(self, list_no):
        return _swigfaiss_avx2.HStackInvertedLists_list_size(self, list_no)

    def get_codes(self, list_no):
        return _swigfaiss_avx2.HStackInvertedLists_get_codes(self, list_no)

    def get_ids(self, list_no):
        return _swigfaiss_avx2.HStackInvertedLists_get_ids(self, list_no)

    def prefetch_lists(self, list_nos, nlist):
        return _swigfaiss_avx2.HStackInvertedLists_prefetch_lists(self, list_nos, nlist)

    def release_codes(self, list_no, codes):
        return _swigfaiss_avx2.HStackInvertedLists_release_codes(self, list_no, codes)

    def release_ids(self, list_no, ids):
        return _swigfaiss_avx2.HStackInvertedLists_release_ids(self, list_no, ids)

    def get_single_id(self, list_no, offset):
        return _swigfaiss_avx2.HStackInvertedLists_get_single_id(self, list_no, offset)

    def get_single_code(self, list_no, offset):
        return _swigfaiss_avx2.HStackInvertedLists_get_single_code(self, list_no, offset)
    __swig_destroy__ = _swigfaiss_avx2.delete_HStackInvertedLists
    __del__ = lambda self: None
HStackInvertedLists_swigregister = _swigfaiss_avx2.HStackInvertedLists_swigregister
HStackInvertedLists_swigregister(HStackInvertedLists)

class SliceInvertedLists(ReadOnlyInvertedLists):
    __swig_setmethods__ = {}
    for _s in [ReadOnlyInvertedLists]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, SliceInvertedLists, name, value)
    __swig_getmethods__ = {}
    for _s in [ReadOnlyInvertedLists]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, SliceInvertedLists, name)
    __repr__ = _swig_repr
    __swig_setmethods__["il"] = _swigfaiss_avx2.SliceInvertedLists_il_set
    __swig_getmethods__["il"] = _swigfaiss_avx2.SliceInvertedLists_il_get
    if _newclass:
        il = _swig_property(_swigfaiss_avx2.SliceInvertedLists_il_get, _swigfaiss_avx2.SliceInvertedLists_il_set)
    __swig_setmethods__["i0"] = _swigfaiss_avx2.SliceInvertedLists_i0_set
    __swig_getmethods__["i0"] = _swigfaiss_avx2.SliceInvertedLists_i0_get
    if _newclass:
        i0 = _swig_property(_swigfaiss_avx2.SliceInvertedLists_i0_get, _swigfaiss_avx2.SliceInvertedLists_i0_set)
    __swig_setmethods__["i1"] = _swigfaiss_avx2.SliceInvertedLists_i1_set
    __swig_getmethods__["i1"] = _swigfaiss_avx2.SliceInvertedLists_i1_get
    if _newclass:
        i1 = _swig_property(_swigfaiss_avx2.SliceInvertedLists_i1_get, _swigfaiss_avx2.SliceInvertedLists_i1_set)

    def __init__(self, il, i0, i1):
        this = _swigfaiss_avx2.new_SliceInvertedLists(il, i0, i1)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def list_size(self, list_no):
        return _swigfaiss_avx2.SliceInvertedLists_list_size(self, list_no)

    def get_codes(self, list_no):
        return _swigfaiss_avx2.SliceInvertedLists_get_codes(self, list_no)

    def get_ids(self, list_no):
        return _swigfaiss_avx2.SliceInvertedLists_get_ids(self, list_no)

    def release_codes(self, list_no, codes):
        return _swigfaiss_avx2.SliceInvertedLists_release_codes(self, list_no, codes)

    def release_ids(self, list_no, ids):
        return _swigfaiss_avx2.SliceInvertedLists_release_ids(self, list_no, ids)

    def get_single_id(self, list_no, offset):
        return _swigfaiss_avx2.SliceInvertedLists_get_single_id(self, list_no, offset)

    def get_single_code(self, list_no, offset):
        return _swigfaiss_avx2.SliceInvertedLists_get_single_code(self, list_no, offset)

    def prefetch_lists(self, list_nos, nlist):
        return _swigfaiss_avx2.SliceInvertedLists_prefetch_lists(self, list_nos, nlist)
    __swig_destroy__ = _swigfaiss_avx2.delete_SliceInvertedLists
    __del__ = lambda self: None
SliceInvertedLists_swigregister = _swigfaiss_avx2.SliceInvertedLists_swigregister
SliceInvertedLists_swigregister(SliceInvertedLists)

class VStackInvertedLists(ReadOnlyInvertedLists):
    __swig_setmethods__ = {}
    for _s in [ReadOnlyInvertedLists]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, VStackInvertedLists, name, value)
    __swig_getmethods__ = {}
    for _s in [ReadOnlyInvertedLists]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, VStackInvertedLists, name)
    __repr__ = _swig_repr
    __swig_setmethods__["ils"] = _swigfaiss_avx2.VStackInvertedLists_ils_set
    __swig_getmethods__["ils"] = _swigfaiss_avx2.VStackInvertedLists_ils_get
    if _newclass:
        ils = _swig_property(_swigfaiss_avx2.VStackInvertedLists_ils_get, _swigfaiss_avx2.VStackInvertedLists_ils_set)
    __swig_setmethods__["cumsz"] = _swigfaiss_avx2.VStackInvertedLists_cumsz_set
    __swig_getmethods__["cumsz"] = _swigfaiss_avx2.VStackInvertedLists_cumsz_get
    if _newclass:
        cumsz = _swig_property(_swigfaiss_avx2.VStackInvertedLists_cumsz_get, _swigfaiss_avx2.VStackInvertedLists_cumsz_set)

    def __init__(self, nil, ils):
        this = _swigfaiss_avx2.new_VStackInvertedLists(nil, ils)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def list_size(self, list_no):
        return _swigfaiss_avx2.VStackInvertedLists_list_size(self, list_no)

    def get_codes(self, list_no):
        return _swigfaiss_avx2.VStackInvertedLists_get_codes(self, list_no)

    def get_ids(self, list_no):
        return _swigfaiss_avx2.VStackInvertedLists_get_ids(self, list_no)

    def release_codes(self, list_no, codes):
        return _swigfaiss_avx2.VStackInvertedLists_release_codes(self, list_no, codes)

    def release_ids(self, list_no, ids):
        return _swigfaiss_avx2.VStackInvertedLists_release_ids(self, list_no, ids)

    def get_single_id(self, list_no, offset):
        return _swigfaiss_avx2.VStackInvertedLists_get_single_id(self, list_no, offset)

    def get_single_code(self, list_no, offset):
        return _swigfaiss_avx2.VStackInvertedLists_get_single_code(self, list_no, offset)

    def prefetch_lists(self, list_nos, nlist):
        return _swigfaiss_avx2.VStackInvertedLists_prefetch_lists(self, list_nos, nlist)
    __swig_destroy__ = _swigfaiss_avx2.delete_VStackInvertedLists
    __del__ = lambda self: None
VStackInvertedLists_swigregister = _swigfaiss_avx2.VStackInvertedLists_swigregister
VStackInvertedLists_swigregister(VStackInvertedLists)

class MaskedInvertedLists(ReadOnlyInvertedLists):
    __swig_setmethods__ = {}
    for _s in [ReadOnlyInvertedLists]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, MaskedInvertedLists, name, value)
    __swig_getmethods__ = {}
    for _s in [ReadOnlyInvertedLists]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, MaskedInvertedLists, name)
    __repr__ = _swig_repr
    __swig_setmethods__["il0"] = _swigfaiss_avx2.MaskedInvertedLists_il0_set
    __swig_getmethods__["il0"] = _swigfaiss_avx2.MaskedInvertedLists_il0_get
    if _newclass:
        il0 = _swig_property(_swigfaiss_avx2.MaskedInvertedLists_il0_get, _swigfaiss_avx2.MaskedInvertedLists_il0_set)
    __swig_setmethods__["il1"] = _swigfaiss_avx2.MaskedInvertedLists_il1_set
    __swig_getmethods__["il1"] = _swigfaiss_avx2.MaskedInvertedLists_il1_get
    if _newclass:
        il1 = _swig_property(_swigfaiss_avx2.MaskedInvertedLists_il1_get, _swigfaiss_avx2.MaskedInvertedLists_il1_set)

    def __init__(self, il0, il1):
        this = _swigfaiss_avx2.new_MaskedInvertedLists(il0, il1)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def list_size(self, list_no):
        return _swigfaiss_avx2.MaskedInvertedLists_list_size(self, list_no)

    def get_codes(self, list_no):
        return _swigfaiss_avx2.MaskedInvertedLists_get_codes(self, list_no)

    def get_ids(self, list_no):
        return _swigfaiss_avx2.MaskedInvertedLists_get_ids(self, list_no)

    def release_codes(self, list_no, codes):
        return _swigfaiss_avx2.MaskedInvertedLists_release_codes(self, list_no, codes)

    def release_ids(self, list_no, ids):
        return _swigfaiss_avx2.MaskedInvertedLists_release_ids(self, list_no, ids)

    def get_single_id(self, list_no, offset):
        return _swigfaiss_avx2.MaskedInvertedLists_get_single_id(self, list_no, offset)

    def get_single_code(self, list_no, offset):
        return _swigfaiss_avx2.MaskedInvertedLists_get_single_code(self, list_no, offset)

    def prefetch_lists(self, list_nos, nlist):
        return _swigfaiss_avx2.MaskedInvertedLists_prefetch_lists(self, list_nos, nlist)
    __swig_destroy__ = _swigfaiss_avx2.delete_MaskedInvertedLists
    __del__ = lambda self: None
MaskedInvertedLists_swigregister = _swigfaiss_avx2.MaskedInvertedLists_swigregister
MaskedInvertedLists_swigregister(MaskedInvertedLists)


def lo_build(list_id, offset):
    return _swigfaiss_avx2.lo_build(list_id, offset)
lo_build = _swigfaiss_avx2.lo_build

def lo_listno(lo):
    return _swigfaiss_avx2.lo_listno(lo)
lo_listno = _swigfaiss_avx2.lo_listno

def lo_offset(lo):
    return _swigfaiss_avx2.lo_offset(lo)
lo_offset = _swigfaiss_avx2.lo_offset
class DirectMap(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, DirectMap, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, DirectMap, name)
    __repr__ = _swig_repr
    NoMap = _swigfaiss_avx2.DirectMap_NoMap
    Array = _swigfaiss_avx2.DirectMap_Array
    Hashtable = _swigfaiss_avx2.DirectMap_Hashtable
    __swig_setmethods__["type"] = _swigfaiss_avx2.DirectMap_type_set
    __swig_getmethods__["type"] = _swigfaiss_avx2.DirectMap_type_get
    if _newclass:
        type = _swig_property(_swigfaiss_avx2.DirectMap_type_get, _swigfaiss_avx2.DirectMap_type_set)
    __swig_setmethods__["array"] = _swigfaiss_avx2.DirectMap_array_set
    __swig_getmethods__["array"] = _swigfaiss_avx2.DirectMap_array_get
    if _newclass:
        array = _swig_property(_swigfaiss_avx2.DirectMap_array_get, _swigfaiss_avx2.DirectMap_array_set)
    __swig_setmethods__["hashtable"] = _swigfaiss_avx2.DirectMap_hashtable_set
    __swig_getmethods__["hashtable"] = _swigfaiss_avx2.DirectMap_hashtable_get
    if _newclass:
        hashtable = _swig_property(_swigfaiss_avx2.DirectMap_hashtable_get, _swigfaiss_avx2.DirectMap_hashtable_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_DirectMap()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def set_type(self, new_type, invlists, ntotal):
        return _swigfaiss_avx2.DirectMap_set_type(self, new_type, invlists, ntotal)

    def get(self, id):
        return _swigfaiss_avx2.DirectMap_get(self, id)

    def no(self):
        return _swigfaiss_avx2.DirectMap_no(self)

    def check_can_add(self, ids):
        return _swigfaiss_avx2.DirectMap_check_can_add(self, ids)

    def add_single_id(self, id, list_no, offset):
        return _swigfaiss_avx2.DirectMap_add_single_id(self, id, list_no, offset)

    def clear(self):
        return _swigfaiss_avx2.DirectMap_clear(self)

    def remove_ids(self, sel, invlists):
        return _swigfaiss_avx2.DirectMap_remove_ids(self, sel, invlists)

    def update_codes(self, invlists, n, ids, list_nos, codes):
        return _swigfaiss_avx2.DirectMap_update_codes(self, invlists, n, ids, list_nos, codes)
    __swig_destroy__ = _swigfaiss_avx2.delete_DirectMap
    __del__ = lambda self: None
DirectMap_swigregister = _swigfaiss_avx2.DirectMap_swigregister
DirectMap_swigregister(DirectMap)

class DirectMapAdd(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, DirectMapAdd, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, DirectMapAdd, name)
    __repr__ = _swig_repr
    __swig_setmethods__["direct_map"] = _swigfaiss_avx2.DirectMapAdd_direct_map_set
    __swig_getmethods__["direct_map"] = _swigfaiss_avx2.DirectMapAdd_direct_map_get
    if _newclass:
        direct_map = _swig_property(_swigfaiss_avx2.DirectMapAdd_direct_map_get, _swigfaiss_avx2.DirectMapAdd_direct_map_set)
    __swig_setmethods__["type"] = _swigfaiss_avx2.DirectMapAdd_type_set
    __swig_getmethods__["type"] = _swigfaiss_avx2.DirectMapAdd_type_get
    if _newclass:
        type = _swig_property(_swigfaiss_avx2.DirectMapAdd_type_get, _swigfaiss_avx2.DirectMapAdd_type_set)
    __swig_setmethods__["ntotal"] = _swigfaiss_avx2.DirectMapAdd_ntotal_set
    __swig_getmethods__["ntotal"] = _swigfaiss_avx2.DirectMapAdd_ntotal_get
    if _newclass:
        ntotal = _swig_property(_swigfaiss_avx2.DirectMapAdd_ntotal_get, _swigfaiss_avx2.DirectMapAdd_ntotal_set)
    __swig_setmethods__["n"] = _swigfaiss_avx2.DirectMapAdd_n_set
    __swig_getmethods__["n"] = _swigfaiss_avx2.DirectMapAdd_n_get
    if _newclass:
        n = _swig_property(_swigfaiss_avx2.DirectMapAdd_n_get, _swigfaiss_avx2.DirectMapAdd_n_set)
    __swig_setmethods__["xids"] = _swigfaiss_avx2.DirectMapAdd_xids_set
    __swig_getmethods__["xids"] = _swigfaiss_avx2.DirectMapAdd_xids_get
    if _newclass:
        xids = _swig_property(_swigfaiss_avx2.DirectMapAdd_xids_get, _swigfaiss_avx2.DirectMapAdd_xids_set)
    __swig_setmethods__["all_ofs"] = _swigfaiss_avx2.DirectMapAdd_all_ofs_set
    __swig_getmethods__["all_ofs"] = _swigfaiss_avx2.DirectMapAdd_all_ofs_get
    if _newclass:
        all_ofs = _swig_property(_swigfaiss_avx2.DirectMapAdd_all_ofs_get, _swigfaiss_avx2.DirectMapAdd_all_ofs_set)

    def __init__(self, direct_map, n, xids):
        this = _swigfaiss_avx2.new_DirectMapAdd(direct_map, n, xids)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def add(self, i, list_no, offset):
        return _swigfaiss_avx2.DirectMapAdd_add(self, i, list_no, offset)
    __swig_destroy__ = _swigfaiss_avx2.delete_DirectMapAdd
    __del__ = lambda self: None
DirectMapAdd_swigregister = _swigfaiss_avx2.DirectMapAdd_swigregister
DirectMapAdd_swigregister(DirectMapAdd)

class Level1Quantizer(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Level1Quantizer, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Level1Quantizer, name)
    __repr__ = _swig_repr
    __swig_setmethods__["quantizer"] = _swigfaiss_avx2.Level1Quantizer_quantizer_set
    __swig_getmethods__["quantizer"] = _swigfaiss_avx2.Level1Quantizer_quantizer_get
    if _newclass:
        quantizer = _swig_property(_swigfaiss_avx2.Level1Quantizer_quantizer_get, _swigfaiss_avx2.Level1Quantizer_quantizer_set)
    __swig_setmethods__["nlist"] = _swigfaiss_avx2.Level1Quantizer_nlist_set
    __swig_getmethods__["nlist"] = _swigfaiss_avx2.Level1Quantizer_nlist_get
    if _newclass:
        nlist = _swig_property(_swigfaiss_avx2.Level1Quantizer_nlist_get, _swigfaiss_avx2.Level1Quantizer_nlist_set)
    __swig_setmethods__["quantizer_trains_alone"] = _swigfaiss_avx2.Level1Quantizer_quantizer_trains_alone_set
    __swig_getmethods__["quantizer_trains_alone"] = _swigfaiss_avx2.Level1Quantizer_quantizer_trains_alone_get
    if _newclass:
        quantizer_trains_alone = _swig_property(_swigfaiss_avx2.Level1Quantizer_quantizer_trains_alone_get, _swigfaiss_avx2.Level1Quantizer_quantizer_trains_alone_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.Level1Quantizer_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.Level1Quantizer_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.Level1Quantizer_own_fields_get, _swigfaiss_avx2.Level1Quantizer_own_fields_set)
    __swig_setmethods__["cp"] = _swigfaiss_avx2.Level1Quantizer_cp_set
    __swig_getmethods__["cp"] = _swigfaiss_avx2.Level1Quantizer_cp_get
    if _newclass:
        cp = _swig_property(_swigfaiss_avx2.Level1Quantizer_cp_get, _swigfaiss_avx2.Level1Quantizer_cp_set)
    __swig_setmethods__["clustering_index"] = _swigfaiss_avx2.Level1Quantizer_clustering_index_set
    __swig_getmethods__["clustering_index"] = _swigfaiss_avx2.Level1Quantizer_clustering_index_get
    if _newclass:
        clustering_index = _swig_property(_swigfaiss_avx2.Level1Quantizer_clustering_index_get, _swigfaiss_avx2.Level1Quantizer_clustering_index_set)

    def train_q1(self, n, x, verbose, metric_type):
        return _swigfaiss_avx2.Level1Quantizer_train_q1(self, n, x, verbose, metric_type)

    def coarse_code_size(self):
        return _swigfaiss_avx2.Level1Quantizer_coarse_code_size(self)

    def encode_listno(self, list_no, code):
        return _swigfaiss_avx2.Level1Quantizer_encode_listno(self, list_no, code)

    def decode_listno(self, code):
        return _swigfaiss_avx2.Level1Quantizer_decode_listno(self, code)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_Level1Quantizer(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_Level1Quantizer
    __del__ = lambda self: None
Level1Quantizer_swigregister = _swigfaiss_avx2.Level1Quantizer_swigregister
Level1Quantizer_swigregister(Level1Quantizer)

class IVFSearchParameters(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IVFSearchParameters, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IVFSearchParameters, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nprobe"] = _swigfaiss_avx2.IVFSearchParameters_nprobe_set
    __swig_getmethods__["nprobe"] = _swigfaiss_avx2.IVFSearchParameters_nprobe_get
    if _newclass:
        nprobe = _swig_property(_swigfaiss_avx2.IVFSearchParameters_nprobe_get, _swigfaiss_avx2.IVFSearchParameters_nprobe_set)
    __swig_setmethods__["max_codes"] = _swigfaiss_avx2.IVFSearchParameters_max_codes_set
    __swig_getmethods__["max_codes"] = _swigfaiss_avx2.IVFSearchParameters_max_codes_get
    if _newclass:
        max_codes = _swig_property(_swigfaiss_avx2.IVFSearchParameters_max_codes_get, _swigfaiss_avx2.IVFSearchParameters_max_codes_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_IVFSearchParameters
    __del__ = lambda self: None

    def __init__(self):
        this = _swigfaiss_avx2.new_IVFSearchParameters()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
IVFSearchParameters_swigregister = _swigfaiss_avx2.IVFSearchParameters_swigregister
IVFSearchParameters_swigregister(IVFSearchParameters)

class IndexIVF(Index, Level1Quantizer):
    __swig_setmethods__ = {}
    for _s in [Index, Level1Quantizer]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVF, name, value)
    __swig_getmethods__ = {}
    for _s in [Index, Level1Quantizer]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVF, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["invlists"] = _swigfaiss_avx2.IndexIVF_invlists_set
    __swig_getmethods__["invlists"] = _swigfaiss_avx2.IndexIVF_invlists_get
    if _newclass:
        invlists = _swig_property(_swigfaiss_avx2.IndexIVF_invlists_get, _swigfaiss_avx2.IndexIVF_invlists_set)
    __swig_setmethods__["own_invlists"] = _swigfaiss_avx2.IndexIVF_own_invlists_set
    __swig_getmethods__["own_invlists"] = _swigfaiss_avx2.IndexIVF_own_invlists_get
    if _newclass:
        own_invlists = _swig_property(_swigfaiss_avx2.IndexIVF_own_invlists_get, _swigfaiss_avx2.IndexIVF_own_invlists_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.IndexIVF_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.IndexIVF_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.IndexIVF_code_size_get, _swigfaiss_avx2.IndexIVF_code_size_set)
    __swig_setmethods__["nprobe"] = _swigfaiss_avx2.IndexIVF_nprobe_set
    __swig_getmethods__["nprobe"] = _swigfaiss_avx2.IndexIVF_nprobe_get
    if _newclass:
        nprobe = _swig_property(_swigfaiss_avx2.IndexIVF_nprobe_get, _swigfaiss_avx2.IndexIVF_nprobe_set)
    __swig_setmethods__["max_codes"] = _swigfaiss_avx2.IndexIVF_max_codes_set
    __swig_getmethods__["max_codes"] = _swigfaiss_avx2.IndexIVF_max_codes_get
    if _newclass:
        max_codes = _swig_property(_swigfaiss_avx2.IndexIVF_max_codes_get, _swigfaiss_avx2.IndexIVF_max_codes_set)
    __swig_setmethods__["parallel_mode"] = _swigfaiss_avx2.IndexIVF_parallel_mode_set
    __swig_getmethods__["parallel_mode"] = _swigfaiss_avx2.IndexIVF_parallel_mode_get
    if _newclass:
        parallel_mode = _swig_property(_swigfaiss_avx2.IndexIVF_parallel_mode_get, _swigfaiss_avx2.IndexIVF_parallel_mode_set)
    __swig_getmethods__["PARALLEL_MODE_NO_HEAP_INIT"] = _swigfaiss_avx2.IndexIVF_PARALLEL_MODE_NO_HEAP_INIT_get
    if _newclass:
        PARALLEL_MODE_NO_HEAP_INIT = _swig_property(_swigfaiss_avx2.IndexIVF_PARALLEL_MODE_NO_HEAP_INIT_get)
    __swig_setmethods__["direct_map"] = _swigfaiss_avx2.IndexIVF_direct_map_set
    __swig_getmethods__["direct_map"] = _swigfaiss_avx2.IndexIVF_direct_map_get
    if _newclass:
        direct_map = _swig_property(_swigfaiss_avx2.IndexIVF_direct_map_get, _swigfaiss_avx2.IndexIVF_direct_map_set)

    def reset(self):
        return _swigfaiss_avx2.IndexIVF_reset(self)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexIVF_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexIVF_add(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexIVF_add_with_ids(self, n, x, xids)

    def encode_vectors(self, n, x, list_nos, codes, include_listno=False):
        return _swigfaiss_avx2.IndexIVF_encode_vectors(self, n, x, list_nos, codes, include_listno)

    def train_residual(self, n, x):
        return _swigfaiss_avx2.IndexIVF_train_residual(self, n, x)

    def search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params=None):
        return _swigfaiss_avx2.IndexIVF_search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexIVF_search(self, n, x, k, distances, labels)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexIVF_range_search(self, n, x, radius, result)

    def range_search_preassigned(self, nx, x, radius, keys, coarse_dis, result):
        return _swigfaiss_avx2.IndexIVF_range_search_preassigned(self, nx, x, radius, keys, coarse_dis, result)

    def get_InvertedListScanner(self, store_pairs=False):
        return _swigfaiss_avx2.IndexIVF_get_InvertedListScanner(self, store_pairs)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexIVF_reconstruct(self, key, recons)

    def update_vectors(self, nv, idx, v):
        return _swigfaiss_avx2.IndexIVF_update_vectors(self, nv, idx, v)

    def reconstruct_n(self, i0, ni, recons):
        return _swigfaiss_avx2.IndexIVF_reconstruct_n(self, i0, ni, recons)

    def search_and_reconstruct(self, n, x, k, distances, labels, recons):
        return _swigfaiss_avx2.IndexIVF_search_and_reconstruct(self, n, x, k, distances, labels, recons)

    def reconstruct_from_offset(self, list_no, offset, recons):
        return _swigfaiss_avx2.IndexIVF_reconstruct_from_offset(self, list_no, offset, recons)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexIVF_remove_ids(self, sel)

    def check_compatible_for_merge(self, other):
        return _swigfaiss_avx2.IndexIVF_check_compatible_for_merge(self, other)

    def merge_from(self, other, add_id):
        return _swigfaiss_avx2.IndexIVF_merge_from(self, other, add_id)

    def copy_subset_to(self, other, subset_type, a1, a2):
        return _swigfaiss_avx2.IndexIVF_copy_subset_to(self, other, subset_type, a1, a2)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVF
    __del__ = lambda self: None

    def get_list_size(self, list_no):
        return _swigfaiss_avx2.IndexIVF_get_list_size(self, list_no)

    def make_direct_map(self, new_maintain_direct_map=True):
        return _swigfaiss_avx2.IndexIVF_make_direct_map(self, new_maintain_direct_map)

    def set_direct_map_type(self, type):
        return _swigfaiss_avx2.IndexIVF_set_direct_map_type(self, type)

    def replace_invlists(self, il, own=False):
        return _swigfaiss_avx2.IndexIVF_replace_invlists(self, il, own)

    def sa_code_size(self):
        return _swigfaiss_avx2.IndexIVF_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.IndexIVF_sa_encode(self, n, x, bytes)
IndexIVF_swigregister = _swigfaiss_avx2.IndexIVF_swigregister
IndexIVF_swigregister(IndexIVF)

class IndexIVFStats(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVFStats, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVFStats, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nq"] = _swigfaiss_avx2.IndexIVFStats_nq_set
    __swig_getmethods__["nq"] = _swigfaiss_avx2.IndexIVFStats_nq_get
    if _newclass:
        nq = _swig_property(_swigfaiss_avx2.IndexIVFStats_nq_get, _swigfaiss_avx2.IndexIVFStats_nq_set)
    __swig_setmethods__["nlist"] = _swigfaiss_avx2.IndexIVFStats_nlist_set
    __swig_getmethods__["nlist"] = _swigfaiss_avx2.IndexIVFStats_nlist_get
    if _newclass:
        nlist = _swig_property(_swigfaiss_avx2.IndexIVFStats_nlist_get, _swigfaiss_avx2.IndexIVFStats_nlist_set)
    __swig_setmethods__["ndis"] = _swigfaiss_avx2.IndexIVFStats_ndis_set
    __swig_getmethods__["ndis"] = _swigfaiss_avx2.IndexIVFStats_ndis_get
    if _newclass:
        ndis = _swig_property(_swigfaiss_avx2.IndexIVFStats_ndis_get, _swigfaiss_avx2.IndexIVFStats_ndis_set)
    __swig_setmethods__["nheap_updates"] = _swigfaiss_avx2.IndexIVFStats_nheap_updates_set
    __swig_getmethods__["nheap_updates"] = _swigfaiss_avx2.IndexIVFStats_nheap_updates_get
    if _newclass:
        nheap_updates = _swig_property(_swigfaiss_avx2.IndexIVFStats_nheap_updates_get, _swigfaiss_avx2.IndexIVFStats_nheap_updates_set)
    __swig_setmethods__["quantization_time"] = _swigfaiss_avx2.IndexIVFStats_quantization_time_set
    __swig_getmethods__["quantization_time"] = _swigfaiss_avx2.IndexIVFStats_quantization_time_get
    if _newclass:
        quantization_time = _swig_property(_swigfaiss_avx2.IndexIVFStats_quantization_time_get, _swigfaiss_avx2.IndexIVFStats_quantization_time_set)
    __swig_setmethods__["search_time"] = _swigfaiss_avx2.IndexIVFStats_search_time_set
    __swig_getmethods__["search_time"] = _swigfaiss_avx2.IndexIVFStats_search_time_get
    if _newclass:
        search_time = _swig_property(_swigfaiss_avx2.IndexIVFStats_search_time_get, _swigfaiss_avx2.IndexIVFStats_search_time_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_IndexIVFStats()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def reset(self):
        return _swigfaiss_avx2.IndexIVFStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFStats
    __del__ = lambda self: None
IndexIVFStats_swigregister = _swigfaiss_avx2.IndexIVFStats_swigregister
IndexIVFStats_swigregister(IndexIVFStats)


def check_compatible_for_merge(index1, index2):
    return _swigfaiss_avx2.check_compatible_for_merge(index1, index2)
check_compatible_for_merge = _swigfaiss_avx2.check_compatible_for_merge

def extract_index_ivf(*args):
    return _swigfaiss_avx2.extract_index_ivf(*args)
extract_index_ivf = _swigfaiss_avx2.extract_index_ivf

def try_extract_index_ivf(*args):
    return _swigfaiss_avx2.try_extract_index_ivf(*args)
try_extract_index_ivf = _swigfaiss_avx2.try_extract_index_ivf

def merge_into(index0, index1, shift_ids):
    return _swigfaiss_avx2.merge_into(index0, index1, shift_ids)
merge_into = _swigfaiss_avx2.merge_into

def search_centroid(index, x, n, centroid_ids):
    return _swigfaiss_avx2.search_centroid(index, x, n, centroid_ids)
search_centroid = _swigfaiss_avx2.search_centroid

def search_and_return_centroids(index, n, xin, k, distances, labels, query_centroid_ids, result_centroid_ids):
    return _swigfaiss_avx2.search_and_return_centroids(index, n, xin, k, distances, labels, query_centroid_ids, result_centroid_ids)
search_and_return_centroids = _swigfaiss_avx2.search_and_return_centroids
class SlidingIndexWindow(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, SlidingIndexWindow, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, SlidingIndexWindow, name)
    __repr__ = _swig_repr
    __swig_setmethods__["index"] = _swigfaiss_avx2.SlidingIndexWindow_index_set
    __swig_getmethods__["index"] = _swigfaiss_avx2.SlidingIndexWindow_index_get
    if _newclass:
        index = _swig_property(_swigfaiss_avx2.SlidingIndexWindow_index_get, _swigfaiss_avx2.SlidingIndexWindow_index_set)
    __swig_setmethods__["ils"] = _swigfaiss_avx2.SlidingIndexWindow_ils_set
    __swig_getmethods__["ils"] = _swigfaiss_avx2.SlidingIndexWindow_ils_get
    if _newclass:
        ils = _swig_property(_swigfaiss_avx2.SlidingIndexWindow_ils_get, _swigfaiss_avx2.SlidingIndexWindow_ils_set)
    __swig_setmethods__["n_slice"] = _swigfaiss_avx2.SlidingIndexWindow_n_slice_set
    __swig_getmethods__["n_slice"] = _swigfaiss_avx2.SlidingIndexWindow_n_slice_get
    if _newclass:
        n_slice = _swig_property(_swigfaiss_avx2.SlidingIndexWindow_n_slice_get, _swigfaiss_avx2.SlidingIndexWindow_n_slice_set)
    __swig_setmethods__["nlist"] = _swigfaiss_avx2.SlidingIndexWindow_nlist_set
    __swig_getmethods__["nlist"] = _swigfaiss_avx2.SlidingIndexWindow_nlist_get
    if _newclass:
        nlist = _swig_property(_swigfaiss_avx2.SlidingIndexWindow_nlist_get, _swigfaiss_avx2.SlidingIndexWindow_nlist_set)
    __swig_setmethods__["sizes"] = _swigfaiss_avx2.SlidingIndexWindow_sizes_set
    __swig_getmethods__["sizes"] = _swigfaiss_avx2.SlidingIndexWindow_sizes_get
    if _newclass:
        sizes = _swig_property(_swigfaiss_avx2.SlidingIndexWindow_sizes_get, _swigfaiss_avx2.SlidingIndexWindow_sizes_set)

    def __init__(self, index):
        this = _swigfaiss_avx2.new_SlidingIndexWindow(index)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def step(self, sub_index, remove_oldest):
        return _swigfaiss_avx2.SlidingIndexWindow_step(self, sub_index, remove_oldest)
    __swig_destroy__ = _swigfaiss_avx2.delete_SlidingIndexWindow
    __del__ = lambda self: None
SlidingIndexWindow_swigregister = _swigfaiss_avx2.SlidingIndexWindow_swigregister
SlidingIndexWindow_swigregister(SlidingIndexWindow)


def get_invlist_range(index, i0, i1):
    return _swigfaiss_avx2.get_invlist_range(index, i0, i1)
get_invlist_range = _swigfaiss_avx2.get_invlist_range

def set_invlist_range(index, i0, i1, src):
    return _swigfaiss_avx2.set_invlist_range(index, i0, i1, src)
set_invlist_range = _swigfaiss_avx2.set_invlist_range

def search_with_parameters(index, n, x, k, distances, labels, params, nb_dis=None):
    return _swigfaiss_avx2.search_with_parameters(index, n, x, k, distances, labels, params, nb_dis)
search_with_parameters = _swigfaiss_avx2.search_with_parameters
class ScalarQuantizer(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ScalarQuantizer, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ScalarQuantizer, name)
    __repr__ = _swig_repr
    QT_8bit = _swigfaiss_avx2.ScalarQuantizer_QT_8bit
    QT_4bit = _swigfaiss_avx2.ScalarQuantizer_QT_4bit
    QT_8bit_uniform = _swigfaiss_avx2.ScalarQuantizer_QT_8bit_uniform
    QT_4bit_uniform = _swigfaiss_avx2.ScalarQuantizer_QT_4bit_uniform
    QT_fp16 = _swigfaiss_avx2.ScalarQuantizer_QT_fp16
    QT_8bit_direct = _swigfaiss_avx2.ScalarQuantizer_QT_8bit_direct
    QT_6bit = _swigfaiss_avx2.ScalarQuantizer_QT_6bit
    __swig_setmethods__["qtype"] = _swigfaiss_avx2.ScalarQuantizer_qtype_set
    __swig_getmethods__["qtype"] = _swigfaiss_avx2.ScalarQuantizer_qtype_get
    if _newclass:
        qtype = _swig_property(_swigfaiss_avx2.ScalarQuantizer_qtype_get, _swigfaiss_avx2.ScalarQuantizer_qtype_set)
    RS_minmax = _swigfaiss_avx2.ScalarQuantizer_RS_minmax
    RS_meanstd = _swigfaiss_avx2.ScalarQuantizer_RS_meanstd
    RS_quantiles = _swigfaiss_avx2.ScalarQuantizer_RS_quantiles
    RS_optim = _swigfaiss_avx2.ScalarQuantizer_RS_optim
    __swig_setmethods__["rangestat"] = _swigfaiss_avx2.ScalarQuantizer_rangestat_set
    __swig_getmethods__["rangestat"] = _swigfaiss_avx2.ScalarQuantizer_rangestat_get
    if _newclass:
        rangestat = _swig_property(_swigfaiss_avx2.ScalarQuantizer_rangestat_get, _swigfaiss_avx2.ScalarQuantizer_rangestat_set)
    __swig_setmethods__["rangestat_arg"] = _swigfaiss_avx2.ScalarQuantizer_rangestat_arg_set
    __swig_getmethods__["rangestat_arg"] = _swigfaiss_avx2.ScalarQuantizer_rangestat_arg_get
    if _newclass:
        rangestat_arg = _swig_property(_swigfaiss_avx2.ScalarQuantizer_rangestat_arg_get, _swigfaiss_avx2.ScalarQuantizer_rangestat_arg_set)
    __swig_setmethods__["d"] = _swigfaiss_avx2.ScalarQuantizer_d_set
    __swig_getmethods__["d"] = _swigfaiss_avx2.ScalarQuantizer_d_get
    if _newclass:
        d = _swig_property(_swigfaiss_avx2.ScalarQuantizer_d_get, _swigfaiss_avx2.ScalarQuantizer_d_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.ScalarQuantizer_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.ScalarQuantizer_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.ScalarQuantizer_code_size_get, _swigfaiss_avx2.ScalarQuantizer_code_size_set)
    __swig_setmethods__["trained"] = _swigfaiss_avx2.ScalarQuantizer_trained_set
    __swig_getmethods__["trained"] = _swigfaiss_avx2.ScalarQuantizer_trained_get
    if _newclass:
        trained = _swig_property(_swigfaiss_avx2.ScalarQuantizer_trained_get, _swigfaiss_avx2.ScalarQuantizer_trained_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_ScalarQuantizer(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.ScalarQuantizer_train(self, n, x)

    def train_residual(self, n, x, quantizer, by_residual, verbose):
        return _swigfaiss_avx2.ScalarQuantizer_train_residual(self, n, x, quantizer, by_residual, verbose)

    def compute_codes(self, x, codes, n):
        return _swigfaiss_avx2.ScalarQuantizer_compute_codes(self, x, codes, n)

    def decode(self, code, x, n):
        return _swigfaiss_avx2.ScalarQuantizer_decode(self, code, x, n)

    def select_quantizer(self):
        return _swigfaiss_avx2.ScalarQuantizer_select_quantizer(self)

    def get_distance_computer(self, *args):
        return _swigfaiss_avx2.ScalarQuantizer_get_distance_computer(self, *args)

    def select_InvertedListScanner(self, mt, quantizer, store_pairs, by_residual=False):
        return _swigfaiss_avx2.ScalarQuantizer_select_InvertedListScanner(self, mt, quantizer, store_pairs, by_residual)
    __swig_destroy__ = _swigfaiss_avx2.delete_ScalarQuantizer
    __del__ = lambda self: None
ScalarQuantizer_swigregister = _swigfaiss_avx2.ScalarQuantizer_swigregister
ScalarQuantizer_swigregister(ScalarQuantizer)

class IndexScalarQuantizer(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexScalarQuantizer, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexScalarQuantizer, name)
    __repr__ = _swig_repr
    __swig_setmethods__["sq"] = _swigfaiss_avx2.IndexScalarQuantizer_sq_set
    __swig_getmethods__["sq"] = _swigfaiss_avx2.IndexScalarQuantizer_sq_get
    if _newclass:
        sq = _swig_property(_swigfaiss_avx2.IndexScalarQuantizer_sq_get, _swigfaiss_avx2.IndexScalarQuantizer_sq_set)
    __swig_setmethods__["codes"] = _swigfaiss_avx2.IndexScalarQuantizer_codes_set
    __swig_getmethods__["codes"] = _swigfaiss_avx2.IndexScalarQuantizer_codes_get
    if _newclass:
        codes = _swig_property(_swigfaiss_avx2.IndexScalarQuantizer_codes_get, _swigfaiss_avx2.IndexScalarQuantizer_codes_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.IndexScalarQuantizer_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.IndexScalarQuantizer_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.IndexScalarQuantizer_code_size_get, _swigfaiss_avx2.IndexScalarQuantizer_code_size_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexScalarQuantizer(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.IndexScalarQuantizer_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexScalarQuantizer_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexScalarQuantizer_search(self, n, x, k, distances, labels)

    def reset(self):
        return _swigfaiss_avx2.IndexScalarQuantizer_reset(self)

    def reconstruct_n(self, i0, ni, recons):
        return _swigfaiss_avx2.IndexScalarQuantizer_reconstruct_n(self, i0, ni, recons)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexScalarQuantizer_reconstruct(self, key, recons)

    def get_distance_computer(self):
        return _swigfaiss_avx2.IndexScalarQuantizer_get_distance_computer(self)

    def sa_code_size(self):
        return _swigfaiss_avx2.IndexScalarQuantizer_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.IndexScalarQuantizer_sa_encode(self, n, x, bytes)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexScalarQuantizer_sa_decode(self, n, bytes, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexScalarQuantizer
    __del__ = lambda self: None
IndexScalarQuantizer_swigregister = _swigfaiss_avx2.IndexScalarQuantizer_swigregister
IndexScalarQuantizer_swigregister(IndexScalarQuantizer)

class IndexIVFScalarQuantizer(IndexIVF):
    __swig_setmethods__ = {}
    for _s in [IndexIVF]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVFScalarQuantizer, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexIVF]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVFScalarQuantizer, name)
    __repr__ = _swig_repr
    __swig_setmethods__["sq"] = _swigfaiss_avx2.IndexIVFScalarQuantizer_sq_set
    __swig_getmethods__["sq"] = _swigfaiss_avx2.IndexIVFScalarQuantizer_sq_get
    if _newclass:
        sq = _swig_property(_swigfaiss_avx2.IndexIVFScalarQuantizer_sq_get, _swigfaiss_avx2.IndexIVFScalarQuantizer_sq_set)
    __swig_setmethods__["by_residual"] = _swigfaiss_avx2.IndexIVFScalarQuantizer_by_residual_set
    __swig_getmethods__["by_residual"] = _swigfaiss_avx2.IndexIVFScalarQuantizer_by_residual_get
    if _newclass:
        by_residual = _swig_property(_swigfaiss_avx2.IndexIVFScalarQuantizer_by_residual_get, _swigfaiss_avx2.IndexIVFScalarQuantizer_by_residual_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexIVFScalarQuantizer(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train_residual(self, n, x):
        return _swigfaiss_avx2.IndexIVFScalarQuantizer_train_residual(self, n, x)

    def encode_vectors(self, n, x, list_nos, codes, include_listnos=False):
        return _swigfaiss_avx2.IndexIVFScalarQuantizer_encode_vectors(self, n, x, list_nos, codes, include_listnos)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexIVFScalarQuantizer_add_with_ids(self, n, x, xids)

    def get_InvertedListScanner(self, store_pairs):
        return _swigfaiss_avx2.IndexIVFScalarQuantizer_get_InvertedListScanner(self, store_pairs)

    def reconstruct_from_offset(self, list_no, offset, recons):
        return _swigfaiss_avx2.IndexIVFScalarQuantizer_reconstruct_from_offset(self, list_no, offset, recons)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexIVFScalarQuantizer_sa_decode(self, n, bytes, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFScalarQuantizer
    __del__ = lambda self: None
IndexIVFScalarQuantizer_swigregister = _swigfaiss_avx2.IndexIVFScalarQuantizer_swigregister
IndexIVFScalarQuantizer_swigregister(IndexIVFScalarQuantizer)

class IndexIVFSpectralHash(IndexIVF):
    __swig_setmethods__ = {}
    for _s in [IndexIVF]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVFSpectralHash, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexIVF]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVFSpectralHash, name)
    __repr__ = _swig_repr
    __swig_setmethods__["vt"] = _swigfaiss_avx2.IndexIVFSpectralHash_vt_set
    __swig_getmethods__["vt"] = _swigfaiss_avx2.IndexIVFSpectralHash_vt_get
    if _newclass:
        vt = _swig_property(_swigfaiss_avx2.IndexIVFSpectralHash_vt_get, _swigfaiss_avx2.IndexIVFSpectralHash_vt_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexIVFSpectralHash_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexIVFSpectralHash_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexIVFSpectralHash_own_fields_get, _swigfaiss_avx2.IndexIVFSpectralHash_own_fields_set)
    __swig_setmethods__["nbit"] = _swigfaiss_avx2.IndexIVFSpectralHash_nbit_set
    __swig_getmethods__["nbit"] = _swigfaiss_avx2.IndexIVFSpectralHash_nbit_get
    if _newclass:
        nbit = _swig_property(_swigfaiss_avx2.IndexIVFSpectralHash_nbit_get, _swigfaiss_avx2.IndexIVFSpectralHash_nbit_set)
    __swig_setmethods__["period"] = _swigfaiss_avx2.IndexIVFSpectralHash_period_set
    __swig_getmethods__["period"] = _swigfaiss_avx2.IndexIVFSpectralHash_period_get
    if _newclass:
        period = _swig_property(_swigfaiss_avx2.IndexIVFSpectralHash_period_get, _swigfaiss_avx2.IndexIVFSpectralHash_period_set)
    Thresh_global = _swigfaiss_avx2.IndexIVFSpectralHash_Thresh_global
    Thresh_centroid = _swigfaiss_avx2.IndexIVFSpectralHash_Thresh_centroid
    Thresh_centroid_half = _swigfaiss_avx2.IndexIVFSpectralHash_Thresh_centroid_half
    Thresh_median = _swigfaiss_avx2.IndexIVFSpectralHash_Thresh_median
    __swig_setmethods__["threshold_type"] = _swigfaiss_avx2.IndexIVFSpectralHash_threshold_type_set
    __swig_getmethods__["threshold_type"] = _swigfaiss_avx2.IndexIVFSpectralHash_threshold_type_get
    if _newclass:
        threshold_type = _swig_property(_swigfaiss_avx2.IndexIVFSpectralHash_threshold_type_get, _swigfaiss_avx2.IndexIVFSpectralHash_threshold_type_set)
    __swig_setmethods__["trained"] = _swigfaiss_avx2.IndexIVFSpectralHash_trained_set
    __swig_getmethods__["trained"] = _swigfaiss_avx2.IndexIVFSpectralHash_trained_get
    if _newclass:
        trained = _swig_property(_swigfaiss_avx2.IndexIVFSpectralHash_trained_get, _swigfaiss_avx2.IndexIVFSpectralHash_trained_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexIVFSpectralHash(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train_residual(self, n, x):
        return _swigfaiss_avx2.IndexIVFSpectralHash_train_residual(self, n, x)

    def encode_vectors(self, n, x, list_nos, codes, include_listnos=False):
        return _swigfaiss_avx2.IndexIVFSpectralHash_encode_vectors(self, n, x, list_nos, codes, include_listnos)

    def get_InvertedListScanner(self, store_pairs):
        return _swigfaiss_avx2.IndexIVFSpectralHash_get_InvertedListScanner(self, store_pairs)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFSpectralHash
    __del__ = lambda self: None
IndexIVFSpectralHash_swigregister = _swigfaiss_avx2.IndexIVFSpectralHash_swigregister
IndexIVFSpectralHash_swigregister(IndexIVFSpectralHash)

class HNSW(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, HNSW, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, HNSW, name)
    __repr__ = _swig_repr
    __swig_setmethods__["assign_probas"] = _swigfaiss_avx2.HNSW_assign_probas_set
    __swig_getmethods__["assign_probas"] = _swigfaiss_avx2.HNSW_assign_probas_get
    if _newclass:
        assign_probas = _swig_property(_swigfaiss_avx2.HNSW_assign_probas_get, _swigfaiss_avx2.HNSW_assign_probas_set)
    __swig_setmethods__["cum_nneighbor_per_level"] = _swigfaiss_avx2.HNSW_cum_nneighbor_per_level_set
    __swig_getmethods__["cum_nneighbor_per_level"] = _swigfaiss_avx2.HNSW_cum_nneighbor_per_level_get
    if _newclass:
        cum_nneighbor_per_level = _swig_property(_swigfaiss_avx2.HNSW_cum_nneighbor_per_level_get, _swigfaiss_avx2.HNSW_cum_nneighbor_per_level_set)
    __swig_setmethods__["levels"] = _swigfaiss_avx2.HNSW_levels_set
    __swig_getmethods__["levels"] = _swigfaiss_avx2.HNSW_levels_get
    if _newclass:
        levels = _swig_property(_swigfaiss_avx2.HNSW_levels_get, _swigfaiss_avx2.HNSW_levels_set)
    __swig_setmethods__["offsets"] = _swigfaiss_avx2.HNSW_offsets_set
    __swig_getmethods__["offsets"] = _swigfaiss_avx2.HNSW_offsets_get
    if _newclass:
        offsets = _swig_property(_swigfaiss_avx2.HNSW_offsets_get, _swigfaiss_avx2.HNSW_offsets_set)
    __swig_setmethods__["neighbors"] = _swigfaiss_avx2.HNSW_neighbors_set
    __swig_getmethods__["neighbors"] = _swigfaiss_avx2.HNSW_neighbors_get
    if _newclass:
        neighbors = _swig_property(_swigfaiss_avx2.HNSW_neighbors_get, _swigfaiss_avx2.HNSW_neighbors_set)
    __swig_setmethods__["entry_point"] = _swigfaiss_avx2.HNSW_entry_point_set
    __swig_getmethods__["entry_point"] = _swigfaiss_avx2.HNSW_entry_point_get
    if _newclass:
        entry_point = _swig_property(_swigfaiss_avx2.HNSW_entry_point_get, _swigfaiss_avx2.HNSW_entry_point_set)
    __swig_setmethods__["rng"] = _swigfaiss_avx2.HNSW_rng_set
    __swig_getmethods__["rng"] = _swigfaiss_avx2.HNSW_rng_get
    if _newclass:
        rng = _swig_property(_swigfaiss_avx2.HNSW_rng_get, _swigfaiss_avx2.HNSW_rng_set)
    __swig_setmethods__["max_level"] = _swigfaiss_avx2.HNSW_max_level_set
    __swig_getmethods__["max_level"] = _swigfaiss_avx2.HNSW_max_level_get
    if _newclass:
        max_level = _swig_property(_swigfaiss_avx2.HNSW_max_level_get, _swigfaiss_avx2.HNSW_max_level_set)
    __swig_setmethods__["efConstruction"] = _swigfaiss_avx2.HNSW_efConstruction_set
    __swig_getmethods__["efConstruction"] = _swigfaiss_avx2.HNSW_efConstruction_get
    if _newclass:
        efConstruction = _swig_property(_swigfaiss_avx2.HNSW_efConstruction_get, _swigfaiss_avx2.HNSW_efConstruction_set)
    __swig_setmethods__["efSearch"] = _swigfaiss_avx2.HNSW_efSearch_set
    __swig_getmethods__["efSearch"] = _swigfaiss_avx2.HNSW_efSearch_get
    if _newclass:
        efSearch = _swig_property(_swigfaiss_avx2.HNSW_efSearch_get, _swigfaiss_avx2.HNSW_efSearch_set)
    __swig_setmethods__["check_relative_distance"] = _swigfaiss_avx2.HNSW_check_relative_distance_set
    __swig_getmethods__["check_relative_distance"] = _swigfaiss_avx2.HNSW_check_relative_distance_get
    if _newclass:
        check_relative_distance = _swig_property(_swigfaiss_avx2.HNSW_check_relative_distance_get, _swigfaiss_avx2.HNSW_check_relative_distance_set)
    __swig_setmethods__["upper_beam"] = _swigfaiss_avx2.HNSW_upper_beam_set
    __swig_getmethods__["upper_beam"] = _swigfaiss_avx2.HNSW_upper_beam_get
    if _newclass:
        upper_beam = _swig_property(_swigfaiss_avx2.HNSW_upper_beam_get, _swigfaiss_avx2.HNSW_upper_beam_set)
    __swig_setmethods__["search_bounded_queue"] = _swigfaiss_avx2.HNSW_search_bounded_queue_set
    __swig_getmethods__["search_bounded_queue"] = _swigfaiss_avx2.HNSW_search_bounded_queue_get
    if _newclass:
        search_bounded_queue = _swig_property(_swigfaiss_avx2.HNSW_search_bounded_queue_get, _swigfaiss_avx2.HNSW_search_bounded_queue_set)

    def set_default_probas(self, M, levelMult):
        return _swigfaiss_avx2.HNSW_set_default_probas(self, M, levelMult)

    def set_nb_neighbors(self, level_no, n):
        return _swigfaiss_avx2.HNSW_set_nb_neighbors(self, level_no, n)

    def nb_neighbors(self, layer_no):
        return _swigfaiss_avx2.HNSW_nb_neighbors(self, layer_no)

    def cum_nb_neighbors(self, layer_no):
        return _swigfaiss_avx2.HNSW_cum_nb_neighbors(self, layer_no)

    def neighbor_range(self, no, layer_no, begin, end):
        return _swigfaiss_avx2.HNSW_neighbor_range(self, no, layer_no, begin, end)

    def __init__(self, M=32):
        this = _swigfaiss_avx2.new_HNSW(M)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def random_level(self):
        return _swigfaiss_avx2.HNSW_random_level(self)

    def fill_with_random_links(self, n):
        return _swigfaiss_avx2.HNSW_fill_with_random_links(self, n)

    def add_links_starting_from(self, ptdis, pt_id, nearest, d_nearest, level, locks, vt):
        return _swigfaiss_avx2.HNSW_add_links_starting_from(self, ptdis, pt_id, nearest, d_nearest, level, locks, vt)

    def add_with_locks(self, ptdis, pt_level, pt_id, locks, vt):
        return _swigfaiss_avx2.HNSW_add_with_locks(self, ptdis, pt_level, pt_id, locks, vt)

    def search_from_candidates(self, qdis, k, I, D, candidates, vt, level, nres_in=0):
        return _swigfaiss_avx2.HNSW_search_from_candidates(self, qdis, k, I, D, candidates, vt, level, nres_in)

    def search_from_candidate_unbounded(self, node, qdis, ef, vt):
        return _swigfaiss_avx2.HNSW_search_from_candidate_unbounded(self, node, qdis, ef, vt)

    def search(self, qdis, k, I, D, vt):
        return _swigfaiss_avx2.HNSW_search(self, qdis, k, I, D, vt)

    def reset(self):
        return _swigfaiss_avx2.HNSW_reset(self)

    def clear_neighbor_tables(self, level):
        return _swigfaiss_avx2.HNSW_clear_neighbor_tables(self, level)

    def print_neighbor_stats(self, level):
        return _swigfaiss_avx2.HNSW_print_neighbor_stats(self, level)

    def prepare_level_tab(self, n, preset_levels=False):
        return _swigfaiss_avx2.HNSW_prepare_level_tab(self, n, preset_levels)
    if _newclass:
        shrink_neighbor_list = staticmethod(_swigfaiss_avx2.HNSW_shrink_neighbor_list)
    else:
        shrink_neighbor_list = _swigfaiss_avx2.HNSW_shrink_neighbor_list
    __swig_destroy__ = _swigfaiss_avx2.delete_HNSW
    __del__ = lambda self: None
HNSW_swigregister = _swigfaiss_avx2.HNSW_swigregister
HNSW_swigregister(HNSW)

def HNSW_shrink_neighbor_list(qdis, input, output, max_size):
    return _swigfaiss_avx2.HNSW_shrink_neighbor_list(qdis, input, output, max_size)
HNSW_shrink_neighbor_list = _swigfaiss_avx2.HNSW_shrink_neighbor_list

class VisitedTable(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, VisitedTable, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, VisitedTable, name)
    __repr__ = _swig_repr
    __swig_setmethods__["visited"] = _swigfaiss_avx2.VisitedTable_visited_set
    __swig_getmethods__["visited"] = _swigfaiss_avx2.VisitedTable_visited_get
    if _newclass:
        visited = _swig_property(_swigfaiss_avx2.VisitedTable_visited_get, _swigfaiss_avx2.VisitedTable_visited_set)
    __swig_setmethods__["visno"] = _swigfaiss_avx2.VisitedTable_visno_set
    __swig_getmethods__["visno"] = _swigfaiss_avx2.VisitedTable_visno_get
    if _newclass:
        visno = _swig_property(_swigfaiss_avx2.VisitedTable_visno_get, _swigfaiss_avx2.VisitedTable_visno_set)

    def __init__(self, size):
        this = _swigfaiss_avx2.new_VisitedTable(size)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def set(self, no):
        return _swigfaiss_avx2.VisitedTable_set(self, no)

    def get(self, no):
        return _swigfaiss_avx2.VisitedTable_get(self, no)

    def advance(self):
        return _swigfaiss_avx2.VisitedTable_advance(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_VisitedTable
    __del__ = lambda self: None
VisitedTable_swigregister = _swigfaiss_avx2.VisitedTable_swigregister
VisitedTable_swigregister(VisitedTable)

class HNSWStats(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, HNSWStats, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, HNSWStats, name)
    __repr__ = _swig_repr
    __swig_setmethods__["n1"] = _swigfaiss_avx2.HNSWStats_n1_set
    __swig_getmethods__["n1"] = _swigfaiss_avx2.HNSWStats_n1_get
    if _newclass:
        n1 = _swig_property(_swigfaiss_avx2.HNSWStats_n1_get, _swigfaiss_avx2.HNSWStats_n1_set)
    __swig_setmethods__["n2"] = _swigfaiss_avx2.HNSWStats_n2_set
    __swig_getmethods__["n2"] = _swigfaiss_avx2.HNSWStats_n2_get
    if _newclass:
        n2 = _swig_property(_swigfaiss_avx2.HNSWStats_n2_get, _swigfaiss_avx2.HNSWStats_n2_set)
    __swig_setmethods__["n3"] = _swigfaiss_avx2.HNSWStats_n3_set
    __swig_getmethods__["n3"] = _swigfaiss_avx2.HNSWStats_n3_get
    if _newclass:
        n3 = _swig_property(_swigfaiss_avx2.HNSWStats_n3_get, _swigfaiss_avx2.HNSWStats_n3_set)
    __swig_setmethods__["ndis"] = _swigfaiss_avx2.HNSWStats_ndis_set
    __swig_getmethods__["ndis"] = _swigfaiss_avx2.HNSWStats_ndis_get
    if _newclass:
        ndis = _swig_property(_swigfaiss_avx2.HNSWStats_ndis_get, _swigfaiss_avx2.HNSWStats_ndis_set)
    __swig_setmethods__["nreorder"] = _swigfaiss_avx2.HNSWStats_nreorder_set
    __swig_getmethods__["nreorder"] = _swigfaiss_avx2.HNSWStats_nreorder_get
    if _newclass:
        nreorder = _swig_property(_swigfaiss_avx2.HNSWStats_nreorder_get, _swigfaiss_avx2.HNSWStats_nreorder_set)
    __swig_setmethods__["view"] = _swigfaiss_avx2.HNSWStats_view_set
    __swig_getmethods__["view"] = _swigfaiss_avx2.HNSWStats_view_get
    if _newclass:
        view = _swig_property(_swigfaiss_avx2.HNSWStats_view_get, _swigfaiss_avx2.HNSWStats_view_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_HNSWStats()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def reset(self):
        return _swigfaiss_avx2.HNSWStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_HNSWStats
    __del__ = lambda self: None
HNSWStats_swigregister = _swigfaiss_avx2.HNSWStats_swigregister
HNSWStats_swigregister(HNSWStats)

class ReconstructFromNeighbors(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ReconstructFromNeighbors, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ReconstructFromNeighbors, name)
    __repr__ = _swig_repr
    __swig_getmethods__["index"] = _swigfaiss_avx2.ReconstructFromNeighbors_index_get
    if _newclass:
        index = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_index_get)
    __swig_setmethods__["M"] = _swigfaiss_avx2.ReconstructFromNeighbors_M_set
    __swig_getmethods__["M"] = _swigfaiss_avx2.ReconstructFromNeighbors_M_get
    if _newclass:
        M = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_M_get, _swigfaiss_avx2.ReconstructFromNeighbors_M_set)
    __swig_setmethods__["k"] = _swigfaiss_avx2.ReconstructFromNeighbors_k_set
    __swig_getmethods__["k"] = _swigfaiss_avx2.ReconstructFromNeighbors_k_get
    if _newclass:
        k = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_k_get, _swigfaiss_avx2.ReconstructFromNeighbors_k_set)
    __swig_setmethods__["nsq"] = _swigfaiss_avx2.ReconstructFromNeighbors_nsq_set
    __swig_getmethods__["nsq"] = _swigfaiss_avx2.ReconstructFromNeighbors_nsq_get
    if _newclass:
        nsq = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_nsq_get, _swigfaiss_avx2.ReconstructFromNeighbors_nsq_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.ReconstructFromNeighbors_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.ReconstructFromNeighbors_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_code_size_get, _swigfaiss_avx2.ReconstructFromNeighbors_code_size_set)
    __swig_setmethods__["k_reorder"] = _swigfaiss_avx2.ReconstructFromNeighbors_k_reorder_set
    __swig_getmethods__["k_reorder"] = _swigfaiss_avx2.ReconstructFromNeighbors_k_reorder_get
    if _newclass:
        k_reorder = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_k_reorder_get, _swigfaiss_avx2.ReconstructFromNeighbors_k_reorder_set)
    __swig_setmethods__["codebook"] = _swigfaiss_avx2.ReconstructFromNeighbors_codebook_set
    __swig_getmethods__["codebook"] = _swigfaiss_avx2.ReconstructFromNeighbors_codebook_get
    if _newclass:
        codebook = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_codebook_get, _swigfaiss_avx2.ReconstructFromNeighbors_codebook_set)
    __swig_setmethods__["codes"] = _swigfaiss_avx2.ReconstructFromNeighbors_codes_set
    __swig_getmethods__["codes"] = _swigfaiss_avx2.ReconstructFromNeighbors_codes_get
    if _newclass:
        codes = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_codes_get, _swigfaiss_avx2.ReconstructFromNeighbors_codes_set)
    __swig_setmethods__["ntotal"] = _swigfaiss_avx2.ReconstructFromNeighbors_ntotal_set
    __swig_getmethods__["ntotal"] = _swigfaiss_avx2.ReconstructFromNeighbors_ntotal_get
    if _newclass:
        ntotal = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_ntotal_get, _swigfaiss_avx2.ReconstructFromNeighbors_ntotal_set)
    __swig_setmethods__["d"] = _swigfaiss_avx2.ReconstructFromNeighbors_d_set
    __swig_getmethods__["d"] = _swigfaiss_avx2.ReconstructFromNeighbors_d_get
    if _newclass:
        d = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_d_get, _swigfaiss_avx2.ReconstructFromNeighbors_d_set)
    __swig_setmethods__["dsub"] = _swigfaiss_avx2.ReconstructFromNeighbors_dsub_set
    __swig_getmethods__["dsub"] = _swigfaiss_avx2.ReconstructFromNeighbors_dsub_get
    if _newclass:
        dsub = _swig_property(_swigfaiss_avx2.ReconstructFromNeighbors_dsub_get, _swigfaiss_avx2.ReconstructFromNeighbors_dsub_set)

    def __init__(self, index, k=256, nsq=1):
        this = _swigfaiss_avx2.new_ReconstructFromNeighbors(index, k, nsq)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def add_codes(self, n, x):
        return _swigfaiss_avx2.ReconstructFromNeighbors_add_codes(self, n, x)

    def compute_distances(self, n, shortlist, query, distances):
        return _swigfaiss_avx2.ReconstructFromNeighbors_compute_distances(self, n, shortlist, query, distances)

    def estimate_code(self, x, i, code):
        return _swigfaiss_avx2.ReconstructFromNeighbors_estimate_code(self, x, i, code)

    def reconstruct(self, i, x, tmp):
        return _swigfaiss_avx2.ReconstructFromNeighbors_reconstruct(self, i, x, tmp)

    def reconstruct_n(self, n0, ni, x):
        return _swigfaiss_avx2.ReconstructFromNeighbors_reconstruct_n(self, n0, ni, x)

    def get_neighbor_table(self, i, out):
        return _swigfaiss_avx2.ReconstructFromNeighbors_get_neighbor_table(self, i, out)
    __swig_destroy__ = _swigfaiss_avx2.delete_ReconstructFromNeighbors
    __del__ = lambda self: None
ReconstructFromNeighbors_swigregister = _swigfaiss_avx2.ReconstructFromNeighbors_swigregister
ReconstructFromNeighbors_swigregister(ReconstructFromNeighbors)

class IndexHNSW(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexHNSW, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexHNSW, name)
    __repr__ = _swig_repr
    __swig_setmethods__["hnsw"] = _swigfaiss_avx2.IndexHNSW_hnsw_set
    __swig_getmethods__["hnsw"] = _swigfaiss_avx2.IndexHNSW_hnsw_get
    if _newclass:
        hnsw = _swig_property(_swigfaiss_avx2.IndexHNSW_hnsw_get, _swigfaiss_avx2.IndexHNSW_hnsw_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexHNSW_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexHNSW_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexHNSW_own_fields_get, _swigfaiss_avx2.IndexHNSW_own_fields_set)
    __swig_setmethods__["storage"] = _swigfaiss_avx2.IndexHNSW_storage_set
    __swig_getmethods__["storage"] = _swigfaiss_avx2.IndexHNSW_storage_get
    if _newclass:
        storage = _swig_property(_swigfaiss_avx2.IndexHNSW_storage_get, _swigfaiss_avx2.IndexHNSW_storage_set)
    __swig_setmethods__["reconstruct_from_neighbors"] = _swigfaiss_avx2.IndexHNSW_reconstruct_from_neighbors_set
    __swig_getmethods__["reconstruct_from_neighbors"] = _swigfaiss_avx2.IndexHNSW_reconstruct_from_neighbors_get
    if _newclass:
        reconstruct_from_neighbors = _swig_property(_swigfaiss_avx2.IndexHNSW_reconstruct_from_neighbors_get, _swigfaiss_avx2.IndexHNSW_reconstruct_from_neighbors_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexHNSW(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSW
    __del__ = lambda self: None

    def add(self, n, x):
        return _swigfaiss_avx2.IndexHNSW_add(self, n, x)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexHNSW_train(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexHNSW_search(self, n, x, k, distances, labels)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexHNSW_reconstruct(self, key, recons)

    def reset(self):
        return _swigfaiss_avx2.IndexHNSW_reset(self)

    def shrink_level_0_neighbors(self, size):
        return _swigfaiss_avx2.IndexHNSW_shrink_level_0_neighbors(self, size)

    def search_level_0(self, n, x, k, nearest, nearest_d, distances, labels, nprobe=1, search_type=1):
        return _swigfaiss_avx2.IndexHNSW_search_level_0(self, n, x, k, nearest, nearest_d, distances, labels, nprobe, search_type)

    def init_level_0_from_knngraph(self, k, D, I):
        return _swigfaiss_avx2.IndexHNSW_init_level_0_from_knngraph(self, k, D, I)

    def init_level_0_from_entry_points(self, npt, points, nearests):
        return _swigfaiss_avx2.IndexHNSW_init_level_0_from_entry_points(self, npt, points, nearests)

    def reorder_links(self):
        return _swigfaiss_avx2.IndexHNSW_reorder_links(self)

    def link_singletons(self):
        return _swigfaiss_avx2.IndexHNSW_link_singletons(self)
IndexHNSW_swigregister = _swigfaiss_avx2.IndexHNSW_swigregister
IndexHNSW_swigregister(IndexHNSW)

class IndexHNSWFlat(IndexHNSW):
    __swig_setmethods__ = {}
    for _s in [IndexHNSW]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexHNSWFlat, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexHNSW]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexHNSWFlat, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexHNSWFlat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSWFlat
    __del__ = lambda self: None
IndexHNSWFlat_swigregister = _swigfaiss_avx2.IndexHNSWFlat_swigregister
IndexHNSWFlat_swigregister(IndexHNSWFlat)

class IndexHNSWPQ(IndexHNSW):
    __swig_setmethods__ = {}
    for _s in [IndexHNSW]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexHNSWPQ, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexHNSW]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexHNSWPQ, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexHNSWPQ(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.IndexHNSWPQ_train(self, n, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSWPQ
    __del__ = lambda self: None
IndexHNSWPQ_swigregister = _swigfaiss_avx2.IndexHNSWPQ_swigregister
IndexHNSWPQ_swigregister(IndexHNSWPQ)

class IndexHNSWSQ(IndexHNSW):
    __swig_setmethods__ = {}
    for _s in [IndexHNSW]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexHNSWSQ, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexHNSW]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexHNSWSQ, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexHNSWSQ(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSWSQ
    __del__ = lambda self: None
IndexHNSWSQ_swigregister = _swigfaiss_avx2.IndexHNSWSQ_swigregister
IndexHNSWSQ_swigregister(IndexHNSWSQ)

class IndexHNSW2Level(IndexHNSW):
    __swig_setmethods__ = {}
    for _s in [IndexHNSW]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexHNSW2Level, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexHNSW]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexHNSW2Level, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexHNSW2Level(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def flip_to_ivf(self):
        return _swigfaiss_avx2.IndexHNSW2Level_flip_to_ivf(self)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexHNSW2Level_search(self, n, x, k, distances, labels)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSW2Level
    __del__ = lambda self: None
IndexHNSW2Level_swigregister = _swigfaiss_avx2.IndexHNSW2Level_swigregister
IndexHNSW2Level_swigregister(IndexHNSW2Level)

class IndexIVFFlat(IndexIVF):
    __swig_setmethods__ = {}
    for _s in [IndexIVF]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVFFlat, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexIVF]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVFFlat, name)
    __repr__ = _swig_repr

    def add_core(self, n, x, xids, precomputed_idx):
        return _swigfaiss_avx2.IndexIVFFlat_add_core(self, n, x, xids, precomputed_idx)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexIVFFlat_add_with_ids(self, n, x, xids)

    def encode_vectors(self, n, x, list_nos, codes, include_listnos=False):
        return _swigfaiss_avx2.IndexIVFFlat_encode_vectors(self, n, x, list_nos, codes, include_listnos)

    def get_InvertedListScanner(self, store_pairs):
        return _swigfaiss_avx2.IndexIVFFlat_get_InvertedListScanner(self, store_pairs)

    def reconstruct_from_offset(self, list_no, offset, recons):
        return _swigfaiss_avx2.IndexIVFFlat_reconstruct_from_offset(self, list_no, offset, recons)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexIVFFlat_sa_decode(self, n, bytes, x)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexIVFFlat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFFlat
    __del__ = lambda self: None
IndexIVFFlat_swigregister = _swigfaiss_avx2.IndexIVFFlat_swigregister
IndexIVFFlat_swigregister(IndexIVFFlat)

class IndexIVFFlatDedup(IndexIVFFlat):
    __swig_setmethods__ = {}
    for _s in [IndexIVFFlat]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVFFlatDedup, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexIVFFlat]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVFFlatDedup, name)
    __repr__ = _swig_repr
    __swig_setmethods__["instances"] = _swigfaiss_avx2.IndexIVFFlatDedup_instances_set
    __swig_getmethods__["instances"] = _swigfaiss_avx2.IndexIVFFlatDedup_instances_get
    if _newclass:
        instances = _swig_property(_swigfaiss_avx2.IndexIVFFlatDedup_instances_get, _swigfaiss_avx2.IndexIVFFlatDedup_instances_set)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexIVFFlatDedup_train(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexIVFFlatDedup_add_with_ids(self, n, x, xids)

    def search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params=None):
        return _swigfaiss_avx2.IndexIVFFlatDedup_search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexIVFFlatDedup_remove_ids(self, sel)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexIVFFlatDedup_range_search(self, n, x, radius, result)

    def update_vectors(self, nv, idx, v):
        return _swigfaiss_avx2.IndexIVFFlatDedup_update_vectors(self, nv, idx, v)

    def reconstruct_from_offset(self, list_no, offset, recons):
        return _swigfaiss_avx2.IndexIVFFlatDedup_reconstruct_from_offset(self, list_no, offset, recons)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexIVFFlatDedup(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFFlatDedup
    __del__ = lambda self: None
IndexIVFFlatDedup_swigregister = _swigfaiss_avx2.IndexIVFFlatDedup_swigregister
IndexIVFFlatDedup_swigregister(IndexIVFFlatDedup)

class OnDiskInvertedLists(InvertedLists):
    __swig_setmethods__ = {}
    for _s in [InvertedLists]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, OnDiskInvertedLists, name, value)
    __swig_getmethods__ = {}
    for _s in [InvertedLists]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, OnDiskInvertedLists, name)
    __repr__ = _swig_repr
    __swig_setmethods__["lists"] = _swigfaiss_avx2.OnDiskInvertedLists_lists_set
    __swig_getmethods__["lists"] = _swigfaiss_avx2.OnDiskInvertedLists_lists_get
    if _newclass:
        lists = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_lists_get, _swigfaiss_avx2.OnDiskInvertedLists_lists_set)
    __swig_setmethods__["slots"] = _swigfaiss_avx2.OnDiskInvertedLists_slots_set
    __swig_getmethods__["slots"] = _swigfaiss_avx2.OnDiskInvertedLists_slots_get
    if _newclass:
        slots = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_slots_get, _swigfaiss_avx2.OnDiskInvertedLists_slots_set)
    __swig_setmethods__["filename"] = _swigfaiss_avx2.OnDiskInvertedLists_filename_set
    __swig_getmethods__["filename"] = _swigfaiss_avx2.OnDiskInvertedLists_filename_get
    if _newclass:
        filename = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_filename_get, _swigfaiss_avx2.OnDiskInvertedLists_filename_set)
    __swig_setmethods__["totsize"] = _swigfaiss_avx2.OnDiskInvertedLists_totsize_set
    __swig_getmethods__["totsize"] = _swigfaiss_avx2.OnDiskInvertedLists_totsize_get
    if _newclass:
        totsize = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_totsize_get, _swigfaiss_avx2.OnDiskInvertedLists_totsize_set)
    __swig_setmethods__["ptr"] = _swigfaiss_avx2.OnDiskInvertedLists_ptr_set
    __swig_getmethods__["ptr"] = _swigfaiss_avx2.OnDiskInvertedLists_ptr_get
    if _newclass:
        ptr = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_ptr_get, _swigfaiss_avx2.OnDiskInvertedLists_ptr_set)
    __swig_setmethods__["read_only"] = _swigfaiss_avx2.OnDiskInvertedLists_read_only_set
    __swig_getmethods__["read_only"] = _swigfaiss_avx2.OnDiskInvertedLists_read_only_get
    if _newclass:
        read_only = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_read_only_get, _swigfaiss_avx2.OnDiskInvertedLists_read_only_set)

    def list_size(self, list_no):
        return _swigfaiss_avx2.OnDiskInvertedLists_list_size(self, list_no)

    def get_codes(self, list_no):
        return _swigfaiss_avx2.OnDiskInvertedLists_get_codes(self, list_no)

    def get_ids(self, list_no):
        return _swigfaiss_avx2.OnDiskInvertedLists_get_ids(self, list_no)

    def add_entries(self, list_no, n_entry, ids, code):
        return _swigfaiss_avx2.OnDiskInvertedLists_add_entries(self, list_no, n_entry, ids, code)

    def update_entries(self, list_no, offset, n_entry, ids, code):
        return _swigfaiss_avx2.OnDiskInvertedLists_update_entries(self, list_no, offset, n_entry, ids, code)

    def resize(self, list_no, new_size):
        return _swigfaiss_avx2.OnDiskInvertedLists_resize(self, list_no, new_size)

    def merge_from(self, ils, n_il, verbose=False):
        return _swigfaiss_avx2.OnDiskInvertedLists_merge_from(self, ils, n_il, verbose)

    def crop_invlists(self, l0, l1):
        return _swigfaiss_avx2.OnDiskInvertedLists_crop_invlists(self, l0, l1)

    def prefetch_lists(self, list_nos, nlist):
        return _swigfaiss_avx2.OnDiskInvertedLists_prefetch_lists(self, list_nos, nlist)
    __swig_destroy__ = _swigfaiss_avx2.delete_OnDiskInvertedLists
    __del__ = lambda self: None
    __swig_setmethods__["locks"] = _swigfaiss_avx2.OnDiskInvertedLists_locks_set
    __swig_getmethods__["locks"] = _swigfaiss_avx2.OnDiskInvertedLists_locks_get
    if _newclass:
        locks = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_locks_get, _swigfaiss_avx2.OnDiskInvertedLists_locks_set)
    __swig_setmethods__["pf"] = _swigfaiss_avx2.OnDiskInvertedLists_pf_set
    __swig_getmethods__["pf"] = _swigfaiss_avx2.OnDiskInvertedLists_pf_get
    if _newclass:
        pf = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_pf_get, _swigfaiss_avx2.OnDiskInvertedLists_pf_set)
    __swig_setmethods__["prefetch_nthread"] = _swigfaiss_avx2.OnDiskInvertedLists_prefetch_nthread_set
    __swig_getmethods__["prefetch_nthread"] = _swigfaiss_avx2.OnDiskInvertedLists_prefetch_nthread_get
    if _newclass:
        prefetch_nthread = _swig_property(_swigfaiss_avx2.OnDiskInvertedLists_prefetch_nthread_get, _swigfaiss_avx2.OnDiskInvertedLists_prefetch_nthread_set)

    def do_mmap(self):
        return _swigfaiss_avx2.OnDiskInvertedLists_do_mmap(self)

    def update_totsize(self, new_totsize):
        return _swigfaiss_avx2.OnDiskInvertedLists_update_totsize(self, new_totsize)

    def resize_locked(self, list_no, new_size):
        return _swigfaiss_avx2.OnDiskInvertedLists_resize_locked(self, list_no, new_size)

    def allocate_slot(self, capacity):
        return _swigfaiss_avx2.OnDiskInvertedLists_allocate_slot(self, capacity)

    def free_slot(self, offset, capacity):
        return _swigfaiss_avx2.OnDiskInvertedLists_free_slot(self, offset, capacity)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_OnDiskInvertedLists(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
OnDiskInvertedLists_swigregister = _swigfaiss_avx2.OnDiskInvertedLists_swigregister
OnDiskInvertedLists_swigregister(OnDiskInvertedLists)

class ZnSphereSearch(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ZnSphereSearch, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ZnSphereSearch, name)
    __repr__ = _swig_repr
    __swig_setmethods__["dimS"] = _swigfaiss_avx2.ZnSphereSearch_dimS_set
    __swig_getmethods__["dimS"] = _swigfaiss_avx2.ZnSphereSearch_dimS_get
    if _newclass:
        dimS = _swig_property(_swigfaiss_avx2.ZnSphereSearch_dimS_get, _swigfaiss_avx2.ZnSphereSearch_dimS_set)
    __swig_setmethods__["r2"] = _swigfaiss_avx2.ZnSphereSearch_r2_set
    __swig_getmethods__["r2"] = _swigfaiss_avx2.ZnSphereSearch_r2_get
    if _newclass:
        r2 = _swig_property(_swigfaiss_avx2.ZnSphereSearch_r2_get, _swigfaiss_avx2.ZnSphereSearch_r2_set)
    __swig_setmethods__["natom"] = _swigfaiss_avx2.ZnSphereSearch_natom_set
    __swig_getmethods__["natom"] = _swigfaiss_avx2.ZnSphereSearch_natom_get
    if _newclass:
        natom = _swig_property(_swigfaiss_avx2.ZnSphereSearch_natom_get, _swigfaiss_avx2.ZnSphereSearch_natom_set)
    __swig_setmethods__["voc"] = _swigfaiss_avx2.ZnSphereSearch_voc_set
    __swig_getmethods__["voc"] = _swigfaiss_avx2.ZnSphereSearch_voc_get
    if _newclass:
        voc = _swig_property(_swigfaiss_avx2.ZnSphereSearch_voc_get, _swigfaiss_avx2.ZnSphereSearch_voc_set)

    def __init__(self, dim, r2):
        this = _swigfaiss_avx2.new_ZnSphereSearch(dim, r2)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def search(self, *args):
        return _swigfaiss_avx2.ZnSphereSearch_search(self, *args)

    def search_multi(self, n, x, c_out, dp_out):
        return _swigfaiss_avx2.ZnSphereSearch_search_multi(self, n, x, c_out, dp_out)
    __swig_destroy__ = _swigfaiss_avx2.delete_ZnSphereSearch
    __del__ = lambda self: None
ZnSphereSearch_swigregister = _swigfaiss_avx2.ZnSphereSearch_swigregister
ZnSphereSearch_swigregister(ZnSphereSearch)

class EnumeratedVectors(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, EnumeratedVectors, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, EnumeratedVectors, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["nv"] = _swigfaiss_avx2.EnumeratedVectors_nv_set
    __swig_getmethods__["nv"] = _swigfaiss_avx2.EnumeratedVectors_nv_get
    if _newclass:
        nv = _swig_property(_swigfaiss_avx2.EnumeratedVectors_nv_get, _swigfaiss_avx2.EnumeratedVectors_nv_set)
    __swig_setmethods__["dim"] = _swigfaiss_avx2.EnumeratedVectors_dim_set
    __swig_getmethods__["dim"] = _swigfaiss_avx2.EnumeratedVectors_dim_get
    if _newclass:
        dim = _swig_property(_swigfaiss_avx2.EnumeratedVectors_dim_get, _swigfaiss_avx2.EnumeratedVectors_dim_set)

    def encode(self, x):
        return _swigfaiss_avx2.EnumeratedVectors_encode(self, x)

    def decode(self, code, c):
        return _swigfaiss_avx2.EnumeratedVectors_decode(self, code, c)

    def encode_multi(self, nc, c, codes):
        return _swigfaiss_avx2.EnumeratedVectors_encode_multi(self, nc, c, codes)

    def decode_multi(self, nc, codes, c):
        return _swigfaiss_avx2.EnumeratedVectors_decode_multi(self, nc, codes, c)

    def find_nn(self, n, codes, nq, xq, idx, dis):
        return _swigfaiss_avx2.EnumeratedVectors_find_nn(self, n, codes, nq, xq, idx, dis)
    __swig_destroy__ = _swigfaiss_avx2.delete_EnumeratedVectors
    __del__ = lambda self: None
EnumeratedVectors_swigregister = _swigfaiss_avx2.EnumeratedVectors_swigregister
EnumeratedVectors_swigregister(EnumeratedVectors)

class Repeat(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Repeat, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Repeat, name)
    __repr__ = _swig_repr
    __swig_setmethods__["val"] = _swigfaiss_avx2.Repeat_val_set
    __swig_getmethods__["val"] = _swigfaiss_avx2.Repeat_val_get
    if _newclass:
        val = _swig_property(_swigfaiss_avx2.Repeat_val_get, _swigfaiss_avx2.Repeat_val_set)
    __swig_setmethods__["n"] = _swigfaiss_avx2.Repeat_n_set
    __swig_getmethods__["n"] = _swigfaiss_avx2.Repeat_n_get
    if _newclass:
        n = _swig_property(_swigfaiss_avx2.Repeat_n_get, _swigfaiss_avx2.Repeat_n_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_Repeat()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_Repeat
    __del__ = lambda self: None
Repeat_swigregister = _swigfaiss_avx2.Repeat_swigregister
Repeat_swigregister(Repeat)

class Repeats(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Repeats, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Repeats, name)
    __repr__ = _swig_repr
    __swig_setmethods__["dim"] = _swigfaiss_avx2.Repeats_dim_set
    __swig_getmethods__["dim"] = _swigfaiss_avx2.Repeats_dim_get
    if _newclass:
        dim = _swig_property(_swigfaiss_avx2.Repeats_dim_get, _swigfaiss_avx2.Repeats_dim_set)
    __swig_setmethods__["repeats"] = _swigfaiss_avx2.Repeats_repeats_set
    __swig_getmethods__["repeats"] = _swigfaiss_avx2.Repeats_repeats_get
    if _newclass:
        repeats = _swig_property(_swigfaiss_avx2.Repeats_repeats_get, _swigfaiss_avx2.Repeats_repeats_set)

    def __init__(self, dim=0, c=None):
        this = _swigfaiss_avx2.new_Repeats(dim, c)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def count(self):
        return _swigfaiss_avx2.Repeats_count(self)

    def encode(self, c):
        return _swigfaiss_avx2.Repeats_encode(self, c)

    def decode(self, code, c):
        return _swigfaiss_avx2.Repeats_decode(self, code, c)
    __swig_destroy__ = _swigfaiss_avx2.delete_Repeats
    __del__ = lambda self: None
Repeats_swigregister = _swigfaiss_avx2.Repeats_swigregister
Repeats_swigregister(Repeats)

class ZnSphereCodec(ZnSphereSearch, EnumeratedVectors):
    __swig_setmethods__ = {}
    for _s in [ZnSphereSearch, EnumeratedVectors]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ZnSphereCodec, name, value)
    __swig_getmethods__ = {}
    for _s in [ZnSphereSearch, EnumeratedVectors]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ZnSphereCodec, name)
    __repr__ = _swig_repr
    __swig_setmethods__["code_segments"] = _swigfaiss_avx2.ZnSphereCodec_code_segments_set
    __swig_getmethods__["code_segments"] = _swigfaiss_avx2.ZnSphereCodec_code_segments_get
    if _newclass:
        code_segments = _swig_property(_swigfaiss_avx2.ZnSphereCodec_code_segments_get, _swigfaiss_avx2.ZnSphereCodec_code_segments_set)
    __swig_setmethods__["nv"] = _swigfaiss_avx2.ZnSphereCodec_nv_set
    __swig_getmethods__["nv"] = _swigfaiss_avx2.ZnSphereCodec_nv_get
    if _newclass:
        nv = _swig_property(_swigfaiss_avx2.ZnSphereCodec_nv_get, _swigfaiss_avx2.ZnSphereCodec_nv_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.ZnSphereCodec_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.ZnSphereCodec_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.ZnSphereCodec_code_size_get, _swigfaiss_avx2.ZnSphereCodec_code_size_set)

    def __init__(self, dim, r2):
        this = _swigfaiss_avx2.new_ZnSphereCodec(dim, r2)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def search_and_encode(self, x):
        return _swigfaiss_avx2.ZnSphereCodec_search_and_encode(self, x)

    def decode(self, code, c):
        return _swigfaiss_avx2.ZnSphereCodec_decode(self, code, c)

    def encode(self, x):
        return _swigfaiss_avx2.ZnSphereCodec_encode(self, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_ZnSphereCodec
    __del__ = lambda self: None
ZnSphereCodec_swigregister = _swigfaiss_avx2.ZnSphereCodec_swigregister
ZnSphereCodec_swigregister(ZnSphereCodec)

class ZnSphereCodecRec(EnumeratedVectors):
    __swig_setmethods__ = {}
    for _s in [EnumeratedVectors]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ZnSphereCodecRec, name, value)
    __swig_getmethods__ = {}
    for _s in [EnumeratedVectors]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ZnSphereCodecRec, name)
    __repr__ = _swig_repr
    __swig_setmethods__["r2"] = _swigfaiss_avx2.ZnSphereCodecRec_r2_set
    __swig_getmethods__["r2"] = _swigfaiss_avx2.ZnSphereCodecRec_r2_get
    if _newclass:
        r2 = _swig_property(_swigfaiss_avx2.ZnSphereCodecRec_r2_get, _swigfaiss_avx2.ZnSphereCodecRec_r2_set)
    __swig_setmethods__["log2_dim"] = _swigfaiss_avx2.ZnSphereCodecRec_log2_dim_set
    __swig_getmethods__["log2_dim"] = _swigfaiss_avx2.ZnSphereCodecRec_log2_dim_get
    if _newclass:
        log2_dim = _swig_property(_swigfaiss_avx2.ZnSphereCodecRec_log2_dim_get, _swigfaiss_avx2.ZnSphereCodecRec_log2_dim_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.ZnSphereCodecRec_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.ZnSphereCodecRec_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.ZnSphereCodecRec_code_size_get, _swigfaiss_avx2.ZnSphereCodecRec_code_size_set)

    def __init__(self, dim, r2):
        this = _swigfaiss_avx2.new_ZnSphereCodecRec(dim, r2)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def encode_centroid(self, c):
        return _swigfaiss_avx2.ZnSphereCodecRec_encode_centroid(self, c)

    def decode(self, code, c):
        return _swigfaiss_avx2.ZnSphereCodecRec_decode(self, code, c)

    def encode(self, x):
        return _swigfaiss_avx2.ZnSphereCodecRec_encode(self, x)
    __swig_setmethods__["all_nv"] = _swigfaiss_avx2.ZnSphereCodecRec_all_nv_set
    __swig_getmethods__["all_nv"] = _swigfaiss_avx2.ZnSphereCodecRec_all_nv_get
    if _newclass:
        all_nv = _swig_property(_swigfaiss_avx2.ZnSphereCodecRec_all_nv_get, _swigfaiss_avx2.ZnSphereCodecRec_all_nv_set)
    __swig_setmethods__["all_nv_cum"] = _swigfaiss_avx2.ZnSphereCodecRec_all_nv_cum_set
    __swig_getmethods__["all_nv_cum"] = _swigfaiss_avx2.ZnSphereCodecRec_all_nv_cum_get
    if _newclass:
        all_nv_cum = _swig_property(_swigfaiss_avx2.ZnSphereCodecRec_all_nv_cum_get, _swigfaiss_avx2.ZnSphereCodecRec_all_nv_cum_set)
    __swig_setmethods__["decode_cache_ld"] = _swigfaiss_avx2.ZnSphereCodecRec_decode_cache_ld_set
    __swig_getmethods__["decode_cache_ld"] = _swigfaiss_avx2.ZnSphereCodecRec_decode_cache_ld_get
    if _newclass:
        decode_cache_ld = _swig_property(_swigfaiss_avx2.ZnSphereCodecRec_decode_cache_ld_get, _swigfaiss_avx2.ZnSphereCodecRec_decode_cache_ld_set)
    __swig_setmethods__["decode_cache"] = _swigfaiss_avx2.ZnSphereCodecRec_decode_cache_set
    __swig_getmethods__["decode_cache"] = _swigfaiss_avx2.ZnSphereCodecRec_decode_cache_get
    if _newclass:
        decode_cache = _swig_property(_swigfaiss_avx2.ZnSphereCodecRec_decode_cache_get, _swigfaiss_avx2.ZnSphereCodecRec_decode_cache_set)

    def get_nv(self, ld, r2a):
        return _swigfaiss_avx2.ZnSphereCodecRec_get_nv(self, ld, r2a)

    def get_nv_cum(self, ld, r2t, r2a):
        return _swigfaiss_avx2.ZnSphereCodecRec_get_nv_cum(self, ld, r2t, r2a)

    def set_nv_cum(self, ld, r2t, r2a, v):
        return _swigfaiss_avx2.ZnSphereCodecRec_set_nv_cum(self, ld, r2t, r2a, v)
    __swig_destroy__ = _swigfaiss_avx2.delete_ZnSphereCodecRec
    __del__ = lambda self: None
ZnSphereCodecRec_swigregister = _swigfaiss_avx2.ZnSphereCodecRec_swigregister
ZnSphereCodecRec_swigregister(ZnSphereCodecRec)

class ZnSphereCodecAlt(ZnSphereCodec):
    __swig_setmethods__ = {}
    for _s in [ZnSphereCodec]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ZnSphereCodecAlt, name, value)
    __swig_getmethods__ = {}
    for _s in [ZnSphereCodec]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ZnSphereCodecAlt, name)
    __repr__ = _swig_repr
    __swig_setmethods__["use_rec"] = _swigfaiss_avx2.ZnSphereCodecAlt_use_rec_set
    __swig_getmethods__["use_rec"] = _swigfaiss_avx2.ZnSphereCodecAlt_use_rec_get
    if _newclass:
        use_rec = _swig_property(_swigfaiss_avx2.ZnSphereCodecAlt_use_rec_get, _swigfaiss_avx2.ZnSphereCodecAlt_use_rec_set)
    __swig_setmethods__["znc_rec"] = _swigfaiss_avx2.ZnSphereCodecAlt_znc_rec_set
    __swig_getmethods__["znc_rec"] = _swigfaiss_avx2.ZnSphereCodecAlt_znc_rec_get
    if _newclass:
        znc_rec = _swig_property(_swigfaiss_avx2.ZnSphereCodecAlt_znc_rec_get, _swigfaiss_avx2.ZnSphereCodecAlt_znc_rec_set)

    def __init__(self, dim, r2):
        this = _swigfaiss_avx2.new_ZnSphereCodecAlt(dim, r2)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def encode(self, x):
        return _swigfaiss_avx2.ZnSphereCodecAlt_encode(self, x)

    def decode(self, code, c):
        return _swigfaiss_avx2.ZnSphereCodecAlt_decode(self, code, c)
    __swig_destroy__ = _swigfaiss_avx2.delete_ZnSphereCodecAlt
    __del__ = lambda self: None
ZnSphereCodecAlt_swigregister = _swigfaiss_avx2.ZnSphereCodecAlt_swigregister
ZnSphereCodecAlt_swigregister(ZnSphereCodecAlt)

class IndexLattice(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexLattice, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexLattice, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nsq"] = _swigfaiss_avx2.IndexLattice_nsq_set
    __swig_getmethods__["nsq"] = _swigfaiss_avx2.IndexLattice_nsq_get
    if _newclass:
        nsq = _swig_property(_swigfaiss_avx2.IndexLattice_nsq_get, _swigfaiss_avx2.IndexLattice_nsq_set)
    __swig_setmethods__["dsq"] = _swigfaiss_avx2.IndexLattice_dsq_set
    __swig_getmethods__["dsq"] = _swigfaiss_avx2.IndexLattice_dsq_get
    if _newclass:
        dsq = _swig_property(_swigfaiss_avx2.IndexLattice_dsq_get, _swigfaiss_avx2.IndexLattice_dsq_set)
    __swig_setmethods__["zn_sphere_codec"] = _swigfaiss_avx2.IndexLattice_zn_sphere_codec_set
    __swig_getmethods__["zn_sphere_codec"] = _swigfaiss_avx2.IndexLattice_zn_sphere_codec_get
    if _newclass:
        zn_sphere_codec = _swig_property(_swigfaiss_avx2.IndexLattice_zn_sphere_codec_get, _swigfaiss_avx2.IndexLattice_zn_sphere_codec_set)
    __swig_setmethods__["scale_nbit"] = _swigfaiss_avx2.IndexLattice_scale_nbit_set
    __swig_getmethods__["scale_nbit"] = _swigfaiss_avx2.IndexLattice_scale_nbit_get
    if _newclass:
        scale_nbit = _swig_property(_swigfaiss_avx2.IndexLattice_scale_nbit_get, _swigfaiss_avx2.IndexLattice_scale_nbit_set)
    __swig_setmethods__["lattice_nbit"] = _swigfaiss_avx2.IndexLattice_lattice_nbit_set
    __swig_getmethods__["lattice_nbit"] = _swigfaiss_avx2.IndexLattice_lattice_nbit_get
    if _newclass:
        lattice_nbit = _swig_property(_swigfaiss_avx2.IndexLattice_lattice_nbit_get, _swigfaiss_avx2.IndexLattice_lattice_nbit_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.IndexLattice_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.IndexLattice_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.IndexLattice_code_size_get, _swigfaiss_avx2.IndexLattice_code_size_set)
    __swig_setmethods__["trained"] = _swigfaiss_avx2.IndexLattice_trained_set
    __swig_getmethods__["trained"] = _swigfaiss_avx2.IndexLattice_trained_get
    if _newclass:
        trained = _swig_property(_swigfaiss_avx2.IndexLattice_trained_get, _swigfaiss_avx2.IndexLattice_trained_set)

    def __init__(self, d, nsq, scale_nbit, r2):
        this = _swigfaiss_avx2.new_IndexLattice(d, nsq, scale_nbit, r2)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def train(self, n, x):
        return _swigfaiss_avx2.IndexLattice_train(self, n, x)

    def sa_code_size(self):
        return _swigfaiss_avx2.IndexLattice_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.IndexLattice_sa_encode(self, n, x, bytes)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexLattice_sa_decode(self, n, bytes, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexLattice_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexLattice_search(self, n, x, k, distances, labels)

    def reset(self):
        return _swigfaiss_avx2.IndexLattice_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexLattice
    __del__ = lambda self: None
IndexLattice_swigregister = _swigfaiss_avx2.IndexLattice_swigregister
IndexLattice_swigregister(IndexLattice)

class IVFPQSearchParameters(IVFSearchParameters):
    __swig_setmethods__ = {}
    for _s in [IVFSearchParameters]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IVFPQSearchParameters, name, value)
    __swig_getmethods__ = {}
    for _s in [IVFSearchParameters]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IVFPQSearchParameters, name)
    __repr__ = _swig_repr
    __swig_setmethods__["scan_table_threshold"] = _swigfaiss_avx2.IVFPQSearchParameters_scan_table_threshold_set
    __swig_getmethods__["scan_table_threshold"] = _swigfaiss_avx2.IVFPQSearchParameters_scan_table_threshold_get
    if _newclass:
        scan_table_threshold = _swig_property(_swigfaiss_avx2.IVFPQSearchParameters_scan_table_threshold_get, _swigfaiss_avx2.IVFPQSearchParameters_scan_table_threshold_set)
    __swig_setmethods__["polysemous_ht"] = _swigfaiss_avx2.IVFPQSearchParameters_polysemous_ht_set
    __swig_getmethods__["polysemous_ht"] = _swigfaiss_avx2.IVFPQSearchParameters_polysemous_ht_get
    if _newclass:
        polysemous_ht = _swig_property(_swigfaiss_avx2.IVFPQSearchParameters_polysemous_ht_get, _swigfaiss_avx2.IVFPQSearchParameters_polysemous_ht_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_IVFPQSearchParameters
    __del__ = lambda self: None

    def __init__(self):
        this = _swigfaiss_avx2.new_IVFPQSearchParameters()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
IVFPQSearchParameters_swigregister = _swigfaiss_avx2.IVFPQSearchParameters_swigregister
IVFPQSearchParameters_swigregister(IVFPQSearchParameters)

class IndexIVFPQ(IndexIVF):
    __swig_setmethods__ = {}
    for _s in [IndexIVF]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVFPQ, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexIVF]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVFPQ, name)
    __repr__ = _swig_repr
    __swig_setmethods__["by_residual"] = _swigfaiss_avx2.IndexIVFPQ_by_residual_set
    __swig_getmethods__["by_residual"] = _swigfaiss_avx2.IndexIVFPQ_by_residual_get
    if _newclass:
        by_residual = _swig_property(_swigfaiss_avx2.IndexIVFPQ_by_residual_get, _swigfaiss_avx2.IndexIVFPQ_by_residual_set)
    __swig_setmethods__["pq"] = _swigfaiss_avx2.IndexIVFPQ_pq_set
    __swig_getmethods__["pq"] = _swigfaiss_avx2.IndexIVFPQ_pq_get
    if _newclass:
        pq = _swig_property(_swigfaiss_avx2.IndexIVFPQ_pq_get, _swigfaiss_avx2.IndexIVFPQ_pq_set)
    __swig_setmethods__["do_polysemous_training"] = _swigfaiss_avx2.IndexIVFPQ_do_polysemous_training_set
    __swig_getmethods__["do_polysemous_training"] = _swigfaiss_avx2.IndexIVFPQ_do_polysemous_training_get
    if _newclass:
        do_polysemous_training = _swig_property(_swigfaiss_avx2.IndexIVFPQ_do_polysemous_training_get, _swigfaiss_avx2.IndexIVFPQ_do_polysemous_training_set)
    __swig_setmethods__["polysemous_training"] = _swigfaiss_avx2.IndexIVFPQ_polysemous_training_set
    __swig_getmethods__["polysemous_training"] = _swigfaiss_avx2.IndexIVFPQ_polysemous_training_get
    if _newclass:
        polysemous_training = _swig_property(_swigfaiss_avx2.IndexIVFPQ_polysemous_training_get, _swigfaiss_avx2.IndexIVFPQ_polysemous_training_set)
    __swig_setmethods__["scan_table_threshold"] = _swigfaiss_avx2.IndexIVFPQ_scan_table_threshold_set
    __swig_getmethods__["scan_table_threshold"] = _swigfaiss_avx2.IndexIVFPQ_scan_table_threshold_get
    if _newclass:
        scan_table_threshold = _swig_property(_swigfaiss_avx2.IndexIVFPQ_scan_table_threshold_get, _swigfaiss_avx2.IndexIVFPQ_scan_table_threshold_set)
    __swig_setmethods__["polysemous_ht"] = _swigfaiss_avx2.IndexIVFPQ_polysemous_ht_set
    __swig_getmethods__["polysemous_ht"] = _swigfaiss_avx2.IndexIVFPQ_polysemous_ht_get
    if _newclass:
        polysemous_ht = _swig_property(_swigfaiss_avx2.IndexIVFPQ_polysemous_ht_get, _swigfaiss_avx2.IndexIVFPQ_polysemous_ht_set)
    __swig_setmethods__["use_precomputed_table"] = _swigfaiss_avx2.IndexIVFPQ_use_precomputed_table_set
    __swig_getmethods__["use_precomputed_table"] = _swigfaiss_avx2.IndexIVFPQ_use_precomputed_table_get
    if _newclass:
        use_precomputed_table = _swig_property(_swigfaiss_avx2.IndexIVFPQ_use_precomputed_table_get, _swigfaiss_avx2.IndexIVFPQ_use_precomputed_table_set)
    __swig_setmethods__["precomputed_table_max_bytes"] = _swigfaiss_avx2.IndexIVFPQ_precomputed_table_max_bytes_set
    __swig_getmethods__["precomputed_table_max_bytes"] = _swigfaiss_avx2.IndexIVFPQ_precomputed_table_max_bytes_get
    if _newclass:
        precomputed_table_max_bytes = _swig_property(_swigfaiss_avx2.IndexIVFPQ_precomputed_table_max_bytes_get, _swigfaiss_avx2.IndexIVFPQ_precomputed_table_max_bytes_set)
    __swig_setmethods__["precomputed_table"] = _swigfaiss_avx2.IndexIVFPQ_precomputed_table_set
    __swig_getmethods__["precomputed_table"] = _swigfaiss_avx2.IndexIVFPQ_precomputed_table_get
    if _newclass:
        precomputed_table = _swig_property(_swigfaiss_avx2.IndexIVFPQ_precomputed_table_get, _swigfaiss_avx2.IndexIVFPQ_precomputed_table_set)

    def add_with_ids(self, n, x, xids=None):
        return _swigfaiss_avx2.IndexIVFPQ_add_with_ids(self, n, x, xids)

    def encode_vectors(self, n, x, list_nos, codes, include_listnos=False):
        return _swigfaiss_avx2.IndexIVFPQ_encode_vectors(self, n, x, list_nos, codes, include_listnos)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexIVFPQ_sa_decode(self, n, bytes, x)

    def add_core_o(self, n, x, xids, residuals_2, precomputed_idx=None):
        return _swigfaiss_avx2.IndexIVFPQ_add_core_o(self, n, x, xids, residuals_2, precomputed_idx)

    def train_residual(self, n, x):
        return _swigfaiss_avx2.IndexIVFPQ_train_residual(self, n, x)

    def train_residual_o(self, n, x, residuals_2):
        return _swigfaiss_avx2.IndexIVFPQ_train_residual_o(self, n, x, residuals_2)

    def reconstruct_from_offset(self, list_no, offset, recons):
        return _swigfaiss_avx2.IndexIVFPQ_reconstruct_from_offset(self, list_no, offset, recons)

    def find_duplicates(self, ids, lims):
        return _swigfaiss_avx2.IndexIVFPQ_find_duplicates(self, ids, lims)

    def encode(self, key, x, code):
        return _swigfaiss_avx2.IndexIVFPQ_encode(self, key, x, code)

    def encode_multiple(self, n, keys, x, codes, compute_keys=False):
        return _swigfaiss_avx2.IndexIVFPQ_encode_multiple(self, n, keys, x, codes, compute_keys)

    def decode_multiple(self, n, keys, xcodes, x):
        return _swigfaiss_avx2.IndexIVFPQ_decode_multiple(self, n, keys, xcodes, x)

    def get_InvertedListScanner(self, store_pairs):
        return _swigfaiss_avx2.IndexIVFPQ_get_InvertedListScanner(self, store_pairs)

    def precompute_table(self):
        return _swigfaiss_avx2.IndexIVFPQ_precompute_table(self)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexIVFPQ(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFPQ
    __del__ = lambda self: None
IndexIVFPQ_swigregister = _swigfaiss_avx2.IndexIVFPQ_swigregister
IndexIVFPQ_swigregister(IndexIVFPQ)

class IndexIVFPQStats(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVFPQStats, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVFPQStats, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nrefine"] = _swigfaiss_avx2.IndexIVFPQStats_nrefine_set
    __swig_getmethods__["nrefine"] = _swigfaiss_avx2.IndexIVFPQStats_nrefine_get
    if _newclass:
        nrefine = _swig_property(_swigfaiss_avx2.IndexIVFPQStats_nrefine_get, _swigfaiss_avx2.IndexIVFPQStats_nrefine_set)
    __swig_setmethods__["n_hamming_pass"] = _swigfaiss_avx2.IndexIVFPQStats_n_hamming_pass_set
    __swig_getmethods__["n_hamming_pass"] = _swigfaiss_avx2.IndexIVFPQStats_n_hamming_pass_get
    if _newclass:
        n_hamming_pass = _swig_property(_swigfaiss_avx2.IndexIVFPQStats_n_hamming_pass_get, _swigfaiss_avx2.IndexIVFPQStats_n_hamming_pass_set)
    __swig_setmethods__["search_cycles"] = _swigfaiss_avx2.IndexIVFPQStats_search_cycles_set
    __swig_getmethods__["search_cycles"] = _swigfaiss_avx2.IndexIVFPQStats_search_cycles_get
    if _newclass:
        search_cycles = _swig_property(_swigfaiss_avx2.IndexIVFPQStats_search_cycles_get, _swigfaiss_avx2.IndexIVFPQStats_search_cycles_set)
    __swig_setmethods__["refine_cycles"] = _swigfaiss_avx2.IndexIVFPQStats_refine_cycles_set
    __swig_getmethods__["refine_cycles"] = _swigfaiss_avx2.IndexIVFPQStats_refine_cycles_get
    if _newclass:
        refine_cycles = _swig_property(_swigfaiss_avx2.IndexIVFPQStats_refine_cycles_get, _swigfaiss_avx2.IndexIVFPQStats_refine_cycles_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_IndexIVFPQStats()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def reset(self):
        return _swigfaiss_avx2.IndexIVFPQStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFPQStats
    __del__ = lambda self: None
IndexIVFPQStats_swigregister = _swigfaiss_avx2.IndexIVFPQStats_swigregister
IndexIVFPQStats_swigregister(IndexIVFPQStats)

class IndexIVFPQR(IndexIVFPQ):
    __swig_setmethods__ = {}
    for _s in [IndexIVFPQ]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIVFPQR, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexIVFPQ]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIVFPQR, name)
    __repr__ = _swig_repr
    __swig_setmethods__["refine_pq"] = _swigfaiss_avx2.IndexIVFPQR_refine_pq_set
    __swig_getmethods__["refine_pq"] = _swigfaiss_avx2.IndexIVFPQR_refine_pq_get
    if _newclass:
        refine_pq = _swig_property(_swigfaiss_avx2.IndexIVFPQR_refine_pq_get, _swigfaiss_avx2.IndexIVFPQR_refine_pq_set)
    __swig_setmethods__["refine_codes"] = _swigfaiss_avx2.IndexIVFPQR_refine_codes_set
    __swig_getmethods__["refine_codes"] = _swigfaiss_avx2.IndexIVFPQR_refine_codes_get
    if _newclass:
        refine_codes = _swig_property(_swigfaiss_avx2.IndexIVFPQR_refine_codes_get, _swigfaiss_avx2.IndexIVFPQR_refine_codes_set)
    __swig_setmethods__["k_factor"] = _swigfaiss_avx2.IndexIVFPQR_k_factor_set
    __swig_getmethods__["k_factor"] = _swigfaiss_avx2.IndexIVFPQR_k_factor_get
    if _newclass:
        k_factor = _swig_property(_swigfaiss_avx2.IndexIVFPQR_k_factor_get, _swigfaiss_avx2.IndexIVFPQR_k_factor_set)

    def reset(self):
        return _swigfaiss_avx2.IndexIVFPQR_reset(self)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexIVFPQR_remove_ids(self, sel)

    def train_residual(self, n, x):
        return _swigfaiss_avx2.IndexIVFPQR_train_residual(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexIVFPQR_add_with_ids(self, n, x, xids)

    def add_core(self, n, x, xids, precomputed_idx=None):
        return _swigfaiss_avx2.IndexIVFPQR_add_core(self, n, x, xids, precomputed_idx)

    def reconstruct_from_offset(self, list_no, offset, recons):
        return _swigfaiss_avx2.IndexIVFPQR_reconstruct_from_offset(self, list_no, offset, recons)

    def merge_from(self, other, add_id):
        return _swigfaiss_avx2.IndexIVFPQR_merge_from(self, other, add_id)

    def search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params=None):
        return _swigfaiss_avx2.IndexIVFPQR_search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexIVFPQR(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFPQR
    __del__ = lambda self: None
IndexIVFPQR_swigregister = _swigfaiss_avx2.IndexIVFPQR_swigregister
IndexIVFPQR_swigregister(IndexIVFPQR)

class Index2Layer(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, Index2Layer, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, Index2Layer, name)
    __repr__ = _swig_repr
    __swig_setmethods__["q1"] = _swigfaiss_avx2.Index2Layer_q1_set
    __swig_getmethods__["q1"] = _swigfaiss_avx2.Index2Layer_q1_get
    if _newclass:
        q1 = _swig_property(_swigfaiss_avx2.Index2Layer_q1_get, _swigfaiss_avx2.Index2Layer_q1_set)
    __swig_setmethods__["pq"] = _swigfaiss_avx2.Index2Layer_pq_set
    __swig_getmethods__["pq"] = _swigfaiss_avx2.Index2Layer_pq_get
    if _newclass:
        pq = _swig_property(_swigfaiss_avx2.Index2Layer_pq_get, _swigfaiss_avx2.Index2Layer_pq_set)
    __swig_setmethods__["codes"] = _swigfaiss_avx2.Index2Layer_codes_set
    __swig_getmethods__["codes"] = _swigfaiss_avx2.Index2Layer_codes_get
    if _newclass:
        codes = _swig_property(_swigfaiss_avx2.Index2Layer_codes_get, _swigfaiss_avx2.Index2Layer_codes_set)
    __swig_setmethods__["code_size_1"] = _swigfaiss_avx2.Index2Layer_code_size_1_set
    __swig_getmethods__["code_size_1"] = _swigfaiss_avx2.Index2Layer_code_size_1_get
    if _newclass:
        code_size_1 = _swig_property(_swigfaiss_avx2.Index2Layer_code_size_1_get, _swigfaiss_avx2.Index2Layer_code_size_1_set)
    __swig_setmethods__["code_size_2"] = _swigfaiss_avx2.Index2Layer_code_size_2_set
    __swig_getmethods__["code_size_2"] = _swigfaiss_avx2.Index2Layer_code_size_2_get
    if _newclass:
        code_size_2 = _swig_property(_swigfaiss_avx2.Index2Layer_code_size_2_get, _swigfaiss_avx2.Index2Layer_code_size_2_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.Index2Layer_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.Index2Layer_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.Index2Layer_code_size_get, _swigfaiss_avx2.Index2Layer_code_size_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_Index2Layer(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_Index2Layer
    __del__ = lambda self: None

    def train(self, n, x):
        return _swigfaiss_avx2.Index2Layer_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.Index2Layer_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.Index2Layer_search(self, n, x, k, distances, labels)

    def reconstruct_n(self, i0, ni, recons):
        return _swigfaiss_avx2.Index2Layer_reconstruct_n(self, i0, ni, recons)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.Index2Layer_reconstruct(self, key, recons)

    def reset(self):
        return _swigfaiss_avx2.Index2Layer_reset(self)

    def get_distance_computer(self):
        return _swigfaiss_avx2.Index2Layer_get_distance_computer(self)

    def transfer_to_IVFPQ(self, other):
        return _swigfaiss_avx2.Index2Layer_transfer_to_IVFPQ(self, other)

    def sa_code_size(self):
        return _swigfaiss_avx2.Index2Layer_sa_code_size(self)

    def sa_encode(self, n, x, bytes):
        return _swigfaiss_avx2.Index2Layer_sa_encode(self, n, x, bytes)

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.Index2Layer_sa_decode(self, n, bytes, x)
Index2Layer_swigregister = _swigfaiss_avx2.Index2Layer_swigregister
Index2Layer_swigregister(Index2Layer)

class IndexBinary(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinary, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinary, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["d"] = _swigfaiss_avx2.IndexBinary_d_set
    __swig_getmethods__["d"] = _swigfaiss_avx2.IndexBinary_d_get
    if _newclass:
        d = _swig_property(_swigfaiss_avx2.IndexBinary_d_get, _swigfaiss_avx2.IndexBinary_d_set)
    __swig_setmethods__["code_size"] = _swigfaiss_avx2.IndexBinary_code_size_set
    __swig_getmethods__["code_size"] = _swigfaiss_avx2.IndexBinary_code_size_get
    if _newclass:
        code_size = _swig_property(_swigfaiss_avx2.IndexBinary_code_size_get, _swigfaiss_avx2.IndexBinary_code_size_set)
    __swig_setmethods__["ntotal"] = _swigfaiss_avx2.IndexBinary_ntotal_set
    __swig_getmethods__["ntotal"] = _swigfaiss_avx2.IndexBinary_ntotal_get
    if _newclass:
        ntotal = _swig_property(_swigfaiss_avx2.IndexBinary_ntotal_get, _swigfaiss_avx2.IndexBinary_ntotal_set)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.IndexBinary_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.IndexBinary_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.IndexBinary_verbose_get, _swigfaiss_avx2.IndexBinary_verbose_set)
    __swig_setmethods__["is_trained"] = _swigfaiss_avx2.IndexBinary_is_trained_set
    __swig_getmethods__["is_trained"] = _swigfaiss_avx2.IndexBinary_is_trained_get
    if _newclass:
        is_trained = _swig_property(_swigfaiss_avx2.IndexBinary_is_trained_get, _swigfaiss_avx2.IndexBinary_is_trained_set)
    __swig_setmethods__["metric_type"] = _swigfaiss_avx2.IndexBinary_metric_type_set
    __swig_getmethods__["metric_type"] = _swigfaiss_avx2.IndexBinary_metric_type_get
    if _newclass:
        metric_type = _swig_property(_swigfaiss_avx2.IndexBinary_metric_type_get, _swigfaiss_avx2.IndexBinary_metric_type_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinary
    __del__ = lambda self: None

    def train(self, n, x):
        return _swigfaiss_avx2.IndexBinary_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinary_add(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexBinary_add_with_ids(self, n, x, xids)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinary_search(self, n, x, k, distances, labels)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexBinary_range_search(self, n, x, radius, result)

    def assign(self, n, x, labels, k=1):
        return _swigfaiss_avx2.IndexBinary_assign(self, n, x, labels, k)

    def reset(self):
        return _swigfaiss_avx2.IndexBinary_reset(self)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexBinary_remove_ids(self, sel)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexBinary_reconstruct(self, key, recons)

    def reconstruct_n(self, i0, ni, recons):
        return _swigfaiss_avx2.IndexBinary_reconstruct_n(self, i0, ni, recons)

    def search_and_reconstruct(self, n, x, k, distances, labels, recons):
        return _swigfaiss_avx2.IndexBinary_search_and_reconstruct(self, n, x, k, distances, labels, recons)

    def display(self):
        return _swigfaiss_avx2.IndexBinary_display(self)
IndexBinary_swigregister = _swigfaiss_avx2.IndexBinary_swigregister
IndexBinary_swigregister(IndexBinary)

class IndexBinaryFlat(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryFlat, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryFlat, name)
    __repr__ = _swig_repr
    __swig_setmethods__["xb"] = _swigfaiss_avx2.IndexBinaryFlat_xb_set
    __swig_getmethods__["xb"] = _swigfaiss_avx2.IndexBinaryFlat_xb_get
    if _newclass:
        xb = _swig_property(_swigfaiss_avx2.IndexBinaryFlat_xb_get, _swigfaiss_avx2.IndexBinaryFlat_xb_set)
    __swig_setmethods__["use_heap"] = _swigfaiss_avx2.IndexBinaryFlat_use_heap_set
    __swig_getmethods__["use_heap"] = _swigfaiss_avx2.IndexBinaryFlat_use_heap_get
    if _newclass:
        use_heap = _swig_property(_swigfaiss_avx2.IndexBinaryFlat_use_heap_get, _swigfaiss_avx2.IndexBinaryFlat_use_heap_set)
    __swig_setmethods__["query_batch_size"] = _swigfaiss_avx2.IndexBinaryFlat_query_batch_size_set
    __swig_getmethods__["query_batch_size"] = _swigfaiss_avx2.IndexBinaryFlat_query_batch_size_get
    if _newclass:
        query_batch_size = _swig_property(_swigfaiss_avx2.IndexBinaryFlat_query_batch_size_get, _swigfaiss_avx2.IndexBinaryFlat_query_batch_size_set)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryFlat_add(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryFlat_reset(self)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryFlat_search(self, n, x, k, distances, labels)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexBinaryFlat_range_search(self, n, x, radius, result)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexBinaryFlat_reconstruct(self, key, recons)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexBinaryFlat_remove_ids(self, sel)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryFlat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryFlat
    __del__ = lambda self: None
IndexBinaryFlat_swigregister = _swigfaiss_avx2.IndexBinaryFlat_swigregister
IndexBinaryFlat_swigregister(IndexBinaryFlat)

class IndexBinaryIVF(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryIVF, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryIVF, name)
    __repr__ = _swig_repr
    __swig_setmethods__["invlists"] = _swigfaiss_avx2.IndexBinaryIVF_invlists_set
    __swig_getmethods__["invlists"] = _swigfaiss_avx2.IndexBinaryIVF_invlists_get
    if _newclass:
        invlists = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_invlists_get, _swigfaiss_avx2.IndexBinaryIVF_invlists_set)
    __swig_setmethods__["own_invlists"] = _swigfaiss_avx2.IndexBinaryIVF_own_invlists_set
    __swig_getmethods__["own_invlists"] = _swigfaiss_avx2.IndexBinaryIVF_own_invlists_get
    if _newclass:
        own_invlists = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_own_invlists_get, _swigfaiss_avx2.IndexBinaryIVF_own_invlists_set)
    __swig_setmethods__["nprobe"] = _swigfaiss_avx2.IndexBinaryIVF_nprobe_set
    __swig_getmethods__["nprobe"] = _swigfaiss_avx2.IndexBinaryIVF_nprobe_get
    if _newclass:
        nprobe = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_nprobe_get, _swigfaiss_avx2.IndexBinaryIVF_nprobe_set)
    __swig_setmethods__["max_codes"] = _swigfaiss_avx2.IndexBinaryIVF_max_codes_set
    __swig_getmethods__["max_codes"] = _swigfaiss_avx2.IndexBinaryIVF_max_codes_get
    if _newclass:
        max_codes = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_max_codes_get, _swigfaiss_avx2.IndexBinaryIVF_max_codes_set)
    __swig_setmethods__["use_heap"] = _swigfaiss_avx2.IndexBinaryIVF_use_heap_set
    __swig_getmethods__["use_heap"] = _swigfaiss_avx2.IndexBinaryIVF_use_heap_get
    if _newclass:
        use_heap = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_use_heap_get, _swigfaiss_avx2.IndexBinaryIVF_use_heap_set)
    __swig_setmethods__["direct_map"] = _swigfaiss_avx2.IndexBinaryIVF_direct_map_set
    __swig_getmethods__["direct_map"] = _swigfaiss_avx2.IndexBinaryIVF_direct_map_get
    if _newclass:
        direct_map = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_direct_map_get, _swigfaiss_avx2.IndexBinaryIVF_direct_map_set)
    __swig_setmethods__["quantizer"] = _swigfaiss_avx2.IndexBinaryIVF_quantizer_set
    __swig_getmethods__["quantizer"] = _swigfaiss_avx2.IndexBinaryIVF_quantizer_get
    if _newclass:
        quantizer = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_quantizer_get, _swigfaiss_avx2.IndexBinaryIVF_quantizer_set)
    __swig_setmethods__["nlist"] = _swigfaiss_avx2.IndexBinaryIVF_nlist_set
    __swig_getmethods__["nlist"] = _swigfaiss_avx2.IndexBinaryIVF_nlist_get
    if _newclass:
        nlist = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_nlist_get, _swigfaiss_avx2.IndexBinaryIVF_nlist_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryIVF_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryIVF_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_own_fields_get, _swigfaiss_avx2.IndexBinaryIVF_own_fields_set)
    __swig_setmethods__["cp"] = _swigfaiss_avx2.IndexBinaryIVF_cp_set
    __swig_getmethods__["cp"] = _swigfaiss_avx2.IndexBinaryIVF_cp_get
    if _newclass:
        cp = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_cp_get, _swigfaiss_avx2.IndexBinaryIVF_cp_set)
    __swig_setmethods__["clustering_index"] = _swigfaiss_avx2.IndexBinaryIVF_clustering_index_set
    __swig_getmethods__["clustering_index"] = _swigfaiss_avx2.IndexBinaryIVF_clustering_index_get
    if _newclass:
        clustering_index = _swig_property(_swigfaiss_avx2.IndexBinaryIVF_clustering_index_get, _swigfaiss_avx2.IndexBinaryIVF_clustering_index_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryIVF(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryIVF
    __del__ = lambda self: None

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryIVF_reset(self)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexBinaryIVF_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryIVF_add(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexBinaryIVF_add_with_ids(self, n, x, xids)

    def add_core(self, n, x, xids, precomputed_idx):
        return _swigfaiss_avx2.IndexBinaryIVF_add_core(self, n, x, xids, precomputed_idx)

    def search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params=None):
        return _swigfaiss_avx2.IndexBinaryIVF_search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params)

    def get_InvertedListScanner(self, store_pairs=False):
        return _swigfaiss_avx2.IndexBinaryIVF_get_InvertedListScanner(self, store_pairs)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryIVF_search(self, n, x, k, distances, labels)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexBinaryIVF_range_search(self, n, x, radius, result)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexBinaryIVF_reconstruct(self, key, recons)

    def reconstruct_n(self, i0, ni, recons):
        return _swigfaiss_avx2.IndexBinaryIVF_reconstruct_n(self, i0, ni, recons)

    def search_and_reconstruct(self, n, x, k, distances, labels, recons):
        return _swigfaiss_avx2.IndexBinaryIVF_search_and_reconstruct(self, n, x, k, distances, labels, recons)

    def reconstruct_from_offset(self, list_no, offset, recons):
        return _swigfaiss_avx2.IndexBinaryIVF_reconstruct_from_offset(self, list_no, offset, recons)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexBinaryIVF_remove_ids(self, sel)

    def merge_from(self, other, add_id):
        return _swigfaiss_avx2.IndexBinaryIVF_merge_from(self, other, add_id)

    def get_list_size(self, list_no):
        return _swigfaiss_avx2.IndexBinaryIVF_get_list_size(self, list_no)

    def make_direct_map(self, new_maintain_direct_map=True):
        return _swigfaiss_avx2.IndexBinaryIVF_make_direct_map(self, new_maintain_direct_map)

    def set_direct_map_type(self, type):
        return _swigfaiss_avx2.IndexBinaryIVF_set_direct_map_type(self, type)

    def replace_invlists(self, il, own=False):
        return _swigfaiss_avx2.IndexBinaryIVF_replace_invlists(self, il, own)
IndexBinaryIVF_swigregister = _swigfaiss_avx2.IndexBinaryIVF_swigregister
IndexBinaryIVF_swigregister(IndexBinaryIVF)

class IndexBinaryFromFloat(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryFromFloat, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryFromFloat, name)
    __repr__ = _swig_repr
    __swig_setmethods__["index"] = _swigfaiss_avx2.IndexBinaryFromFloat_index_set
    __swig_getmethods__["index"] = _swigfaiss_avx2.IndexBinaryFromFloat_index_get
    if _newclass:
        index = _swig_property(_swigfaiss_avx2.IndexBinaryFromFloat_index_get, _swigfaiss_avx2.IndexBinaryFromFloat_index_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryFromFloat_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryFromFloat_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexBinaryFromFloat_own_fields_get, _swigfaiss_avx2.IndexBinaryFromFloat_own_fields_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryFromFloat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryFromFloat
    __del__ = lambda self: None

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryFromFloat_add(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryFromFloat_reset(self)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryFromFloat_search(self, n, x, k, distances, labels)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexBinaryFromFloat_train(self, n, x)
IndexBinaryFromFloat_swigregister = _swigfaiss_avx2.IndexBinaryFromFloat_swigregister
IndexBinaryFromFloat_swigregister(IndexBinaryFromFloat)

class IndexBinaryHNSW(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryHNSW, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryHNSW, name)
    __repr__ = _swig_repr
    __swig_setmethods__["hnsw"] = _swigfaiss_avx2.IndexBinaryHNSW_hnsw_set
    __swig_getmethods__["hnsw"] = _swigfaiss_avx2.IndexBinaryHNSW_hnsw_get
    if _newclass:
        hnsw = _swig_property(_swigfaiss_avx2.IndexBinaryHNSW_hnsw_get, _swigfaiss_avx2.IndexBinaryHNSW_hnsw_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryHNSW_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryHNSW_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexBinaryHNSW_own_fields_get, _swigfaiss_avx2.IndexBinaryHNSW_own_fields_set)
    __swig_setmethods__["storage"] = _swigfaiss_avx2.IndexBinaryHNSW_storage_set
    __swig_getmethods__["storage"] = _swigfaiss_avx2.IndexBinaryHNSW_storage_get
    if _newclass:
        storage = _swig_property(_swigfaiss_avx2.IndexBinaryHNSW_storage_get, _swigfaiss_avx2.IndexBinaryHNSW_storage_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryHNSW(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryHNSW
    __del__ = lambda self: None

    def get_distance_computer(self):
        return _swigfaiss_avx2.IndexBinaryHNSW_get_distance_computer(self)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryHNSW_add(self, n, x)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexBinaryHNSW_train(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryHNSW_search(self, n, x, k, distances, labels)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexBinaryHNSW_reconstruct(self, key, recons)

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryHNSW_reset(self)
IndexBinaryHNSW_swigregister = _swigfaiss_avx2.IndexBinaryHNSW_swigregister
IndexBinaryHNSW_swigregister(IndexBinaryHNSW)

class IndexBinaryHash(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryHash, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryHash, name)
    __repr__ = _swig_repr
    __swig_setmethods__["invlists"] = _swigfaiss_avx2.IndexBinaryHash_invlists_set
    __swig_getmethods__["invlists"] = _swigfaiss_avx2.IndexBinaryHash_invlists_get
    if _newclass:
        invlists = _swig_property(_swigfaiss_avx2.IndexBinaryHash_invlists_get, _swigfaiss_avx2.IndexBinaryHash_invlists_set)
    __swig_setmethods__["b"] = _swigfaiss_avx2.IndexBinaryHash_b_set
    __swig_getmethods__["b"] = _swigfaiss_avx2.IndexBinaryHash_b_get
    if _newclass:
        b = _swig_property(_swigfaiss_avx2.IndexBinaryHash_b_get, _swigfaiss_avx2.IndexBinaryHash_b_set)
    __swig_setmethods__["nflip"] = _swigfaiss_avx2.IndexBinaryHash_nflip_set
    __swig_getmethods__["nflip"] = _swigfaiss_avx2.IndexBinaryHash_nflip_get
    if _newclass:
        nflip = _swig_property(_swigfaiss_avx2.IndexBinaryHash_nflip_get, _swigfaiss_avx2.IndexBinaryHash_nflip_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryHash(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryHash_reset(self)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryHash_add(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexBinaryHash_add_with_ids(self, n, x, xids)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexBinaryHash_range_search(self, n, x, radius, result)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryHash_search(self, n, x, k, distances, labels)

    def display(self):
        return _swigfaiss_avx2.IndexBinaryHash_display(self)

    def hashtable_size(self):
        return _swigfaiss_avx2.IndexBinaryHash_hashtable_size(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryHash
    __del__ = lambda self: None
IndexBinaryHash_swigregister = _swigfaiss_avx2.IndexBinaryHash_swigregister
IndexBinaryHash_swigregister(IndexBinaryHash)

class IndexBinaryHashStats(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryHashStats, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryHashStats, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nq"] = _swigfaiss_avx2.IndexBinaryHashStats_nq_set
    __swig_getmethods__["nq"] = _swigfaiss_avx2.IndexBinaryHashStats_nq_get
    if _newclass:
        nq = _swig_property(_swigfaiss_avx2.IndexBinaryHashStats_nq_get, _swigfaiss_avx2.IndexBinaryHashStats_nq_set)
    __swig_setmethods__["n0"] = _swigfaiss_avx2.IndexBinaryHashStats_n0_set
    __swig_getmethods__["n0"] = _swigfaiss_avx2.IndexBinaryHashStats_n0_get
    if _newclass:
        n0 = _swig_property(_swigfaiss_avx2.IndexBinaryHashStats_n0_get, _swigfaiss_avx2.IndexBinaryHashStats_n0_set)
    __swig_setmethods__["nlist"] = _swigfaiss_avx2.IndexBinaryHashStats_nlist_set
    __swig_getmethods__["nlist"] = _swigfaiss_avx2.IndexBinaryHashStats_nlist_get
    if _newclass:
        nlist = _swig_property(_swigfaiss_avx2.IndexBinaryHashStats_nlist_get, _swigfaiss_avx2.IndexBinaryHashStats_nlist_set)
    __swig_setmethods__["ndis"] = _swigfaiss_avx2.IndexBinaryHashStats_ndis_set
    __swig_getmethods__["ndis"] = _swigfaiss_avx2.IndexBinaryHashStats_ndis_get
    if _newclass:
        ndis = _swig_property(_swigfaiss_avx2.IndexBinaryHashStats_ndis_get, _swigfaiss_avx2.IndexBinaryHashStats_ndis_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_IndexBinaryHashStats()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryHashStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryHashStats
    __del__ = lambda self: None
IndexBinaryHashStats_swigregister = _swigfaiss_avx2.IndexBinaryHashStats_swigregister
IndexBinaryHashStats_swigregister(IndexBinaryHashStats)

class IndexBinaryMultiHash(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryMultiHash, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryMultiHash, name)
    __repr__ = _swig_repr
    __swig_setmethods__["storage"] = _swigfaiss_avx2.IndexBinaryMultiHash_storage_set
    __swig_getmethods__["storage"] = _swigfaiss_avx2.IndexBinaryMultiHash_storage_get
    if _newclass:
        storage = _swig_property(_swigfaiss_avx2.IndexBinaryMultiHash_storage_get, _swigfaiss_avx2.IndexBinaryMultiHash_storage_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryMultiHash_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryMultiHash_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexBinaryMultiHash_own_fields_get, _swigfaiss_avx2.IndexBinaryMultiHash_own_fields_set)
    __swig_setmethods__["maps"] = _swigfaiss_avx2.IndexBinaryMultiHash_maps_set
    __swig_getmethods__["maps"] = _swigfaiss_avx2.IndexBinaryMultiHash_maps_get
    if _newclass:
        maps = _swig_property(_swigfaiss_avx2.IndexBinaryMultiHash_maps_get, _swigfaiss_avx2.IndexBinaryMultiHash_maps_set)
    __swig_setmethods__["nhash"] = _swigfaiss_avx2.IndexBinaryMultiHash_nhash_set
    __swig_getmethods__["nhash"] = _swigfaiss_avx2.IndexBinaryMultiHash_nhash_get
    if _newclass:
        nhash = _swig_property(_swigfaiss_avx2.IndexBinaryMultiHash_nhash_get, _swigfaiss_avx2.IndexBinaryMultiHash_nhash_set)
    __swig_setmethods__["b"] = _swigfaiss_avx2.IndexBinaryMultiHash_b_set
    __swig_getmethods__["b"] = _swigfaiss_avx2.IndexBinaryMultiHash_b_get
    if _newclass:
        b = _swig_property(_swigfaiss_avx2.IndexBinaryMultiHash_b_get, _swigfaiss_avx2.IndexBinaryMultiHash_b_set)
    __swig_setmethods__["nflip"] = _swigfaiss_avx2.IndexBinaryMultiHash_nflip_set
    __swig_getmethods__["nflip"] = _swigfaiss_avx2.IndexBinaryMultiHash_nflip_get
    if _newclass:
        nflip = _swig_property(_swigfaiss_avx2.IndexBinaryMultiHash_nflip_get, _swigfaiss_avx2.IndexBinaryMultiHash_nflip_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryMultiHash(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryMultiHash
    __del__ = lambda self: None

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryMultiHash_reset(self)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryMultiHash_add(self, n, x)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexBinaryMultiHash_range_search(self, n, x, radius, result)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryMultiHash_search(self, n, x, k, distances, labels)

    def hashtable_size(self):
        return _swigfaiss_avx2.IndexBinaryMultiHash_hashtable_size(self)
IndexBinaryMultiHash_swigregister = _swigfaiss_avx2.IndexBinaryMultiHash_swigregister
IndexBinaryMultiHash_swigregister(IndexBinaryMultiHash)

class ThreadedIndexBase(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ThreadedIndexBase, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ThreadedIndexBase, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _swigfaiss_avx2.delete_ThreadedIndexBase
    __del__ = lambda self: None

    def addIndex(self, index):
        return _swigfaiss_avx2.ThreadedIndexBase_addIndex(self, index)

    def removeIndex(self, index):
        return _swigfaiss_avx2.ThreadedIndexBase_removeIndex(self, index)

    def runOnIndex(self, *args):
        return _swigfaiss_avx2.ThreadedIndexBase_runOnIndex(self, *args)

    def reset(self):
        return _swigfaiss_avx2.ThreadedIndexBase_reset(self)

    def count(self):
        return _swigfaiss_avx2.ThreadedIndexBase_count(self)

    def at(self, *args):
        return _swigfaiss_avx2.ThreadedIndexBase_at(self, *args)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.ThreadedIndexBase_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.ThreadedIndexBase_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.ThreadedIndexBase_own_fields_get, _swigfaiss_avx2.ThreadedIndexBase_own_fields_set)
ThreadedIndexBase_swigregister = _swigfaiss_avx2.ThreadedIndexBase_swigregister
ThreadedIndexBase_swigregister(ThreadedIndexBase)

class ThreadedIndexBaseBinary(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ThreadedIndexBaseBinary, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ThreadedIndexBaseBinary, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _swigfaiss_avx2.delete_ThreadedIndexBaseBinary
    __del__ = lambda self: None

    def addIndex(self, index):
        return _swigfaiss_avx2.ThreadedIndexBaseBinary_addIndex(self, index)

    def removeIndex(self, index):
        return _swigfaiss_avx2.ThreadedIndexBaseBinary_removeIndex(self, index)

    def runOnIndex(self, *args):
        return _swigfaiss_avx2.ThreadedIndexBaseBinary_runOnIndex(self, *args)

    def reset(self):
        return _swigfaiss_avx2.ThreadedIndexBaseBinary_reset(self)

    def count(self):
        return _swigfaiss_avx2.ThreadedIndexBaseBinary_count(self)

    def at(self, *args):
        return _swigfaiss_avx2.ThreadedIndexBaseBinary_at(self, *args)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.ThreadedIndexBaseBinary_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.ThreadedIndexBaseBinary_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.ThreadedIndexBaseBinary_own_fields_get, _swigfaiss_avx2.ThreadedIndexBaseBinary_own_fields_set)
ThreadedIndexBaseBinary_swigregister = _swigfaiss_avx2.ThreadedIndexBaseBinary_swigregister
ThreadedIndexBaseBinary_swigregister(ThreadedIndexBaseBinary)

class IndexShards(ThreadedIndexBase):
    __swig_setmethods__ = {}
    for _s in [ThreadedIndexBase]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexShards, name, value)
    __swig_getmethods__ = {}
    for _s in [ThreadedIndexBase]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexShards, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexShards(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def add_shard(self, index):
        return _swigfaiss_avx2.IndexShards_add_shard(self, index)

    def remove_shard(self, index):
        return _swigfaiss_avx2.IndexShards_remove_shard(self, index)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexShards_add(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexShards_add_with_ids(self, n, x, xids)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexShards_search(self, n, x, k, distances, labels)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexShards_train(self, n, x)

    def sync_with_shard_indexes(self):
        return _swigfaiss_avx2.IndexShards_sync_with_shard_indexes(self)
    __swig_setmethods__["successive_ids"] = _swigfaiss_avx2.IndexShards_successive_ids_set
    __swig_getmethods__["successive_ids"] = _swigfaiss_avx2.IndexShards_successive_ids_get
    if _newclass:
        successive_ids = _swig_property(_swigfaiss_avx2.IndexShards_successive_ids_get, _swigfaiss_avx2.IndexShards_successive_ids_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexShards
    __del__ = lambda self: None
IndexShards_swigregister = _swigfaiss_avx2.IndexShards_swigregister
IndexShards_swigregister(IndexShards)

class IndexBinaryShards(ThreadedIndexBaseBinary):
    __swig_setmethods__ = {}
    for _s in [ThreadedIndexBaseBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryShards, name, value)
    __swig_getmethods__ = {}
    for _s in [ThreadedIndexBaseBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryShards, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryShards(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def add_shard(self, index):
        return _swigfaiss_avx2.IndexBinaryShards_add_shard(self, index)

    def remove_shard(self, index):
        return _swigfaiss_avx2.IndexBinaryShards_remove_shard(self, index)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryShards_add(self, n, x)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexBinaryShards_add_with_ids(self, n, x, xids)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryShards_search(self, n, x, k, distances, labels)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexBinaryShards_train(self, n, x)

    def sync_with_shard_indexes(self):
        return _swigfaiss_avx2.IndexBinaryShards_sync_with_shard_indexes(self)
    __swig_setmethods__["successive_ids"] = _swigfaiss_avx2.IndexBinaryShards_successive_ids_set
    __swig_getmethods__["successive_ids"] = _swigfaiss_avx2.IndexBinaryShards_successive_ids_get
    if _newclass:
        successive_ids = _swig_property(_swigfaiss_avx2.IndexBinaryShards_successive_ids_get, _swigfaiss_avx2.IndexBinaryShards_successive_ids_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryShards
    __del__ = lambda self: None
IndexBinaryShards_swigregister = _swigfaiss_avx2.IndexBinaryShards_swigregister
IndexBinaryShards_swigregister(IndexBinaryShards)

class IndexReplicas(ThreadedIndexBase):
    __swig_setmethods__ = {}
    for _s in [ThreadedIndexBase]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexReplicas, name, value)
    __swig_getmethods__ = {}
    for _s in [ThreadedIndexBase]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexReplicas, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexReplicas(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def add_replica(self, index):
        return _swigfaiss_avx2.IndexReplicas_add_replica(self, index)

    def remove_replica(self, index):
        return _swigfaiss_avx2.IndexReplicas_remove_replica(self, index)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexReplicas_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexReplicas_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexReplicas_search(self, n, x, k, distances, labels)

    def reconstruct(self, arg2, v):
        return _swigfaiss_avx2.IndexReplicas_reconstruct(self, arg2, v)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexReplicas
    __del__ = lambda self: None
IndexReplicas_swigregister = _swigfaiss_avx2.IndexReplicas_swigregister
IndexReplicas_swigregister(IndexReplicas)

class IndexBinaryReplicas(ThreadedIndexBaseBinary):
    __swig_setmethods__ = {}
    for _s in [ThreadedIndexBaseBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryReplicas, name, value)
    __swig_getmethods__ = {}
    for _s in [ThreadedIndexBaseBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryReplicas, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryReplicas(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def add_replica(self, index):
        return _swigfaiss_avx2.IndexBinaryReplicas_add_replica(self, index)

    def remove_replica(self, index):
        return _swigfaiss_avx2.IndexBinaryReplicas_remove_replica(self, index)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexBinaryReplicas_train(self, n, x)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryReplicas_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryReplicas_search(self, n, x, k, distances, labels)

    def reconstruct(self, arg2, v):
        return _swigfaiss_avx2.IndexBinaryReplicas_reconstruct(self, arg2, v)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryReplicas
    __del__ = lambda self: None
IndexBinaryReplicas_swigregister = _swigfaiss_avx2.IndexBinaryReplicas_swigregister
IndexBinaryReplicas_swigregister(IndexBinaryReplicas)

class IndexSplitVectors(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexSplitVectors, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexSplitVectors, name)
    __repr__ = _swig_repr
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexSplitVectors_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexSplitVectors_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexSplitVectors_own_fields_get, _swigfaiss_avx2.IndexSplitVectors_own_fields_set)
    __swig_setmethods__["threaded"] = _swigfaiss_avx2.IndexSplitVectors_threaded_set
    __swig_getmethods__["threaded"] = _swigfaiss_avx2.IndexSplitVectors_threaded_get
    if _newclass:
        threaded = _swig_property(_swigfaiss_avx2.IndexSplitVectors_threaded_get, _swigfaiss_avx2.IndexSplitVectors_threaded_set)
    __swig_setmethods__["sub_indexes"] = _swigfaiss_avx2.IndexSplitVectors_sub_indexes_set
    __swig_getmethods__["sub_indexes"] = _swigfaiss_avx2.IndexSplitVectors_sub_indexes_get
    if _newclass:
        sub_indexes = _swig_property(_swigfaiss_avx2.IndexSplitVectors_sub_indexes_get, _swigfaiss_avx2.IndexSplitVectors_sub_indexes_set)
    __swig_setmethods__["sum_d"] = _swigfaiss_avx2.IndexSplitVectors_sum_d_set
    __swig_getmethods__["sum_d"] = _swigfaiss_avx2.IndexSplitVectors_sum_d_get
    if _newclass:
        sum_d = _swig_property(_swigfaiss_avx2.IndexSplitVectors_sum_d_get, _swigfaiss_avx2.IndexSplitVectors_sum_d_set)

    def __init__(self, d, threaded=False):
        this = _swigfaiss_avx2.new_IndexSplitVectors(d, threaded)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def add_sub_index(self, arg2):
        return _swigfaiss_avx2.IndexSplitVectors_add_sub_index(self, arg2)

    def sync_with_sub_indexes(self):
        return _swigfaiss_avx2.IndexSplitVectors_sync_with_sub_indexes(self)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexSplitVectors_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexSplitVectors_search(self, n, x, k, distances, labels)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexSplitVectors_train(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.IndexSplitVectors_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexSplitVectors
    __del__ = lambda self: None
IndexSplitVectors_swigregister = _swigfaiss_avx2.IndexSplitVectors_swigregister
IndexSplitVectors_swigregister(IndexSplitVectors)

class IndexIDMap(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIDMap, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIDMap, name)
    __repr__ = _swig_repr
    __swig_setmethods__["index"] = _swigfaiss_avx2.IndexIDMap_index_set
    __swig_getmethods__["index"] = _swigfaiss_avx2.IndexIDMap_index_get
    if _newclass:
        index = _swig_property(_swigfaiss_avx2.IndexIDMap_index_get, _swigfaiss_avx2.IndexIDMap_index_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexIDMap_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexIDMap_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexIDMap_own_fields_get, _swigfaiss_avx2.IndexIDMap_own_fields_set)
    __swig_setmethods__["id_map"] = _swigfaiss_avx2.IndexIDMap_id_map_set
    __swig_getmethods__["id_map"] = _swigfaiss_avx2.IndexIDMap_id_map_get
    if _newclass:
        id_map = _swig_property(_swigfaiss_avx2.IndexIDMap_id_map_get, _swigfaiss_avx2.IndexIDMap_id_map_set)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexIDMap_add_with_ids(self, n, x, xids)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexIDMap_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexIDMap_search(self, n, x, k, distances, labels)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexIDMap_train(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.IndexIDMap_reset(self)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexIDMap_remove_ids(self, sel)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexIDMap_range_search(self, n, x, radius, result)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIDMap
    __del__ = lambda self: None

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexIDMap(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
IndexIDMap_swigregister = _swigfaiss_avx2.IndexIDMap_swigregister
IndexIDMap_swigregister(IndexIDMap)

class IndexBinaryIDMap(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryIDMap, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryIDMap, name)
    __repr__ = _swig_repr
    __swig_setmethods__["index"] = _swigfaiss_avx2.IndexBinaryIDMap_index_set
    __swig_getmethods__["index"] = _swigfaiss_avx2.IndexBinaryIDMap_index_get
    if _newclass:
        index = _swig_property(_swigfaiss_avx2.IndexBinaryIDMap_index_get, _swigfaiss_avx2.IndexBinaryIDMap_index_set)
    __swig_setmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryIDMap_own_fields_set
    __swig_getmethods__["own_fields"] = _swigfaiss_avx2.IndexBinaryIDMap_own_fields_get
    if _newclass:
        own_fields = _swig_property(_swigfaiss_avx2.IndexBinaryIDMap_own_fields_get, _swigfaiss_avx2.IndexBinaryIDMap_own_fields_set)
    __swig_setmethods__["id_map"] = _swigfaiss_avx2.IndexBinaryIDMap_id_map_set
    __swig_getmethods__["id_map"] = _swigfaiss_avx2.IndexBinaryIDMap_id_map_get
    if _newclass:
        id_map = _swig_property(_swigfaiss_avx2.IndexBinaryIDMap_id_map_get, _swigfaiss_avx2.IndexBinaryIDMap_id_map_set)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexBinaryIDMap_add_with_ids(self, n, x, xids)

    def add(self, n, x):
        return _swigfaiss_avx2.IndexBinaryIDMap_add(self, n, x)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.IndexBinaryIDMap_search(self, n, x, k, distances, labels)

    def train(self, n, x):
        return _swigfaiss_avx2.IndexBinaryIDMap_train(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryIDMap_reset(self)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexBinaryIDMap_remove_ids(self, sel)

    def range_search(self, n, x, radius, result):
        return _swigfaiss_avx2.IndexBinaryIDMap_range_search(self, n, x, radius, result)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryIDMap
    __del__ = lambda self: None

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryIDMap(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
IndexBinaryIDMap_swigregister = _swigfaiss_avx2.IndexBinaryIDMap_swigregister
IndexBinaryIDMap_swigregister(IndexBinaryIDMap)

class IndexIDMap2(IndexIDMap):
    __swig_setmethods__ = {}
    for _s in [IndexIDMap]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexIDMap2, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexIDMap]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexIDMap2, name)
    __repr__ = _swig_repr
    __swig_setmethods__["rev_map"] = _swigfaiss_avx2.IndexIDMap2_rev_map_set
    __swig_getmethods__["rev_map"] = _swigfaiss_avx2.IndexIDMap2_rev_map_get
    if _newclass:
        rev_map = _swig_property(_swigfaiss_avx2.IndexIDMap2_rev_map_get, _swigfaiss_avx2.IndexIDMap2_rev_map_set)

    def construct_rev_map(self):
        return _swigfaiss_avx2.IndexIDMap2_construct_rev_map(self)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexIDMap2_add_with_ids(self, n, x, xids)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexIDMap2_remove_ids(self, sel)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexIDMap2_reconstruct(self, key, recons)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIDMap2
    __del__ = lambda self: None

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexIDMap2(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
IndexIDMap2_swigregister = _swigfaiss_avx2.IndexIDMap2_swigregister
IndexIDMap2_swigregister(IndexIDMap2)

class IndexBinaryIDMap2(IndexBinaryIDMap):
    __swig_setmethods__ = {}
    for _s in [IndexBinaryIDMap]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IndexBinaryIDMap2, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinaryIDMap]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IndexBinaryIDMap2, name)
    __repr__ = _swig_repr
    __swig_setmethods__["rev_map"] = _swigfaiss_avx2.IndexBinaryIDMap2_rev_map_set
    __swig_getmethods__["rev_map"] = _swigfaiss_avx2.IndexBinaryIDMap2_rev_map_get
    if _newclass:
        rev_map = _swig_property(_swigfaiss_avx2.IndexBinaryIDMap2_rev_map_get, _swigfaiss_avx2.IndexBinaryIDMap2_rev_map_set)

    def construct_rev_map(self):
        return _swigfaiss_avx2.IndexBinaryIDMap2_construct_rev_map(self)

    def add_with_ids(self, n, x, xids):
        return _swigfaiss_avx2.IndexBinaryIDMap2_add_with_ids(self, n, x, xids)

    def remove_ids(self, sel):
        return _swigfaiss_avx2.IndexBinaryIDMap2_remove_ids(self, sel)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexBinaryIDMap2_reconstruct(self, key, recons)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryIDMap2
    __del__ = lambda self: None

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_IndexBinaryIDMap2(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
IndexBinaryIDMap2_swigregister = _swigfaiss_avx2.IndexBinaryIDMap2_swigregister
IndexBinaryIDMap2_swigregister(IndexBinaryIDMap2)

INDICES_CPU = _swigfaiss_avx2.INDICES_CPU
INDICES_IVF = _swigfaiss_avx2.INDICES_IVF
INDICES_32_BIT = _swigfaiss_avx2.INDICES_32_BIT
INDICES_64_BIT = _swigfaiss_avx2.INDICES_64_BIT
class GpuClonerOptions(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuClonerOptions, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, GpuClonerOptions, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuClonerOptions()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["indicesOptions"] = _swigfaiss_avx2.GpuClonerOptions_indicesOptions_set
    __swig_getmethods__["indicesOptions"] = _swigfaiss_avx2.GpuClonerOptions_indicesOptions_get
    if _newclass:
        indicesOptions = _swig_property(_swigfaiss_avx2.GpuClonerOptions_indicesOptions_get, _swigfaiss_avx2.GpuClonerOptions_indicesOptions_set)
    __swig_setmethods__["useFloat16CoarseQuantizer"] = _swigfaiss_avx2.GpuClonerOptions_useFloat16CoarseQuantizer_set
    __swig_getmethods__["useFloat16CoarseQuantizer"] = _swigfaiss_avx2.GpuClonerOptions_useFloat16CoarseQuantizer_get
    if _newclass:
        useFloat16CoarseQuantizer = _swig_property(_swigfaiss_avx2.GpuClonerOptions_useFloat16CoarseQuantizer_get, _swigfaiss_avx2.GpuClonerOptions_useFloat16CoarseQuantizer_set)
    __swig_setmethods__["useFloat16"] = _swigfaiss_avx2.GpuClonerOptions_useFloat16_set
    __swig_getmethods__["useFloat16"] = _swigfaiss_avx2.GpuClonerOptions_useFloat16_get
    if _newclass:
        useFloat16 = _swig_property(_swigfaiss_avx2.GpuClonerOptions_useFloat16_get, _swigfaiss_avx2.GpuClonerOptions_useFloat16_set)
    __swig_setmethods__["usePrecomputed"] = _swigfaiss_avx2.GpuClonerOptions_usePrecomputed_set
    __swig_getmethods__["usePrecomputed"] = _swigfaiss_avx2.GpuClonerOptions_usePrecomputed_get
    if _newclass:
        usePrecomputed = _swig_property(_swigfaiss_avx2.GpuClonerOptions_usePrecomputed_get, _swigfaiss_avx2.GpuClonerOptions_usePrecomputed_set)
    __swig_setmethods__["reserveVecs"] = _swigfaiss_avx2.GpuClonerOptions_reserveVecs_set
    __swig_getmethods__["reserveVecs"] = _swigfaiss_avx2.GpuClonerOptions_reserveVecs_get
    if _newclass:
        reserveVecs = _swig_property(_swigfaiss_avx2.GpuClonerOptions_reserveVecs_get, _swigfaiss_avx2.GpuClonerOptions_reserveVecs_set)
    __swig_setmethods__["storeTransposed"] = _swigfaiss_avx2.GpuClonerOptions_storeTransposed_set
    __swig_getmethods__["storeTransposed"] = _swigfaiss_avx2.GpuClonerOptions_storeTransposed_get
    if _newclass:
        storeTransposed = _swig_property(_swigfaiss_avx2.GpuClonerOptions_storeTransposed_get, _swigfaiss_avx2.GpuClonerOptions_storeTransposed_set)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.GpuClonerOptions_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.GpuClonerOptions_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.GpuClonerOptions_verbose_get, _swigfaiss_avx2.GpuClonerOptions_verbose_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuClonerOptions
    __del__ = lambda self: None
GpuClonerOptions_swigregister = _swigfaiss_avx2.GpuClonerOptions_swigregister
GpuClonerOptions_swigregister(GpuClonerOptions)

class GpuMultipleClonerOptions(GpuClonerOptions):
    __swig_setmethods__ = {}
    for _s in [GpuClonerOptions]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuMultipleClonerOptions, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuClonerOptions]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuMultipleClonerOptions, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuMultipleClonerOptions()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["shard"] = _swigfaiss_avx2.GpuMultipleClonerOptions_shard_set
    __swig_getmethods__["shard"] = _swigfaiss_avx2.GpuMultipleClonerOptions_shard_get
    if _newclass:
        shard = _swig_property(_swigfaiss_avx2.GpuMultipleClonerOptions_shard_get, _swigfaiss_avx2.GpuMultipleClonerOptions_shard_set)
    __swig_setmethods__["shard_type"] = _swigfaiss_avx2.GpuMultipleClonerOptions_shard_type_set
    __swig_getmethods__["shard_type"] = _swigfaiss_avx2.GpuMultipleClonerOptions_shard_type_get
    if _newclass:
        shard_type = _swig_property(_swigfaiss_avx2.GpuMultipleClonerOptions_shard_type_get, _swigfaiss_avx2.GpuMultipleClonerOptions_shard_type_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuMultipleClonerOptions
    __del__ = lambda self: None
GpuMultipleClonerOptions_swigregister = _swigfaiss_avx2.GpuMultipleClonerOptions_swigregister
GpuMultipleClonerOptions_swigregister(GpuMultipleClonerOptions)

Device = _swigfaiss_avx2.Device
Unified = _swigfaiss_avx2.Unified
HostPinned = _swigfaiss_avx2.HostPinned

def allocMemorySpaceV(space, p, size):
    return _swigfaiss_avx2.allocMemorySpaceV(space, p, size)
allocMemorySpaceV = _swigfaiss_avx2.allocMemorySpaceV

def freeMemorySpace(space, p):
    return _swigfaiss_avx2.freeMemorySpace(space, p)
freeMemorySpace = _swigfaiss_avx2.freeMemorySpace
class GpuIndexConfig(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexConfig, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexConfig, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuIndexConfig()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["device"] = _swigfaiss_avx2.GpuIndexConfig_device_set
    __swig_getmethods__["device"] = _swigfaiss_avx2.GpuIndexConfig_device_get
    if _newclass:
        device = _swig_property(_swigfaiss_avx2.GpuIndexConfig_device_get, _swigfaiss_avx2.GpuIndexConfig_device_set)
    __swig_setmethods__["memorySpace"] = _swigfaiss_avx2.GpuIndexConfig_memorySpace_set
    __swig_getmethods__["memorySpace"] = _swigfaiss_avx2.GpuIndexConfig_memorySpace_get
    if _newclass:
        memorySpace = _swig_property(_swigfaiss_avx2.GpuIndexConfig_memorySpace_get, _swigfaiss_avx2.GpuIndexConfig_memorySpace_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexConfig
    __del__ = lambda self: None
GpuIndexConfig_swigregister = _swigfaiss_avx2.GpuIndexConfig_swigregister
GpuIndexConfig_swigregister(GpuIndexConfig)

class GpuIndex(Index):
    __swig_setmethods__ = {}
    for _s in [Index]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndex, name, value)
    __swig_getmethods__ = {}
    for _s in [Index]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndex, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def getDevice(self):
        return _swigfaiss_avx2.GpuIndex_getDevice(self)

    def getResources(self):
        return _swigfaiss_avx2.GpuIndex_getResources(self)

    def setMinPagingSize(self, size):
        return _swigfaiss_avx2.GpuIndex_setMinPagingSize(self, size)

    def getMinPagingSize(self):
        return _swigfaiss_avx2.GpuIndex_getMinPagingSize(self)

    def add(self, arg2, x):
        return _swigfaiss_avx2.GpuIndex_add(self, arg2, x)

    def add_with_ids(self, n, x, ids):
        return _swigfaiss_avx2.GpuIndex_add_with_ids(self, n, x, ids)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.GpuIndex_search(self, n, x, k, distances, labels)

    def compute_residual(self, x, residual, key):
        return _swigfaiss_avx2.GpuIndex_compute_residual(self, x, residual, key)

    def compute_residual_n(self, n, xs, residuals, keys):
        return _swigfaiss_avx2.GpuIndex_compute_residual_n(self, n, xs, residuals, keys)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndex
    __del__ = lambda self: None
GpuIndex_swigregister = _swigfaiss_avx2.GpuIndex_swigregister
GpuIndex_swigregister(GpuIndex)

class GpuIndexFlatConfig(GpuIndexConfig):
    __swig_setmethods__ = {}
    for _s in [GpuIndexConfig]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexFlatConfig, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexConfig]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexFlatConfig, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuIndexFlatConfig()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["useFloat16"] = _swigfaiss_avx2.GpuIndexFlatConfig_useFloat16_set
    __swig_getmethods__["useFloat16"] = _swigfaiss_avx2.GpuIndexFlatConfig_useFloat16_get
    if _newclass:
        useFloat16 = _swig_property(_swigfaiss_avx2.GpuIndexFlatConfig_useFloat16_get, _swigfaiss_avx2.GpuIndexFlatConfig_useFloat16_set)
    __swig_setmethods__["storeTransposed"] = _swigfaiss_avx2.GpuIndexFlatConfig_storeTransposed_set
    __swig_getmethods__["storeTransposed"] = _swigfaiss_avx2.GpuIndexFlatConfig_storeTransposed_get
    if _newclass:
        storeTransposed = _swig_property(_swigfaiss_avx2.GpuIndexFlatConfig_storeTransposed_get, _swigfaiss_avx2.GpuIndexFlatConfig_storeTransposed_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexFlatConfig
    __del__ = lambda self: None
GpuIndexFlatConfig_swigregister = _swigfaiss_avx2.GpuIndexFlatConfig_swigregister
GpuIndexFlatConfig_swigregister(GpuIndexFlatConfig)

class GpuIndexFlat(GpuIndex):
    __swig_setmethods__ = {}
    for _s in [GpuIndex]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexFlat, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndex]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexFlat, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_GpuIndexFlat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexFlat
    __del__ = lambda self: None

    def copyFrom(self, index):
        return _swigfaiss_avx2.GpuIndexFlat_copyFrom(self, index)

    def copyTo(self, index):
        return _swigfaiss_avx2.GpuIndexFlat_copyTo(self, index)

    def getNumVecs(self):
        return _swigfaiss_avx2.GpuIndexFlat_getNumVecs(self)

    def reset(self):
        return _swigfaiss_avx2.GpuIndexFlat_reset(self)

    def train(self, n, x):
        return _swigfaiss_avx2.GpuIndexFlat_train(self, n, x)

    def add(self, arg2, x):
        return _swigfaiss_avx2.GpuIndexFlat_add(self, arg2, x)

    def reconstruct(self, key, out):
        return _swigfaiss_avx2.GpuIndexFlat_reconstruct(self, key, out)

    def reconstruct_n(self, i0, num, out):
        return _swigfaiss_avx2.GpuIndexFlat_reconstruct_n(self, i0, num, out)

    def compute_residual(self, x, residual, key):
        return _swigfaiss_avx2.GpuIndexFlat_compute_residual(self, x, residual, key)

    def compute_residual_n(self, n, xs, residuals, keys):
        return _swigfaiss_avx2.GpuIndexFlat_compute_residual_n(self, n, xs, residuals, keys)

    def getGpuData(self):
        return _swigfaiss_avx2.GpuIndexFlat_getGpuData(self)
GpuIndexFlat_swigregister = _swigfaiss_avx2.GpuIndexFlat_swigregister
GpuIndexFlat_swigregister(GpuIndexFlat)

class GpuIndexFlatL2(GpuIndexFlat):
    __swig_setmethods__ = {}
    for _s in [GpuIndexFlat]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexFlatL2, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexFlat]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexFlatL2, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_GpuIndexFlatL2(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def copyFrom(self, index):
        return _swigfaiss_avx2.GpuIndexFlatL2_copyFrom(self, index)

    def copyTo(self, index):
        return _swigfaiss_avx2.GpuIndexFlatL2_copyTo(self, index)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexFlatL2
    __del__ = lambda self: None
GpuIndexFlatL2_swigregister = _swigfaiss_avx2.GpuIndexFlatL2_swigregister
GpuIndexFlatL2_swigregister(GpuIndexFlatL2)

class GpuIndexFlatIP(GpuIndexFlat):
    __swig_setmethods__ = {}
    for _s in [GpuIndexFlat]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexFlatIP, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexFlat]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexFlatIP, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_GpuIndexFlatIP(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def copyFrom(self, index):
        return _swigfaiss_avx2.GpuIndexFlatIP_copyFrom(self, index)

    def copyTo(self, index):
        return _swigfaiss_avx2.GpuIndexFlatIP_copyTo(self, index)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexFlatIP
    __del__ = lambda self: None
GpuIndexFlatIP_swigregister = _swigfaiss_avx2.GpuIndexFlatIP_swigregister
GpuIndexFlatIP_swigregister(GpuIndexFlatIP)

class GpuIndexIVFConfig(GpuIndexConfig):
    __swig_setmethods__ = {}
    for _s in [GpuIndexConfig]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexIVFConfig, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexConfig]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexIVFConfig, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuIndexIVFConfig()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["indicesOptions"] = _swigfaiss_avx2.GpuIndexIVFConfig_indicesOptions_set
    __swig_getmethods__["indicesOptions"] = _swigfaiss_avx2.GpuIndexIVFConfig_indicesOptions_get
    if _newclass:
        indicesOptions = _swig_property(_swigfaiss_avx2.GpuIndexIVFConfig_indicesOptions_get, _swigfaiss_avx2.GpuIndexIVFConfig_indicesOptions_set)
    __swig_setmethods__["flatConfig"] = _swigfaiss_avx2.GpuIndexIVFConfig_flatConfig_set
    __swig_getmethods__["flatConfig"] = _swigfaiss_avx2.GpuIndexIVFConfig_flatConfig_get
    if _newclass:
        flatConfig = _swig_property(_swigfaiss_avx2.GpuIndexIVFConfig_flatConfig_get, _swigfaiss_avx2.GpuIndexIVFConfig_flatConfig_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFConfig
    __del__ = lambda self: None
GpuIndexIVFConfig_swigregister = _swigfaiss_avx2.GpuIndexIVFConfig_swigregister
GpuIndexIVFConfig_swigregister(GpuIndexIVFConfig)

class GpuIndexIVF(GpuIndex):
    __swig_setmethods__ = {}
    for _s in [GpuIndex]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexIVF, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndex]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexIVF, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVF
    __del__ = lambda self: None

    def copyFrom(self, index):
        return _swigfaiss_avx2.GpuIndexIVF_copyFrom(self, index)

    def copyTo(self, index):
        return _swigfaiss_avx2.GpuIndexIVF_copyTo(self, index)

    def getNumLists(self):
        return _swigfaiss_avx2.GpuIndexIVF_getNumLists(self)

    def getQuantizer(self):
        return _swigfaiss_avx2.GpuIndexIVF_getQuantizer(self)

    def setNumProbes(self, nprobe):
        return _swigfaiss_avx2.GpuIndexIVF_setNumProbes(self, nprobe)

    def getNumProbes(self):
        return _swigfaiss_avx2.GpuIndexIVF_getNumProbes(self)
    __swig_setmethods__["cp"] = _swigfaiss_avx2.GpuIndexIVF_cp_set
    __swig_getmethods__["cp"] = _swigfaiss_avx2.GpuIndexIVF_cp_get
    if _newclass:
        cp = _swig_property(_swigfaiss_avx2.GpuIndexIVF_cp_get, _swigfaiss_avx2.GpuIndexIVF_cp_set)
    __swig_setmethods__["nlist"] = _swigfaiss_avx2.GpuIndexIVF_nlist_set
    __swig_getmethods__["nlist"] = _swigfaiss_avx2.GpuIndexIVF_nlist_get
    if _newclass:
        nlist = _swig_property(_swigfaiss_avx2.GpuIndexIVF_nlist_get, _swigfaiss_avx2.GpuIndexIVF_nlist_set)
    __swig_setmethods__["nprobe"] = _swigfaiss_avx2.GpuIndexIVF_nprobe_set
    __swig_getmethods__["nprobe"] = _swigfaiss_avx2.GpuIndexIVF_nprobe_get
    if _newclass:
        nprobe = _swig_property(_swigfaiss_avx2.GpuIndexIVF_nprobe_get, _swigfaiss_avx2.GpuIndexIVF_nprobe_set)
    __swig_setmethods__["quantizer"] = _swigfaiss_avx2.GpuIndexIVF_quantizer_set
    __swig_getmethods__["quantizer"] = _swigfaiss_avx2.GpuIndexIVF_quantizer_get
    if _newclass:
        quantizer = _swig_property(_swigfaiss_avx2.GpuIndexIVF_quantizer_get, _swigfaiss_avx2.GpuIndexIVF_quantizer_set)
GpuIndexIVF_swigregister = _swigfaiss_avx2.GpuIndexIVF_swigregister
GpuIndexIVF_swigregister(GpuIndexIVF)

class GpuIndexIVFPQConfig(GpuIndexIVFConfig):
    __swig_setmethods__ = {}
    for _s in [GpuIndexIVFConfig]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexIVFPQConfig, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexIVFConfig]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexIVFPQConfig, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuIndexIVFPQConfig()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["useFloat16LookupTables"] = _swigfaiss_avx2.GpuIndexIVFPQConfig_useFloat16LookupTables_set
    __swig_getmethods__["useFloat16LookupTables"] = _swigfaiss_avx2.GpuIndexIVFPQConfig_useFloat16LookupTables_get
    if _newclass:
        useFloat16LookupTables = _swig_property(_swigfaiss_avx2.GpuIndexIVFPQConfig_useFloat16LookupTables_get, _swigfaiss_avx2.GpuIndexIVFPQConfig_useFloat16LookupTables_set)
    __swig_setmethods__["usePrecomputedTables"] = _swigfaiss_avx2.GpuIndexIVFPQConfig_usePrecomputedTables_set
    __swig_getmethods__["usePrecomputedTables"] = _swigfaiss_avx2.GpuIndexIVFPQConfig_usePrecomputedTables_get
    if _newclass:
        usePrecomputedTables = _swig_property(_swigfaiss_avx2.GpuIndexIVFPQConfig_usePrecomputedTables_get, _swigfaiss_avx2.GpuIndexIVFPQConfig_usePrecomputedTables_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFPQConfig
    __del__ = lambda self: None
GpuIndexIVFPQConfig_swigregister = _swigfaiss_avx2.GpuIndexIVFPQConfig_swigregister
GpuIndexIVFPQConfig_swigregister(GpuIndexIVFPQConfig)

class GpuIndexIVFPQ(GpuIndexIVF):
    __swig_setmethods__ = {}
    for _s in [GpuIndexIVF]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexIVFPQ, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexIVF]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexIVFPQ, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_GpuIndexIVFPQ(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFPQ
    __del__ = lambda self: None

    def copyFrom(self, index):
        return _swigfaiss_avx2.GpuIndexIVFPQ_copyFrom(self, index)

    def copyTo(self, index):
        return _swigfaiss_avx2.GpuIndexIVFPQ_copyTo(self, index)

    def reserveMemory(self, numVecs):
        return _swigfaiss_avx2.GpuIndexIVFPQ_reserveMemory(self, numVecs)

    def setPrecomputedCodes(self, enable):
        return _swigfaiss_avx2.GpuIndexIVFPQ_setPrecomputedCodes(self, enable)

    def getPrecomputedCodes(self):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getPrecomputedCodes(self)

    def getNumSubQuantizers(self):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getNumSubQuantizers(self)

    def getBitsPerCode(self):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getBitsPerCode(self)

    def getCentroidsPerSubQuantizer(self):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getCentroidsPerSubQuantizer(self)

    def reclaimMemory(self):
        return _swigfaiss_avx2.GpuIndexIVFPQ_reclaimMemory(self)

    def reset(self):
        return _swigfaiss_avx2.GpuIndexIVFPQ_reset(self)

    def train(self, n, x):
        return _swigfaiss_avx2.GpuIndexIVFPQ_train(self, n, x)

    def getListLength(self, listId):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getListLength(self, listId)

    def getListCodes(self, listId):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getListCodes(self, listId)

    def getListIndices(self, listId):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getListIndices(self, listId)
GpuIndexIVFPQ_swigregister = _swigfaiss_avx2.GpuIndexIVFPQ_swigregister
GpuIndexIVFPQ_swigregister(GpuIndexIVFPQ)

class GpuIndexIVFFlatConfig(GpuIndexIVFConfig):
    __swig_setmethods__ = {}
    for _s in [GpuIndexIVFConfig]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexIVFFlatConfig, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexIVFConfig]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexIVFFlatConfig, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuIndexIVFFlatConfig()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFFlatConfig
    __del__ = lambda self: None
GpuIndexIVFFlatConfig_swigregister = _swigfaiss_avx2.GpuIndexIVFFlatConfig_swigregister
GpuIndexIVFFlatConfig_swigregister(GpuIndexIVFFlatConfig)

class GpuIndexIVFFlat(GpuIndexIVF):
    __swig_setmethods__ = {}
    for _s in [GpuIndexIVF]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexIVFFlat, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexIVF]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexIVFFlat, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_GpuIndexIVFFlat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFFlat
    __del__ = lambda self: None

    def reserveMemory(self, numVecs):
        return _swigfaiss_avx2.GpuIndexIVFFlat_reserveMemory(self, numVecs)

    def copyFrom(self, index):
        return _swigfaiss_avx2.GpuIndexIVFFlat_copyFrom(self, index)

    def copyTo(self, index):
        return _swigfaiss_avx2.GpuIndexIVFFlat_copyTo(self, index)

    def reclaimMemory(self):
        return _swigfaiss_avx2.GpuIndexIVFFlat_reclaimMemory(self)

    def reset(self):
        return _swigfaiss_avx2.GpuIndexIVFFlat_reset(self)

    def train(self, n, x):
        return _swigfaiss_avx2.GpuIndexIVFFlat_train(self, n, x)
GpuIndexIVFFlat_swigregister = _swigfaiss_avx2.GpuIndexIVFFlat_swigregister
GpuIndexIVFFlat_swigregister(GpuIndexIVFFlat)

class GpuIndexIVFScalarQuantizerConfig(GpuIndexIVFConfig):
    __swig_setmethods__ = {}
    for _s in [GpuIndexIVFConfig]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexIVFScalarQuantizerConfig, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexIVFConfig]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexIVFScalarQuantizerConfig, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuIndexIVFScalarQuantizerConfig()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFScalarQuantizerConfig
    __del__ = lambda self: None
GpuIndexIVFScalarQuantizerConfig_swigregister = _swigfaiss_avx2.GpuIndexIVFScalarQuantizerConfig_swigregister
GpuIndexIVFScalarQuantizerConfig_swigregister(GpuIndexIVFScalarQuantizerConfig)

class GpuIndexIVFScalarQuantizer(GpuIndexIVF):
    __swig_setmethods__ = {}
    for _s in [GpuIndexIVF]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexIVFScalarQuantizer, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexIVF]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexIVFScalarQuantizer, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_GpuIndexIVFScalarQuantizer(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFScalarQuantizer
    __del__ = lambda self: None

    def reserveMemory(self, numVecs):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_reserveMemory(self, numVecs)

    def copyFrom(self, index):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_copyFrom(self, index)

    def copyTo(self, index):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_copyTo(self, index)

    def reclaimMemory(self):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_reclaimMemory(self)

    def reset(self):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_reset(self)

    def train(self, n, x):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_train(self, n, x)
    __swig_setmethods__["sq"] = _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_sq_set
    __swig_getmethods__["sq"] = _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_sq_get
    if _newclass:
        sq = _swig_property(_swigfaiss_avx2.GpuIndexIVFScalarQuantizer_sq_get, _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_sq_set)
    __swig_setmethods__["by_residual"] = _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_by_residual_set
    __swig_getmethods__["by_residual"] = _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_by_residual_get
    if _newclass:
        by_residual = _swig_property(_swigfaiss_avx2.GpuIndexIVFScalarQuantizer_by_residual_get, _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_by_residual_set)
GpuIndexIVFScalarQuantizer_swigregister = _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_swigregister
GpuIndexIVFScalarQuantizer_swigregister(GpuIndexIVFScalarQuantizer)

class GpuIndexBinaryFlatConfig(GpuIndexConfig):
    __swig_setmethods__ = {}
    for _s in [GpuIndexConfig]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexBinaryFlatConfig, name, value)
    __swig_getmethods__ = {}
    for _s in [GpuIndexConfig]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexBinaryFlatConfig, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuIndexBinaryFlatConfig()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexBinaryFlatConfig
    __del__ = lambda self: None
GpuIndexBinaryFlatConfig_swigregister = _swigfaiss_avx2.GpuIndexBinaryFlatConfig_swigregister
GpuIndexBinaryFlatConfig_swigregister(GpuIndexBinaryFlatConfig)

class GpuIndexBinaryFlat(IndexBinary):
    __swig_setmethods__ = {}
    for _s in [IndexBinary]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuIndexBinaryFlat, name, value)
    __swig_getmethods__ = {}
    for _s in [IndexBinary]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuIndexBinaryFlat, name)
    __repr__ = _swig_repr

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_GpuIndexBinaryFlat(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexBinaryFlat
    __del__ = lambda self: None

    def copyFrom(self, index):
        return _swigfaiss_avx2.GpuIndexBinaryFlat_copyFrom(self, index)

    def copyTo(self, index):
        return _swigfaiss_avx2.GpuIndexBinaryFlat_copyTo(self, index)

    def add(self, n, x):
        return _swigfaiss_avx2.GpuIndexBinaryFlat_add(self, n, x)

    def reset(self):
        return _swigfaiss_avx2.GpuIndexBinaryFlat_reset(self)

    def search(self, n, x, k, distances, labels):
        return _swigfaiss_avx2.GpuIndexBinaryFlat_search(self, n, x, k, distances, labels)

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.GpuIndexBinaryFlat_reconstruct(self, key, recons)
GpuIndexBinaryFlat_swigregister = _swigfaiss_avx2.GpuIndexBinaryFlat_swigregister
GpuIndexBinaryFlat_swigregister(GpuIndexBinaryFlat)

DistanceDataType_F32 = _swigfaiss_avx2.DistanceDataType_F32
DistanceDataType_F16 = _swigfaiss_avx2.DistanceDataType_F16
class GpuDistanceParams(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuDistanceParams, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, GpuDistanceParams, name)
    __repr__ = _swig_repr

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuDistanceParams()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["metric"] = _swigfaiss_avx2.GpuDistanceParams_metric_set
    __swig_getmethods__["metric"] = _swigfaiss_avx2.GpuDistanceParams_metric_get
    if _newclass:
        metric = _swig_property(_swigfaiss_avx2.GpuDistanceParams_metric_get, _swigfaiss_avx2.GpuDistanceParams_metric_set)
    __swig_setmethods__["metricArg"] = _swigfaiss_avx2.GpuDistanceParams_metricArg_set
    __swig_getmethods__["metricArg"] = _swigfaiss_avx2.GpuDistanceParams_metricArg_get
    if _newclass:
        metricArg = _swig_property(_swigfaiss_avx2.GpuDistanceParams_metricArg_get, _swigfaiss_avx2.GpuDistanceParams_metricArg_set)
    __swig_setmethods__["k"] = _swigfaiss_avx2.GpuDistanceParams_k_set
    __swig_getmethods__["k"] = _swigfaiss_avx2.GpuDistanceParams_k_get
    if _newclass:
        k = _swig_property(_swigfaiss_avx2.GpuDistanceParams_k_get, _swigfaiss_avx2.GpuDistanceParams_k_set)
    __swig_setmethods__["dims"] = _swigfaiss_avx2.GpuDistanceParams_dims_set
    __swig_getmethods__["dims"] = _swigfaiss_avx2.GpuDistanceParams_dims_get
    if _newclass:
        dims = _swig_property(_swigfaiss_avx2.GpuDistanceParams_dims_get, _swigfaiss_avx2.GpuDistanceParams_dims_set)
    __swig_setmethods__["vectors"] = _swigfaiss_avx2.GpuDistanceParams_vectors_set
    __swig_getmethods__["vectors"] = _swigfaiss_avx2.GpuDistanceParams_vectors_get
    if _newclass:
        vectors = _swig_property(_swigfaiss_avx2.GpuDistanceParams_vectors_get, _swigfaiss_avx2.GpuDistanceParams_vectors_set)
    __swig_setmethods__["vectorType"] = _swigfaiss_avx2.GpuDistanceParams_vectorType_set
    __swig_getmethods__["vectorType"] = _swigfaiss_avx2.GpuDistanceParams_vectorType_get
    if _newclass:
        vectorType = _swig_property(_swigfaiss_avx2.GpuDistanceParams_vectorType_get, _swigfaiss_avx2.GpuDistanceParams_vectorType_set)
    __swig_setmethods__["vectorsRowMajor"] = _swigfaiss_avx2.GpuDistanceParams_vectorsRowMajor_set
    __swig_getmethods__["vectorsRowMajor"] = _swigfaiss_avx2.GpuDistanceParams_vectorsRowMajor_get
    if _newclass:
        vectorsRowMajor = _swig_property(_swigfaiss_avx2.GpuDistanceParams_vectorsRowMajor_get, _swigfaiss_avx2.GpuDistanceParams_vectorsRowMajor_set)
    __swig_setmethods__["numVectors"] = _swigfaiss_avx2.GpuDistanceParams_numVectors_set
    __swig_getmethods__["numVectors"] = _swigfaiss_avx2.GpuDistanceParams_numVectors_get
    if _newclass:
        numVectors = _swig_property(_swigfaiss_avx2.GpuDistanceParams_numVectors_get, _swigfaiss_avx2.GpuDistanceParams_numVectors_set)
    __swig_setmethods__["vectorNorms"] = _swigfaiss_avx2.GpuDistanceParams_vectorNorms_set
    __swig_getmethods__["vectorNorms"] = _swigfaiss_avx2.GpuDistanceParams_vectorNorms_get
    if _newclass:
        vectorNorms = _swig_property(_swigfaiss_avx2.GpuDistanceParams_vectorNorms_get, _swigfaiss_avx2.GpuDistanceParams_vectorNorms_set)
    __swig_setmethods__["queries"] = _swigfaiss_avx2.GpuDistanceParams_queries_set
    __swig_getmethods__["queries"] = _swigfaiss_avx2.GpuDistanceParams_queries_get
    if _newclass:
        queries = _swig_property(_swigfaiss_avx2.GpuDistanceParams_queries_get, _swigfaiss_avx2.GpuDistanceParams_queries_set)
    __swig_setmethods__["queryType"] = _swigfaiss_avx2.GpuDistanceParams_queryType_set
    __swig_getmethods__["queryType"] = _swigfaiss_avx2.GpuDistanceParams_queryType_get
    if _newclass:
        queryType = _swig_property(_swigfaiss_avx2.GpuDistanceParams_queryType_get, _swigfaiss_avx2.GpuDistanceParams_queryType_set)
    __swig_setmethods__["queriesRowMajor"] = _swigfaiss_avx2.GpuDistanceParams_queriesRowMajor_set
    __swig_getmethods__["queriesRowMajor"] = _swigfaiss_avx2.GpuDistanceParams_queriesRowMajor_get
    if _newclass:
        queriesRowMajor = _swig_property(_swigfaiss_avx2.GpuDistanceParams_queriesRowMajor_get, _swigfaiss_avx2.GpuDistanceParams_queriesRowMajor_set)
    __swig_setmethods__["numQueries"] = _swigfaiss_avx2.GpuDistanceParams_numQueries_set
    __swig_getmethods__["numQueries"] = _swigfaiss_avx2.GpuDistanceParams_numQueries_get
    if _newclass:
        numQueries = _swig_property(_swigfaiss_avx2.GpuDistanceParams_numQueries_get, _swigfaiss_avx2.GpuDistanceParams_numQueries_set)
    __swig_setmethods__["outDistances"] = _swigfaiss_avx2.GpuDistanceParams_outDistances_set
    __swig_getmethods__["outDistances"] = _swigfaiss_avx2.GpuDistanceParams_outDistances_get
    if _newclass:
        outDistances = _swig_property(_swigfaiss_avx2.GpuDistanceParams_outDistances_get, _swigfaiss_avx2.GpuDistanceParams_outDistances_set)
    __swig_setmethods__["ignoreOutDistances"] = _swigfaiss_avx2.GpuDistanceParams_ignoreOutDistances_set
    __swig_getmethods__["ignoreOutDistances"] = _swigfaiss_avx2.GpuDistanceParams_ignoreOutDistances_get
    if _newclass:
        ignoreOutDistances = _swig_property(_swigfaiss_avx2.GpuDistanceParams_ignoreOutDistances_get, _swigfaiss_avx2.GpuDistanceParams_ignoreOutDistances_set)
    __swig_setmethods__["outIndices"] = _swigfaiss_avx2.GpuDistanceParams_outIndices_set
    __swig_getmethods__["outIndices"] = _swigfaiss_avx2.GpuDistanceParams_outIndices_get
    if _newclass:
        outIndices = _swig_property(_swigfaiss_avx2.GpuDistanceParams_outIndices_get, _swigfaiss_avx2.GpuDistanceParams_outIndices_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuDistanceParams
    __del__ = lambda self: None
GpuDistanceParams_swigregister = _swigfaiss_avx2.GpuDistanceParams_swigregister
GpuDistanceParams_swigregister(GpuDistanceParams)


def bfKnn(resources, args):
    return _swigfaiss_avx2.bfKnn(resources, args)
bfKnn = _swigfaiss_avx2.bfKnn

def bruteForceKnn(resources, metric, vectors, vectorsRowMajor, numVectors, queries, queriesRowMajor, numQueries, dims, k, outDistances, outIndices):
    return _swigfaiss_avx2.bruteForceKnn(resources, metric, vectors, vectorsRowMajor, numVectors, queries, queriesRowMajor, numQueries, dims, k, outDistances, outIndices)
bruteForceKnn = _swigfaiss_avx2.bruteForceKnn

def downcast_index(index):
    return _swigfaiss_avx2.downcast_index(index)
downcast_index = _swigfaiss_avx2.downcast_index

def downcast_VectorTransform(vt):
    return _swigfaiss_avx2.downcast_VectorTransform(vt)
downcast_VectorTransform = _swigfaiss_avx2.downcast_VectorTransform

def downcast_IndexBinary(index):
    return _swigfaiss_avx2.downcast_IndexBinary(index)
downcast_IndexBinary = _swigfaiss_avx2.downcast_IndexBinary

def downcast_InvertedLists(il):
    return _swigfaiss_avx2.downcast_InvertedLists(il)
downcast_InvertedLists = _swigfaiss_avx2.downcast_InvertedLists
class IOReader(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IOReader, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IOReader, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["name"] = _swigfaiss_avx2.IOReader_name_set
    __swig_getmethods__["name"] = _swigfaiss_avx2.IOReader_name_get
    if _newclass:
        name = _swig_property(_swigfaiss_avx2.IOReader_name_get, _swigfaiss_avx2.IOReader_name_set)

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.IOReader___call__(self, ptr, size, nitems)

    def fileno(self):
        return _swigfaiss_avx2.IOReader_fileno(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IOReader
    __del__ = lambda self: None
IOReader_swigregister = _swigfaiss_avx2.IOReader_swigregister
IOReader_swigregister(IOReader)

class IOWriter(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IOWriter, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IOWriter, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["name"] = _swigfaiss_avx2.IOWriter_name_set
    __swig_getmethods__["name"] = _swigfaiss_avx2.IOWriter_name_get
    if _newclass:
        name = _swig_property(_swigfaiss_avx2.IOWriter_name_get, _swigfaiss_avx2.IOWriter_name_set)

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.IOWriter___call__(self, ptr, size, nitems)

    def fileno(self):
        return _swigfaiss_avx2.IOWriter_fileno(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IOWriter
    __del__ = lambda self: None
IOWriter_swigregister = _swigfaiss_avx2.IOWriter_swigregister
IOWriter_swigregister(IOWriter)

class VectorIOReader(IOReader):
    __swig_setmethods__ = {}
    for _s in [IOReader]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, VectorIOReader, name, value)
    __swig_getmethods__ = {}
    for _s in [IOReader]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, VectorIOReader, name)
    __repr__ = _swig_repr
    __swig_setmethods__["data"] = _swigfaiss_avx2.VectorIOReader_data_set
    __swig_getmethods__["data"] = _swigfaiss_avx2.VectorIOReader_data_get
    if _newclass:
        data = _swig_property(_swigfaiss_avx2.VectorIOReader_data_get, _swigfaiss_avx2.VectorIOReader_data_set)
    __swig_setmethods__["rp"] = _swigfaiss_avx2.VectorIOReader_rp_set
    __swig_getmethods__["rp"] = _swigfaiss_avx2.VectorIOReader_rp_get
    if _newclass:
        rp = _swig_property(_swigfaiss_avx2.VectorIOReader_rp_get, _swigfaiss_avx2.VectorIOReader_rp_set)

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.VectorIOReader___call__(self, ptr, size, nitems)

    def __init__(self):
        this = _swigfaiss_avx2.new_VectorIOReader()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_VectorIOReader
    __del__ = lambda self: None
VectorIOReader_swigregister = _swigfaiss_avx2.VectorIOReader_swigregister
VectorIOReader_swigregister(VectorIOReader)

class VectorIOWriter(IOWriter):
    __swig_setmethods__ = {}
    for _s in [IOWriter]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, VectorIOWriter, name, value)
    __swig_getmethods__ = {}
    for _s in [IOWriter]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, VectorIOWriter, name)
    __repr__ = _swig_repr
    __swig_setmethods__["data"] = _swigfaiss_avx2.VectorIOWriter_data_set
    __swig_getmethods__["data"] = _swigfaiss_avx2.VectorIOWriter_data_get
    if _newclass:
        data = _swig_property(_swigfaiss_avx2.VectorIOWriter_data_get, _swigfaiss_avx2.VectorIOWriter_data_set)

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.VectorIOWriter___call__(self, ptr, size, nitems)

    def __init__(self):
        this = _swigfaiss_avx2.new_VectorIOWriter()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_VectorIOWriter
    __del__ = lambda self: None
VectorIOWriter_swigregister = _swigfaiss_avx2.VectorIOWriter_swigregister
VectorIOWriter_swigregister(VectorIOWriter)

class FileIOReader(IOReader):
    __swig_setmethods__ = {}
    for _s in [IOReader]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, FileIOReader, name, value)
    __swig_getmethods__ = {}
    for _s in [IOReader]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, FileIOReader, name)
    __repr__ = _swig_repr
    __swig_setmethods__["f"] = _swigfaiss_avx2.FileIOReader_f_set
    __swig_getmethods__["f"] = _swigfaiss_avx2.FileIOReader_f_get
    if _newclass:
        f = _swig_property(_swigfaiss_avx2.FileIOReader_f_get, _swigfaiss_avx2.FileIOReader_f_set)
    __swig_setmethods__["need_close"] = _swigfaiss_avx2.FileIOReader_need_close_set
    __swig_getmethods__["need_close"] = _swigfaiss_avx2.FileIOReader_need_close_get
    if _newclass:
        need_close = _swig_property(_swigfaiss_avx2.FileIOReader_need_close_get, _swigfaiss_avx2.FileIOReader_need_close_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_FileIOReader(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_FileIOReader
    __del__ = lambda self: None

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.FileIOReader___call__(self, ptr, size, nitems)

    def fileno(self):
        return _swigfaiss_avx2.FileIOReader_fileno(self)
FileIOReader_swigregister = _swigfaiss_avx2.FileIOReader_swigregister
FileIOReader_swigregister(FileIOReader)

class FileIOWriter(IOWriter):
    __swig_setmethods__ = {}
    for _s in [IOWriter]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, FileIOWriter, name, value)
    __swig_getmethods__ = {}
    for _s in [IOWriter]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, FileIOWriter, name)
    __repr__ = _swig_repr
    __swig_setmethods__["f"] = _swigfaiss_avx2.FileIOWriter_f_set
    __swig_getmethods__["f"] = _swigfaiss_avx2.FileIOWriter_f_get
    if _newclass:
        f = _swig_property(_swigfaiss_avx2.FileIOWriter_f_get, _swigfaiss_avx2.FileIOWriter_f_set)
    __swig_setmethods__["need_close"] = _swigfaiss_avx2.FileIOWriter_need_close_set
    __swig_getmethods__["need_close"] = _swigfaiss_avx2.FileIOWriter_need_close_get
    if _newclass:
        need_close = _swig_property(_swigfaiss_avx2.FileIOWriter_need_close_get, _swigfaiss_avx2.FileIOWriter_need_close_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_FileIOWriter(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_FileIOWriter
    __del__ = lambda self: None

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.FileIOWriter___call__(self, ptr, size, nitems)

    def fileno(self):
        return _swigfaiss_avx2.FileIOWriter_fileno(self)
FileIOWriter_swigregister = _swigfaiss_avx2.FileIOWriter_swigregister
FileIOWriter_swigregister(FileIOWriter)

class BufferedIOReader(IOReader):
    __swig_setmethods__ = {}
    for _s in [IOReader]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, BufferedIOReader, name, value)
    __swig_getmethods__ = {}
    for _s in [IOReader]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, BufferedIOReader, name)
    __repr__ = _swig_repr
    __swig_setmethods__["reader"] = _swigfaiss_avx2.BufferedIOReader_reader_set
    __swig_getmethods__["reader"] = _swigfaiss_avx2.BufferedIOReader_reader_get
    if _newclass:
        reader = _swig_property(_swigfaiss_avx2.BufferedIOReader_reader_get, _swigfaiss_avx2.BufferedIOReader_reader_set)
    __swig_setmethods__["bsz"] = _swigfaiss_avx2.BufferedIOReader_bsz_set
    __swig_getmethods__["bsz"] = _swigfaiss_avx2.BufferedIOReader_bsz_get
    if _newclass:
        bsz = _swig_property(_swigfaiss_avx2.BufferedIOReader_bsz_get, _swigfaiss_avx2.BufferedIOReader_bsz_set)
    __swig_setmethods__["totsz"] = _swigfaiss_avx2.BufferedIOReader_totsz_set
    __swig_getmethods__["totsz"] = _swigfaiss_avx2.BufferedIOReader_totsz_get
    if _newclass:
        totsz = _swig_property(_swigfaiss_avx2.BufferedIOReader_totsz_get, _swigfaiss_avx2.BufferedIOReader_totsz_set)
    __swig_setmethods__["ofs"] = _swigfaiss_avx2.BufferedIOReader_ofs_set
    __swig_getmethods__["ofs"] = _swigfaiss_avx2.BufferedIOReader_ofs_get
    if _newclass:
        ofs = _swig_property(_swigfaiss_avx2.BufferedIOReader_ofs_get, _swigfaiss_avx2.BufferedIOReader_ofs_set)
    __swig_setmethods__["b0"] = _swigfaiss_avx2.BufferedIOReader_b0_set
    __swig_getmethods__["b0"] = _swigfaiss_avx2.BufferedIOReader_b0_get
    if _newclass:
        b0 = _swig_property(_swigfaiss_avx2.BufferedIOReader_b0_get, _swigfaiss_avx2.BufferedIOReader_b0_set)
    __swig_setmethods__["b1"] = _swigfaiss_avx2.BufferedIOReader_b1_set
    __swig_getmethods__["b1"] = _swigfaiss_avx2.BufferedIOReader_b1_get
    if _newclass:
        b1 = _swig_property(_swigfaiss_avx2.BufferedIOReader_b1_get, _swigfaiss_avx2.BufferedIOReader_b1_set)
    __swig_setmethods__["buffer"] = _swigfaiss_avx2.BufferedIOReader_buffer_set
    __swig_getmethods__["buffer"] = _swigfaiss_avx2.BufferedIOReader_buffer_get
    if _newclass:
        buffer = _swig_property(_swigfaiss_avx2.BufferedIOReader_buffer_get, _swigfaiss_avx2.BufferedIOReader_buffer_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_BufferedIOReader(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.BufferedIOReader___call__(self, ptr, size, nitems)
    __swig_destroy__ = _swigfaiss_avx2.delete_BufferedIOReader
    __del__ = lambda self: None
BufferedIOReader_swigregister = _swigfaiss_avx2.BufferedIOReader_swigregister
BufferedIOReader_swigregister(BufferedIOReader)

class BufferedIOWriter(IOWriter):
    __swig_setmethods__ = {}
    for _s in [IOWriter]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, BufferedIOWriter, name, value)
    __swig_getmethods__ = {}
    for _s in [IOWriter]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, BufferedIOWriter, name)
    __repr__ = _swig_repr
    __swig_setmethods__["writer"] = _swigfaiss_avx2.BufferedIOWriter_writer_set
    __swig_getmethods__["writer"] = _swigfaiss_avx2.BufferedIOWriter_writer_get
    if _newclass:
        writer = _swig_property(_swigfaiss_avx2.BufferedIOWriter_writer_get, _swigfaiss_avx2.BufferedIOWriter_writer_set)
    __swig_setmethods__["bsz"] = _swigfaiss_avx2.BufferedIOWriter_bsz_set
    __swig_getmethods__["bsz"] = _swigfaiss_avx2.BufferedIOWriter_bsz_get
    if _newclass:
        bsz = _swig_property(_swigfaiss_avx2.BufferedIOWriter_bsz_get, _swigfaiss_avx2.BufferedIOWriter_bsz_set)
    __swig_setmethods__["ofs"] = _swigfaiss_avx2.BufferedIOWriter_ofs_set
    __swig_getmethods__["ofs"] = _swigfaiss_avx2.BufferedIOWriter_ofs_get
    if _newclass:
        ofs = _swig_property(_swigfaiss_avx2.BufferedIOWriter_ofs_get, _swigfaiss_avx2.BufferedIOWriter_ofs_set)
    __swig_setmethods__["b0"] = _swigfaiss_avx2.BufferedIOWriter_b0_set
    __swig_getmethods__["b0"] = _swigfaiss_avx2.BufferedIOWriter_b0_get
    if _newclass:
        b0 = _swig_property(_swigfaiss_avx2.BufferedIOWriter_b0_get, _swigfaiss_avx2.BufferedIOWriter_b0_set)
    __swig_setmethods__["buffer"] = _swigfaiss_avx2.BufferedIOWriter_buffer_set
    __swig_getmethods__["buffer"] = _swigfaiss_avx2.BufferedIOWriter_buffer_get
    if _newclass:
        buffer = _swig_property(_swigfaiss_avx2.BufferedIOWriter_buffer_get, _swigfaiss_avx2.BufferedIOWriter_buffer_set)

    def __init__(self, writer, bsz):
        this = _swigfaiss_avx2.new_BufferedIOWriter(writer, bsz)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.BufferedIOWriter___call__(self, ptr, size, nitems)
    __swig_destroy__ = _swigfaiss_avx2.delete_BufferedIOWriter
    __del__ = lambda self: None
BufferedIOWriter_swigregister = _swigfaiss_avx2.BufferedIOWriter_swigregister
BufferedIOWriter_swigregister(BufferedIOWriter)


def fourcc(sx):
    return _swigfaiss_avx2.fourcc(sx)
fourcc = _swigfaiss_avx2.fourcc

def write_index(*args):
    return _swigfaiss_avx2.write_index(*args)
write_index = _swigfaiss_avx2.write_index

def write_index_binary(*args):
    return _swigfaiss_avx2.write_index_binary(*args)
write_index_binary = _swigfaiss_avx2.write_index_binary

def read_index(*args):
    return _swigfaiss_avx2.read_index(*args)
read_index = _swigfaiss_avx2.read_index

def read_index_binary(*args):
    return _swigfaiss_avx2.read_index_binary(*args)
read_index_binary = _swigfaiss_avx2.read_index_binary

def write_VectorTransform(vt, fname):
    return _swigfaiss_avx2.write_VectorTransform(vt, fname)
write_VectorTransform = _swigfaiss_avx2.write_VectorTransform

def read_VectorTransform(fname):
    return _swigfaiss_avx2.read_VectorTransform(fname)
read_VectorTransform = _swigfaiss_avx2.read_VectorTransform

def read_ProductQuantizer(*args):
    return _swigfaiss_avx2.read_ProductQuantizer(*args)
read_ProductQuantizer = _swigfaiss_avx2.read_ProductQuantizer

def write_ProductQuantizer(*args):
    return _swigfaiss_avx2.write_ProductQuantizer(*args)
write_ProductQuantizer = _swigfaiss_avx2.write_ProductQuantizer

def write_InvertedLists(ils, f):
    return _swigfaiss_avx2.write_InvertedLists(ils, f)
write_InvertedLists = _swigfaiss_avx2.write_InvertedLists

def read_InvertedLists(reader, io_flags=0):
    return _swigfaiss_avx2.read_InvertedLists(reader, io_flags)
read_InvertedLists = _swigfaiss_avx2.read_InvertedLists

def clone_index(arg1):
    return _swigfaiss_avx2.clone_index(arg1)
clone_index = _swigfaiss_avx2.clone_index
class Cloner(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, Cloner, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, Cloner, name)
    __repr__ = _swig_repr

    def clone_VectorTransform(self, arg2):
        return _swigfaiss_avx2.Cloner_clone_VectorTransform(self, arg2)

    def clone_Index(self, arg2):
        return _swigfaiss_avx2.Cloner_clone_Index(self, arg2)

    def clone_IndexIVF(self, arg2):
        return _swigfaiss_avx2.Cloner_clone_IndexIVF(self, arg2)
    __swig_destroy__ = _swigfaiss_avx2.delete_Cloner
    __del__ = lambda self: None

    def __init__(self):
        this = _swigfaiss_avx2.new_Cloner()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
Cloner_swigregister = _swigfaiss_avx2.Cloner_swigregister
Cloner_swigregister(Cloner)
IO_FLAG_MMAP = cvar.IO_FLAG_MMAP
IO_FLAG_READ_ONLY = cvar.IO_FLAG_READ_ONLY
IO_FLAG_ONDISK_SAME_DIR = cvar.IO_FLAG_ONDISK_SAME_DIR

class AutoTuneCriterion(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, AutoTuneCriterion, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, AutoTuneCriterion, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    __swig_setmethods__["nq"] = _swigfaiss_avx2.AutoTuneCriterion_nq_set
    __swig_getmethods__["nq"] = _swigfaiss_avx2.AutoTuneCriterion_nq_get
    if _newclass:
        nq = _swig_property(_swigfaiss_avx2.AutoTuneCriterion_nq_get, _swigfaiss_avx2.AutoTuneCriterion_nq_set)
    __swig_setmethods__["nnn"] = _swigfaiss_avx2.AutoTuneCriterion_nnn_set
    __swig_getmethods__["nnn"] = _swigfaiss_avx2.AutoTuneCriterion_nnn_get
    if _newclass:
        nnn = _swig_property(_swigfaiss_avx2.AutoTuneCriterion_nnn_get, _swigfaiss_avx2.AutoTuneCriterion_nnn_set)
    __swig_setmethods__["gt_nnn"] = _swigfaiss_avx2.AutoTuneCriterion_gt_nnn_set
    __swig_getmethods__["gt_nnn"] = _swigfaiss_avx2.AutoTuneCriterion_gt_nnn_get
    if _newclass:
        gt_nnn = _swig_property(_swigfaiss_avx2.AutoTuneCriterion_gt_nnn_get, _swigfaiss_avx2.AutoTuneCriterion_gt_nnn_set)
    __swig_setmethods__["gt_D"] = _swigfaiss_avx2.AutoTuneCriterion_gt_D_set
    __swig_getmethods__["gt_D"] = _swigfaiss_avx2.AutoTuneCriterion_gt_D_get
    if _newclass:
        gt_D = _swig_property(_swigfaiss_avx2.AutoTuneCriterion_gt_D_get, _swigfaiss_avx2.AutoTuneCriterion_gt_D_set)
    __swig_setmethods__["gt_I"] = _swigfaiss_avx2.AutoTuneCriterion_gt_I_set
    __swig_getmethods__["gt_I"] = _swigfaiss_avx2.AutoTuneCriterion_gt_I_get
    if _newclass:
        gt_I = _swig_property(_swigfaiss_avx2.AutoTuneCriterion_gt_I_get, _swigfaiss_avx2.AutoTuneCriterion_gt_I_set)

    def set_groundtruth(self, gt_nnn, gt_D_in, gt_I_in):
        return _swigfaiss_avx2.AutoTuneCriterion_set_groundtruth(self, gt_nnn, gt_D_in, gt_I_in)

    def evaluate(self, D, I):
        return _swigfaiss_avx2.AutoTuneCriterion_evaluate(self, D, I)
    __swig_destroy__ = _swigfaiss_avx2.delete_AutoTuneCriterion
    __del__ = lambda self: None
AutoTuneCriterion_swigregister = _swigfaiss_avx2.AutoTuneCriterion_swigregister
AutoTuneCriterion_swigregister(AutoTuneCriterion)

class OneRecallAtRCriterion(AutoTuneCriterion):
    __swig_setmethods__ = {}
    for _s in [AutoTuneCriterion]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, OneRecallAtRCriterion, name, value)
    __swig_getmethods__ = {}
    for _s in [AutoTuneCriterion]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, OneRecallAtRCriterion, name)
    __repr__ = _swig_repr
    __swig_setmethods__["R"] = _swigfaiss_avx2.OneRecallAtRCriterion_R_set
    __swig_getmethods__["R"] = _swigfaiss_avx2.OneRecallAtRCriterion_R_get
    if _newclass:
        R = _swig_property(_swigfaiss_avx2.OneRecallAtRCriterion_R_get, _swigfaiss_avx2.OneRecallAtRCriterion_R_set)

    def __init__(self, nq, R):
        this = _swigfaiss_avx2.new_OneRecallAtRCriterion(nq, R)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def evaluate(self, D, I):
        return _swigfaiss_avx2.OneRecallAtRCriterion_evaluate(self, D, I)
    __swig_destroy__ = _swigfaiss_avx2.delete_OneRecallAtRCriterion
    __del__ = lambda self: None
OneRecallAtRCriterion_swigregister = _swigfaiss_avx2.OneRecallAtRCriterion_swigregister
OneRecallAtRCriterion_swigregister(OneRecallAtRCriterion)

class IntersectionCriterion(AutoTuneCriterion):
    __swig_setmethods__ = {}
    for _s in [AutoTuneCriterion]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IntersectionCriterion, name, value)
    __swig_getmethods__ = {}
    for _s in [AutoTuneCriterion]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IntersectionCriterion, name)
    __repr__ = _swig_repr
    __swig_setmethods__["R"] = _swigfaiss_avx2.IntersectionCriterion_R_set
    __swig_getmethods__["R"] = _swigfaiss_avx2.IntersectionCriterion_R_get
    if _newclass:
        R = _swig_property(_swigfaiss_avx2.IntersectionCriterion_R_get, _swigfaiss_avx2.IntersectionCriterion_R_set)

    def __init__(self, nq, R):
        this = _swigfaiss_avx2.new_IntersectionCriterion(nq, R)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def evaluate(self, D, I):
        return _swigfaiss_avx2.IntersectionCriterion_evaluate(self, D, I)
    __swig_destroy__ = _swigfaiss_avx2.delete_IntersectionCriterion
    __del__ = lambda self: None
IntersectionCriterion_swigregister = _swigfaiss_avx2.IntersectionCriterion_swigregister
IntersectionCriterion_swigregister(IntersectionCriterion)

class OperatingPoint(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, OperatingPoint, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, OperatingPoint, name)
    __repr__ = _swig_repr
    __swig_setmethods__["perf"] = _swigfaiss_avx2.OperatingPoint_perf_set
    __swig_getmethods__["perf"] = _swigfaiss_avx2.OperatingPoint_perf_get
    if _newclass:
        perf = _swig_property(_swigfaiss_avx2.OperatingPoint_perf_get, _swigfaiss_avx2.OperatingPoint_perf_set)
    __swig_setmethods__["t"] = _swigfaiss_avx2.OperatingPoint_t_set
    __swig_getmethods__["t"] = _swigfaiss_avx2.OperatingPoint_t_get
    if _newclass:
        t = _swig_property(_swigfaiss_avx2.OperatingPoint_t_get, _swigfaiss_avx2.OperatingPoint_t_set)
    __swig_setmethods__["key"] = _swigfaiss_avx2.OperatingPoint_key_set
    __swig_getmethods__["key"] = _swigfaiss_avx2.OperatingPoint_key_get
    if _newclass:
        key = _swig_property(_swigfaiss_avx2.OperatingPoint_key_get, _swigfaiss_avx2.OperatingPoint_key_set)
    __swig_setmethods__["cno"] = _swigfaiss_avx2.OperatingPoint_cno_set
    __swig_getmethods__["cno"] = _swigfaiss_avx2.OperatingPoint_cno_get
    if _newclass:
        cno = _swig_property(_swigfaiss_avx2.OperatingPoint_cno_get, _swigfaiss_avx2.OperatingPoint_cno_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_OperatingPoint()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_OperatingPoint
    __del__ = lambda self: None
OperatingPoint_swigregister = _swigfaiss_avx2.OperatingPoint_swigregister
OperatingPoint_swigregister(OperatingPoint)

class OperatingPoints(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, OperatingPoints, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, OperatingPoints, name)
    __repr__ = _swig_repr
    __swig_setmethods__["all_pts"] = _swigfaiss_avx2.OperatingPoints_all_pts_set
    __swig_getmethods__["all_pts"] = _swigfaiss_avx2.OperatingPoints_all_pts_get
    if _newclass:
        all_pts = _swig_property(_swigfaiss_avx2.OperatingPoints_all_pts_get, _swigfaiss_avx2.OperatingPoints_all_pts_set)
    __swig_setmethods__["optimal_pts"] = _swigfaiss_avx2.OperatingPoints_optimal_pts_set
    __swig_getmethods__["optimal_pts"] = _swigfaiss_avx2.OperatingPoints_optimal_pts_get
    if _newclass:
        optimal_pts = _swig_property(_swigfaiss_avx2.OperatingPoints_optimal_pts_get, _swigfaiss_avx2.OperatingPoints_optimal_pts_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_OperatingPoints()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def merge_with(self, *args):
        return _swigfaiss_avx2.OperatingPoints_merge_with(self, *args)

    def clear(self):
        return _swigfaiss_avx2.OperatingPoints_clear(self)

    def add(self, perf, t, key, cno=0):
        return _swigfaiss_avx2.OperatingPoints_add(self, perf, t, key, cno)

    def t_for_perf(self, perf):
        return _swigfaiss_avx2.OperatingPoints_t_for_perf(self, perf)

    def display(self, only_optimal=True):
        return _swigfaiss_avx2.OperatingPoints_display(self, only_optimal)

    def all_to_gnuplot(self, fname):
        return _swigfaiss_avx2.OperatingPoints_all_to_gnuplot(self, fname)

    def optimal_to_gnuplot(self, fname):
        return _swigfaiss_avx2.OperatingPoints_optimal_to_gnuplot(self, fname)
    __swig_destroy__ = _swigfaiss_avx2.delete_OperatingPoints
    __del__ = lambda self: None
OperatingPoints_swigregister = _swigfaiss_avx2.OperatingPoints_swigregister
OperatingPoints_swigregister(OperatingPoints)

class ParameterRange(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ParameterRange, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ParameterRange, name)
    __repr__ = _swig_repr
    __swig_setmethods__["name"] = _swigfaiss_avx2.ParameterRange_name_set
    __swig_getmethods__["name"] = _swigfaiss_avx2.ParameterRange_name_get
    if _newclass:
        name = _swig_property(_swigfaiss_avx2.ParameterRange_name_get, _swigfaiss_avx2.ParameterRange_name_set)
    __swig_setmethods__["values"] = _swigfaiss_avx2.ParameterRange_values_set
    __swig_getmethods__["values"] = _swigfaiss_avx2.ParameterRange_values_get
    if _newclass:
        values = _swig_property(_swigfaiss_avx2.ParameterRange_values_get, _swigfaiss_avx2.ParameterRange_values_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_ParameterRange()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_ParameterRange
    __del__ = lambda self: None
ParameterRange_swigregister = _swigfaiss_avx2.ParameterRange_swigregister
ParameterRange_swigregister(ParameterRange)

class ParameterSpace(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, ParameterSpace, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, ParameterSpace, name)
    __repr__ = _swig_repr
    __swig_setmethods__["parameter_ranges"] = _swigfaiss_avx2.ParameterSpace_parameter_ranges_set
    __swig_getmethods__["parameter_ranges"] = _swigfaiss_avx2.ParameterSpace_parameter_ranges_get
    if _newclass:
        parameter_ranges = _swig_property(_swigfaiss_avx2.ParameterSpace_parameter_ranges_get, _swigfaiss_avx2.ParameterSpace_parameter_ranges_set)
    __swig_setmethods__["verbose"] = _swigfaiss_avx2.ParameterSpace_verbose_set
    __swig_getmethods__["verbose"] = _swigfaiss_avx2.ParameterSpace_verbose_get
    if _newclass:
        verbose = _swig_property(_swigfaiss_avx2.ParameterSpace_verbose_get, _swigfaiss_avx2.ParameterSpace_verbose_set)
    __swig_setmethods__["n_experiments"] = _swigfaiss_avx2.ParameterSpace_n_experiments_set
    __swig_getmethods__["n_experiments"] = _swigfaiss_avx2.ParameterSpace_n_experiments_get
    if _newclass:
        n_experiments = _swig_property(_swigfaiss_avx2.ParameterSpace_n_experiments_get, _swigfaiss_avx2.ParameterSpace_n_experiments_set)
    __swig_setmethods__["batchsize"] = _swigfaiss_avx2.ParameterSpace_batchsize_set
    __swig_getmethods__["batchsize"] = _swigfaiss_avx2.ParameterSpace_batchsize_get
    if _newclass:
        batchsize = _swig_property(_swigfaiss_avx2.ParameterSpace_batchsize_get, _swigfaiss_avx2.ParameterSpace_batchsize_set)
    __swig_setmethods__["thread_over_batches"] = _swigfaiss_avx2.ParameterSpace_thread_over_batches_set
    __swig_getmethods__["thread_over_batches"] = _swigfaiss_avx2.ParameterSpace_thread_over_batches_get
    if _newclass:
        thread_over_batches = _swig_property(_swigfaiss_avx2.ParameterSpace_thread_over_batches_get, _swigfaiss_avx2.ParameterSpace_thread_over_batches_set)
    __swig_setmethods__["min_test_duration"] = _swigfaiss_avx2.ParameterSpace_min_test_duration_set
    __swig_getmethods__["min_test_duration"] = _swigfaiss_avx2.ParameterSpace_min_test_duration_get
    if _newclass:
        min_test_duration = _swig_property(_swigfaiss_avx2.ParameterSpace_min_test_duration_get, _swigfaiss_avx2.ParameterSpace_min_test_duration_set)

    def __init__(self):
        this = _swigfaiss_avx2.new_ParameterSpace()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def n_combinations(self):
        return _swigfaiss_avx2.ParameterSpace_n_combinations(self)

    def combination_ge(self, c1, c2):
        return _swigfaiss_avx2.ParameterSpace_combination_ge(self, c1, c2)

    def combination_name(self, cno):
        return _swigfaiss_avx2.ParameterSpace_combination_name(self, cno)

    def display(self):
        return _swigfaiss_avx2.ParameterSpace_display(self)

    def add_range(self, name):
        return _swigfaiss_avx2.ParameterSpace_add_range(self, name)

    def initialize(self, index):
        return _swigfaiss_avx2.ParameterSpace_initialize(self, index)

    def set_index_parameters(self, *args):
        return _swigfaiss_avx2.ParameterSpace_set_index_parameters(self, *args)

    def set_index_parameter(self, index, name, val):
        return _swigfaiss_avx2.ParameterSpace_set_index_parameter(self, index, name, val)

    def update_bounds(self, cno, op, upper_bound_perf, lower_bound_t):
        return _swigfaiss_avx2.ParameterSpace_update_bounds(self, cno, op, upper_bound_perf, lower_bound_t)

    def explore(self, index, nq, xq, crit, ops):
        return _swigfaiss_avx2.ParameterSpace_explore(self, index, nq, xq, crit, ops)
    __swig_destroy__ = _swigfaiss_avx2.delete_ParameterSpace
    __del__ = lambda self: None
ParameterSpace_swigregister = _swigfaiss_avx2.ParameterSpace_swigregister
ParameterSpace_swigregister(ParameterSpace)


def index_factory(*args):
    return _swigfaiss_avx2.index_factory(*args)
index_factory = _swigfaiss_avx2.index_factory

def index_binary_factory(d, description):
    return _swigfaiss_avx2.index_binary_factory(d, description)
index_binary_factory = _swigfaiss_avx2.index_binary_factory
class MatrixStats(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, MatrixStats, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, MatrixStats, name)
    __repr__ = _swig_repr

    def __init__(self, n, d, x):
        this = _swigfaiss_avx2.new_MatrixStats(n, d, x)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["comments"] = _swigfaiss_avx2.MatrixStats_comments_set
    __swig_getmethods__["comments"] = _swigfaiss_avx2.MatrixStats_comments_get
    if _newclass:
        comments = _swig_property(_swigfaiss_avx2.MatrixStats_comments_get, _swigfaiss_avx2.MatrixStats_comments_set)
    __swig_setmethods__["n"] = _swigfaiss_avx2.MatrixStats_n_set
    __swig_getmethods__["n"] = _swigfaiss_avx2.MatrixStats_n_get
    if _newclass:
        n = _swig_property(_swigfaiss_avx2.MatrixStats_n_get, _swigfaiss_avx2.MatrixStats_n_set)
    __swig_setmethods__["d"] = _swigfaiss_avx2.MatrixStats_d_set
    __swig_getmethods__["d"] = _swigfaiss_avx2.MatrixStats_d_get
    if _newclass:
        d = _swig_property(_swigfaiss_avx2.MatrixStats_d_get, _swigfaiss_avx2.MatrixStats_d_set)
    __swig_setmethods__["n_collision"] = _swigfaiss_avx2.MatrixStats_n_collision_set
    __swig_getmethods__["n_collision"] = _swigfaiss_avx2.MatrixStats_n_collision_get
    if _newclass:
        n_collision = _swig_property(_swigfaiss_avx2.MatrixStats_n_collision_get, _swigfaiss_avx2.MatrixStats_n_collision_set)
    __swig_setmethods__["n_valid"] = _swigfaiss_avx2.MatrixStats_n_valid_set
    __swig_getmethods__["n_valid"] = _swigfaiss_avx2.MatrixStats_n_valid_get
    if _newclass:
        n_valid = _swig_property(_swigfaiss_avx2.MatrixStats_n_valid_get, _swigfaiss_avx2.MatrixStats_n_valid_set)
    __swig_setmethods__["n0"] = _swigfaiss_avx2.MatrixStats_n0_set
    __swig_getmethods__["n0"] = _swigfaiss_avx2.MatrixStats_n0_get
    if _newclass:
        n0 = _swig_property(_swigfaiss_avx2.MatrixStats_n0_get, _swigfaiss_avx2.MatrixStats_n0_set)
    __swig_setmethods__["min_norm2"] = _swigfaiss_avx2.MatrixStats_min_norm2_set
    __swig_getmethods__["min_norm2"] = _swigfaiss_avx2.MatrixStats_min_norm2_get
    if _newclass:
        min_norm2 = _swig_property(_swigfaiss_avx2.MatrixStats_min_norm2_get, _swigfaiss_avx2.MatrixStats_min_norm2_set)
    __swig_setmethods__["max_norm2"] = _swigfaiss_avx2.MatrixStats_max_norm2_set
    __swig_getmethods__["max_norm2"] = _swigfaiss_avx2.MatrixStats_max_norm2_get
    if _newclass:
        max_norm2 = _swig_property(_swigfaiss_avx2.MatrixStats_max_norm2_get, _swigfaiss_avx2.MatrixStats_max_norm2_set)
    __swig_setmethods__["per_dim_stats"] = _swigfaiss_avx2.MatrixStats_per_dim_stats_set
    __swig_getmethods__["per_dim_stats"] = _swigfaiss_avx2.MatrixStats_per_dim_stats_get
    if _newclass:
        per_dim_stats = _swig_property(_swigfaiss_avx2.MatrixStats_per_dim_stats_get, _swigfaiss_avx2.MatrixStats_per_dim_stats_set)
    __swig_setmethods__["occurrences"] = _swigfaiss_avx2.MatrixStats_occurrences_set
    __swig_getmethods__["occurrences"] = _swigfaiss_avx2.MatrixStats_occurrences_get
    if _newclass:
        occurrences = _swig_property(_swigfaiss_avx2.MatrixStats_occurrences_get, _swigfaiss_avx2.MatrixStats_occurrences_set)
    __swig_setmethods__["buf"] = _swigfaiss_avx2.MatrixStats_buf_set
    __swig_getmethods__["buf"] = _swigfaiss_avx2.MatrixStats_buf_get
    if _newclass:
        buf = _swig_property(_swigfaiss_avx2.MatrixStats_buf_get, _swigfaiss_avx2.MatrixStats_buf_set)
    __swig_setmethods__["nbuf"] = _swigfaiss_avx2.MatrixStats_nbuf_set
    __swig_getmethods__["nbuf"] = _swigfaiss_avx2.MatrixStats_nbuf_get
    if _newclass:
        nbuf = _swig_property(_swigfaiss_avx2.MatrixStats_nbuf_get, _swigfaiss_avx2.MatrixStats_nbuf_set)

    def do_comment(self, fmt):
        return _swigfaiss_avx2.MatrixStats_do_comment(self, fmt)
    __swig_destroy__ = _swigfaiss_avx2.delete_MatrixStats
    __del__ = lambda self: None
MatrixStats_swigregister = _swigfaiss_avx2.MatrixStats_swigregister
MatrixStats_swigregister(MatrixStats)

class GpuParameterSpace(ParameterSpace):
    __swig_setmethods__ = {}
    for _s in [ParameterSpace]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, GpuParameterSpace, name, value)
    __swig_getmethods__ = {}
    for _s in [ParameterSpace]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, GpuParameterSpace, name)
    __repr__ = _swig_repr

    def initialize(self, index):
        return _swigfaiss_avx2.GpuParameterSpace_initialize(self, index)

    def set_index_parameter(self, index, name, val):
        return _swigfaiss_avx2.GpuParameterSpace_set_index_parameter(self, index, name, val)

    def __init__(self):
        this = _swigfaiss_avx2.new_GpuParameterSpace()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuParameterSpace
    __del__ = lambda self: None
GpuParameterSpace_swigregister = _swigfaiss_avx2.GpuParameterSpace_swigregister
GpuParameterSpace_swigregister(GpuParameterSpace)

class ToCPUCloner(Cloner):
    __swig_setmethods__ = {}
    for _s in [Cloner]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ToCPUCloner, name, value)
    __swig_getmethods__ = {}
    for _s in [Cloner]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ToCPUCloner, name)
    __repr__ = _swig_repr

    def merge_index(self, dst, src, successive_ids):
        return _swigfaiss_avx2.ToCPUCloner_merge_index(self, dst, src, successive_ids)

    def clone_Index(self, index):
        return _swigfaiss_avx2.ToCPUCloner_clone_Index(self, index)

    def __init__(self):
        this = _swigfaiss_avx2.new_ToCPUCloner()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_ToCPUCloner
    __del__ = lambda self: None
ToCPUCloner_swigregister = _swigfaiss_avx2.ToCPUCloner_swigregister
ToCPUCloner_swigregister(ToCPUCloner)

class ToGpuCloner(Cloner, GpuClonerOptions):
    __swig_setmethods__ = {}
    for _s in [Cloner, GpuClonerOptions]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ToGpuCloner, name, value)
    __swig_getmethods__ = {}
    for _s in [Cloner, GpuClonerOptions]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ToGpuCloner, name)
    __repr__ = _swig_repr
    __swig_setmethods__["resources"] = _swigfaiss_avx2.ToGpuCloner_resources_set
    __swig_getmethods__["resources"] = _swigfaiss_avx2.ToGpuCloner_resources_get
    if _newclass:
        resources = _swig_property(_swigfaiss_avx2.ToGpuCloner_resources_get, _swigfaiss_avx2.ToGpuCloner_resources_set)
    __swig_setmethods__["device"] = _swigfaiss_avx2.ToGpuCloner_device_set
    __swig_getmethods__["device"] = _swigfaiss_avx2.ToGpuCloner_device_get
    if _newclass:
        device = _swig_property(_swigfaiss_avx2.ToGpuCloner_device_get, _swigfaiss_avx2.ToGpuCloner_device_set)

    def __init__(self, resources, device, options):
        this = _swigfaiss_avx2.new_ToGpuCloner(resources, device, options)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def clone_Index(self, index):
        return _swigfaiss_avx2.ToGpuCloner_clone_Index(self, index)
    __swig_destroy__ = _swigfaiss_avx2.delete_ToGpuCloner
    __del__ = lambda self: None
ToGpuCloner_swigregister = _swigfaiss_avx2.ToGpuCloner_swigregister
ToGpuCloner_swigregister(ToGpuCloner)

class ToGpuClonerMultiple(Cloner, GpuMultipleClonerOptions):
    __swig_setmethods__ = {}
    for _s in [Cloner, GpuMultipleClonerOptions]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, ToGpuClonerMultiple, name, value)
    __swig_getmethods__ = {}
    for _s in [Cloner, GpuMultipleClonerOptions]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, ToGpuClonerMultiple, name)
    __repr__ = _swig_repr
    __swig_setmethods__["sub_cloners"] = _swigfaiss_avx2.ToGpuClonerMultiple_sub_cloners_set
    __swig_getmethods__["sub_cloners"] = _swigfaiss_avx2.ToGpuClonerMultiple_sub_cloners_get
    if _newclass:
        sub_cloners = _swig_property(_swigfaiss_avx2.ToGpuClonerMultiple_sub_cloners_get, _swigfaiss_avx2.ToGpuClonerMultiple_sub_cloners_set)

    def __init__(self, *args):
        this = _swigfaiss_avx2.new_ToGpuClonerMultiple(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def copy_ivf_shard(self, index_ivf, idx2, n, i):
        return _swigfaiss_avx2.ToGpuClonerMultiple_copy_ivf_shard(self, index_ivf, idx2, n, i)

    def clone_Index_to_shards(self, index):
        return _swigfaiss_avx2.ToGpuClonerMultiple_clone_Index_to_shards(self, index)

    def clone_Index(self, index):
        return _swigfaiss_avx2.ToGpuClonerMultiple_clone_Index(self, index)
    __swig_destroy__ = _swigfaiss_avx2.delete_ToGpuClonerMultiple
    __del__ = lambda self: None
ToGpuClonerMultiple_swigregister = _swigfaiss_avx2.ToGpuClonerMultiple_swigregister
ToGpuClonerMultiple_swigregister(ToGpuClonerMultiple)


def index_gpu_to_cpu(gpu_index):
    return _swigfaiss_avx2.index_gpu_to_cpu(gpu_index)
index_gpu_to_cpu = _swigfaiss_avx2.index_gpu_to_cpu

def index_cpu_to_gpu(resources, device, index, options=None):
    return _swigfaiss_avx2.index_cpu_to_gpu(resources, device, index, options)
index_cpu_to_gpu = _swigfaiss_avx2.index_cpu_to_gpu

def index_cpu_to_gpu_multiple(resources, devices, index, options=None):
    return _swigfaiss_avx2.index_cpu_to_gpu_multiple(resources, devices, index, options)
index_cpu_to_gpu_multiple = _swigfaiss_avx2.index_cpu_to_gpu_multiple

def swig_ptr(a):
    return _swigfaiss_avx2.swig_ptr(a)
swig_ptr = _swigfaiss_avx2.swig_ptr

def rev_swig_ptr(*args):
    return _swigfaiss_avx2.rev_swig_ptr(*args)
rev_swig_ptr = _swigfaiss_avx2.rev_swig_ptr
class float_minheap_array_t(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, float_minheap_array_t, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, float_minheap_array_t, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nh"] = _swigfaiss_avx2.float_minheap_array_t_nh_set
    __swig_getmethods__["nh"] = _swigfaiss_avx2.float_minheap_array_t_nh_get
    if _newclass:
        nh = _swig_property(_swigfaiss_avx2.float_minheap_array_t_nh_get, _swigfaiss_avx2.float_minheap_array_t_nh_set)
    __swig_setmethods__["k"] = _swigfaiss_avx2.float_minheap_array_t_k_set
    __swig_getmethods__["k"] = _swigfaiss_avx2.float_minheap_array_t_k_get
    if _newclass:
        k = _swig_property(_swigfaiss_avx2.float_minheap_array_t_k_get, _swigfaiss_avx2.float_minheap_array_t_k_set)
    __swig_setmethods__["ids"] = _swigfaiss_avx2.float_minheap_array_t_ids_set
    __swig_getmethods__["ids"] = _swigfaiss_avx2.float_minheap_array_t_ids_get
    if _newclass:
        ids = _swig_property(_swigfaiss_avx2.float_minheap_array_t_ids_get, _swigfaiss_avx2.float_minheap_array_t_ids_set)
    __swig_setmethods__["val"] = _swigfaiss_avx2.float_minheap_array_t_val_set
    __swig_getmethods__["val"] = _swigfaiss_avx2.float_minheap_array_t_val_get
    if _newclass:
        val = _swig_property(_swigfaiss_avx2.float_minheap_array_t_val_get, _swigfaiss_avx2.float_minheap_array_t_val_set)

    def get_val(self, key):
        return _swigfaiss_avx2.float_minheap_array_t_get_val(self, key)

    def get_ids(self, key):
        return _swigfaiss_avx2.float_minheap_array_t_get_ids(self, key)

    def heapify(self):
        return _swigfaiss_avx2.float_minheap_array_t_heapify(self)

    def addn(self, nj, vin, j0=0, i0=0, ni=-1):
        return _swigfaiss_avx2.float_minheap_array_t_addn(self, nj, vin, j0, i0, ni)

    def addn_with_ids(self, nj, vin, id_in=None, id_stride=0, i0=0, ni=-1):
        return _swigfaiss_avx2.float_minheap_array_t_addn_with_ids(self, nj, vin, id_in, id_stride, i0, ni)

    def reorder(self):
        return _swigfaiss_avx2.float_minheap_array_t_reorder(self)

    def per_line_extrema(self, vals_out, idx_out):
        return _swigfaiss_avx2.float_minheap_array_t_per_line_extrema(self, vals_out, idx_out)

    def __init__(self):
        this = _swigfaiss_avx2.new_float_minheap_array_t()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_float_minheap_array_t
    __del__ = lambda self: None
float_minheap_array_t_swigregister = _swigfaiss_avx2.float_minheap_array_t_swigregister
float_minheap_array_t_swigregister(float_minheap_array_t)

class int_minheap_array_t(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, int_minheap_array_t, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, int_minheap_array_t, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nh"] = _swigfaiss_avx2.int_minheap_array_t_nh_set
    __swig_getmethods__["nh"] = _swigfaiss_avx2.int_minheap_array_t_nh_get
    if _newclass:
        nh = _swig_property(_swigfaiss_avx2.int_minheap_array_t_nh_get, _swigfaiss_avx2.int_minheap_array_t_nh_set)
    __swig_setmethods__["k"] = _swigfaiss_avx2.int_minheap_array_t_k_set
    __swig_getmethods__["k"] = _swigfaiss_avx2.int_minheap_array_t_k_get
    if _newclass:
        k = _swig_property(_swigfaiss_avx2.int_minheap_array_t_k_get, _swigfaiss_avx2.int_minheap_array_t_k_set)
    __swig_setmethods__["ids"] = _swigfaiss_avx2.int_minheap_array_t_ids_set
    __swig_getmethods__["ids"] = _swigfaiss_avx2.int_minheap_array_t_ids_get
    if _newclass:
        ids = _swig_property(_swigfaiss_avx2.int_minheap_array_t_ids_get, _swigfaiss_avx2.int_minheap_array_t_ids_set)
    __swig_setmethods__["val"] = _swigfaiss_avx2.int_minheap_array_t_val_set
    __swig_getmethods__["val"] = _swigfaiss_avx2.int_minheap_array_t_val_get
    if _newclass:
        val = _swig_property(_swigfaiss_avx2.int_minheap_array_t_val_get, _swigfaiss_avx2.int_minheap_array_t_val_set)

    def get_val(self, key):
        return _swigfaiss_avx2.int_minheap_array_t_get_val(self, key)

    def get_ids(self, key):
        return _swigfaiss_avx2.int_minheap_array_t_get_ids(self, key)

    def heapify(self):
        return _swigfaiss_avx2.int_minheap_array_t_heapify(self)

    def addn(self, nj, vin, j0=0, i0=0, ni=-1):
        return _swigfaiss_avx2.int_minheap_array_t_addn(self, nj, vin, j0, i0, ni)

    def addn_with_ids(self, nj, vin, id_in=None, id_stride=0, i0=0, ni=-1):
        return _swigfaiss_avx2.int_minheap_array_t_addn_with_ids(self, nj, vin, id_in, id_stride, i0, ni)

    def reorder(self):
        return _swigfaiss_avx2.int_minheap_array_t_reorder(self)

    def per_line_extrema(self, vals_out, idx_out):
        return _swigfaiss_avx2.int_minheap_array_t_per_line_extrema(self, vals_out, idx_out)

    def __init__(self):
        this = _swigfaiss_avx2.new_int_minheap_array_t()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_int_minheap_array_t
    __del__ = lambda self: None
int_minheap_array_t_swigregister = _swigfaiss_avx2.int_minheap_array_t_swigregister
int_minheap_array_t_swigregister(int_minheap_array_t)

class float_maxheap_array_t(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, float_maxheap_array_t, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, float_maxheap_array_t, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nh"] = _swigfaiss_avx2.float_maxheap_array_t_nh_set
    __swig_getmethods__["nh"] = _swigfaiss_avx2.float_maxheap_array_t_nh_get
    if _newclass:
        nh = _swig_property(_swigfaiss_avx2.float_maxheap_array_t_nh_get, _swigfaiss_avx2.float_maxheap_array_t_nh_set)
    __swig_setmethods__["k"] = _swigfaiss_avx2.float_maxheap_array_t_k_set
    __swig_getmethods__["k"] = _swigfaiss_avx2.float_maxheap_array_t_k_get
    if _newclass:
        k = _swig_property(_swigfaiss_avx2.float_maxheap_array_t_k_get, _swigfaiss_avx2.float_maxheap_array_t_k_set)
    __swig_setmethods__["ids"] = _swigfaiss_avx2.float_maxheap_array_t_ids_set
    __swig_getmethods__["ids"] = _swigfaiss_avx2.float_maxheap_array_t_ids_get
    if _newclass:
        ids = _swig_property(_swigfaiss_avx2.float_maxheap_array_t_ids_get, _swigfaiss_avx2.float_maxheap_array_t_ids_set)
    __swig_setmethods__["val"] = _swigfaiss_avx2.float_maxheap_array_t_val_set
    __swig_getmethods__["val"] = _swigfaiss_avx2.float_maxheap_array_t_val_get
    if _newclass:
        val = _swig_property(_swigfaiss_avx2.float_maxheap_array_t_val_get, _swigfaiss_avx2.float_maxheap_array_t_val_set)

    def get_val(self, key):
        return _swigfaiss_avx2.float_maxheap_array_t_get_val(self, key)

    def get_ids(self, key):
        return _swigfaiss_avx2.float_maxheap_array_t_get_ids(self, key)

    def heapify(self):
        return _swigfaiss_avx2.float_maxheap_array_t_heapify(self)

    def addn(self, nj, vin, j0=0, i0=0, ni=-1):
        return _swigfaiss_avx2.float_maxheap_array_t_addn(self, nj, vin, j0, i0, ni)

    def addn_with_ids(self, nj, vin, id_in=None, id_stride=0, i0=0, ni=-1):
        return _swigfaiss_avx2.float_maxheap_array_t_addn_with_ids(self, nj, vin, id_in, id_stride, i0, ni)

    def reorder(self):
        return _swigfaiss_avx2.float_maxheap_array_t_reorder(self)

    def per_line_extrema(self, vals_out, idx_out):
        return _swigfaiss_avx2.float_maxheap_array_t_per_line_extrema(self, vals_out, idx_out)

    def __init__(self):
        this = _swigfaiss_avx2.new_float_maxheap_array_t()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_float_maxheap_array_t
    __del__ = lambda self: None
float_maxheap_array_t_swigregister = _swigfaiss_avx2.float_maxheap_array_t_swigregister
float_maxheap_array_t_swigregister(float_maxheap_array_t)

class int_maxheap_array_t(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, int_maxheap_array_t, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, int_maxheap_array_t, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nh"] = _swigfaiss_avx2.int_maxheap_array_t_nh_set
    __swig_getmethods__["nh"] = _swigfaiss_avx2.int_maxheap_array_t_nh_get
    if _newclass:
        nh = _swig_property(_swigfaiss_avx2.int_maxheap_array_t_nh_get, _swigfaiss_avx2.int_maxheap_array_t_nh_set)
    __swig_setmethods__["k"] = _swigfaiss_avx2.int_maxheap_array_t_k_set
    __swig_getmethods__["k"] = _swigfaiss_avx2.int_maxheap_array_t_k_get
    if _newclass:
        k = _swig_property(_swigfaiss_avx2.int_maxheap_array_t_k_get, _swigfaiss_avx2.int_maxheap_array_t_k_set)
    __swig_setmethods__["ids"] = _swigfaiss_avx2.int_maxheap_array_t_ids_set
    __swig_getmethods__["ids"] = _swigfaiss_avx2.int_maxheap_array_t_ids_get
    if _newclass:
        ids = _swig_property(_swigfaiss_avx2.int_maxheap_array_t_ids_get, _swigfaiss_avx2.int_maxheap_array_t_ids_set)
    __swig_setmethods__["val"] = _swigfaiss_avx2.int_maxheap_array_t_val_set
    __swig_getmethods__["val"] = _swigfaiss_avx2.int_maxheap_array_t_val_get
    if _newclass:
        val = _swig_property(_swigfaiss_avx2.int_maxheap_array_t_val_get, _swigfaiss_avx2.int_maxheap_array_t_val_set)

    def get_val(self, key):
        return _swigfaiss_avx2.int_maxheap_array_t_get_val(self, key)

    def get_ids(self, key):
        return _swigfaiss_avx2.int_maxheap_array_t_get_ids(self, key)

    def heapify(self):
        return _swigfaiss_avx2.int_maxheap_array_t_heapify(self)

    def addn(self, nj, vin, j0=0, i0=0, ni=-1):
        return _swigfaiss_avx2.int_maxheap_array_t_addn(self, nj, vin, j0, i0, ni)

    def addn_with_ids(self, nj, vin, id_in=None, id_stride=0, i0=0, ni=-1):
        return _swigfaiss_avx2.int_maxheap_array_t_addn_with_ids(self, nj, vin, id_in, id_stride, i0, ni)

    def reorder(self):
        return _swigfaiss_avx2.int_maxheap_array_t_reorder(self)

    def per_line_extrema(self, vals_out, idx_out):
        return _swigfaiss_avx2.int_maxheap_array_t_per_line_extrema(self, vals_out, idx_out)

    def __init__(self):
        this = _swigfaiss_avx2.new_int_maxheap_array_t()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_int_maxheap_array_t
    __del__ = lambda self: None
int_maxheap_array_t_swigregister = _swigfaiss_avx2.int_maxheap_array_t_swigregister
int_maxheap_array_t_swigregister(int_maxheap_array_t)


def omp_set_num_threads(num_threads):
    return _swigfaiss_avx2.omp_set_num_threads(num_threads)
omp_set_num_threads = _swigfaiss_avx2.omp_set_num_threads

def omp_get_max_threads():
    return _swigfaiss_avx2.omp_get_max_threads()
omp_get_max_threads = _swigfaiss_avx2.omp_get_max_threads

def memcpy(dest, src, n):
    return _swigfaiss_avx2.memcpy(dest, src, n)
memcpy = _swigfaiss_avx2.memcpy

def cast_integer_to_float_ptr(x):
    return _swigfaiss_avx2.cast_integer_to_float_ptr(x)
cast_integer_to_float_ptr = _swigfaiss_avx2.cast_integer_to_float_ptr

def cast_integer_to_long_ptr(x):
    return _swigfaiss_avx2.cast_integer_to_long_ptr(x)
cast_integer_to_long_ptr = _swigfaiss_avx2.cast_integer_to_long_ptr

def cast_integer_to_int_ptr(x):
    return _swigfaiss_avx2.cast_integer_to_int_ptr(x)
cast_integer_to_int_ptr = _swigfaiss_avx2.cast_integer_to_int_ptr
class RangeSearchResult(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, RangeSearchResult, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, RangeSearchResult, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nq"] = _swigfaiss_avx2.RangeSearchResult_nq_set
    __swig_getmethods__["nq"] = _swigfaiss_avx2.RangeSearchResult_nq_get
    if _newclass:
        nq = _swig_property(_swigfaiss_avx2.RangeSearchResult_nq_get, _swigfaiss_avx2.RangeSearchResult_nq_set)
    __swig_setmethods__["lims"] = _swigfaiss_avx2.RangeSearchResult_lims_set
    __swig_getmethods__["lims"] = _swigfaiss_avx2.RangeSearchResult_lims_get
    if _newclass:
        lims = _swig_property(_swigfaiss_avx2.RangeSearchResult_lims_get, _swigfaiss_avx2.RangeSearchResult_lims_set)
    __swig_setmethods__["labels"] = _swigfaiss_avx2.RangeSearchResult_labels_set
    __swig_getmethods__["labels"] = _swigfaiss_avx2.RangeSearchResult_labels_get
    if _newclass:
        labels = _swig_property(_swigfaiss_avx2.RangeSearchResult_labels_get, _swigfaiss_avx2.RangeSearchResult_labels_set)
    __swig_setmethods__["distances"] = _swigfaiss_avx2.RangeSearchResult_distances_set
    __swig_getmethods__["distances"] = _swigfaiss_avx2.RangeSearchResult_distances_get
    if _newclass:
        distances = _swig_property(_swigfaiss_avx2.RangeSearchResult_distances_get, _swigfaiss_avx2.RangeSearchResult_distances_set)
    __swig_setmethods__["buffer_size"] = _swigfaiss_avx2.RangeSearchResult_buffer_size_set
    __swig_getmethods__["buffer_size"] = _swigfaiss_avx2.RangeSearchResult_buffer_size_get
    if _newclass:
        buffer_size = _swig_property(_swigfaiss_avx2.RangeSearchResult_buffer_size_get, _swigfaiss_avx2.RangeSearchResult_buffer_size_set)

    def __init__(self, nq, alloc_lims=True):
        this = _swigfaiss_avx2.new_RangeSearchResult(nq, alloc_lims)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def do_allocation(self):
        return _swigfaiss_avx2.RangeSearchResult_do_allocation(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_RangeSearchResult
    __del__ = lambda self: None
RangeSearchResult_swigregister = _swigfaiss_avx2.RangeSearchResult_swigregister
RangeSearchResult_swigregister(RangeSearchResult)

class IDSelector(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, IDSelector, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, IDSelector, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def is_member(self, id):
        return _swigfaiss_avx2.IDSelector_is_member(self, id)
    __swig_destroy__ = _swigfaiss_avx2.delete_IDSelector
    __del__ = lambda self: None
IDSelector_swigregister = _swigfaiss_avx2.IDSelector_swigregister
IDSelector_swigregister(IDSelector)

class IDSelectorRange(IDSelector):
    __swig_setmethods__ = {}
    for _s in [IDSelector]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IDSelectorRange, name, value)
    __swig_getmethods__ = {}
    for _s in [IDSelector]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IDSelectorRange, name)
    __repr__ = _swig_repr
    __swig_setmethods__["imin"] = _swigfaiss_avx2.IDSelectorRange_imin_set
    __swig_getmethods__["imin"] = _swigfaiss_avx2.IDSelectorRange_imin_get
    if _newclass:
        imin = _swig_property(_swigfaiss_avx2.IDSelectorRange_imin_get, _swigfaiss_avx2.IDSelectorRange_imin_set)
    __swig_setmethods__["imax"] = _swigfaiss_avx2.IDSelectorRange_imax_set
    __swig_getmethods__["imax"] = _swigfaiss_avx2.IDSelectorRange_imax_get
    if _newclass:
        imax = _swig_property(_swigfaiss_avx2.IDSelectorRange_imax_get, _swigfaiss_avx2.IDSelectorRange_imax_set)

    def __init__(self, imin, imax):
        this = _swigfaiss_avx2.new_IDSelectorRange(imin, imax)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def is_member(self, id):
        return _swigfaiss_avx2.IDSelectorRange_is_member(self, id)
    __swig_destroy__ = _swigfaiss_avx2.delete_IDSelectorRange
    __del__ = lambda self: None
IDSelectorRange_swigregister = _swigfaiss_avx2.IDSelectorRange_swigregister
IDSelectorRange_swigregister(IDSelectorRange)

class IDSelectorArray(IDSelector):
    __swig_setmethods__ = {}
    for _s in [IDSelector]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IDSelectorArray, name, value)
    __swig_getmethods__ = {}
    for _s in [IDSelector]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IDSelectorArray, name)
    __repr__ = _swig_repr
    __swig_setmethods__["n"] = _swigfaiss_avx2.IDSelectorArray_n_set
    __swig_getmethods__["n"] = _swigfaiss_avx2.IDSelectorArray_n_get
    if _newclass:
        n = _swig_property(_swigfaiss_avx2.IDSelectorArray_n_get, _swigfaiss_avx2.IDSelectorArray_n_set)
    __swig_setmethods__["ids"] = _swigfaiss_avx2.IDSelectorArray_ids_set
    __swig_getmethods__["ids"] = _swigfaiss_avx2.IDSelectorArray_ids_get
    if _newclass:
        ids = _swig_property(_swigfaiss_avx2.IDSelectorArray_ids_get, _swigfaiss_avx2.IDSelectorArray_ids_set)

    def __init__(self, n, ids):
        this = _swigfaiss_avx2.new_IDSelectorArray(n, ids)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def is_member(self, id):
        return _swigfaiss_avx2.IDSelectorArray_is_member(self, id)
    __swig_destroy__ = _swigfaiss_avx2.delete_IDSelectorArray
    __del__ = lambda self: None
IDSelectorArray_swigregister = _swigfaiss_avx2.IDSelectorArray_swigregister
IDSelectorArray_swigregister(IDSelectorArray)

class IDSelectorBatch(IDSelector):
    __swig_setmethods__ = {}
    for _s in [IDSelector]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, IDSelectorBatch, name, value)
    __swig_getmethods__ = {}
    for _s in [IDSelector]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, IDSelectorBatch, name)
    __repr__ = _swig_repr
    __swig_setmethods__["nbits"] = _swigfaiss_avx2.IDSelectorBatch_nbits_set
    __swig_getmethods__["nbits"] = _swigfaiss_avx2.IDSelectorBatch_nbits_get
    if _newclass:
        nbits = _swig_property(_swigfaiss_avx2.IDSelectorBatch_nbits_get, _swigfaiss_avx2.IDSelectorBatch_nbits_set)
    __swig_setmethods__["mask"] = _swigfaiss_avx2.IDSelectorBatch_mask_set
    __swig_getmethods__["mask"] = _swigfaiss_avx2.IDSelectorBatch_mask_get
    if _newclass:
        mask = _swig_property(_swigfaiss_avx2.IDSelectorBatch_mask_get, _swigfaiss_avx2.IDSelectorBatch_mask_set)

    def __init__(self, n, indices):
        this = _swigfaiss_avx2.new_IDSelectorBatch(n, indices)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def is_member(self, id):
        return _swigfaiss_avx2.IDSelectorBatch_is_member(self, id)
    __swig_destroy__ = _swigfaiss_avx2.delete_IDSelectorBatch
    __del__ = lambda self: None
IDSelectorBatch_swigregister = _swigfaiss_avx2.IDSelectorBatch_swigregister
IDSelectorBatch_swigregister(IDSelectorBatch)

class BufferList(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, BufferList, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, BufferList, name)
    __repr__ = _swig_repr
    __swig_setmethods__["buffer_size"] = _swigfaiss_avx2.BufferList_buffer_size_set
    __swig_getmethods__["buffer_size"] = _swigfaiss_avx2.BufferList_buffer_size_get
    if _newclass:
        buffer_size = _swig_property(_swigfaiss_avx2.BufferList_buffer_size_get, _swigfaiss_avx2.BufferList_buffer_size_set)
    __swig_setmethods__["buffers"] = _swigfaiss_avx2.BufferList_buffers_set
    __swig_getmethods__["buffers"] = _swigfaiss_avx2.BufferList_buffers_get
    if _newclass:
        buffers = _swig_property(_swigfaiss_avx2.BufferList_buffers_get, _swigfaiss_avx2.BufferList_buffers_set)
    __swig_setmethods__["wp"] = _swigfaiss_avx2.BufferList_wp_set
    __swig_getmethods__["wp"] = _swigfaiss_avx2.BufferList_wp_get
    if _newclass:
        wp = _swig_property(_swigfaiss_avx2.BufferList_wp_get, _swigfaiss_avx2.BufferList_wp_set)

    def __init__(self, buffer_size):
        this = _swigfaiss_avx2.new_BufferList(buffer_size)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_BufferList
    __del__ = lambda self: None

    def append_buffer(self):
        return _swigfaiss_avx2.BufferList_append_buffer(self)

    def add(self, id, dis):
        return _swigfaiss_avx2.BufferList_add(self, id, dis)

    def copy_range(self, ofs, n, dest_ids, dest_dis):
        return _swigfaiss_avx2.BufferList_copy_range(self, ofs, n, dest_ids, dest_dis)
BufferList_swigregister = _swigfaiss_avx2.BufferList_swigregister
BufferList_swigregister(BufferList)

class RangeQueryResult(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, RangeQueryResult, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, RangeQueryResult, name)
    __repr__ = _swig_repr
    __swig_setmethods__["qno"] = _swigfaiss_avx2.RangeQueryResult_qno_set
    __swig_getmethods__["qno"] = _swigfaiss_avx2.RangeQueryResult_qno_get
    if _newclass:
        qno = _swig_property(_swigfaiss_avx2.RangeQueryResult_qno_get, _swigfaiss_avx2.RangeQueryResult_qno_set)
    __swig_setmethods__["nres"] = _swigfaiss_avx2.RangeQueryResult_nres_set
    __swig_getmethods__["nres"] = _swigfaiss_avx2.RangeQueryResult_nres_get
    if _newclass:
        nres = _swig_property(_swigfaiss_avx2.RangeQueryResult_nres_get, _swigfaiss_avx2.RangeQueryResult_nres_set)
    __swig_setmethods__["pres"] = _swigfaiss_avx2.RangeQueryResult_pres_set
    __swig_getmethods__["pres"] = _swigfaiss_avx2.RangeQueryResult_pres_get
    if _newclass:
        pres = _swig_property(_swigfaiss_avx2.RangeQueryResult_pres_get, _swigfaiss_avx2.RangeQueryResult_pres_set)

    def add(self, dis, id):
        return _swigfaiss_avx2.RangeQueryResult_add(self, dis, id)

    def __init__(self):
        this = _swigfaiss_avx2.new_RangeQueryResult()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_RangeQueryResult
    __del__ = lambda self: None
RangeQueryResult_swigregister = _swigfaiss_avx2.RangeQueryResult_swigregister
RangeQueryResult_swigregister(RangeQueryResult)

class RangeSearchPartialResult(BufferList):
    __swig_setmethods__ = {}
    for _s in [BufferList]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, RangeSearchPartialResult, name, value)
    __swig_getmethods__ = {}
    for _s in [BufferList]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, RangeSearchPartialResult, name)
    __repr__ = _swig_repr
    __swig_setmethods__["res"] = _swigfaiss_avx2.RangeSearchPartialResult_res_set
    __swig_getmethods__["res"] = _swigfaiss_avx2.RangeSearchPartialResult_res_get
    if _newclass:
        res = _swig_property(_swigfaiss_avx2.RangeSearchPartialResult_res_get, _swigfaiss_avx2.RangeSearchPartialResult_res_set)

    def __init__(self, res_in):
        this = _swigfaiss_avx2.new_RangeSearchPartialResult(res_in)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["queries"] = _swigfaiss_avx2.RangeSearchPartialResult_queries_set
    __swig_getmethods__["queries"] = _swigfaiss_avx2.RangeSearchPartialResult_queries_get
    if _newclass:
        queries = _swig_property(_swigfaiss_avx2.RangeSearchPartialResult_queries_get, _swigfaiss_avx2.RangeSearchPartialResult_queries_set)

    def new_result(self, qno):
        return _swigfaiss_avx2.RangeSearchPartialResult_new_result(self, qno)

    def finalize(self):
        return _swigfaiss_avx2.RangeSearchPartialResult_finalize(self)

    def set_lims(self):
        return _swigfaiss_avx2.RangeSearchPartialResult_set_lims(self)

    def copy_result(self, incremental=False):
        return _swigfaiss_avx2.RangeSearchPartialResult_copy_result(self, incremental)
    if _newclass:
        merge = staticmethod(_swigfaiss_avx2.RangeSearchPartialResult_merge)
    else:
        merge = _swigfaiss_avx2.RangeSearchPartialResult_merge
    __swig_destroy__ = _swigfaiss_avx2.delete_RangeSearchPartialResult
    __del__ = lambda self: None
RangeSearchPartialResult_swigregister = _swigfaiss_avx2.RangeSearchPartialResult_swigregister
RangeSearchPartialResult_swigregister(RangeSearchPartialResult)

def RangeSearchPartialResult_merge(partial_results, do_delete=True):
    return _swigfaiss_avx2.RangeSearchPartialResult_merge(partial_results, do_delete)
RangeSearchPartialResult_merge = _swigfaiss_avx2.RangeSearchPartialResult_merge

class DistanceComputer(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, DistanceComputer, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, DistanceComputer, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def set_query(self, x):
        return _swigfaiss_avx2.DistanceComputer_set_query(self, x)

    def __call__(self, i):
        return _swigfaiss_avx2.DistanceComputer___call__(self, i)

    def symmetric_dis(self, i, j):
        return _swigfaiss_avx2.DistanceComputer_symmetric_dis(self, i, j)
    __swig_destroy__ = _swigfaiss_avx2.delete_DistanceComputer
    __del__ = lambda self: None
DistanceComputer_swigregister = _swigfaiss_avx2.DistanceComputer_swigregister
DistanceComputer_swigregister(DistanceComputer)

class InterruptCallback(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, InterruptCallback, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, InterruptCallback, name)

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr

    def want_interrupt(self):
        return _swigfaiss_avx2.InterruptCallback_want_interrupt(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_InterruptCallback
    __del__ = lambda self: None
    if _newclass:
        clear_instance = staticmethod(_swigfaiss_avx2.InterruptCallback_clear_instance)
    else:
        clear_instance = _swigfaiss_avx2.InterruptCallback_clear_instance
    if _newclass:
        check = staticmethod(_swigfaiss_avx2.InterruptCallback_check)
    else:
        check = _swigfaiss_avx2.InterruptCallback_check
    if _newclass:
        is_interrupted = staticmethod(_swigfaiss_avx2.InterruptCallback_is_interrupted)
    else:
        is_interrupted = _swigfaiss_avx2.InterruptCallback_is_interrupted
    if _newclass:
        get_period_hint = staticmethod(_swigfaiss_avx2.InterruptCallback_get_period_hint)
    else:
        get_period_hint = _swigfaiss_avx2.InterruptCallback_get_period_hint
InterruptCallback_swigregister = _swigfaiss_avx2.InterruptCallback_swigregister
InterruptCallback_swigregister(InterruptCallback)

def InterruptCallback_clear_instance():
    return _swigfaiss_avx2.InterruptCallback_clear_instance()
InterruptCallback_clear_instance = _swigfaiss_avx2.InterruptCallback_clear_instance

def InterruptCallback_check():
    return _swigfaiss_avx2.InterruptCallback_check()
InterruptCallback_check = _swigfaiss_avx2.InterruptCallback_check

def InterruptCallback_is_interrupted():
    return _swigfaiss_avx2.InterruptCallback_is_interrupted()
InterruptCallback_is_interrupted = _swigfaiss_avx2.InterruptCallback_is_interrupted

def InterruptCallback_get_period_hint(flops):
    return _swigfaiss_avx2.InterruptCallback_get_period_hint(flops)
InterruptCallback_get_period_hint = _swigfaiss_avx2.InterruptCallback_get_period_hint


def ignore_SIGTTIN():
    return _swigfaiss_avx2.ignore_SIGTTIN()
ignore_SIGTTIN = _swigfaiss_avx2.ignore_SIGTTIN
class MapLong2Long(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, MapLong2Long, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, MapLong2Long, name)
    __repr__ = _swig_repr
    __swig_setmethods__["map"] = _swigfaiss_avx2.MapLong2Long_map_set
    __swig_getmethods__["map"] = _swigfaiss_avx2.MapLong2Long_map_get
    if _newclass:
        map = _swig_property(_swigfaiss_avx2.MapLong2Long_map_get, _swigfaiss_avx2.MapLong2Long_map_set)

    def add(self, n, keys, vals):
        return _swigfaiss_avx2.MapLong2Long_add(self, n, keys, vals)

    def search(self, key):
        return _swigfaiss_avx2.MapLong2Long_search(self, key)

    def search_multiple(self, n, keys, vals):
        return _swigfaiss_avx2.MapLong2Long_search_multiple(self, n, keys, vals)

    def __init__(self):
        this = _swigfaiss_avx2.new_MapLong2Long()
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_destroy__ = _swigfaiss_avx2.delete_MapLong2Long
    __del__ = lambda self: None
MapLong2Long_swigregister = _swigfaiss_avx2.MapLong2Long_swigregister
MapLong2Long_swigregister(MapLong2Long)

class PyCallbackIOWriter(IOWriter):
    __swig_setmethods__ = {}
    for _s in [IOWriter]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PyCallbackIOWriter, name, value)
    __swig_getmethods__ = {}
    for _s in [IOWriter]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, PyCallbackIOWriter, name)
    __repr__ = _swig_repr
    __swig_setmethods__["callback"] = _swigfaiss_avx2.PyCallbackIOWriter_callback_set
    __swig_getmethods__["callback"] = _swigfaiss_avx2.PyCallbackIOWriter_callback_get
    if _newclass:
        callback = _swig_property(_swigfaiss_avx2.PyCallbackIOWriter_callback_get, _swigfaiss_avx2.PyCallbackIOWriter_callback_set)
    __swig_setmethods__["bs"] = _swigfaiss_avx2.PyCallbackIOWriter_bs_set
    __swig_getmethods__["bs"] = _swigfaiss_avx2.PyCallbackIOWriter_bs_get
    if _newclass:
        bs = _swig_property(_swigfaiss_avx2.PyCallbackIOWriter_bs_get, _swigfaiss_avx2.PyCallbackIOWriter_bs_set)

    def __init__(self, callback, bs=1024):
        this = _swigfaiss_avx2.new_PyCallbackIOWriter(callback, bs)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def __call__(self, ptrv, size, nitems):
        return _swigfaiss_avx2.PyCallbackIOWriter___call__(self, ptrv, size, nitems)
    __swig_destroy__ = _swigfaiss_avx2.delete_PyCallbackIOWriter
    __del__ = lambda self: None
PyCallbackIOWriter_swigregister = _swigfaiss_avx2.PyCallbackIOWriter_swigregister
PyCallbackIOWriter_swigregister(PyCallbackIOWriter)

class PyCallbackIOReader(IOReader):
    __swig_setmethods__ = {}
    for _s in [IOReader]:
        __swig_setmethods__.update(getattr(_s, '__swig_setmethods__', {}))
    __setattr__ = lambda self, name, value: _swig_setattr(self, PyCallbackIOReader, name, value)
    __swig_getmethods__ = {}
    for _s in [IOReader]:
        __swig_getmethods__.update(getattr(_s, '__swig_getmethods__', {}))
    __getattr__ = lambda self, name: _swig_getattr(self, PyCallbackIOReader, name)
    __repr__ = _swig_repr
    __swig_setmethods__["callback"] = _swigfaiss_avx2.PyCallbackIOReader_callback_set
    __swig_getmethods__["callback"] = _swigfaiss_avx2.PyCallbackIOReader_callback_get
    if _newclass:
        callback = _swig_property(_swigfaiss_avx2.PyCallbackIOReader_callback_get, _swigfaiss_avx2.PyCallbackIOReader_callback_set)
    __swig_setmethods__["bs"] = _swigfaiss_avx2.PyCallbackIOReader_bs_set
    __swig_getmethods__["bs"] = _swigfaiss_avx2.PyCallbackIOReader_bs_get
    if _newclass:
        bs = _swig_property(_swigfaiss_avx2.PyCallbackIOReader_bs_get, _swigfaiss_avx2.PyCallbackIOReader_bs_set)

    def __init__(self, callback, bs=1024):
        this = _swigfaiss_avx2.new_PyCallbackIOReader(callback, bs)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this

    def __call__(self, ptrv, size, nitems):
        return _swigfaiss_avx2.PyCallbackIOReader___call__(self, ptrv, size, nitems)
    __swig_destroy__ = _swigfaiss_avx2.delete_PyCallbackIOReader
    __del__ = lambda self: None
PyCallbackIOReader_swigregister = _swigfaiss_avx2.PyCallbackIOReader_swigregister
PyCallbackIOReader_swigregister(PyCallbackIOReader)


def wait():
    return _swigfaiss_avx2.wait()
wait = _swigfaiss_avx2.wait
# This file is compatible with both classic and new-style classes.


