# This file was automatically generated by SWIG (http://www.swig.org).
# Version 4.0.2
#
# 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):
    raise RuntimeError("Python 2.7 or later required")

# Import the low-level C/C++ module
if __package__ or "." in __name__:
    from . import _swigfaiss_avx2
else:
    import _swigfaiss_avx2

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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,)


def _swig_setattr_nondynamic_instance_variable(set):
    def set_instance_attr(self, name, value):
        if name == "thisown":
            self.this.own(value)
        elif name == "this":
            set(self, name, value)
        elif hasattr(self, name) and isinstance(getattr(type(self), name), property):
            set(self, name, value)
        else:
            raise AttributeError("You cannot add instance attributes to %s" % self)
    return set_instance_attr


def _swig_setattr_nondynamic_class_variable(set):
    def set_class_attr(cls, name, value):
        if hasattr(cls, name) and not isinstance(getattr(cls, name), property):
            set(cls, name, value)
        else:
            raise AttributeError("You cannot add class attributes to %s" % cls)
    return set_class_attr


def _swig_add_metaclass(metaclass):
    """Class decorator for adding a metaclass to a SWIG wrapped class - a slimmed down version of six.add_metaclass"""
    def wrapper(cls):
        return metaclass(cls.__name__, cls.__bases__, cls.__dict__.copy())
    return wrapper


class _SwigNonDynamicMeta(type):
    """Meta class to enforce nondynamic attributes (no new attributes) for a class"""
    __setattr__ = _swig_setattr_nondynamic_class_variable(type.__setattr__)


class SwigPyIterator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

    def value(self):
        return _swigfaiss_avx2.SwigPyIterator_value(self)

    def incr(self, n=1):
        return _swigfaiss_avx2.SwigPyIterator_incr(self, n)

    def decr(self, n=1):
        return _swigfaiss_avx2.SwigPyIterator_decr(self, n)

    def distance(self, x):
        return _swigfaiss_avx2.SwigPyIterator_distance(self, x)

    def equal(self, x):
        return _swigfaiss_avx2.SwigPyIterator_equal(self, x)

    def copy(self):
        return _swigfaiss_avx2.SwigPyIterator_copy(self)

    def next(self):
        return _swigfaiss_avx2.SwigPyIterator_next(self)

    def __next__(self):
        return _swigfaiss_avx2.SwigPyIterator___next__(self)

    def previous(self):
        return _swigfaiss_avx2.SwigPyIterator_previous(self)

    def advance(self, n):
        return _swigfaiss_avx2.SwigPyIterator_advance(self, n)

    def __eq__(self, x):
        return _swigfaiss_avx2.SwigPyIterator___eq__(self, x)

    def __ne__(self, x):
        return _swigfaiss_avx2.SwigPyIterator___ne__(self, x)

    def __iadd__(self, n):
        return _swigfaiss_avx2.SwigPyIterator___iadd__(self, n)

    def __isub__(self, n):
        return _swigfaiss_avx2.SwigPyIterator___isub__(self, n)

    def __add__(self, n):
        return _swigfaiss_avx2.SwigPyIterator___add__(self, n)

    def __sub__(self, *args):
        return _swigfaiss_avx2.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self

# Register SwigPyIterator in _swigfaiss_avx2:
_swigfaiss_avx2.SwigPyIterator_swigregister(SwigPyIterator)

SHARED_PTR_DISOWN = _swigfaiss_avx2.SHARED_PTR_DISOWN
class Float32Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Float32Vector_swiginit(self, _swigfaiss_avx2.new_Float32Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Float32Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Float32Vector

# Register Float32Vector in _swigfaiss_avx2:
_swigfaiss_avx2.Float32Vector_swigregister(Float32Vector)

class Float64Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Float64Vector_swiginit(self, _swigfaiss_avx2.new_Float64Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Float64Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Float64Vector

# Register Float64Vector in _swigfaiss_avx2:
_swigfaiss_avx2.Float64Vector_swigregister(Float64Vector)

class Int8Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Int8Vector_swiginit(self, _swigfaiss_avx2.new_Int8Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Int8Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Int8Vector

# Register Int8Vector in _swigfaiss_avx2:
_swigfaiss_avx2.Int8Vector_swigregister(Int8Vector)

class Int16Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Int16Vector_swiginit(self, _swigfaiss_avx2.new_Int16Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Int16Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Int16Vector

# Register Int16Vector in _swigfaiss_avx2:
_swigfaiss_avx2.Int16Vector_swigregister(Int16Vector)

class Int32Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Int32Vector_swiginit(self, _swigfaiss_avx2.new_Int32Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Int32Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Int32Vector

# Register Int32Vector in _swigfaiss_avx2:
_swigfaiss_avx2.Int32Vector_swigregister(Int32Vector)

class Int64Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Int64Vector_swiginit(self, _swigfaiss_avx2.new_Int64Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Int64Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Int64Vector

# Register Int64Vector in _swigfaiss_avx2:
_swigfaiss_avx2.Int64Vector_swigregister(Int64Vector)

class UInt8Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.UInt8Vector_swiginit(self, _swigfaiss_avx2.new_UInt8Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.UInt8Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_UInt8Vector

# Register UInt8Vector in _swigfaiss_avx2:
_swigfaiss_avx2.UInt8Vector_swigregister(UInt8Vector)

class UInt16Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.UInt16Vector_swiginit(self, _swigfaiss_avx2.new_UInt16Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.UInt16Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_UInt16Vector

# Register UInt16Vector in _swigfaiss_avx2:
_swigfaiss_avx2.UInt16Vector_swigregister(UInt16Vector)

class UInt32Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.UInt32Vector_swiginit(self, _swigfaiss_avx2.new_UInt32Vector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.UInt32Vector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_UInt32Vector

# Register UInt32Vector in _swigfaiss_avx2:
_swigfaiss_avx2.UInt32Vector_swigregister(UInt32Vector)

class UInt64Vector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.UInt64Vector_swiginit(self, _swigfaiss_avx2.new_UInt64Vector())

    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

# Register UInt64Vector in _swigfaiss_avx2:
_swigfaiss_avx2.UInt64Vector_swigregister(UInt64Vector)

class Float32VectorVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Float32VectorVector_swiginit(self, _swigfaiss_avx2.new_Float32VectorVector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Float32VectorVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Float32VectorVector

# Register Float32VectorVector in _swigfaiss_avx2:
_swigfaiss_avx2.Float32VectorVector_swigregister(Float32VectorVector)

class UInt8VectorVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.UInt8VectorVector_swiginit(self, _swigfaiss_avx2.new_UInt8VectorVector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.UInt8VectorVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_UInt8VectorVector

# Register UInt8VectorVector in _swigfaiss_avx2:
_swigfaiss_avx2.UInt8VectorVector_swigregister(UInt8VectorVector)

class Int32VectorVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Int32VectorVector_swiginit(self, _swigfaiss_avx2.new_Int32VectorVector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Int32VectorVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Int32VectorVector

# Register Int32VectorVector in _swigfaiss_avx2:
_swigfaiss_avx2.Int32VectorVector_swigregister(Int32VectorVector)

class Int64VectorVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.Int64VectorVector_swiginit(self, _swigfaiss_avx2.new_Int64VectorVector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.Int64VectorVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Int64VectorVector

# Register Int64VectorVector in _swigfaiss_avx2:
_swigfaiss_avx2.Int64VectorVector_swigregister(Int64VectorVector)

class VectorTransformVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.VectorTransformVector_swiginit(self, _swigfaiss_avx2.new_VectorTransformVector())

    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

# Register VectorTransformVector in _swigfaiss_avx2:
_swigfaiss_avx2.VectorTransformVector_swigregister(VectorTransformVector)

class OperatingPointVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.OperatingPointVector_swiginit(self, _swigfaiss_avx2.new_OperatingPointVector())

    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

# Register OperatingPointVector in _swigfaiss_avx2:
_swigfaiss_avx2.OperatingPointVector_swigregister(OperatingPointVector)

class InvertedListsPtrVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.InvertedListsPtrVector_swiginit(self, _swigfaiss_avx2.new_InvertedListsPtrVector())

    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

# Register InvertedListsPtrVector in _swigfaiss_avx2:
_swigfaiss_avx2.InvertedListsPtrVector_swigregister(InvertedListsPtrVector)

class RepeatVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.RepeatVector_swiginit(self, _swigfaiss_avx2.new_RepeatVector())

    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

# Register RepeatVector in _swigfaiss_avx2:
_swigfaiss_avx2.RepeatVector_swigregister(RepeatVector)

class ClusteringIterationStatsVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.ClusteringIterationStatsVector_swiginit(self, _swigfaiss_avx2.new_ClusteringIterationStatsVector())

    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

# Register ClusteringIterationStatsVector in _swigfaiss_avx2:
_swigfaiss_avx2.ClusteringIterationStatsVector_swigregister(ClusteringIterationStatsVector)

class OnDiskOneListVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.OnDiskOneListVector_swiginit(self, _swigfaiss_avx2.new_OnDiskOneListVector())

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

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

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

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

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

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

    def swap(self, other):
        return _swigfaiss_avx2.OnDiskOneListVector_swap(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_OnDiskOneListVector

# Register OnDiskOneListVector in _swigfaiss_avx2:
_swigfaiss_avx2.OnDiskOneListVector_swigregister(OnDiskOneListVector)

class GpuResourcesVector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuResourcesVector_swiginit(self, _swigfaiss_avx2.new_GpuResourcesVector())

    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

# Register GpuResourcesVector in _swigfaiss_avx2:
_swigfaiss_avx2.GpuResourcesVector_swigregister(GpuResourcesVector)


def simd_histogram_8(data, n, min, shift, hist):
    return _swigfaiss_avx2.simd_histogram_8(data, n, min, shift, hist)

def simd_histogram_16(data, n, min, shift, hist):
    return _swigfaiss_avx2.simd_histogram_16(data, n, min, shift, hist)
class PartitionStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    bissect_cycles = property(_swigfaiss_avx2.PartitionStats_bissect_cycles_get, _swigfaiss_avx2.PartitionStats_bissect_cycles_set)
    compress_cycles = property(_swigfaiss_avx2.PartitionStats_compress_cycles_get, _swigfaiss_avx2.PartitionStats_compress_cycles_set)

    def __init__(self):
        _swigfaiss_avx2.PartitionStats_swiginit(self, _swigfaiss_avx2.new_PartitionStats())

    def reset(self):
        return _swigfaiss_avx2.PartitionStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_PartitionStats

# Register PartitionStats in _swigfaiss_avx2:
_swigfaiss_avx2.PartitionStats_swigregister(PartitionStats)


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

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

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

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

def bitvec_shuffle(n, da, db, order, a, b):
    return _swigfaiss_avx2.bitvec_shuffle(n, da, db, order, a, b)
class BitstringWriter(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    code = property(_swigfaiss_avx2.BitstringWriter_code_get, _swigfaiss_avx2.BitstringWriter_code_set)
    code_size = property(_swigfaiss_avx2.BitstringWriter_code_size_get, _swigfaiss_avx2.BitstringWriter_code_size_set)
    i = property(_swigfaiss_avx2.BitstringWriter_i_get, _swigfaiss_avx2.BitstringWriter_i_set)

    def __init__(self, code, code_size):
        _swigfaiss_avx2.BitstringWriter_swiginit(self, _swigfaiss_avx2.new_BitstringWriter(code, code_size))

    def write(self, x, nbit):
        return _swigfaiss_avx2.BitstringWriter_write(self, x, nbit)
    __swig_destroy__ = _swigfaiss_avx2.delete_BitstringWriter

# Register BitstringWriter in _swigfaiss_avx2:
_swigfaiss_avx2.BitstringWriter_swigregister(BitstringWriter)
cvar = _swigfaiss_avx2.cvar

class BitstringReader(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    code = property(_swigfaiss_avx2.BitstringReader_code_get, _swigfaiss_avx2.BitstringReader_code_set)
    code_size = property(_swigfaiss_avx2.BitstringReader_code_size_get, _swigfaiss_avx2.BitstringReader_code_size_set)
    i = property(_swigfaiss_avx2.BitstringReader_i_get, _swigfaiss_avx2.BitstringReader_i_set)

    def __init__(self, code, code_size):
        _swigfaiss_avx2.BitstringReader_swiginit(self, _swigfaiss_avx2.new_BitstringReader(code, code_size))

    def read(self, nbit):
        return _swigfaiss_avx2.BitstringReader_read(self, nbit)
    __swig_destroy__ = _swigfaiss_avx2.delete_BitstringReader

# Register BitstringReader in _swigfaiss_avx2:
_swigfaiss_avx2.BitstringReader_swigregister(BitstringReader)


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

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

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

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

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)

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

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

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)

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

def get_num_gpus():
    return _swigfaiss_avx2.get_num_gpus()

def gpu_profiler_start():
    return _swigfaiss_avx2.gpu_profiler_start()

def gpu_profiler_stop():
    return _swigfaiss_avx2.gpu_profiler_stop()

def gpu_sync_all_devices():
    return _swigfaiss_avx2.gpu_sync_all_devices()
Other = _swigfaiss_avx2.Other
FlatData = _swigfaiss_avx2.FlatData
IVFLists = _swigfaiss_avx2.IVFLists
Quantizer = _swigfaiss_avx2.Quantizer
QuantizerPrecomputedCodes = _swigfaiss_avx2.QuantizerPrecomputedCodes
TemporaryMemoryBuffer = _swigfaiss_avx2.TemporaryMemoryBuffer
TemporaryMemoryOverflow = _swigfaiss_avx2.TemporaryMemoryOverflow

def allocTypeToString(t):
    return _swigfaiss_avx2.allocTypeToString(t)
Temporary = _swigfaiss_avx2.Temporary
Device = _swigfaiss_avx2.Device
Unified = _swigfaiss_avx2.Unified

def memorySpaceToString(s):
    return _swigfaiss_avx2.memorySpaceToString(s)
class AllocInfo(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.AllocInfo_swiginit(self, _swigfaiss_avx2.new_AllocInfo(*args))

    def toString(self):
        return _swigfaiss_avx2.AllocInfo_toString(self)
    type = property(_swigfaiss_avx2.AllocInfo_type_get, _swigfaiss_avx2.AllocInfo_type_set)
    device = property(_swigfaiss_avx2.AllocInfo_device_get, _swigfaiss_avx2.AllocInfo_device_set)
    space = property(_swigfaiss_avx2.AllocInfo_space_get, _swigfaiss_avx2.AllocInfo_space_set)
    stream = property(_swigfaiss_avx2.AllocInfo_stream_get, _swigfaiss_avx2.AllocInfo_stream_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_AllocInfo

# Register AllocInfo in _swigfaiss_avx2:
_swigfaiss_avx2.AllocInfo_swigregister(AllocInfo)


def makeDevAlloc(at, st):
    return _swigfaiss_avx2.makeDevAlloc(at, st)

def makeTempAlloc(at, st):
    return _swigfaiss_avx2.makeTempAlloc(at, st)

def makeSpaceAlloc(at, sp, st):
    return _swigfaiss_avx2.makeSpaceAlloc(at, sp, st)
class AllocRequest(AllocInfo):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.AllocRequest_swiginit(self, _swigfaiss_avx2.new_AllocRequest(*args))

    def toString(self):
        return _swigfaiss_avx2.AllocRequest_toString(self)
    size = property(_swigfaiss_avx2.AllocRequest_size_get, _swigfaiss_avx2.AllocRequest_size_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_AllocRequest

# Register AllocRequest in _swigfaiss_avx2:
_swigfaiss_avx2.AllocRequest_swigregister(AllocRequest)

class GpuResources(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

    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 setDefaultStream(self, device, stream):
        return _swigfaiss_avx2.GpuResources_setDefaultStream(self, device, stream)

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

    def allocMemory(self, req):
        return _swigfaiss_avx2.GpuResources_allocMemory(self, req)

    def deallocMemory(self, device, _in):
        return _swigfaiss_avx2.GpuResources_deallocMemory(self, device, _in)

    def getTempMemoryAvailable(self, device):
        return _swigfaiss_avx2.GpuResources_getTempMemoryAvailable(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 getTempMemoryAvailableCurrentDevice(self):
        return _swigfaiss_avx2.GpuResources_getTempMemoryAvailableCurrentDevice(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)

# Register GpuResources in _swigfaiss_avx2:
_swigfaiss_avx2.GpuResources_swigregister(GpuResources)

class GpuResourcesProvider(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

    def getResources(self):
        return _swigfaiss_avx2.GpuResourcesProvider_getResources(self)

# Register GpuResourcesProvider in _swigfaiss_avx2:
_swigfaiss_avx2.GpuResourcesProvider_swigregister(GpuResourcesProvider)

class StandardGpuResourcesImpl(GpuResources):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.StandardGpuResourcesImpl_swiginit(self, _swigfaiss_avx2.new_StandardGpuResourcesImpl())
    __swig_destroy__ = _swigfaiss_avx2.delete_StandardGpuResourcesImpl

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

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

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

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

    def revertDefaultStream(self, device):
        return _swigfaiss_avx2.StandardGpuResourcesImpl_revertDefaultStream(self, device)

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

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

    def setLogMemoryAllocations(self, enable):
        return _swigfaiss_avx2.StandardGpuResourcesImpl_setLogMemoryAllocations(self, enable)

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

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

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

    def allocMemory(self, req):
        return _swigfaiss_avx2.StandardGpuResourcesImpl_allocMemory(self, req)

    def deallocMemory(self, device, _in):
        return _swigfaiss_avx2.StandardGpuResourcesImpl_deallocMemory(self, device, _in)

    def getTempMemoryAvailable(self, device):
        return _swigfaiss_avx2.StandardGpuResourcesImpl_getTempMemoryAvailable(self, device)

    def getMemoryInfo(self):
        return _swigfaiss_avx2.StandardGpuResourcesImpl_getMemoryInfo(self)

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

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

# Register StandardGpuResourcesImpl in _swigfaiss_avx2:
_swigfaiss_avx2.StandardGpuResourcesImpl_swigregister(StandardGpuResourcesImpl)

class StandardGpuResources(GpuResourcesProvider):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.StandardGpuResources_swiginit(self, _swigfaiss_avx2.new_StandardGpuResources())
    __swig_destroy__ = _swigfaiss_avx2.delete_StandardGpuResources

    def getResources(self):
        return _swigfaiss_avx2.StandardGpuResources_getResources(self)

    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 revertDefaultStream(self, device):
        return _swigfaiss_avx2.StandardGpuResources_revertDefaultStream(self, device)

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

    def getMemoryInfo(self):
        return _swigfaiss_avx2.StandardGpuResources_getMemoryInfo(self)

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

    def getTempMemoryAvailable(self, device):
        return _swigfaiss_avx2.StandardGpuResources_getTempMemoryAvailable(self, device)

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

    def setLogMemoryAllocations(self, enable):
        return _swigfaiss_avx2.StandardGpuResources_setLogMemoryAllocations(self, enable)

# Register StandardGpuResources in _swigfaiss_avx2:
_swigfaiss_avx2.StandardGpuResources_swigregister(StandardGpuResources)


def cast_integer_to_cudastream_t(x):
    return _swigfaiss_avx2.cast_integer_to_cudastream_t(x)

def cast_cudastream_t_to_integer(x):
    return _swigfaiss_avx2.cast_cudastream_t_to_integer(x)

def get_compile_options():
    return _swigfaiss_avx2.get_compile_options()

def getmillisecs():
    return _swigfaiss_avx2.getmillisecs()

def get_mem_usage_kb():
    return _swigfaiss_avx2.get_mem_usage_kb()

def get_cycles():
    return _swigfaiss_avx2.get_cycles()

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

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

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

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

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

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

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)

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

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

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

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

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

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

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

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

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

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

def check_openmp():
    return _swigfaiss_avx2.check_openmp()

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

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

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

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

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)

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

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

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

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

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

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

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

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)

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)

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

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)

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

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

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)

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)

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

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)

def compute_PQ_dis_tables_dsub2(d, ksub, centroids, nx, x, is_inner_product, dis_tables):
    return _swigfaiss_avx2.compute_PQ_dis_tables_dsub2(d, ksub, centroids, nx, x, is_inner_product, dis_tables)
class RandomGenerator(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    mt = 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):
        _swigfaiss_avx2.RandomGenerator_swiginit(self, _swigfaiss_avx2.new_RandomGenerator(seed))
    __swig_destroy__ = _swigfaiss_avx2.delete_RandomGenerator

# Register RandomGenerator in _swigfaiss_avx2:
_swigfaiss_avx2.RandomGenerator_swigregister(RandomGenerator)


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

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

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

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

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

def rand_perm(perm, n, seed):
    return _swigfaiss_avx2.rand_perm(perm, n, seed)
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):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

    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)

# Register Index in _swigfaiss_avx2:
_swigfaiss_avx2.Index_swigregister(Index)

class ClusteringParameters(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    niter = property(_swigfaiss_avx2.ClusteringParameters_niter_get, _swigfaiss_avx2.ClusteringParameters_niter_set)
    nredo = property(_swigfaiss_avx2.ClusteringParameters_nredo_get, _swigfaiss_avx2.ClusteringParameters_nredo_set)
    verbose = property(_swigfaiss_avx2.ClusteringParameters_verbose_get, _swigfaiss_avx2.ClusteringParameters_verbose_set)
    spherical = property(_swigfaiss_avx2.ClusteringParameters_spherical_get, _swigfaiss_avx2.ClusteringParameters_spherical_set)
    int_centroids = property(_swigfaiss_avx2.ClusteringParameters_int_centroids_get, _swigfaiss_avx2.ClusteringParameters_int_centroids_set)
    update_index = property(_swigfaiss_avx2.ClusteringParameters_update_index_get, _swigfaiss_avx2.ClusteringParameters_update_index_set)
    frozen_centroids = property(_swigfaiss_avx2.ClusteringParameters_frozen_centroids_get, _swigfaiss_avx2.ClusteringParameters_frozen_centroids_set)
    min_points_per_centroid = property(_swigfaiss_avx2.ClusteringParameters_min_points_per_centroid_get, _swigfaiss_avx2.ClusteringParameters_min_points_per_centroid_set)
    max_points_per_centroid = property(_swigfaiss_avx2.ClusteringParameters_max_points_per_centroid_get, _swigfaiss_avx2.ClusteringParameters_max_points_per_centroid_set)
    seed = property(_swigfaiss_avx2.ClusteringParameters_seed_get, _swigfaiss_avx2.ClusteringParameters_seed_set)
    decode_block_size = property(_swigfaiss_avx2.ClusteringParameters_decode_block_size_get, _swigfaiss_avx2.ClusteringParameters_decode_block_size_set)

    def __init__(self):
        _swigfaiss_avx2.ClusteringParameters_swiginit(self, _swigfaiss_avx2.new_ClusteringParameters())
    __swig_destroy__ = _swigfaiss_avx2.delete_ClusteringParameters

# Register ClusteringParameters in _swigfaiss_avx2:
_swigfaiss_avx2.ClusteringParameters_swigregister(ClusteringParameters)

class ClusteringIterationStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    obj = property(_swigfaiss_avx2.ClusteringIterationStats_obj_get, _swigfaiss_avx2.ClusteringIterationStats_obj_set)
    time = property(_swigfaiss_avx2.ClusteringIterationStats_time_get, _swigfaiss_avx2.ClusteringIterationStats_time_set)
    time_search = property(_swigfaiss_avx2.ClusteringIterationStats_time_search_get, _swigfaiss_avx2.ClusteringIterationStats_time_search_set)
    imbalance_factor = property(_swigfaiss_avx2.ClusteringIterationStats_imbalance_factor_get, _swigfaiss_avx2.ClusteringIterationStats_imbalance_factor_set)
    nsplit = property(_swigfaiss_avx2.ClusteringIterationStats_nsplit_get, _swigfaiss_avx2.ClusteringIterationStats_nsplit_set)

    def __init__(self):
        _swigfaiss_avx2.ClusteringIterationStats_swiginit(self, _swigfaiss_avx2.new_ClusteringIterationStats())
    __swig_destroy__ = _swigfaiss_avx2.delete_ClusteringIterationStats

# Register ClusteringIterationStats in _swigfaiss_avx2:
_swigfaiss_avx2.ClusteringIterationStats_swigregister(ClusteringIterationStats)

class Clustering(ClusteringParameters):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    d = property(_swigfaiss_avx2.Clustering_d_get, _swigfaiss_avx2.Clustering_d_set)
    k = property(_swigfaiss_avx2.Clustering_k_get, _swigfaiss_avx2.Clustering_k_set)
    centroids = property(_swigfaiss_avx2.Clustering_centroids_get, _swigfaiss_avx2.Clustering_centroids_set)
    iteration_stats = property(_swigfaiss_avx2.Clustering_iteration_stats_get, _swigfaiss_avx2.Clustering_iteration_stats_set)

    def __init__(self, *args):
        _swigfaiss_avx2.Clustering_swiginit(self, _swigfaiss_avx2.new_Clustering(*args))

    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

# Register Clustering in _swigfaiss_avx2:
_swigfaiss_avx2.Clustering_swigregister(Clustering)

class ProgressiveDimClusteringParameters(ClusteringParameters):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    progressive_dim_steps = property(_swigfaiss_avx2.ProgressiveDimClusteringParameters_progressive_dim_steps_get, _swigfaiss_avx2.ProgressiveDimClusteringParameters_progressive_dim_steps_set)
    apply_pca = property(_swigfaiss_avx2.ProgressiveDimClusteringParameters_apply_pca_get, _swigfaiss_avx2.ProgressiveDimClusteringParameters_apply_pca_set)

    def __init__(self):
        _swigfaiss_avx2.ProgressiveDimClusteringParameters_swiginit(self, _swigfaiss_avx2.new_ProgressiveDimClusteringParameters())
    __swig_destroy__ = _swigfaiss_avx2.delete_ProgressiveDimClusteringParameters

# Register ProgressiveDimClusteringParameters in _swigfaiss_avx2:
_swigfaiss_avx2.ProgressiveDimClusteringParameters_swigregister(ProgressiveDimClusteringParameters)

class ProgressiveDimIndexFactory(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __call__(self, dim):
        return _swigfaiss_avx2.ProgressiveDimIndexFactory___call__(self, dim)
    __swig_destroy__ = _swigfaiss_avx2.delete_ProgressiveDimIndexFactory

    def __init__(self):
        _swigfaiss_avx2.ProgressiveDimIndexFactory_swiginit(self, _swigfaiss_avx2.new_ProgressiveDimIndexFactory())

# Register ProgressiveDimIndexFactory in _swigfaiss_avx2:
_swigfaiss_avx2.ProgressiveDimIndexFactory_swigregister(ProgressiveDimIndexFactory)

class ProgressiveDimClustering(ProgressiveDimClusteringParameters):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    d = property(_swigfaiss_avx2.ProgressiveDimClustering_d_get, _swigfaiss_avx2.ProgressiveDimClustering_d_set)
    k = property(_swigfaiss_avx2.ProgressiveDimClustering_k_get, _swigfaiss_avx2.ProgressiveDimClustering_k_set)
    centroids = property(_swigfaiss_avx2.ProgressiveDimClustering_centroids_get, _swigfaiss_avx2.ProgressiveDimClustering_centroids_set)
    iteration_stats = property(_swigfaiss_avx2.ProgressiveDimClustering_iteration_stats_get, _swigfaiss_avx2.ProgressiveDimClustering_iteration_stats_set)

    def __init__(self, *args):
        _swigfaiss_avx2.ProgressiveDimClustering_swiginit(self, _swigfaiss_avx2.new_ProgressiveDimClustering(*args))

    def train(self, n, x, factory):
        return _swigfaiss_avx2.ProgressiveDimClustering_train(self, n, x, factory)
    __swig_destroy__ = _swigfaiss_avx2.delete_ProgressiveDimClustering

# Register ProgressiveDimClustering in _swigfaiss_avx2:
_swigfaiss_avx2.ProgressiveDimClustering_swigregister(ProgressiveDimClustering)


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

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)

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)

def get_extra_distance_computer(d, mt, metric_arg, nb, xb):
    return _swigfaiss_avx2.get_extra_distance_computer(d, mt, metric_arg, nb, xb)
class ProductQuantizer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    d = property(_swigfaiss_avx2.ProductQuantizer_d_get, _swigfaiss_avx2.ProductQuantizer_d_set)
    M = property(_swigfaiss_avx2.ProductQuantizer_M_get, _swigfaiss_avx2.ProductQuantizer_M_set)
    nbits = property(_swigfaiss_avx2.ProductQuantizer_nbits_get, _swigfaiss_avx2.ProductQuantizer_nbits_set)
    dsub = property(_swigfaiss_avx2.ProductQuantizer_dsub_get, _swigfaiss_avx2.ProductQuantizer_dsub_set)
    code_size = property(_swigfaiss_avx2.ProductQuantizer_code_size_get, _swigfaiss_avx2.ProductQuantizer_code_size_set)
    ksub = property(_swigfaiss_avx2.ProductQuantizer_ksub_get, _swigfaiss_avx2.ProductQuantizer_ksub_set)
    verbose = 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
    train_type = property(_swigfaiss_avx2.ProductQuantizer_train_type_get, _swigfaiss_avx2.ProductQuantizer_train_type_set)
    cp = property(_swigfaiss_avx2.ProductQuantizer_cp_get, _swigfaiss_avx2.ProductQuantizer_cp_set)
    assign_index = property(_swigfaiss_avx2.ProductQuantizer_assign_index_get, _swigfaiss_avx2.ProductQuantizer_assign_index_set)
    centroids = 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):
        _swigfaiss_avx2.ProductQuantizer_swiginit(self, _swigfaiss_avx2.new_ProductQuantizer(*args))

    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)
    sdc_table = 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

# Register ProductQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.ProductQuantizer_swigregister(ProductQuantizer)

class PQEncoderGeneric(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    code = property(_swigfaiss_avx2.PQEncoderGeneric_code_get, _swigfaiss_avx2.PQEncoderGeneric_code_set)
    offset = property(_swigfaiss_avx2.PQEncoderGeneric_offset_get, _swigfaiss_avx2.PQEncoderGeneric_offset_set)
    nbits = property(_swigfaiss_avx2.PQEncoderGeneric_nbits_get)
    reg = property(_swigfaiss_avx2.PQEncoderGeneric_reg_get, _swigfaiss_avx2.PQEncoderGeneric_reg_set)

    def __init__(self, code, nbits, offset=0):
        _swigfaiss_avx2.PQEncoderGeneric_swiginit(self, _swigfaiss_avx2.new_PQEncoderGeneric(code, nbits, offset))

    def encode(self, x):
        return _swigfaiss_avx2.PQEncoderGeneric_encode(self, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQEncoderGeneric

# Register PQEncoderGeneric in _swigfaiss_avx2:
_swigfaiss_avx2.PQEncoderGeneric_swigregister(PQEncoderGeneric)

class PQEncoder8(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    code = property(_swigfaiss_avx2.PQEncoder8_code_get, _swigfaiss_avx2.PQEncoder8_code_set)

    def __init__(self, code, nbits):
        _swigfaiss_avx2.PQEncoder8_swiginit(self, _swigfaiss_avx2.new_PQEncoder8(code, nbits))

    def encode(self, x):
        return _swigfaiss_avx2.PQEncoder8_encode(self, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQEncoder8

# Register PQEncoder8 in _swigfaiss_avx2:
_swigfaiss_avx2.PQEncoder8_swigregister(PQEncoder8)

class PQEncoder16(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    code = property(_swigfaiss_avx2.PQEncoder16_code_get, _swigfaiss_avx2.PQEncoder16_code_set)

    def __init__(self, code, nbits):
        _swigfaiss_avx2.PQEncoder16_swiginit(self, _swigfaiss_avx2.new_PQEncoder16(code, nbits))

    def encode(self, x):
        return _swigfaiss_avx2.PQEncoder16_encode(self, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQEncoder16

# Register PQEncoder16 in _swigfaiss_avx2:
_swigfaiss_avx2.PQEncoder16_swigregister(PQEncoder16)

class PQDecoderGeneric(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    code = property(_swigfaiss_avx2.PQDecoderGeneric_code_get, _swigfaiss_avx2.PQDecoderGeneric_code_set)
    offset = property(_swigfaiss_avx2.PQDecoderGeneric_offset_get, _swigfaiss_avx2.PQDecoderGeneric_offset_set)
    nbits = property(_swigfaiss_avx2.PQDecoderGeneric_nbits_get)
    mask = property(_swigfaiss_avx2.PQDecoderGeneric_mask_get)
    reg = property(_swigfaiss_avx2.PQDecoderGeneric_reg_get, _swigfaiss_avx2.PQDecoderGeneric_reg_set)

    def __init__(self, code, nbits):
        _swigfaiss_avx2.PQDecoderGeneric_swiginit(self, _swigfaiss_avx2.new_PQDecoderGeneric(code, nbits))

    def decode(self):
        return _swigfaiss_avx2.PQDecoderGeneric_decode(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQDecoderGeneric

# Register PQDecoderGeneric in _swigfaiss_avx2:
_swigfaiss_avx2.PQDecoderGeneric_swigregister(PQDecoderGeneric)

class PQDecoder8(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nbits = _swigfaiss_avx2.PQDecoder8_nbits
    code = property(_swigfaiss_avx2.PQDecoder8_code_get, _swigfaiss_avx2.PQDecoder8_code_set)

    def __init__(self, code, nbits):
        _swigfaiss_avx2.PQDecoder8_swiginit(self, _swigfaiss_avx2.new_PQDecoder8(code, nbits))

    def decode(self):
        return _swigfaiss_avx2.PQDecoder8_decode(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQDecoder8

# Register PQDecoder8 in _swigfaiss_avx2:
_swigfaiss_avx2.PQDecoder8_swigregister(PQDecoder8)

class PQDecoder16(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nbits = _swigfaiss_avx2.PQDecoder16_nbits
    code = property(_swigfaiss_avx2.PQDecoder16_code_get, _swigfaiss_avx2.PQDecoder16_code_set)

    def __init__(self, code, nbits):
        _swigfaiss_avx2.PQDecoder16_swiginit(self, _swigfaiss_avx2.new_PQDecoder16(code, nbits))

    def decode(self):
        return _swigfaiss_avx2.PQDecoder16_decode(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_PQDecoder16

# Register PQDecoder16 in _swigfaiss_avx2:
_swigfaiss_avx2.PQDecoder16_swigregister(PQDecoder16)

class AdditiveQuantizer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    d = property(_swigfaiss_avx2.AdditiveQuantizer_d_get, _swigfaiss_avx2.AdditiveQuantizer_d_set)
    M = property(_swigfaiss_avx2.AdditiveQuantizer_M_get, _swigfaiss_avx2.AdditiveQuantizer_M_set)
    nbits = property(_swigfaiss_avx2.AdditiveQuantizer_nbits_get, _swigfaiss_avx2.AdditiveQuantizer_nbits_set)
    codebooks = property(_swigfaiss_avx2.AdditiveQuantizer_codebooks_get, _swigfaiss_avx2.AdditiveQuantizer_codebooks_set)
    codebook_offsets = property(_swigfaiss_avx2.AdditiveQuantizer_codebook_offsets_get, _swigfaiss_avx2.AdditiveQuantizer_codebook_offsets_set)
    code_size = property(_swigfaiss_avx2.AdditiveQuantizer_code_size_get, _swigfaiss_avx2.AdditiveQuantizer_code_size_set)
    tot_bits = property(_swigfaiss_avx2.AdditiveQuantizer_tot_bits_get, _swigfaiss_avx2.AdditiveQuantizer_tot_bits_set)
    total_codebook_size = property(_swigfaiss_avx2.AdditiveQuantizer_total_codebook_size_get, _swigfaiss_avx2.AdditiveQuantizer_total_codebook_size_set)
    is_byte_aligned = property(_swigfaiss_avx2.AdditiveQuantizer_is_byte_aligned_get, _swigfaiss_avx2.AdditiveQuantizer_is_byte_aligned_set)
    verbose = property(_swigfaiss_avx2.AdditiveQuantizer_verbose_get, _swigfaiss_avx2.AdditiveQuantizer_verbose_set)
    is_trained = property(_swigfaiss_avx2.AdditiveQuantizer_is_trained_get, _swigfaiss_avx2.AdditiveQuantizer_is_trained_set)

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

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

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

    def pack_codes(self, n, codes, packed_codes, ld_codes=-1):
        return _swigfaiss_avx2.AdditiveQuantizer_pack_codes(self, n, codes, packed_codes, ld_codes)

    def decode(self, codes, x, n):
        return _swigfaiss_avx2.AdditiveQuantizer_decode(self, codes, x, n)

    def decode_64bit(self, n, x):
        return _swigfaiss_avx2.AdditiveQuantizer_decode_64bit(self, n, x)

    def compute_LUT(self, n, xq, LUT):
        return _swigfaiss_avx2.AdditiveQuantizer_compute_LUT(self, n, xq, LUT)

    def knn_exact_inner_product(self, n, xq, k, distances, labels):
        return _swigfaiss_avx2.AdditiveQuantizer_knn_exact_inner_product(self, n, xq, k, distances, labels)

    def compute_centroid_norms(self, norms):
        return _swigfaiss_avx2.AdditiveQuantizer_compute_centroid_norms(self, norms)

    def knn_exact_L2(self, n, xq, k, distances, labels, centroid_norms):
        return _swigfaiss_avx2.AdditiveQuantizer_knn_exact_L2(self, n, xq, k, distances, labels, centroid_norms)
    __swig_destroy__ = _swigfaiss_avx2.delete_AdditiveQuantizer

# Register AdditiveQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.AdditiveQuantizer_swigregister(AdditiveQuantizer)

class ResidualQuantizer(AdditiveQuantizer):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    Train_default = _swigfaiss_avx2.ResidualQuantizer_Train_default
    Train_progressive_dim = _swigfaiss_avx2.ResidualQuantizer_Train_progressive_dim
    Train_top_beam = _swigfaiss_avx2.ResidualQuantizer_Train_top_beam
    train_type = property(_swigfaiss_avx2.ResidualQuantizer_train_type_get, _swigfaiss_avx2.ResidualQuantizer_train_type_set)
    max_beam_size = property(_swigfaiss_avx2.ResidualQuantizer_max_beam_size_get, _swigfaiss_avx2.ResidualQuantizer_max_beam_size_set)
    max_mem_distances = property(_swigfaiss_avx2.ResidualQuantizer_max_mem_distances_get, _swigfaiss_avx2.ResidualQuantizer_max_mem_distances_set)
    cp = property(_swigfaiss_avx2.ResidualQuantizer_cp_get, _swigfaiss_avx2.ResidualQuantizer_cp_set)
    assign_index_factory = property(_swigfaiss_avx2.ResidualQuantizer_assign_index_factory_get, _swigfaiss_avx2.ResidualQuantizer_assign_index_factory_set)

    def __init__(self, *args):
        _swigfaiss_avx2.ResidualQuantizer_swiginit(self, _swigfaiss_avx2.new_ResidualQuantizer(*args))

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

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

    def refine_beam(self, n, beam_size, residuals, new_beam_size, new_codes, new_residuals=None, new_distances=None):
        return _swigfaiss_avx2.ResidualQuantizer_refine_beam(self, n, beam_size, residuals, new_beam_size, new_codes, new_residuals, new_distances)

    def memory_per_point(self, beam_size=-1):
        return _swigfaiss_avx2.ResidualQuantizer_memory_per_point(self, beam_size)
    __swig_destroy__ = _swigfaiss_avx2.delete_ResidualQuantizer

# Register ResidualQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.ResidualQuantizer_swigregister(ResidualQuantizer)


def beam_search_encode_step(d, K, cent, n, beam_size, residuals, m, codes, new_beam_size, new_codes, new_residuals, new_distances, assign_index=None):
    return _swigfaiss_avx2.beam_search_encode_step(d, K, cent, n, beam_size, residuals, m, codes, new_beam_size, new_codes, new_residuals, new_distances, assign_index)
class LocalSearchQuantizer(AdditiveQuantizer):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    K = property(_swigfaiss_avx2.LocalSearchQuantizer_K_get, _swigfaiss_avx2.LocalSearchQuantizer_K_set)
    train_iters = property(_swigfaiss_avx2.LocalSearchQuantizer_train_iters_get, _swigfaiss_avx2.LocalSearchQuantizer_train_iters_set)
    encode_ils_iters = property(_swigfaiss_avx2.LocalSearchQuantizer_encode_ils_iters_get, _swigfaiss_avx2.LocalSearchQuantizer_encode_ils_iters_set)
    train_ils_iters = property(_swigfaiss_avx2.LocalSearchQuantizer_train_ils_iters_get, _swigfaiss_avx2.LocalSearchQuantizer_train_ils_iters_set)
    icm_iters = property(_swigfaiss_avx2.LocalSearchQuantizer_icm_iters_get, _swigfaiss_avx2.LocalSearchQuantizer_icm_iters_set)
    p = property(_swigfaiss_avx2.LocalSearchQuantizer_p_get, _swigfaiss_avx2.LocalSearchQuantizer_p_set)
    lambd = property(_swigfaiss_avx2.LocalSearchQuantizer_lambd_get, _swigfaiss_avx2.LocalSearchQuantizer_lambd_set)
    chunk_size = property(_swigfaiss_avx2.LocalSearchQuantizer_chunk_size_get, _swigfaiss_avx2.LocalSearchQuantizer_chunk_size_set)
    random_seed = property(_swigfaiss_avx2.LocalSearchQuantizer_random_seed_get, _swigfaiss_avx2.LocalSearchQuantizer_random_seed_set)
    nperts = property(_swigfaiss_avx2.LocalSearchQuantizer_nperts_get, _swigfaiss_avx2.LocalSearchQuantizer_nperts_set)

    def __init__(self, d, M, nbits):
        _swigfaiss_avx2.LocalSearchQuantizer_swiginit(self, _swigfaiss_avx2.new_LocalSearchQuantizer(d, M, nbits))

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

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

    def update_codebooks(self, x, codes, n):
        return _swigfaiss_avx2.LocalSearchQuantizer_update_codebooks(self, x, codes, n)

    def icm_encode(self, x, codes, n, ils_iters, gen):
        return _swigfaiss_avx2.LocalSearchQuantizer_icm_encode(self, x, codes, n, ils_iters, gen)

    def icm_encode_partial(self, index, x, codes, n, binaries, ils_iters, gen):
        return _swigfaiss_avx2.LocalSearchQuantizer_icm_encode_partial(self, index, x, codes, n, binaries, ils_iters, gen)

    def icm_encode_step(self, unaries, binaries, codes, n):
        return _swigfaiss_avx2.LocalSearchQuantizer_icm_encode_step(self, unaries, binaries, codes, n)

    def perturb_codebooks(self, T, stddev, gen):
        return _swigfaiss_avx2.LocalSearchQuantizer_perturb_codebooks(self, T, stddev, gen)

    def perturb_codes(self, codes, n, gen):
        return _swigfaiss_avx2.LocalSearchQuantizer_perturb_codes(self, codes, n, gen)

    def compute_binary_terms(self, binaries):
        return _swigfaiss_avx2.LocalSearchQuantizer_compute_binary_terms(self, binaries)

    def compute_unary_terms(self, x, unaries, n):
        return _swigfaiss_avx2.LocalSearchQuantizer_compute_unary_terms(self, x, unaries, n)

    def evaluate(self, codes, x, n, objs=None):
        return _swigfaiss_avx2.LocalSearchQuantizer_evaluate(self, codes, x, n, objs)
    __swig_destroy__ = _swigfaiss_avx2.delete_LocalSearchQuantizer

# Register LocalSearchQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.LocalSearchQuantizer_swigregister(LocalSearchQuantizer)

class LSQTimer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    duration = property(_swigfaiss_avx2.LSQTimer_duration_get, _swigfaiss_avx2.LSQTimer_duration_set)
    t0 = property(_swigfaiss_avx2.LSQTimer_t0_get, _swigfaiss_avx2.LSQTimer_t0_set)
    started = property(_swigfaiss_avx2.LSQTimer_started_get, _swigfaiss_avx2.LSQTimer_started_set)

    def __init__(self):
        _swigfaiss_avx2.LSQTimer_swiginit(self, _swigfaiss_avx2.new_LSQTimer())

    def get(self, name):
        return _swigfaiss_avx2.LSQTimer_get(self, name)

    def start(self, name):
        return _swigfaiss_avx2.LSQTimer_start(self, name)

    def end(self, name):
        return _swigfaiss_avx2.LSQTimer_end(self, name)

    def reset(self):
        return _swigfaiss_avx2.LSQTimer_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_LSQTimer

# Register LSQTimer in _swigfaiss_avx2:
_swigfaiss_avx2.LSQTimer_swigregister(LSQTimer)

class VectorTransform(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    d_in = property(_swigfaiss_avx2.VectorTransform_d_in_get, _swigfaiss_avx2.VectorTransform_d_in_set)
    d_out = property(_swigfaiss_avx2.VectorTransform_d_out_get, _swigfaiss_avx2.VectorTransform_d_out_set)
    is_trained = 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

# Register VectorTransform in _swigfaiss_avx2:
_swigfaiss_avx2.VectorTransform_swigregister(VectorTransform)

class LinearTransform(VectorTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    have_bias = property(_swigfaiss_avx2.LinearTransform_have_bias_get, _swigfaiss_avx2.LinearTransform_have_bias_set)
    is_orthonormal = property(_swigfaiss_avx2.LinearTransform_is_orthonormal_get, _swigfaiss_avx2.LinearTransform_is_orthonormal_set)
    A = property(_swigfaiss_avx2.LinearTransform_A_get, _swigfaiss_avx2.LinearTransform_A_set)
    b = property(_swigfaiss_avx2.LinearTransform_b_get, _swigfaiss_avx2.LinearTransform_b_set)

    def __init__(self, d_in=0, d_out=0, have_bias=False):
        _swigfaiss_avx2.LinearTransform_swiginit(self, _swigfaiss_avx2.new_LinearTransform(d_in, d_out, have_bias))

    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)
    verbose = 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

# Register LinearTransform in _swigfaiss_avx2:
_swigfaiss_avx2.LinearTransform_swigregister(LinearTransform)

class RandomRotationMatrix(LinearTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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):
        _swigfaiss_avx2.RandomRotationMatrix_swiginit(self, _swigfaiss_avx2.new_RandomRotationMatrix(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_RandomRotationMatrix

# Register RandomRotationMatrix in _swigfaiss_avx2:
_swigfaiss_avx2.RandomRotationMatrix_swigregister(RandomRotationMatrix)

class PCAMatrix(LinearTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    eigen_power = property(_swigfaiss_avx2.PCAMatrix_eigen_power_get, _swigfaiss_avx2.PCAMatrix_eigen_power_set)
    random_rotation = property(_swigfaiss_avx2.PCAMatrix_random_rotation_get, _swigfaiss_avx2.PCAMatrix_random_rotation_set)
    max_points_per_d = property(_swigfaiss_avx2.PCAMatrix_max_points_per_d_get, _swigfaiss_avx2.PCAMatrix_max_points_per_d_set)
    balanced_bins = property(_swigfaiss_avx2.PCAMatrix_balanced_bins_get, _swigfaiss_avx2.PCAMatrix_balanced_bins_set)
    mean = property(_swigfaiss_avx2.PCAMatrix_mean_get, _swigfaiss_avx2.PCAMatrix_mean_set)
    eigenvalues = property(_swigfaiss_avx2.PCAMatrix_eigenvalues_get, _swigfaiss_avx2.PCAMatrix_eigenvalues_set)
    PCAMat = 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):
        _swigfaiss_avx2.PCAMatrix_swiginit(self, _swigfaiss_avx2.new_PCAMatrix(d_in, d_out, eigen_power, random_rotation))

    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

# Register PCAMatrix in _swigfaiss_avx2:
_swigfaiss_avx2.PCAMatrix_swigregister(PCAMatrix)

class ITQMatrix(LinearTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    max_iter = property(_swigfaiss_avx2.ITQMatrix_max_iter_get, _swigfaiss_avx2.ITQMatrix_max_iter_set)
    seed = property(_swigfaiss_avx2.ITQMatrix_seed_get, _swigfaiss_avx2.ITQMatrix_seed_set)
    init_rotation = property(_swigfaiss_avx2.ITQMatrix_init_rotation_get, _swigfaiss_avx2.ITQMatrix_init_rotation_set)

    def __init__(self, d=0):
        _swigfaiss_avx2.ITQMatrix_swiginit(self, _swigfaiss_avx2.new_ITQMatrix(d))

    def train(self, n, x):
        return _swigfaiss_avx2.ITQMatrix_train(self, n, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_ITQMatrix

# Register ITQMatrix in _swigfaiss_avx2:
_swigfaiss_avx2.ITQMatrix_swigregister(ITQMatrix)

class ITQTransform(VectorTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    mean = property(_swigfaiss_avx2.ITQTransform_mean_get, _swigfaiss_avx2.ITQTransform_mean_set)
    do_pca = property(_swigfaiss_avx2.ITQTransform_do_pca_get, _swigfaiss_avx2.ITQTransform_do_pca_set)
    itq = property(_swigfaiss_avx2.ITQTransform_itq_get, _swigfaiss_avx2.ITQTransform_itq_set)
    max_train_per_dim = property(_swigfaiss_avx2.ITQTransform_max_train_per_dim_get, _swigfaiss_avx2.ITQTransform_max_train_per_dim_set)
    pca_then_itq = 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):
        _swigfaiss_avx2.ITQTransform_swiginit(self, _swigfaiss_avx2.new_ITQTransform(d_in, d_out, do_pca))

    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

# Register ITQTransform in _swigfaiss_avx2:
_swigfaiss_avx2.ITQTransform_swigregister(ITQTransform)

class OPQMatrix(LinearTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    M = property(_swigfaiss_avx2.OPQMatrix_M_get, _swigfaiss_avx2.OPQMatrix_M_set)
    niter = property(_swigfaiss_avx2.OPQMatrix_niter_get, _swigfaiss_avx2.OPQMatrix_niter_set)
    niter_pq = property(_swigfaiss_avx2.OPQMatrix_niter_pq_get, _swigfaiss_avx2.OPQMatrix_niter_pq_set)
    niter_pq_0 = property(_swigfaiss_avx2.OPQMatrix_niter_pq_0_get, _swigfaiss_avx2.OPQMatrix_niter_pq_0_set)
    max_train_points = property(_swigfaiss_avx2.OPQMatrix_max_train_points_get, _swigfaiss_avx2.OPQMatrix_max_train_points_set)
    verbose = property(_swigfaiss_avx2.OPQMatrix_verbose_get, _swigfaiss_avx2.OPQMatrix_verbose_set)
    pq = property(_swigfaiss_avx2.OPQMatrix_pq_get, _swigfaiss_avx2.OPQMatrix_pq_set)

    def __init__(self, d=0, M=1, d2=-1):
        _swigfaiss_avx2.OPQMatrix_swiginit(self, _swigfaiss_avx2.new_OPQMatrix(d, M, d2))

    def train(self, n, x):
        return _swigfaiss_avx2.OPQMatrix_train(self, n, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_OPQMatrix

# Register OPQMatrix in _swigfaiss_avx2:
_swigfaiss_avx2.OPQMatrix_swigregister(OPQMatrix)

class RemapDimensionsTransform(VectorTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    map = 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):
        _swigfaiss_avx2.RemapDimensionsTransform_swiginit(self, _swigfaiss_avx2.new_RemapDimensionsTransform(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_RemapDimensionsTransform

# Register RemapDimensionsTransform in _swigfaiss_avx2:
_swigfaiss_avx2.RemapDimensionsTransform_swigregister(RemapDimensionsTransform)

class NormalizationTransform(VectorTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    norm = property(_swigfaiss_avx2.NormalizationTransform_norm_get, _swigfaiss_avx2.NormalizationTransform_norm_set)

    def __init__(self, *args):
        _swigfaiss_avx2.NormalizationTransform_swiginit(self, _swigfaiss_avx2.new_NormalizationTransform(*args))

    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

# Register NormalizationTransform in _swigfaiss_avx2:
_swigfaiss_avx2.NormalizationTransform_swigregister(NormalizationTransform)

class CenteringTransform(VectorTransform):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    mean = property(_swigfaiss_avx2.CenteringTransform_mean_get, _swigfaiss_avx2.CenteringTransform_mean_set)

    def __init__(self, d=0):
        _swigfaiss_avx2.CenteringTransform_swiginit(self, _swigfaiss_avx2.new_CenteringTransform(d))

    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

# Register CenteringTransform in _swigfaiss_avx2:
_swigfaiss_avx2.CenteringTransform_swigregister(CenteringTransform)

class IndexPreTransform(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    chain = property(_swigfaiss_avx2.IndexPreTransform_chain_get, _swigfaiss_avx2.IndexPreTransform_chain_set)
    index = property(_swigfaiss_avx2.IndexPreTransform_index_get, _swigfaiss_avx2.IndexPreTransform_index_set)
    own_fields = property(_swigfaiss_avx2.IndexPreTransform_own_fields_get, _swigfaiss_avx2.IndexPreTransform_own_fields_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexPreTransform_swiginit(self, _swigfaiss_avx2.new_IndexPreTransform(*args))

    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 get_distance_computer(self):
        return _swigfaiss_avx2.IndexPreTransform_get_distance_computer(self)

    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

# Register IndexPreTransform in _swigfaiss_avx2:
_swigfaiss_avx2.IndexPreTransform_swigregister(IndexPreTransform)

class IndexFlat(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    xb = 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):
        _swigfaiss_avx2.IndexFlat_swiginit(self, _swigfaiss_avx2.new_IndexFlat(*args))

    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

# Register IndexFlat in _swigfaiss_avx2:
_swigfaiss_avx2.IndexFlat_swigregister(IndexFlat)

class IndexFlatIP(IndexFlat):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexFlatIP_swiginit(self, _swigfaiss_avx2.new_IndexFlatIP(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexFlatIP

# Register IndexFlatIP in _swigfaiss_avx2:
_swigfaiss_avx2.IndexFlatIP_swigregister(IndexFlatIP)

class IndexFlatL2(IndexFlat):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexFlatL2_swiginit(self, _swigfaiss_avx2.new_IndexFlatL2(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexFlatL2

# Register IndexFlatL2 in _swigfaiss_avx2:
_swigfaiss_avx2.IndexFlatL2_swigregister(IndexFlatL2)

class IndexFlat1D(IndexFlatL2):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    continuous_update = property(_swigfaiss_avx2.IndexFlat1D_continuous_update_get, _swigfaiss_avx2.IndexFlat1D_continuous_update_set)
    perm = property(_swigfaiss_avx2.IndexFlat1D_perm_get, _swigfaiss_avx2.IndexFlat1D_perm_set)

    def __init__(self, continuous_update=True):
        _swigfaiss_avx2.IndexFlat1D_swiginit(self, _swigfaiss_avx2.new_IndexFlat1D(continuous_update))

    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

# Register IndexFlat1D in _swigfaiss_avx2:
_swigfaiss_avx2.IndexFlat1D_swigregister(IndexFlat1D)

class IndexRefine(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    base_index = property(_swigfaiss_avx2.IndexRefine_base_index_get, _swigfaiss_avx2.IndexRefine_base_index_set)
    refine_index = property(_swigfaiss_avx2.IndexRefine_refine_index_get, _swigfaiss_avx2.IndexRefine_refine_index_set)
    own_fields = property(_swigfaiss_avx2.IndexRefine_own_fields_get, _swigfaiss_avx2.IndexRefine_own_fields_set)
    own_refine_index = property(_swigfaiss_avx2.IndexRefine_own_refine_index_get, _swigfaiss_avx2.IndexRefine_own_refine_index_set)
    k_factor = property(_swigfaiss_avx2.IndexRefine_k_factor_get, _swigfaiss_avx2.IndexRefine_k_factor_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexRefine_swiginit(self, _swigfaiss_avx2.new_IndexRefine(*args))

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

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

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

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

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.IndexRefine_reconstruct(self, key, recons)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexRefine

# Register IndexRefine in _swigfaiss_avx2:
_swigfaiss_avx2.IndexRefine_swigregister(IndexRefine)

class IndexRefineFlat(IndexRefine):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexRefineFlat_swiginit(self, _swigfaiss_avx2.new_IndexRefineFlat(*args))

    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

# Register IndexRefineFlat in _swigfaiss_avx2:
_swigfaiss_avx2.IndexRefineFlat_swigregister(IndexRefineFlat)

class IndexLSH(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nbits = property(_swigfaiss_avx2.IndexLSH_nbits_get, _swigfaiss_avx2.IndexLSH_nbits_set)
    bytes_per_vec = property(_swigfaiss_avx2.IndexLSH_bytes_per_vec_get, _swigfaiss_avx2.IndexLSH_bytes_per_vec_set)
    rotate_data = property(_swigfaiss_avx2.IndexLSH_rotate_data_get, _swigfaiss_avx2.IndexLSH_rotate_data_set)
    train_thresholds = property(_swigfaiss_avx2.IndexLSH_train_thresholds_get, _swigfaiss_avx2.IndexLSH_train_thresholds_set)
    rrot = property(_swigfaiss_avx2.IndexLSH_rrot_get, _swigfaiss_avx2.IndexLSH_rrot_set)
    thresholds = property(_swigfaiss_avx2.IndexLSH_thresholds_get, _swigfaiss_avx2.IndexLSH_thresholds_set)
    codes = 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

    def __init__(self, *args):
        _swigfaiss_avx2.IndexLSH_swiginit(self, _swigfaiss_avx2.new_IndexLSH(*args))

    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)

# Register IndexLSH in _swigfaiss_avx2:
_swigfaiss_avx2.IndexLSH_swigregister(IndexLSH)

class SimulatedAnnealingParameters(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    init_temperature = property(_swigfaiss_avx2.SimulatedAnnealingParameters_init_temperature_get, _swigfaiss_avx2.SimulatedAnnealingParameters_init_temperature_set)
    temperature_decay = property(_swigfaiss_avx2.SimulatedAnnealingParameters_temperature_decay_get, _swigfaiss_avx2.SimulatedAnnealingParameters_temperature_decay_set)
    n_iter = property(_swigfaiss_avx2.SimulatedAnnealingParameters_n_iter_get, _swigfaiss_avx2.SimulatedAnnealingParameters_n_iter_set)
    n_redo = property(_swigfaiss_avx2.SimulatedAnnealingParameters_n_redo_get, _swigfaiss_avx2.SimulatedAnnealingParameters_n_redo_set)
    seed = property(_swigfaiss_avx2.SimulatedAnnealingParameters_seed_get, _swigfaiss_avx2.SimulatedAnnealingParameters_seed_set)
    verbose = property(_swigfaiss_avx2.SimulatedAnnealingParameters_verbose_get, _swigfaiss_avx2.SimulatedAnnealingParameters_verbose_set)
    only_bit_flips = property(_swigfaiss_avx2.SimulatedAnnealingParameters_only_bit_flips_get, _swigfaiss_avx2.SimulatedAnnealingParameters_only_bit_flips_set)
    init_random = property(_swigfaiss_avx2.SimulatedAnnealingParameters_init_random_get, _swigfaiss_avx2.SimulatedAnnealingParameters_init_random_set)

    def __init__(self):
        _swigfaiss_avx2.SimulatedAnnealingParameters_swiginit(self, _swigfaiss_avx2.new_SimulatedAnnealingParameters())
    __swig_destroy__ = _swigfaiss_avx2.delete_SimulatedAnnealingParameters

# Register SimulatedAnnealingParameters in _swigfaiss_avx2:
_swigfaiss_avx2.SimulatedAnnealingParameters_swigregister(SimulatedAnnealingParameters)

class PermutationObjective(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    n = 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

# Register PermutationObjective in _swigfaiss_avx2:
_swigfaiss_avx2.PermutationObjective_swigregister(PermutationObjective)

class ReproduceDistancesObjective(PermutationObjective):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    dis_weight_factor = property(_swigfaiss_avx2.ReproduceDistancesObjective_dis_weight_factor_get, _swigfaiss_avx2.ReproduceDistancesObjective_dis_weight_factor_set)

    @staticmethod
    def sqr(x):
        return _swigfaiss_avx2.ReproduceDistancesObjective_sqr(x)

    def dis_weight(self, x):
        return _swigfaiss_avx2.ReproduceDistancesObjective_dis_weight(self, x)
    source_dis = property(_swigfaiss_avx2.ReproduceDistancesObjective_source_dis_get, _swigfaiss_avx2.ReproduceDistancesObjective_source_dis_set)
    target_dis = property(_swigfaiss_avx2.ReproduceDistancesObjective_target_dis_get, _swigfaiss_avx2.ReproduceDistancesObjective_target_dis_set)
    weights = 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):
        _swigfaiss_avx2.ReproduceDistancesObjective_swiginit(self, _swigfaiss_avx2.new_ReproduceDistancesObjective(n, source_dis_in, target_dis_in, dis_weight_factor))

    @staticmethod
    def compute_mean_stdev(tab, n2, mean_out, stddev_out):
        return _swigfaiss_avx2.ReproduceDistancesObjective_compute_mean_stdev(tab, n2, mean_out, stddev_out)

    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

# Register ReproduceDistancesObjective in _swigfaiss_avx2:
_swigfaiss_avx2.ReproduceDistancesObjective_swigregister(ReproduceDistancesObjective)

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

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

class SimulatedAnnealingOptimizer(SimulatedAnnealingParameters):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    obj = property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_obj_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_obj_set)
    n = property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_n_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_n_set)
    logfile = property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_logfile_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_logfile_set)

    def __init__(self, obj, p):
        _swigfaiss_avx2.SimulatedAnnealingOptimizer_swiginit(self, _swigfaiss_avx2.new_SimulatedAnnealingOptimizer(obj, p))
    rnd = property(_swigfaiss_avx2.SimulatedAnnealingOptimizer_rnd_get, _swigfaiss_avx2.SimulatedAnnealingOptimizer_rnd_set)
    init_cost = 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

# Register SimulatedAnnealingOptimizer in _swigfaiss_avx2:
_swigfaiss_avx2.SimulatedAnnealingOptimizer_swigregister(SimulatedAnnealingOptimizer)

class PolysemousTraining(SimulatedAnnealingParameters):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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
    optimization_type = property(_swigfaiss_avx2.PolysemousTraining_optimization_type_get, _swigfaiss_avx2.PolysemousTraining_optimization_type_set)
    ntrain_permutation = property(_swigfaiss_avx2.PolysemousTraining_ntrain_permutation_get, _swigfaiss_avx2.PolysemousTraining_ntrain_permutation_set)
    dis_weight_factor = property(_swigfaiss_avx2.PolysemousTraining_dis_weight_factor_get, _swigfaiss_avx2.PolysemousTraining_dis_weight_factor_set)
    max_memory = property(_swigfaiss_avx2.PolysemousTraining_max_memory_get, _swigfaiss_avx2.PolysemousTraining_max_memory_set)
    log_pattern = property(_swigfaiss_avx2.PolysemousTraining_log_pattern_get, _swigfaiss_avx2.PolysemousTraining_log_pattern_set)

    def __init__(self):
        _swigfaiss_avx2.PolysemousTraining_swiginit(self, _swigfaiss_avx2.new_PolysemousTraining())

    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)

    def memory_usage_per_thread(self, pq):
        return _swigfaiss_avx2.PolysemousTraining_memory_usage_per_thread(self, pq)
    __swig_destroy__ = _swigfaiss_avx2.delete_PolysemousTraining

# Register PolysemousTraining in _swigfaiss_avx2:
_swigfaiss_avx2.PolysemousTraining_swigregister(PolysemousTraining)

class IndexPQ(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    pq = property(_swigfaiss_avx2.IndexPQ_pq_get, _swigfaiss_avx2.IndexPQ_pq_set)
    codes = property(_swigfaiss_avx2.IndexPQ_codes_get, _swigfaiss_avx2.IndexPQ_codes_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexPQ_swiginit(self, _swigfaiss_avx2.new_IndexPQ(*args))

    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)
    do_polysemous_training = property(_swigfaiss_avx2.IndexPQ_do_polysemous_training_get, _swigfaiss_avx2.IndexPQ_do_polysemous_training_set)
    polysemous_training = 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
    search_type = property(_swigfaiss_avx2.IndexPQ_search_type_get, _swigfaiss_avx2.IndexPQ_search_type_set)
    encode_signs = property(_swigfaiss_avx2.IndexPQ_encode_signs_get, _swigfaiss_avx2.IndexPQ_encode_signs_set)
    polysemous_ht = 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

# Register IndexPQ in _swigfaiss_avx2:
_swigfaiss_avx2.IndexPQ_swigregister(IndexPQ)

class IndexPQStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nq = property(_swigfaiss_avx2.IndexPQStats_nq_get, _swigfaiss_avx2.IndexPQStats_nq_set)
    ncode = property(_swigfaiss_avx2.IndexPQStats_ncode_get, _swigfaiss_avx2.IndexPQStats_ncode_set)
    n_hamming_pass = property(_swigfaiss_avx2.IndexPQStats_n_hamming_pass_get, _swigfaiss_avx2.IndexPQStats_n_hamming_pass_set)

    def __init__(self):
        _swigfaiss_avx2.IndexPQStats_swiginit(self, _swigfaiss_avx2.new_IndexPQStats())

    def reset(self):
        return _swigfaiss_avx2.IndexPQStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexPQStats

# Register IndexPQStats in _swigfaiss_avx2:
_swigfaiss_avx2.IndexPQStats_swigregister(IndexPQStats)

class MultiIndexQuantizer(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    pq = 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):
        _swigfaiss_avx2.MultiIndexQuantizer_swiginit(self, _swigfaiss_avx2.new_MultiIndexQuantizer(*args))

    def reconstruct(self, key, recons):
        return _swigfaiss_avx2.MultiIndexQuantizer_reconstruct(self, key, recons)
    __swig_destroy__ = _swigfaiss_avx2.delete_MultiIndexQuantizer

# Register MultiIndexQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.MultiIndexQuantizer_swigregister(MultiIndexQuantizer)

class MultiIndexQuantizer2(MultiIndexQuantizer):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    assign_indexes = property(_swigfaiss_avx2.MultiIndexQuantizer2_assign_indexes_get, _swigfaiss_avx2.MultiIndexQuantizer2_assign_indexes_set)
    own_fields = property(_swigfaiss_avx2.MultiIndexQuantizer2_own_fields_get, _swigfaiss_avx2.MultiIndexQuantizer2_own_fields_set)

    def __init__(self, *args):
        _swigfaiss_avx2.MultiIndexQuantizer2_swiginit(self, _swigfaiss_avx2.new_MultiIndexQuantizer2(*args))

    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

# Register MultiIndexQuantizer2 in _swigfaiss_avx2:
_swigfaiss_avx2.MultiIndexQuantizer2_swigregister(MultiIndexQuantizer2)

class IndexResidual(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    rq = property(_swigfaiss_avx2.IndexResidual_rq_get, _swigfaiss_avx2.IndexResidual_rq_set)
    ST_decompress = _swigfaiss_avx2.IndexResidual_ST_decompress
    ST_LUT_nonorm = _swigfaiss_avx2.IndexResidual_ST_LUT_nonorm
    ST_norm_float = _swigfaiss_avx2.IndexResidual_ST_norm_float
    ST_norm_qint8 = _swigfaiss_avx2.IndexResidual_ST_norm_qint8
    search_type = property(_swigfaiss_avx2.IndexResidual_search_type_get, _swigfaiss_avx2.IndexResidual_search_type_set)
    norm_min = property(_swigfaiss_avx2.IndexResidual_norm_min_get, _swigfaiss_avx2.IndexResidual_norm_min_set)
    norm_max = property(_swigfaiss_avx2.IndexResidual_norm_max_get, _swigfaiss_avx2.IndexResidual_norm_max_set)
    code_size = property(_swigfaiss_avx2.IndexResidual_code_size_get, _swigfaiss_avx2.IndexResidual_code_size_set)
    codes = property(_swigfaiss_avx2.IndexResidual_codes_get, _swigfaiss_avx2.IndexResidual_codes_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexResidual_swiginit(self, _swigfaiss_avx2.new_IndexResidual(*args))

    def set_search_type(self, search_type):
        return _swigfaiss_avx2.IndexResidual_set_search_type(self, search_type)

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

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

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

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

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

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

    def sa_decode(self, n, bytes, x):
        return _swigfaiss_avx2.IndexResidual_sa_decode(self, n, bytes, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexResidual

# Register IndexResidual in _swigfaiss_avx2:
_swigfaiss_avx2.IndexResidual_swigregister(IndexResidual)

class ResidualCoarseQuantizer(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    rq = property(_swigfaiss_avx2.ResidualCoarseQuantizer_rq_get, _swigfaiss_avx2.ResidualCoarseQuantizer_rq_set)
    beam_factor = property(_swigfaiss_avx2.ResidualCoarseQuantizer_beam_factor_get, _swigfaiss_avx2.ResidualCoarseQuantizer_beam_factor_set)
    centroid_norms = property(_swigfaiss_avx2.ResidualCoarseQuantizer_centroid_norms_get, _swigfaiss_avx2.ResidualCoarseQuantizer_centroid_norms_set)

    def set_beam_factor(self, new_beam_factor):
        return _swigfaiss_avx2.ResidualCoarseQuantizer_set_beam_factor(self, new_beam_factor)

    def __init__(self, *args):
        _swigfaiss_avx2.ResidualCoarseQuantizer_swiginit(self, _swigfaiss_avx2.new_ResidualCoarseQuantizer(*args))

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

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

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

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

    def reset(self):
        return _swigfaiss_avx2.ResidualCoarseQuantizer_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_ResidualCoarseQuantizer

# Register ResidualCoarseQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.ResidualCoarseQuantizer_swigregister(ResidualCoarseQuantizer)

class IOReader(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    name = 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

# Register IOReader in _swigfaiss_avx2:
_swigfaiss_avx2.IOReader_swigregister(IOReader)

class IOWriter(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    name = 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

# Register IOWriter in _swigfaiss_avx2:
_swigfaiss_avx2.IOWriter_swigregister(IOWriter)

class VectorIOReader(IOReader):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    data = property(_swigfaiss_avx2.VectorIOReader_data_get, _swigfaiss_avx2.VectorIOReader_data_set)
    rp = 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):
        _swigfaiss_avx2.VectorIOReader_swiginit(self, _swigfaiss_avx2.new_VectorIOReader())
    __swig_destroy__ = _swigfaiss_avx2.delete_VectorIOReader

# Register VectorIOReader in _swigfaiss_avx2:
_swigfaiss_avx2.VectorIOReader_swigregister(VectorIOReader)

class VectorIOWriter(IOWriter):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    data = 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):
        _swigfaiss_avx2.VectorIOWriter_swiginit(self, _swigfaiss_avx2.new_VectorIOWriter())
    __swig_destroy__ = _swigfaiss_avx2.delete_VectorIOWriter

# Register VectorIOWriter in _swigfaiss_avx2:
_swigfaiss_avx2.VectorIOWriter_swigregister(VectorIOWriter)

class FileIOReader(IOReader):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    f = property(_swigfaiss_avx2.FileIOReader_f_get, _swigfaiss_avx2.FileIOReader_f_set)
    need_close = property(_swigfaiss_avx2.FileIOReader_need_close_get, _swigfaiss_avx2.FileIOReader_need_close_set)

    def __init__(self, *args):
        _swigfaiss_avx2.FileIOReader_swiginit(self, _swigfaiss_avx2.new_FileIOReader(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_FileIOReader

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.FileIOReader___call__(self, ptr, size, nitems)

    def fileno(self):
        return _swigfaiss_avx2.FileIOReader_fileno(self)

# Register FileIOReader in _swigfaiss_avx2:
_swigfaiss_avx2.FileIOReader_swigregister(FileIOReader)

class FileIOWriter(IOWriter):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    f = property(_swigfaiss_avx2.FileIOWriter_f_get, _swigfaiss_avx2.FileIOWriter_f_set)
    need_close = property(_swigfaiss_avx2.FileIOWriter_need_close_get, _swigfaiss_avx2.FileIOWriter_need_close_set)

    def __init__(self, *args):
        _swigfaiss_avx2.FileIOWriter_swiginit(self, _swigfaiss_avx2.new_FileIOWriter(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_FileIOWriter

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.FileIOWriter___call__(self, ptr, size, nitems)

    def fileno(self):
        return _swigfaiss_avx2.FileIOWriter_fileno(self)

# Register FileIOWriter in _swigfaiss_avx2:
_swigfaiss_avx2.FileIOWriter_swigregister(FileIOWriter)

class BufferedIOReader(IOReader):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    reader = property(_swigfaiss_avx2.BufferedIOReader_reader_get, _swigfaiss_avx2.BufferedIOReader_reader_set)
    bsz = property(_swigfaiss_avx2.BufferedIOReader_bsz_get, _swigfaiss_avx2.BufferedIOReader_bsz_set)
    ofs = property(_swigfaiss_avx2.BufferedIOReader_ofs_get, _swigfaiss_avx2.BufferedIOReader_ofs_set)
    ofs2 = property(_swigfaiss_avx2.BufferedIOReader_ofs2_get, _swigfaiss_avx2.BufferedIOReader_ofs2_set)
    b0 = property(_swigfaiss_avx2.BufferedIOReader_b0_get, _swigfaiss_avx2.BufferedIOReader_b0_set)
    b1 = property(_swigfaiss_avx2.BufferedIOReader_b1_get, _swigfaiss_avx2.BufferedIOReader_b1_set)
    buffer = property(_swigfaiss_avx2.BufferedIOReader_buffer_get, _swigfaiss_avx2.BufferedIOReader_buffer_set)

    def __init__(self, *args):
        _swigfaiss_avx2.BufferedIOReader_swiginit(self, _swigfaiss_avx2.new_BufferedIOReader(*args))

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.BufferedIOReader___call__(self, ptr, size, nitems)
    __swig_destroy__ = _swigfaiss_avx2.delete_BufferedIOReader

# Register BufferedIOReader in _swigfaiss_avx2:
_swigfaiss_avx2.BufferedIOReader_swigregister(BufferedIOReader)

class BufferedIOWriter(IOWriter):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    writer = property(_swigfaiss_avx2.BufferedIOWriter_writer_get, _swigfaiss_avx2.BufferedIOWriter_writer_set)
    bsz = property(_swigfaiss_avx2.BufferedIOWriter_bsz_get, _swigfaiss_avx2.BufferedIOWriter_bsz_set)
    ofs = property(_swigfaiss_avx2.BufferedIOWriter_ofs_get, _swigfaiss_avx2.BufferedIOWriter_ofs_set)
    ofs2 = property(_swigfaiss_avx2.BufferedIOWriter_ofs2_get, _swigfaiss_avx2.BufferedIOWriter_ofs2_set)
    b0 = property(_swigfaiss_avx2.BufferedIOWriter_b0_get, _swigfaiss_avx2.BufferedIOWriter_b0_set)
    buffer = property(_swigfaiss_avx2.BufferedIOWriter_buffer_get, _swigfaiss_avx2.BufferedIOWriter_buffer_set)

    def __init__(self, *args):
        _swigfaiss_avx2.BufferedIOWriter_swiginit(self, _swigfaiss_avx2.new_BufferedIOWriter(*args))

    def __call__(self, ptr, size, nitems):
        return _swigfaiss_avx2.BufferedIOWriter___call__(self, ptr, size, nitems)
    __swig_destroy__ = _swigfaiss_avx2.delete_BufferedIOWriter

# Register BufferedIOWriter in _swigfaiss_avx2:
_swigfaiss_avx2.BufferedIOWriter_swigregister(BufferedIOWriter)


def fourcc(*args):
    return _swigfaiss_avx2.fourcc(*args)

def fourcc_inv(*args):
    return _swigfaiss_avx2.fourcc_inv(*args)

def fourcc_inv_printable(x):
    return _swigfaiss_avx2.fourcc_inv_printable(x)
class InvertedLists(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    nlist = property(_swigfaiss_avx2.InvertedLists_nlist_get, _swigfaiss_avx2.InvertedLists_nlist_set)
    code_size = property(_swigfaiss_avx2.InvertedLists_code_size_get, _swigfaiss_avx2.InvertedLists_code_size_set)
    INVALID_CODE_SIZE = _swigfaiss_avx2.InvertedLists_INVALID_CODE_SIZE

    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

    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)

# Register InvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.InvertedLists_swigregister(InvertedLists)

class ArrayInvertedLists(InvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    codes = property(_swigfaiss_avx2.ArrayInvertedLists_codes_get, _swigfaiss_avx2.ArrayInvertedLists_codes_set)
    ids = property(_swigfaiss_avx2.ArrayInvertedLists_ids_get, _swigfaiss_avx2.ArrayInvertedLists_ids_set)

    def __init__(self, nlist, code_size):
        _swigfaiss_avx2.ArrayInvertedLists_swiginit(self, _swigfaiss_avx2.new_ArrayInvertedLists(nlist, code_size))

    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

# Register ArrayInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.ArrayInvertedLists_swigregister(ArrayInvertedLists)

class ReadOnlyInvertedLists(InvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    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

# Register ReadOnlyInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.ReadOnlyInvertedLists_swigregister(ReadOnlyInvertedLists)

class HStackInvertedLists(ReadOnlyInvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    ils = property(_swigfaiss_avx2.HStackInvertedLists_ils_get, _swigfaiss_avx2.HStackInvertedLists_ils_set)

    def __init__(self, nil, ils):
        _swigfaiss_avx2.HStackInvertedLists_swiginit(self, _swigfaiss_avx2.new_HStackInvertedLists(nil, ils))

    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

# Register HStackInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.HStackInvertedLists_swigregister(HStackInvertedLists)

class SliceInvertedLists(ReadOnlyInvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    il = property(_swigfaiss_avx2.SliceInvertedLists_il_get, _swigfaiss_avx2.SliceInvertedLists_il_set)
    i0 = property(_swigfaiss_avx2.SliceInvertedLists_i0_get, _swigfaiss_avx2.SliceInvertedLists_i0_set)
    i1 = property(_swigfaiss_avx2.SliceInvertedLists_i1_get, _swigfaiss_avx2.SliceInvertedLists_i1_set)

    def __init__(self, il, i0, i1):
        _swigfaiss_avx2.SliceInvertedLists_swiginit(self, _swigfaiss_avx2.new_SliceInvertedLists(il, i0, i1))

    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

# Register SliceInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.SliceInvertedLists_swigregister(SliceInvertedLists)

class VStackInvertedLists(ReadOnlyInvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    ils = property(_swigfaiss_avx2.VStackInvertedLists_ils_get, _swigfaiss_avx2.VStackInvertedLists_ils_set)
    cumsz = property(_swigfaiss_avx2.VStackInvertedLists_cumsz_get, _swigfaiss_avx2.VStackInvertedLists_cumsz_set)

    def __init__(self, nil, ils):
        _swigfaiss_avx2.VStackInvertedLists_swiginit(self, _swigfaiss_avx2.new_VStackInvertedLists(nil, ils))

    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

# Register VStackInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.VStackInvertedLists_swigregister(VStackInvertedLists)

class MaskedInvertedLists(ReadOnlyInvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    il0 = property(_swigfaiss_avx2.MaskedInvertedLists_il0_get, _swigfaiss_avx2.MaskedInvertedLists_il0_set)
    il1 = property(_swigfaiss_avx2.MaskedInvertedLists_il1_get, _swigfaiss_avx2.MaskedInvertedLists_il1_set)

    def __init__(self, il0, il1):
        _swigfaiss_avx2.MaskedInvertedLists_swiginit(self, _swigfaiss_avx2.new_MaskedInvertedLists(il0, il1))

    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

# Register MaskedInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.MaskedInvertedLists_swigregister(MaskedInvertedLists)

class StopWordsInvertedLists(ReadOnlyInvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    il0 = property(_swigfaiss_avx2.StopWordsInvertedLists_il0_get, _swigfaiss_avx2.StopWordsInvertedLists_il0_set)
    maxsize = property(_swigfaiss_avx2.StopWordsInvertedLists_maxsize_get, _swigfaiss_avx2.StopWordsInvertedLists_maxsize_set)

    def __init__(self, il, maxsize):
        _swigfaiss_avx2.StopWordsInvertedLists_swiginit(self, _swigfaiss_avx2.new_StopWordsInvertedLists(il, maxsize))

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

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

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

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

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

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

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

    def prefetch_lists(self, list_nos, nlist):
        return _swigfaiss_avx2.StopWordsInvertedLists_prefetch_lists(self, list_nos, nlist)
    __swig_destroy__ = _swigfaiss_avx2.delete_StopWordsInvertedLists

# Register StopWordsInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.StopWordsInvertedLists_swigregister(StopWordsInvertedLists)

class InvertedListsIOHook(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    key = property(_swigfaiss_avx2.InvertedListsIOHook_key_get)
    classname = property(_swigfaiss_avx2.InvertedListsIOHook_classname_get)

    def write(self, ils, f):
        return _swigfaiss_avx2.InvertedListsIOHook_write(self, ils, f)

    def read(self, f, io_flags):
        return _swigfaiss_avx2.InvertedListsIOHook_read(self, f, io_flags)

    def read_ArrayInvertedLists(self, f, io_flags, nlist, code_size, sizes):
        return _swigfaiss_avx2.InvertedListsIOHook_read_ArrayInvertedLists(self, f, io_flags, nlist, code_size, sizes)
    __swig_destroy__ = _swigfaiss_avx2.delete_InvertedListsIOHook

    @staticmethod
    def add_callback(arg1):
        return _swigfaiss_avx2.InvertedListsIOHook_add_callback(arg1)

    @staticmethod
    def print_callbacks():
        return _swigfaiss_avx2.InvertedListsIOHook_print_callbacks()

    @staticmethod
    def lookup(h):
        return _swigfaiss_avx2.InvertedListsIOHook_lookup(h)

    @staticmethod
    def lookup_classname(classname):
        return _swigfaiss_avx2.InvertedListsIOHook_lookup_classname(classname)

# Register InvertedListsIOHook in _swigfaiss_avx2:
_swigfaiss_avx2.InvertedListsIOHook_swigregister(InvertedListsIOHook)

def InvertedListsIOHook_add_callback(arg1):
    return _swigfaiss_avx2.InvertedListsIOHook_add_callback(arg1)

def InvertedListsIOHook_print_callbacks():
    return _swigfaiss_avx2.InvertedListsIOHook_print_callbacks()

def InvertedListsIOHook_lookup(h):
    return _swigfaiss_avx2.InvertedListsIOHook_lookup(h)

def InvertedListsIOHook_lookup_classname(classname):
    return _swigfaiss_avx2.InvertedListsIOHook_lookup_classname(classname)

class BlockInvertedLists(InvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    n_per_block = property(_swigfaiss_avx2.BlockInvertedLists_n_per_block_get, _swigfaiss_avx2.BlockInvertedLists_n_per_block_set)
    block_size = property(_swigfaiss_avx2.BlockInvertedLists_block_size_get, _swigfaiss_avx2.BlockInvertedLists_block_size_set)
    codes = property(_swigfaiss_avx2.BlockInvertedLists_codes_get, _swigfaiss_avx2.BlockInvertedLists_codes_set)
    ids = property(_swigfaiss_avx2.BlockInvertedLists_ids_get, _swigfaiss_avx2.BlockInvertedLists_ids_set)

    def __init__(self, *args):
        _swigfaiss_avx2.BlockInvertedLists_swiginit(self, _swigfaiss_avx2.new_BlockInvertedLists(*args))

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

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

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

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

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

    def resize(self, list_no, new_size):
        return _swigfaiss_avx2.BlockInvertedLists_resize(self, list_no, new_size)
    __swig_destroy__ = _swigfaiss_avx2.delete_BlockInvertedLists

# Register BlockInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.BlockInvertedLists_swigregister(BlockInvertedLists)


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

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

def lo_offset(lo):
    return _swigfaiss_avx2.lo_offset(lo)
class DirectMap(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    NoMap = _swigfaiss_avx2.DirectMap_NoMap
    Array = _swigfaiss_avx2.DirectMap_Array
    Hashtable = _swigfaiss_avx2.DirectMap_Hashtable
    type = property(_swigfaiss_avx2.DirectMap_type_get, _swigfaiss_avx2.DirectMap_type_set)
    array = property(_swigfaiss_avx2.DirectMap_array_get, _swigfaiss_avx2.DirectMap_array_set)
    hashtable = property(_swigfaiss_avx2.DirectMap_hashtable_get, _swigfaiss_avx2.DirectMap_hashtable_set)

    def __init__(self):
        _swigfaiss_avx2.DirectMap_swiginit(self, _swigfaiss_avx2.new_DirectMap())

    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

# Register DirectMap in _swigfaiss_avx2:
_swigfaiss_avx2.DirectMap_swigregister(DirectMap)

class DirectMapAdd(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    direct_map = property(_swigfaiss_avx2.DirectMapAdd_direct_map_get, _swigfaiss_avx2.DirectMapAdd_direct_map_set)
    type = property(_swigfaiss_avx2.DirectMapAdd_type_get, _swigfaiss_avx2.DirectMapAdd_type_set)
    ntotal = property(_swigfaiss_avx2.DirectMapAdd_ntotal_get, _swigfaiss_avx2.DirectMapAdd_ntotal_set)
    n = property(_swigfaiss_avx2.DirectMapAdd_n_get, _swigfaiss_avx2.DirectMapAdd_n_set)
    xids = property(_swigfaiss_avx2.DirectMapAdd_xids_get, _swigfaiss_avx2.DirectMapAdd_xids_set)
    all_ofs = property(_swigfaiss_avx2.DirectMapAdd_all_ofs_get, _swigfaiss_avx2.DirectMapAdd_all_ofs_set)

    def __init__(self, direct_map, n, xids):
        _swigfaiss_avx2.DirectMapAdd_swiginit(self, _swigfaiss_avx2.new_DirectMapAdd(direct_map, n, xids))

    def add(self, i, list_no, offset):
        return _swigfaiss_avx2.DirectMapAdd_add(self, i, list_no, offset)
    __swig_destroy__ = _swigfaiss_avx2.delete_DirectMapAdd

# Register DirectMapAdd in _swigfaiss_avx2:
_swigfaiss_avx2.DirectMapAdd_swigregister(DirectMapAdd)

class Level1Quantizer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    quantizer = property(_swigfaiss_avx2.Level1Quantizer_quantizer_get, _swigfaiss_avx2.Level1Quantizer_quantizer_set)
    nlist = property(_swigfaiss_avx2.Level1Quantizer_nlist_get, _swigfaiss_avx2.Level1Quantizer_nlist_set)
    quantizer_trains_alone = property(_swigfaiss_avx2.Level1Quantizer_quantizer_trains_alone_get, _swigfaiss_avx2.Level1Quantizer_quantizer_trains_alone_set)
    own_fields = property(_swigfaiss_avx2.Level1Quantizer_own_fields_get, _swigfaiss_avx2.Level1Quantizer_own_fields_set)
    cp = property(_swigfaiss_avx2.Level1Quantizer_cp_get, _swigfaiss_avx2.Level1Quantizer_cp_set)
    clustering_index = 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):
        _swigfaiss_avx2.Level1Quantizer_swiginit(self, _swigfaiss_avx2.new_Level1Quantizer(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_Level1Quantizer

# Register Level1Quantizer in _swigfaiss_avx2:
_swigfaiss_avx2.Level1Quantizer_swigregister(Level1Quantizer)

class IVFSearchParameters(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nprobe = property(_swigfaiss_avx2.IVFSearchParameters_nprobe_get, _swigfaiss_avx2.IVFSearchParameters_nprobe_set)
    max_codes = property(_swigfaiss_avx2.IVFSearchParameters_max_codes_get, _swigfaiss_avx2.IVFSearchParameters_max_codes_set)

    def __init__(self):
        _swigfaiss_avx2.IVFSearchParameters_swiginit(self, _swigfaiss_avx2.new_IVFSearchParameters())
    __swig_destroy__ = _swigfaiss_avx2.delete_IVFSearchParameters

# Register IVFSearchParameters in _swigfaiss_avx2:
_swigfaiss_avx2.IVFSearchParameters_swigregister(IVFSearchParameters)

class IndexIVF(Index, Level1Quantizer):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    invlists = property(_swigfaiss_avx2.IndexIVF_invlists_get, _swigfaiss_avx2.IndexIVF_invlists_set)
    own_invlists = property(_swigfaiss_avx2.IndexIVF_own_invlists_get, _swigfaiss_avx2.IndexIVF_own_invlists_set)
    code_size = property(_swigfaiss_avx2.IndexIVF_code_size_get, _swigfaiss_avx2.IndexIVF_code_size_set)
    nprobe = property(_swigfaiss_avx2.IndexIVF_nprobe_get, _swigfaiss_avx2.IndexIVF_nprobe_set)
    max_codes = property(_swigfaiss_avx2.IndexIVF_max_codes_get, _swigfaiss_avx2.IndexIVF_max_codes_set)
    parallel_mode = property(_swigfaiss_avx2.IndexIVF_parallel_mode_get, _swigfaiss_avx2.IndexIVF_parallel_mode_set)
    PARALLEL_MODE_NO_HEAP_INIT = property(_swigfaiss_avx2.IndexIVF_PARALLEL_MODE_NO_HEAP_INIT_get)
    direct_map = 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 add_core(self, n, x, xids, precomputed_idx):
        return _swigfaiss_avx2.IndexIVF_add_core(self, n, x, xids, precomputed_idx)

    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, stats=None):
        return _swigfaiss_avx2.IndexIVF_search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params, stats)

    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, store_pairs=False, params=None, stats=None):
        return _swigfaiss_avx2.IndexIVF_range_search_preassigned(self, nx, x, radius, keys, coarse_dis, result, store_pairs, params, stats)

    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

    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)

# Register IndexIVF in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVF_swigregister(IndexIVF)

class IndexIVFStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nq = property(_swigfaiss_avx2.IndexIVFStats_nq_get, _swigfaiss_avx2.IndexIVFStats_nq_set)
    nlist = property(_swigfaiss_avx2.IndexIVFStats_nlist_get, _swigfaiss_avx2.IndexIVFStats_nlist_set)
    ndis = property(_swigfaiss_avx2.IndexIVFStats_ndis_get, _swigfaiss_avx2.IndexIVFStats_ndis_set)
    nheap_updates = property(_swigfaiss_avx2.IndexIVFStats_nheap_updates_get, _swigfaiss_avx2.IndexIVFStats_nheap_updates_set)
    quantization_time = property(_swigfaiss_avx2.IndexIVFStats_quantization_time_get, _swigfaiss_avx2.IndexIVFStats_quantization_time_set)
    search_time = property(_swigfaiss_avx2.IndexIVFStats_search_time_get, _swigfaiss_avx2.IndexIVFStats_search_time_set)

    def __init__(self):
        _swigfaiss_avx2.IndexIVFStats_swiginit(self, _swigfaiss_avx2.new_IndexIVFStats())

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

    def add(self, other):
        return _swigfaiss_avx2.IndexIVFStats_add(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFStats

# Register IndexIVFStats in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFStats_swigregister(IndexIVFStats)


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

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

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

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

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

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)
class SlidingIndexWindow(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    index = property(_swigfaiss_avx2.SlidingIndexWindow_index_get, _swigfaiss_avx2.SlidingIndexWindow_index_set)
    ils = property(_swigfaiss_avx2.SlidingIndexWindow_ils_get, _swigfaiss_avx2.SlidingIndexWindow_ils_set)
    n_slice = property(_swigfaiss_avx2.SlidingIndexWindow_n_slice_get, _swigfaiss_avx2.SlidingIndexWindow_n_slice_set)
    nlist = property(_swigfaiss_avx2.SlidingIndexWindow_nlist_get, _swigfaiss_avx2.SlidingIndexWindow_nlist_set)
    sizes = property(_swigfaiss_avx2.SlidingIndexWindow_sizes_get, _swigfaiss_avx2.SlidingIndexWindow_sizes_set)

    def __init__(self, index):
        _swigfaiss_avx2.SlidingIndexWindow_swiginit(self, _swigfaiss_avx2.new_SlidingIndexWindow(index))

    def step(self, sub_index, remove_oldest):
        return _swigfaiss_avx2.SlidingIndexWindow_step(self, sub_index, remove_oldest)
    __swig_destroy__ = _swigfaiss_avx2.delete_SlidingIndexWindow

# Register SlidingIndexWindow in _swigfaiss_avx2:
_swigfaiss_avx2.SlidingIndexWindow_swigregister(SlidingIndexWindow)


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

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

def search_with_parameters(index, n, x, k, distances, labels, params, nb_dis=None, ms_per_stage=None):
    return _swigfaiss_avx2.search_with_parameters(index, n, x, k, distances, labels, params, nb_dis, ms_per_stage)

def range_search_with_parameters(index, n, x, radius, result, params, nb_dis=None, ms_per_stage=None):
    return _swigfaiss_avx2.range_search_with_parameters(index, n, x, radius, result, params, nb_dis, ms_per_stage)
class ScalarQuantizer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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
    qtype = 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
    rangestat = property(_swigfaiss_avx2.ScalarQuantizer_rangestat_get, _swigfaiss_avx2.ScalarQuantizer_rangestat_set)
    rangestat_arg = property(_swigfaiss_avx2.ScalarQuantizer_rangestat_arg_get, _swigfaiss_avx2.ScalarQuantizer_rangestat_arg_set)
    d = property(_swigfaiss_avx2.ScalarQuantizer_d_get, _swigfaiss_avx2.ScalarQuantizer_d_set)
    bits = property(_swigfaiss_avx2.ScalarQuantizer_bits_get, _swigfaiss_avx2.ScalarQuantizer_bits_set)
    code_size = property(_swigfaiss_avx2.ScalarQuantizer_code_size_get, _swigfaiss_avx2.ScalarQuantizer_code_size_set)
    trained = property(_swigfaiss_avx2.ScalarQuantizer_trained_get, _swigfaiss_avx2.ScalarQuantizer_trained_set)

    def __init__(self, *args):
        _swigfaiss_avx2.ScalarQuantizer_swiginit(self, _swigfaiss_avx2.new_ScalarQuantizer(*args))

    def set_derived_sizes(self):
        return _swigfaiss_avx2.ScalarQuantizer_set_derived_sizes(self)

    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

# Register ScalarQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.ScalarQuantizer_swigregister(ScalarQuantizer)

class IndexScalarQuantizer(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    sq = property(_swigfaiss_avx2.IndexScalarQuantizer_sq_get, _swigfaiss_avx2.IndexScalarQuantizer_sq_set)
    codes = property(_swigfaiss_avx2.IndexScalarQuantizer_codes_get, _swigfaiss_avx2.IndexScalarQuantizer_codes_set)
    code_size = property(_swigfaiss_avx2.IndexScalarQuantizer_code_size_get, _swigfaiss_avx2.IndexScalarQuantizer_code_size_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexScalarQuantizer_swiginit(self, _swigfaiss_avx2.new_IndexScalarQuantizer(*args))

    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

# Register IndexScalarQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.IndexScalarQuantizer_swigregister(IndexScalarQuantizer)

class IndexIVFScalarQuantizer(IndexIVF):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    sq = property(_swigfaiss_avx2.IndexIVFScalarQuantizer_sq_get, _swigfaiss_avx2.IndexIVFScalarQuantizer_sq_set)
    by_residual = property(_swigfaiss_avx2.IndexIVFScalarQuantizer_by_residual_get, _swigfaiss_avx2.IndexIVFScalarQuantizer_by_residual_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexIVFScalarQuantizer_swiginit(self, _swigfaiss_avx2.new_IndexIVFScalarQuantizer(*args))

    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_core(self, n, x, xids, precomputed_idx):
        return _swigfaiss_avx2.IndexIVFScalarQuantizer_add_core(self, n, x, xids, precomputed_idx)

    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

# Register IndexIVFScalarQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFScalarQuantizer_swigregister(IndexIVFScalarQuantizer)

class IndexIVFSpectralHash(IndexIVF):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    vt = property(_swigfaiss_avx2.IndexIVFSpectralHash_vt_get, _swigfaiss_avx2.IndexIVFSpectralHash_vt_set)
    own_fields = property(_swigfaiss_avx2.IndexIVFSpectralHash_own_fields_get, _swigfaiss_avx2.IndexIVFSpectralHash_own_fields_set)
    nbit = property(_swigfaiss_avx2.IndexIVFSpectralHash_nbit_get, _swigfaiss_avx2.IndexIVFSpectralHash_nbit_set)
    period = 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
    threshold_type = property(_swigfaiss_avx2.IndexIVFSpectralHash_threshold_type_get, _swigfaiss_avx2.IndexIVFSpectralHash_threshold_type_set)
    trained = property(_swigfaiss_avx2.IndexIVFSpectralHash_trained_get, _swigfaiss_avx2.IndexIVFSpectralHash_trained_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexIVFSpectralHash_swiginit(self, _swigfaiss_avx2.new_IndexIVFSpectralHash(*args))

    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

# Register IndexIVFSpectralHash in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFSpectralHash_swigregister(IndexIVFSpectralHash)

class HNSW(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    assign_probas = property(_swigfaiss_avx2.HNSW_assign_probas_get, _swigfaiss_avx2.HNSW_assign_probas_set)
    cum_nneighbor_per_level = property(_swigfaiss_avx2.HNSW_cum_nneighbor_per_level_get, _swigfaiss_avx2.HNSW_cum_nneighbor_per_level_set)
    levels = property(_swigfaiss_avx2.HNSW_levels_get, _swigfaiss_avx2.HNSW_levels_set)
    offsets = property(_swigfaiss_avx2.HNSW_offsets_get, _swigfaiss_avx2.HNSW_offsets_set)
    neighbors = property(_swigfaiss_avx2.HNSW_neighbors_get, _swigfaiss_avx2.HNSW_neighbors_set)
    entry_point = property(_swigfaiss_avx2.HNSW_entry_point_get, _swigfaiss_avx2.HNSW_entry_point_set)
    rng = property(_swigfaiss_avx2.HNSW_rng_get, _swigfaiss_avx2.HNSW_rng_set)
    max_level = property(_swigfaiss_avx2.HNSW_max_level_get, _swigfaiss_avx2.HNSW_max_level_set)
    efConstruction = property(_swigfaiss_avx2.HNSW_efConstruction_get, _swigfaiss_avx2.HNSW_efConstruction_set)
    efSearch = property(_swigfaiss_avx2.HNSW_efSearch_get, _swigfaiss_avx2.HNSW_efSearch_set)
    check_relative_distance = property(_swigfaiss_avx2.HNSW_check_relative_distance_get, _swigfaiss_avx2.HNSW_check_relative_distance_set)
    upper_beam = property(_swigfaiss_avx2.HNSW_upper_beam_get, _swigfaiss_avx2.HNSW_upper_beam_set)
    search_bounded_queue = 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):
        _swigfaiss_avx2.HNSW_swiginit(self, _swigfaiss_avx2.new_HNSW(M))

    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, stats, level, nres_in=0):
        return _swigfaiss_avx2.HNSW_search_from_candidates(self, qdis, k, I, D, candidates, vt, stats, level, nres_in)

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

    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)

    @staticmethod
    def shrink_neighbor_list(qdis, input, output, max_size):
        return _swigfaiss_avx2.HNSW_shrink_neighbor_list(qdis, input, output, max_size)
    __swig_destroy__ = _swigfaiss_avx2.delete_HNSW

# Register HNSW in _swigfaiss_avx2:
_swigfaiss_avx2.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)

class HNSWStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    n1 = property(_swigfaiss_avx2.HNSWStats_n1_get, _swigfaiss_avx2.HNSWStats_n1_set)
    n2 = property(_swigfaiss_avx2.HNSWStats_n2_get, _swigfaiss_avx2.HNSWStats_n2_set)
    n3 = property(_swigfaiss_avx2.HNSWStats_n3_get, _swigfaiss_avx2.HNSWStats_n3_set)
    ndis = property(_swigfaiss_avx2.HNSWStats_ndis_get, _swigfaiss_avx2.HNSWStats_ndis_set)
    nreorder = property(_swigfaiss_avx2.HNSWStats_nreorder_get, _swigfaiss_avx2.HNSWStats_nreorder_set)

    def __init__(self, n1=0, n2=0, n3=0, ndis=0, nreorder=0):
        _swigfaiss_avx2.HNSWStats_swiginit(self, _swigfaiss_avx2.new_HNSWStats(n1, n2, n3, ndis, nreorder))

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

    def combine(self, other):
        return _swigfaiss_avx2.HNSWStats_combine(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_HNSWStats

# Register HNSWStats in _swigfaiss_avx2:
_swigfaiss_avx2.HNSWStats_swigregister(HNSWStats)

class ReconstructFromNeighbors(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    index = property(_swigfaiss_avx2.ReconstructFromNeighbors_index_get)
    M = property(_swigfaiss_avx2.ReconstructFromNeighbors_M_get, _swigfaiss_avx2.ReconstructFromNeighbors_M_set)
    k = property(_swigfaiss_avx2.ReconstructFromNeighbors_k_get, _swigfaiss_avx2.ReconstructFromNeighbors_k_set)
    nsq = property(_swigfaiss_avx2.ReconstructFromNeighbors_nsq_get, _swigfaiss_avx2.ReconstructFromNeighbors_nsq_set)
    code_size = property(_swigfaiss_avx2.ReconstructFromNeighbors_code_size_get, _swigfaiss_avx2.ReconstructFromNeighbors_code_size_set)
    k_reorder = property(_swigfaiss_avx2.ReconstructFromNeighbors_k_reorder_get, _swigfaiss_avx2.ReconstructFromNeighbors_k_reorder_set)
    codebook = property(_swigfaiss_avx2.ReconstructFromNeighbors_codebook_get, _swigfaiss_avx2.ReconstructFromNeighbors_codebook_set)
    codes = property(_swigfaiss_avx2.ReconstructFromNeighbors_codes_get, _swigfaiss_avx2.ReconstructFromNeighbors_codes_set)
    ntotal = property(_swigfaiss_avx2.ReconstructFromNeighbors_ntotal_get, _swigfaiss_avx2.ReconstructFromNeighbors_ntotal_set)
    d = property(_swigfaiss_avx2.ReconstructFromNeighbors_d_get, _swigfaiss_avx2.ReconstructFromNeighbors_d_set)
    dsub = property(_swigfaiss_avx2.ReconstructFromNeighbors_dsub_get, _swigfaiss_avx2.ReconstructFromNeighbors_dsub_set)

    def __init__(self, index, k=256, nsq=1):
        _swigfaiss_avx2.ReconstructFromNeighbors_swiginit(self, _swigfaiss_avx2.new_ReconstructFromNeighbors(index, k, nsq))

    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

# Register ReconstructFromNeighbors in _swigfaiss_avx2:
_swigfaiss_avx2.ReconstructFromNeighbors_swigregister(ReconstructFromNeighbors)

class IndexHNSW(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    hnsw = property(_swigfaiss_avx2.IndexHNSW_hnsw_get, _swigfaiss_avx2.IndexHNSW_hnsw_set)
    own_fields = property(_swigfaiss_avx2.IndexHNSW_own_fields_get, _swigfaiss_avx2.IndexHNSW_own_fields_set)
    storage = property(_swigfaiss_avx2.IndexHNSW_storage_get, _swigfaiss_avx2.IndexHNSW_storage_set)
    reconstruct_from_neighbors = property(_swigfaiss_avx2.IndexHNSW_reconstruct_from_neighbors_get, _swigfaiss_avx2.IndexHNSW_reconstruct_from_neighbors_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexHNSW_swiginit(self, _swigfaiss_avx2.new_IndexHNSW(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSW

    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)

# Register IndexHNSW in _swigfaiss_avx2:
_swigfaiss_avx2.IndexHNSW_swigregister(IndexHNSW)

class IndexHNSWFlat(IndexHNSW):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexHNSWFlat_swiginit(self, _swigfaiss_avx2.new_IndexHNSWFlat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSWFlat

# Register IndexHNSWFlat in _swigfaiss_avx2:
_swigfaiss_avx2.IndexHNSWFlat_swigregister(IndexHNSWFlat)

class IndexHNSWPQ(IndexHNSW):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexHNSWPQ_swiginit(self, _swigfaiss_avx2.new_IndexHNSWPQ(*args))

    def train(self, n, x):
        return _swigfaiss_avx2.IndexHNSWPQ_train(self, n, x)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSWPQ

# Register IndexHNSWPQ in _swigfaiss_avx2:
_swigfaiss_avx2.IndexHNSWPQ_swigregister(IndexHNSWPQ)

class IndexHNSWSQ(IndexHNSW):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexHNSWSQ_swiginit(self, _swigfaiss_avx2.new_IndexHNSWSQ(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexHNSWSQ

# Register IndexHNSWSQ in _swigfaiss_avx2:
_swigfaiss_avx2.IndexHNSWSQ_swigregister(IndexHNSWSQ)

class IndexHNSW2Level(IndexHNSW):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexHNSW2Level_swiginit(self, _swigfaiss_avx2.new_IndexHNSW2Level(*args))

    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

# Register IndexHNSW2Level in _swigfaiss_avx2:
_swigfaiss_avx2.IndexHNSW2Level_swigregister(IndexHNSW2Level)

class Neighbor(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    id = property(_swigfaiss_avx2.Neighbor_id_get, _swigfaiss_avx2.Neighbor_id_set)
    distance = property(_swigfaiss_avx2.Neighbor_distance_get, _swigfaiss_avx2.Neighbor_distance_set)
    flag = property(_swigfaiss_avx2.Neighbor_flag_get, _swigfaiss_avx2.Neighbor_flag_set)

    def __init__(self, *args):
        _swigfaiss_avx2.Neighbor_swiginit(self, _swigfaiss_avx2.new_Neighbor(*args))

    def __lt__(self, other):
        return _swigfaiss_avx2.Neighbor___lt__(self, other)
    __swig_destroy__ = _swigfaiss_avx2.delete_Neighbor

# Register Neighbor in _swigfaiss_avx2:
_swigfaiss_avx2.Neighbor_swigregister(Neighbor)

class Nhood(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    pool = property(_swigfaiss_avx2.Nhood_pool_get, _swigfaiss_avx2.Nhood_pool_set)
    M = property(_swigfaiss_avx2.Nhood_M_get, _swigfaiss_avx2.Nhood_M_set)
    nn_old = property(_swigfaiss_avx2.Nhood_nn_old_get, _swigfaiss_avx2.Nhood_nn_old_set)
    nn_new = property(_swigfaiss_avx2.Nhood_nn_new_get, _swigfaiss_avx2.Nhood_nn_new_set)
    rnn_old = property(_swigfaiss_avx2.Nhood_rnn_old_get, _swigfaiss_avx2.Nhood_rnn_old_set)
    rnn_new = property(_swigfaiss_avx2.Nhood_rnn_new_get, _swigfaiss_avx2.Nhood_rnn_new_set)

    def __init__(self, *args):
        _swigfaiss_avx2.Nhood_swiginit(self, _swigfaiss_avx2.new_Nhood(*args))

    def insert(self, id, dist):
        return _swigfaiss_avx2.Nhood_insert(self, id, dist)
    __swig_destroy__ = _swigfaiss_avx2.delete_Nhood

# Register Nhood in _swigfaiss_avx2:
_swigfaiss_avx2.Nhood_swigregister(Nhood)

class NNDescent(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, d, K):
        _swigfaiss_avx2.NNDescent_swiginit(self, _swigfaiss_avx2.new_NNDescent(d, K))
    __swig_destroy__ = _swigfaiss_avx2.delete_NNDescent

    def build(self, qdis, n, verbose):
        return _swigfaiss_avx2.NNDescent_build(self, qdis, n, verbose)

    def search(self, qdis, topk, indices, dists, vt):
        return _swigfaiss_avx2.NNDescent_search(self, qdis, topk, indices, dists, vt)

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

    def init_graph(self, qdis):
        return _swigfaiss_avx2.NNDescent_init_graph(self, qdis)

    def nndescent(self, qdis, verbose):
        return _swigfaiss_avx2.NNDescent_nndescent(self, qdis, verbose)

    def join(self, qdis):
        return _swigfaiss_avx2.NNDescent_join(self, qdis)

    def update(self):
        return _swigfaiss_avx2.NNDescent_update(self)

    def generate_eval_set(self, qdis, c, v, N):
        return _swigfaiss_avx2.NNDescent_generate_eval_set(self, qdis, c, v, N)

    def eval_recall(self, ctrl_points, acc_eval_set):
        return _swigfaiss_avx2.NNDescent_eval_recall(self, ctrl_points, acc_eval_set)
    has_built = property(_swigfaiss_avx2.NNDescent_has_built_get, _swigfaiss_avx2.NNDescent_has_built_set)
    K = property(_swigfaiss_avx2.NNDescent_K_get, _swigfaiss_avx2.NNDescent_K_set)
    S = property(_swigfaiss_avx2.NNDescent_S_get, _swigfaiss_avx2.NNDescent_S_set)
    R = property(_swigfaiss_avx2.NNDescent_R_get, _swigfaiss_avx2.NNDescent_R_set)
    L = property(_swigfaiss_avx2.NNDescent_L_get, _swigfaiss_avx2.NNDescent_L_set)
    iter = property(_swigfaiss_avx2.NNDescent_iter_get, _swigfaiss_avx2.NNDescent_iter_set)
    search_L = property(_swigfaiss_avx2.NNDescent_search_L_get, _swigfaiss_avx2.NNDescent_search_L_set)
    random_seed = property(_swigfaiss_avx2.NNDescent_random_seed_get, _swigfaiss_avx2.NNDescent_random_seed_set)
    d = property(_swigfaiss_avx2.NNDescent_d_get, _swigfaiss_avx2.NNDescent_d_set)
    ntotal = property(_swigfaiss_avx2.NNDescent_ntotal_get, _swigfaiss_avx2.NNDescent_ntotal_set)
    graph = property(_swigfaiss_avx2.NNDescent_graph_get, _swigfaiss_avx2.NNDescent_graph_set)
    final_graph = property(_swigfaiss_avx2.NNDescent_final_graph_get, _swigfaiss_avx2.NNDescent_final_graph_set)

# Register NNDescent in _swigfaiss_avx2:
_swigfaiss_avx2.NNDescent_swigregister(NNDescent)

class IndexNNDescent(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nndescent = property(_swigfaiss_avx2.IndexNNDescent_nndescent_get, _swigfaiss_avx2.IndexNNDescent_nndescent_set)
    own_fields = property(_swigfaiss_avx2.IndexNNDescent_own_fields_get, _swigfaiss_avx2.IndexNNDescent_own_fields_set)
    storage = property(_swigfaiss_avx2.IndexNNDescent_storage_get, _swigfaiss_avx2.IndexNNDescent_storage_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexNNDescent_swiginit(self, _swigfaiss_avx2.new_IndexNNDescent(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexNNDescent

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

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

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

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

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

# Register IndexNNDescent in _swigfaiss_avx2:
_swigfaiss_avx2.IndexNNDescent_swigregister(IndexNNDescent)

class IndexNNDescentFlat(IndexNNDescent):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexNNDescentFlat_swiginit(self, _swigfaiss_avx2.new_IndexNNDescentFlat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexNNDescentFlat

# Register IndexNNDescentFlat in _swigfaiss_avx2:
_swigfaiss_avx2.IndexNNDescentFlat_swigregister(IndexNNDescentFlat)

class IndexIVFFlat(IndexIVF):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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 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):
        _swigfaiss_avx2.IndexIVFFlat_swiginit(self, _swigfaiss_avx2.new_IndexIVFFlat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFFlat

# Register IndexIVFFlat in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFFlat_swigregister(IndexIVFFlat)

class IndexIVFFlatDedup(IndexIVFFlat):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    instances = 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, stats=None):
        return _swigfaiss_avx2.IndexIVFFlatDedup_search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params, stats)

    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):
        _swigfaiss_avx2.IndexIVFFlatDedup_swiginit(self, _swigfaiss_avx2.new_IndexIVFFlatDedup(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFFlatDedup

# Register IndexIVFFlatDedup in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFFlatDedup_swigregister(IndexIVFFlatDedup)


def storage_distance_computer(storage):
    return _swigfaiss_avx2.storage_distance_computer(storage)
class NSG(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    ntotal = property(_swigfaiss_avx2.NSG_ntotal_get, _swigfaiss_avx2.NSG_ntotal_set)
    R = property(_swigfaiss_avx2.NSG_R_get, _swigfaiss_avx2.NSG_R_set)
    L = property(_swigfaiss_avx2.NSG_L_get, _swigfaiss_avx2.NSG_L_set)
    C = property(_swigfaiss_avx2.NSG_C_get, _swigfaiss_avx2.NSG_C_set)
    search_L = property(_swigfaiss_avx2.NSG_search_L_get, _swigfaiss_avx2.NSG_search_L_set)
    enterpoint = property(_swigfaiss_avx2.NSG_enterpoint_get, _swigfaiss_avx2.NSG_enterpoint_set)
    final_graph = property(_swigfaiss_avx2.NSG_final_graph_get, _swigfaiss_avx2.NSG_final_graph_set)
    is_built = property(_swigfaiss_avx2.NSG_is_built_get, _swigfaiss_avx2.NSG_is_built_set)
    rng = property(_swigfaiss_avx2.NSG_rng_get, _swigfaiss_avx2.NSG_rng_set)

    def __init__(self, R=32):
        _swigfaiss_avx2.NSG_swiginit(self, _swigfaiss_avx2.new_NSG(R))

    def build(self, storage, n, knn_graph, verbose):
        return _swigfaiss_avx2.NSG_build(self, storage, n, knn_graph, verbose)

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

    def search(self, dis, k, I, D, vt):
        return _swigfaiss_avx2.NSG_search(self, dis, k, I, D, vt)

    def init_graph(self, storage, knn_graph):
        return _swigfaiss_avx2.NSG_init_graph(self, storage, knn_graph)

    def add_reverse_links(self, q, locks, dis, graph):
        return _swigfaiss_avx2.NSG_add_reverse_links(self, q, locks, dis, graph)

    def sync_prune(self, q, pool, dis, vt, knn_graph, graph):
        return _swigfaiss_avx2.NSG_sync_prune(self, q, pool, dis, vt, knn_graph, graph)

    def link(self, storage, knn_graph, graph, verbose):
        return _swigfaiss_avx2.NSG_link(self, storage, knn_graph, graph, verbose)

    def tree_grow(self, storage, degrees):
        return _swigfaiss_avx2.NSG_tree_grow(self, storage, degrees)

    def dfs(self, vt, root, cnt):
        return _swigfaiss_avx2.NSG_dfs(self, vt, root, cnt)

    def attach_unlinked(self, storage, vt, vt2, degrees):
        return _swigfaiss_avx2.NSG_attach_unlinked(self, storage, vt, vt2, degrees)

    def check_graph(self):
        return _swigfaiss_avx2.NSG_check_graph(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_NSG

# Register NSG in _swigfaiss_avx2:
_swigfaiss_avx2.NSG_swigregister(NSG)

class IndexNSG(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nsg = property(_swigfaiss_avx2.IndexNSG_nsg_get, _swigfaiss_avx2.IndexNSG_nsg_set)
    own_fields = property(_swigfaiss_avx2.IndexNSG_own_fields_get, _swigfaiss_avx2.IndexNSG_own_fields_set)
    storage = property(_swigfaiss_avx2.IndexNSG_storage_get, _swigfaiss_avx2.IndexNSG_storage_set)
    is_built = property(_swigfaiss_avx2.IndexNSG_is_built_get, _swigfaiss_avx2.IndexNSG_is_built_set)
    GK = property(_swigfaiss_avx2.IndexNSG_GK_get, _swigfaiss_avx2.IndexNSG_GK_set)
    build_type = property(_swigfaiss_avx2.IndexNSG_build_type_get, _swigfaiss_avx2.IndexNSG_build_type_set)
    nndescent_S = property(_swigfaiss_avx2.IndexNSG_nndescent_S_get, _swigfaiss_avx2.IndexNSG_nndescent_S_set)
    nndescent_R = property(_swigfaiss_avx2.IndexNSG_nndescent_R_get, _swigfaiss_avx2.IndexNSG_nndescent_R_set)
    nndescent_L = property(_swigfaiss_avx2.IndexNSG_nndescent_L_get, _swigfaiss_avx2.IndexNSG_nndescent_L_set)
    nndescent_iter = property(_swigfaiss_avx2.IndexNSG_nndescent_iter_get, _swigfaiss_avx2.IndexNSG_nndescent_iter_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexNSG_swiginit(self, _swigfaiss_avx2.new_IndexNSG(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexNSG

    def build(self, n, x, knn_graph, GK):
        return _swigfaiss_avx2.IndexNSG_build(self, n, x, knn_graph, GK)

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

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

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

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

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

    def check_knn_graph(self, knn_graph, n, K):
        return _swigfaiss_avx2.IndexNSG_check_knn_graph(self, knn_graph, n, K)

# Register IndexNSG in _swigfaiss_avx2:
_swigfaiss_avx2.IndexNSG_swigregister(IndexNSG)

class IndexNSGFlat(IndexNSG):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexNSGFlat_swiginit(self, _swigfaiss_avx2.new_IndexNSGFlat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexNSGFlat

# Register IndexNSGFlat in _swigfaiss_avx2:
_swigfaiss_avx2.IndexNSGFlat_swigregister(IndexNSGFlat)

class OnDiskOneList(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    size = property(_swigfaiss_avx2.OnDiskOneList_size_get, _swigfaiss_avx2.OnDiskOneList_size_set)
    capacity = property(_swigfaiss_avx2.OnDiskOneList_capacity_get, _swigfaiss_avx2.OnDiskOneList_capacity_set)
    offset = property(_swigfaiss_avx2.OnDiskOneList_offset_get, _swigfaiss_avx2.OnDiskOneList_offset_set)

    def __init__(self):
        _swigfaiss_avx2.OnDiskOneList_swiginit(self, _swigfaiss_avx2.new_OnDiskOneList())
    __swig_destroy__ = _swigfaiss_avx2.delete_OnDiskOneList

# Register OnDiskOneList in _swigfaiss_avx2:
_swigfaiss_avx2.OnDiskOneList_swigregister(OnDiskOneList)

class OnDiskInvertedLists(InvertedLists):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    lists = property(_swigfaiss_avx2.OnDiskInvertedLists_lists_get, _swigfaiss_avx2.OnDiskInvertedLists_lists_set)
    slots = property(_swigfaiss_avx2.OnDiskInvertedLists_slots_get, _swigfaiss_avx2.OnDiskInvertedLists_slots_set)
    filename = property(_swigfaiss_avx2.OnDiskInvertedLists_filename_get, _swigfaiss_avx2.OnDiskInvertedLists_filename_set)
    totsize = property(_swigfaiss_avx2.OnDiskInvertedLists_totsize_get, _swigfaiss_avx2.OnDiskInvertedLists_totsize_set)
    ptr = property(_swigfaiss_avx2.OnDiskInvertedLists_ptr_get, _swigfaiss_avx2.OnDiskInvertedLists_ptr_set)
    read_only = 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 merge_from_1(self, il, verbose=False):
        return _swigfaiss_avx2.OnDiskInvertedLists_merge_from_1(self, 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
    locks = property(_swigfaiss_avx2.OnDiskInvertedLists_locks_get, _swigfaiss_avx2.OnDiskInvertedLists_locks_set)
    pf = property(_swigfaiss_avx2.OnDiskInvertedLists_pf_get, _swigfaiss_avx2.OnDiskInvertedLists_pf_set)
    prefetch_nthread = 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 set_all_lists_sizes(self, sizes):
        return _swigfaiss_avx2.OnDiskInvertedLists_set_all_lists_sizes(self, sizes)

    def __init__(self, *args):
        _swigfaiss_avx2.OnDiskInvertedLists_swiginit(self, _swigfaiss_avx2.new_OnDiskInvertedLists(*args))

# Register OnDiskInvertedLists in _swigfaiss_avx2:
_swigfaiss_avx2.OnDiskInvertedLists_swigregister(OnDiskInvertedLists)

class ZnSphereSearch(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    dimS = property(_swigfaiss_avx2.ZnSphereSearch_dimS_get, _swigfaiss_avx2.ZnSphereSearch_dimS_set)
    r2 = property(_swigfaiss_avx2.ZnSphereSearch_r2_get, _swigfaiss_avx2.ZnSphereSearch_r2_set)
    natom = property(_swigfaiss_avx2.ZnSphereSearch_natom_get, _swigfaiss_avx2.ZnSphereSearch_natom_set)
    voc = property(_swigfaiss_avx2.ZnSphereSearch_voc_get, _swigfaiss_avx2.ZnSphereSearch_voc_set)

    def __init__(self, dim, r2):
        _swigfaiss_avx2.ZnSphereSearch_swiginit(self, _swigfaiss_avx2.new_ZnSphereSearch(dim, r2))

    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

# Register ZnSphereSearch in _swigfaiss_avx2:
_swigfaiss_avx2.ZnSphereSearch_swigregister(ZnSphereSearch)

class EnumeratedVectors(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    nv = property(_swigfaiss_avx2.EnumeratedVectors_nv_get, _swigfaiss_avx2.EnumeratedVectors_nv_set)
    dim = 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

# Register EnumeratedVectors in _swigfaiss_avx2:
_swigfaiss_avx2.EnumeratedVectors_swigregister(EnumeratedVectors)

class Repeat(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    val = property(_swigfaiss_avx2.Repeat_val_get, _swigfaiss_avx2.Repeat_val_set)
    n = property(_swigfaiss_avx2.Repeat_n_get, _swigfaiss_avx2.Repeat_n_set)

    def __init__(self):
        _swigfaiss_avx2.Repeat_swiginit(self, _swigfaiss_avx2.new_Repeat())
    __swig_destroy__ = _swigfaiss_avx2.delete_Repeat

# Register Repeat in _swigfaiss_avx2:
_swigfaiss_avx2.Repeat_swigregister(Repeat)

class Repeats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    dim = property(_swigfaiss_avx2.Repeats_dim_get, _swigfaiss_avx2.Repeats_dim_set)
    repeats = property(_swigfaiss_avx2.Repeats_repeats_get, _swigfaiss_avx2.Repeats_repeats_set)

    def __init__(self, dim=0, c=None):
        _swigfaiss_avx2.Repeats_swiginit(self, _swigfaiss_avx2.new_Repeats(dim, c))

    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

# Register Repeats in _swigfaiss_avx2:
_swigfaiss_avx2.Repeats_swigregister(Repeats)

class ZnSphereCodec(ZnSphereSearch, EnumeratedVectors):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    code_segments = property(_swigfaiss_avx2.ZnSphereCodec_code_segments_get, _swigfaiss_avx2.ZnSphereCodec_code_segments_set)
    nv = property(_swigfaiss_avx2.ZnSphereCodec_nv_get, _swigfaiss_avx2.ZnSphereCodec_nv_set)
    code_size = property(_swigfaiss_avx2.ZnSphereCodec_code_size_get, _swigfaiss_avx2.ZnSphereCodec_code_size_set)

    def __init__(self, dim, r2):
        _swigfaiss_avx2.ZnSphereCodec_swiginit(self, _swigfaiss_avx2.new_ZnSphereCodec(dim, r2))

    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

# Register ZnSphereCodec in _swigfaiss_avx2:
_swigfaiss_avx2.ZnSphereCodec_swigregister(ZnSphereCodec)

class ZnSphereCodecRec(EnumeratedVectors):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    r2 = property(_swigfaiss_avx2.ZnSphereCodecRec_r2_get, _swigfaiss_avx2.ZnSphereCodecRec_r2_set)
    log2_dim = property(_swigfaiss_avx2.ZnSphereCodecRec_log2_dim_get, _swigfaiss_avx2.ZnSphereCodecRec_log2_dim_set)
    code_size = property(_swigfaiss_avx2.ZnSphereCodecRec_code_size_get, _swigfaiss_avx2.ZnSphereCodecRec_code_size_set)

    def __init__(self, dim, r2):
        _swigfaiss_avx2.ZnSphereCodecRec_swiginit(self, _swigfaiss_avx2.new_ZnSphereCodecRec(dim, r2))

    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)
    all_nv = property(_swigfaiss_avx2.ZnSphereCodecRec_all_nv_get, _swigfaiss_avx2.ZnSphereCodecRec_all_nv_set)
    all_nv_cum = property(_swigfaiss_avx2.ZnSphereCodecRec_all_nv_cum_get, _swigfaiss_avx2.ZnSphereCodecRec_all_nv_cum_set)
    decode_cache_ld = property(_swigfaiss_avx2.ZnSphereCodecRec_decode_cache_ld_get, _swigfaiss_avx2.ZnSphereCodecRec_decode_cache_ld_set)
    decode_cache = 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

# Register ZnSphereCodecRec in _swigfaiss_avx2:
_swigfaiss_avx2.ZnSphereCodecRec_swigregister(ZnSphereCodecRec)

class ZnSphereCodecAlt(ZnSphereCodec):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    use_rec = property(_swigfaiss_avx2.ZnSphereCodecAlt_use_rec_get, _swigfaiss_avx2.ZnSphereCodecAlt_use_rec_set)
    znc_rec = property(_swigfaiss_avx2.ZnSphereCodecAlt_znc_rec_get, _swigfaiss_avx2.ZnSphereCodecAlt_znc_rec_set)

    def __init__(self, dim, r2):
        _swigfaiss_avx2.ZnSphereCodecAlt_swiginit(self, _swigfaiss_avx2.new_ZnSphereCodecAlt(dim, r2))

    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

# Register ZnSphereCodecAlt in _swigfaiss_avx2:
_swigfaiss_avx2.ZnSphereCodecAlt_swigregister(ZnSphereCodecAlt)

class IndexLattice(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nsq = property(_swigfaiss_avx2.IndexLattice_nsq_get, _swigfaiss_avx2.IndexLattice_nsq_set)
    dsq = property(_swigfaiss_avx2.IndexLattice_dsq_get, _swigfaiss_avx2.IndexLattice_dsq_set)
    zn_sphere_codec = property(_swigfaiss_avx2.IndexLattice_zn_sphere_codec_get, _swigfaiss_avx2.IndexLattice_zn_sphere_codec_set)
    scale_nbit = property(_swigfaiss_avx2.IndexLattice_scale_nbit_get, _swigfaiss_avx2.IndexLattice_scale_nbit_set)
    lattice_nbit = property(_swigfaiss_avx2.IndexLattice_lattice_nbit_get, _swigfaiss_avx2.IndexLattice_lattice_nbit_set)
    code_size = property(_swigfaiss_avx2.IndexLattice_code_size_get, _swigfaiss_avx2.IndexLattice_code_size_set)
    trained = property(_swigfaiss_avx2.IndexLattice_trained_get, _swigfaiss_avx2.IndexLattice_trained_set)

    def __init__(self, d, nsq, scale_nbit, r2):
        _swigfaiss_avx2.IndexLattice_swiginit(self, _swigfaiss_avx2.new_IndexLattice(d, nsq, scale_nbit, r2))

    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

# Register IndexLattice in _swigfaiss_avx2:
_swigfaiss_avx2.IndexLattice_swigregister(IndexLattice)

class IVFPQSearchParameters(IVFSearchParameters):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    scan_table_threshold = property(_swigfaiss_avx2.IVFPQSearchParameters_scan_table_threshold_get, _swigfaiss_avx2.IVFPQSearchParameters_scan_table_threshold_set)
    polysemous_ht = property(_swigfaiss_avx2.IVFPQSearchParameters_polysemous_ht_get, _swigfaiss_avx2.IVFPQSearchParameters_polysemous_ht_set)

    def __init__(self):
        _swigfaiss_avx2.IVFPQSearchParameters_swiginit(self, _swigfaiss_avx2.new_IVFPQSearchParameters())
    __swig_destroy__ = _swigfaiss_avx2.delete_IVFPQSearchParameters

# Register IVFPQSearchParameters in _swigfaiss_avx2:
_swigfaiss_avx2.IVFPQSearchParameters_swigregister(IVFPQSearchParameters)

class IndexIVFPQ(IndexIVF):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    by_residual = property(_swigfaiss_avx2.IndexIVFPQ_by_residual_get, _swigfaiss_avx2.IndexIVFPQ_by_residual_set)
    pq = property(_swigfaiss_avx2.IndexIVFPQ_pq_get, _swigfaiss_avx2.IndexIVFPQ_pq_set)
    do_polysemous_training = property(_swigfaiss_avx2.IndexIVFPQ_do_polysemous_training_get, _swigfaiss_avx2.IndexIVFPQ_do_polysemous_training_set)
    polysemous_training = property(_swigfaiss_avx2.IndexIVFPQ_polysemous_training_get, _swigfaiss_avx2.IndexIVFPQ_polysemous_training_set)
    scan_table_threshold = property(_swigfaiss_avx2.IndexIVFPQ_scan_table_threshold_get, _swigfaiss_avx2.IndexIVFPQ_scan_table_threshold_set)
    polysemous_ht = property(_swigfaiss_avx2.IndexIVFPQ_polysemous_ht_get, _swigfaiss_avx2.IndexIVFPQ_polysemous_ht_set)
    use_precomputed_table = property(_swigfaiss_avx2.IndexIVFPQ_use_precomputed_table_get, _swigfaiss_avx2.IndexIVFPQ_use_precomputed_table_set)
    precomputed_table = property(_swigfaiss_avx2.IndexIVFPQ_precomputed_table_get, _swigfaiss_avx2.IndexIVFPQ_precomputed_table_set)

    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(self, n, x, xids, precomputed_idx):
        return _swigfaiss_avx2.IndexIVFPQ_add_core(self, n, x, xids, precomputed_idx)

    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):
        _swigfaiss_avx2.IndexIVFPQ_swiginit(self, _swigfaiss_avx2.new_IndexIVFPQ(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFPQ

# Register IndexIVFPQ in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFPQ_swigregister(IndexIVFPQ)


def initialize_IVFPQ_precomputed_table(use_precomputed_table, quantizer, pq, precomputed_table, verbose):
    return _swigfaiss_avx2.initialize_IVFPQ_precomputed_table(use_precomputed_table, quantizer, pq, precomputed_table, verbose)
class IndexIVFPQStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nrefine = property(_swigfaiss_avx2.IndexIVFPQStats_nrefine_get, _swigfaiss_avx2.IndexIVFPQStats_nrefine_set)
    n_hamming_pass = property(_swigfaiss_avx2.IndexIVFPQStats_n_hamming_pass_get, _swigfaiss_avx2.IndexIVFPQStats_n_hamming_pass_set)
    search_cycles = property(_swigfaiss_avx2.IndexIVFPQStats_search_cycles_get, _swigfaiss_avx2.IndexIVFPQStats_search_cycles_set)
    refine_cycles = property(_swigfaiss_avx2.IndexIVFPQStats_refine_cycles_get, _swigfaiss_avx2.IndexIVFPQStats_refine_cycles_set)

    def __init__(self):
        _swigfaiss_avx2.IndexIVFPQStats_swiginit(self, _swigfaiss_avx2.new_IndexIVFPQStats())

    def reset(self):
        return _swigfaiss_avx2.IndexIVFPQStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFPQStats

# Register IndexIVFPQStats in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFPQStats_swigregister(IndexIVFPQStats)

class IndexIVFPQR(IndexIVFPQ):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    refine_pq = property(_swigfaiss_avx2.IndexIVFPQR_refine_pq_get, _swigfaiss_avx2.IndexIVFPQR_refine_pq_set)
    refine_codes = property(_swigfaiss_avx2.IndexIVFPQR_refine_codes_get, _swigfaiss_avx2.IndexIVFPQR_refine_codes_set)
    k_factor = 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):
        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, stats=None):
        return _swigfaiss_avx2.IndexIVFPQR_search_preassigned(self, n, x, k, assign, centroid_dis, distances, labels, store_pairs, params, stats)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexIVFPQR_swiginit(self, _swigfaiss_avx2.new_IndexIVFPQR(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFPQR

# Register IndexIVFPQR in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFPQR_swigregister(IndexIVFPQR)

class Index2Layer(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    q1 = property(_swigfaiss_avx2.Index2Layer_q1_get, _swigfaiss_avx2.Index2Layer_q1_set)
    pq = property(_swigfaiss_avx2.Index2Layer_pq_get, _swigfaiss_avx2.Index2Layer_pq_set)
    codes = property(_swigfaiss_avx2.Index2Layer_codes_get, _swigfaiss_avx2.Index2Layer_codes_set)
    code_size_1 = property(_swigfaiss_avx2.Index2Layer_code_size_1_get, _swigfaiss_avx2.Index2Layer_code_size_1_set)
    code_size_2 = property(_swigfaiss_avx2.Index2Layer_code_size_2_get, _swigfaiss_avx2.Index2Layer_code_size_2_set)
    code_size = property(_swigfaiss_avx2.Index2Layer_code_size_get, _swigfaiss_avx2.Index2Layer_code_size_set)

    def __init__(self, *args):
        _swigfaiss_avx2.Index2Layer_swiginit(self, _swigfaiss_avx2.new_Index2Layer(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_Index2Layer

    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)

# Register Index2Layer in _swigfaiss_avx2:
_swigfaiss_avx2.Index2Layer_swigregister(Index2Layer)

class IndexPQFastScan(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    pq = property(_swigfaiss_avx2.IndexPQFastScan_pq_get, _swigfaiss_avx2.IndexPQFastScan_pq_set)
    implem = property(_swigfaiss_avx2.IndexPQFastScan_implem_get, _swigfaiss_avx2.IndexPQFastScan_implem_set)
    skip = property(_swigfaiss_avx2.IndexPQFastScan_skip_get, _swigfaiss_avx2.IndexPQFastScan_skip_set)
    bbs = property(_swigfaiss_avx2.IndexPQFastScan_bbs_get, _swigfaiss_avx2.IndexPQFastScan_bbs_set)
    qbs = property(_swigfaiss_avx2.IndexPQFastScan_qbs_get, _swigfaiss_avx2.IndexPQFastScan_qbs_set)
    ntotal2 = property(_swigfaiss_avx2.IndexPQFastScan_ntotal2_get, _swigfaiss_avx2.IndexPQFastScan_ntotal2_set)
    M2 = property(_swigfaiss_avx2.IndexPQFastScan_M2_get, _swigfaiss_avx2.IndexPQFastScan_M2_set)
    codes = property(_swigfaiss_avx2.IndexPQFastScan_codes_get, _swigfaiss_avx2.IndexPQFastScan_codes_set)
    orig_codes = property(_swigfaiss_avx2.IndexPQFastScan_orig_codes_get, _swigfaiss_avx2.IndexPQFastScan_orig_codes_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexPQFastScan_swiginit(self, _swigfaiss_avx2.new_IndexPQFastScan(*args))

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

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

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

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

    def compute_quantized_LUT(self, n, x, lut, normalizers):
        return _swigfaiss_avx2.IndexPQFastScan_compute_quantized_LUT(self, n, x, lut, normalizers)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexPQFastScan

# Register IndexPQFastScan in _swigfaiss_avx2:
_swigfaiss_avx2.IndexPQFastScan_swigregister(IndexPQFastScan)

class FastScanStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    t0 = property(_swigfaiss_avx2.FastScanStats_t0_get, _swigfaiss_avx2.FastScanStats_t0_set)
    t1 = property(_swigfaiss_avx2.FastScanStats_t1_get, _swigfaiss_avx2.FastScanStats_t1_set)
    t2 = property(_swigfaiss_avx2.FastScanStats_t2_get, _swigfaiss_avx2.FastScanStats_t2_set)
    t3 = property(_swigfaiss_avx2.FastScanStats_t3_get, _swigfaiss_avx2.FastScanStats_t3_set)

    def __init__(self):
        _swigfaiss_avx2.FastScanStats_swiginit(self, _swigfaiss_avx2.new_FastScanStats())

    def reset(self):
        return _swigfaiss_avx2.FastScanStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_FastScanStats

# Register FastScanStats in _swigfaiss_avx2:
_swigfaiss_avx2.FastScanStats_swigregister(FastScanStats)

class IndexIVFPQFastScan(IndexIVF):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    by_residual = property(_swigfaiss_avx2.IndexIVFPQFastScan_by_residual_get, _swigfaiss_avx2.IndexIVFPQFastScan_by_residual_set)
    pq = property(_swigfaiss_avx2.IndexIVFPQFastScan_pq_get, _swigfaiss_avx2.IndexIVFPQFastScan_pq_set)
    bbs = property(_swigfaiss_avx2.IndexIVFPQFastScan_bbs_get, _swigfaiss_avx2.IndexIVFPQFastScan_bbs_set)
    M2 = property(_swigfaiss_avx2.IndexIVFPQFastScan_M2_get, _swigfaiss_avx2.IndexIVFPQFastScan_M2_set)
    use_precomputed_table = property(_swigfaiss_avx2.IndexIVFPQFastScan_use_precomputed_table_get, _swigfaiss_avx2.IndexIVFPQFastScan_use_precomputed_table_set)
    precomputed_table = property(_swigfaiss_avx2.IndexIVFPQFastScan_precomputed_table_get, _swigfaiss_avx2.IndexIVFPQFastScan_precomputed_table_set)
    implem = property(_swigfaiss_avx2.IndexIVFPQFastScan_implem_get, _swigfaiss_avx2.IndexIVFPQFastScan_implem_set)
    skip = property(_swigfaiss_avx2.IndexIVFPQFastScan_skip_get, _swigfaiss_avx2.IndexIVFPQFastScan_skip_set)
    qbs = property(_swigfaiss_avx2.IndexIVFPQFastScan_qbs_get, _swigfaiss_avx2.IndexIVFPQFastScan_qbs_set)
    qbs2 = property(_swigfaiss_avx2.IndexIVFPQFastScan_qbs2_get, _swigfaiss_avx2.IndexIVFPQFastScan_qbs2_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexIVFPQFastScan_swiginit(self, _swigfaiss_avx2.new_IndexIVFPQFastScan(*args))
    orig_invlists = property(_swigfaiss_avx2.IndexIVFPQFastScan_orig_invlists_get, _swigfaiss_avx2.IndexIVFPQFastScan_orig_invlists_set)

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

    def precompute_table(self):
        return _swigfaiss_avx2.IndexIVFPQFastScan_precompute_table(self)

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

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

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

    def compute_LUT(self, n, x, coarse_ids, coarse_dis, dis_tables, biases):
        return _swigfaiss_avx2.IndexIVFPQFastScan_compute_LUT(self, n, x, coarse_ids, coarse_dis, dis_tables, biases)

    def compute_LUT_uint8(self, n, x, coarse_ids, coarse_dis, dis_tables, biases, normalizers):
        return _swigfaiss_avx2.IndexIVFPQFastScan_compute_LUT_uint8(self, n, x, coarse_ids, coarse_dis, dis_tables, biases, normalizers)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexIVFPQFastScan

# Register IndexIVFPQFastScan in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIVFPQFastScan_swigregister(IndexIVFPQFastScan)

class IVFFastScanStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    times = property(_swigfaiss_avx2.IVFFastScanStats_times_get, _swigfaiss_avx2.IVFFastScanStats_times_set)
    t_compute_distance_tables = property(_swigfaiss_avx2.IVFFastScanStats_t_compute_distance_tables_get, _swigfaiss_avx2.IVFFastScanStats_t_compute_distance_tables_set)
    t_round = property(_swigfaiss_avx2.IVFFastScanStats_t_round_get, _swigfaiss_avx2.IVFFastScanStats_t_round_set)
    t_copy_pack = property(_swigfaiss_avx2.IVFFastScanStats_t_copy_pack_get, _swigfaiss_avx2.IVFFastScanStats_t_copy_pack_set)
    t_scan = property(_swigfaiss_avx2.IVFFastScanStats_t_scan_get, _swigfaiss_avx2.IVFFastScanStats_t_scan_set)
    t_to_flat = property(_swigfaiss_avx2.IVFFastScanStats_t_to_flat_get, _swigfaiss_avx2.IVFFastScanStats_t_to_flat_set)
    reservoir_times = property(_swigfaiss_avx2.IVFFastScanStats_reservoir_times_get, _swigfaiss_avx2.IVFFastScanStats_reservoir_times_set)

    def Mcy_at(self, i):
        return _swigfaiss_avx2.IVFFastScanStats_Mcy_at(self, i)

    def Mcy_reservoir_at(self, i):
        return _swigfaiss_avx2.IVFFastScanStats_Mcy_reservoir_at(self, i)

    def __init__(self):
        _swigfaiss_avx2.IVFFastScanStats_swiginit(self, _swigfaiss_avx2.new_IVFFastScanStats())

    def reset(self):
        return _swigfaiss_avx2.IVFFastScanStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IVFFastScanStats

# Register IVFFastScanStats in _swigfaiss_avx2:
_swigfaiss_avx2.IVFFastScanStats_swigregister(IVFFastScanStats)


def round_uint8_per_column(tab, n, d, a_out=None, b_out=None):
    return _swigfaiss_avx2.round_uint8_per_column(tab, n, d, a_out, b_out)

def round_uint8_per_column_multi(tab, m, n, d, a_out=None, b_out=None):
    return _swigfaiss_avx2.round_uint8_per_column_multi(tab, m, n, d, a_out, b_out)

def quantize_LUT_and_bias(nprobe, M, ksub, lut_is_3d, LUT, bias, LUTq, M2, biasq, a_out=None, b_out=None):
    return _swigfaiss_avx2.quantize_LUT_and_bias(nprobe, M, ksub, lut_is_3d, LUT, bias, LUTq, M2, biasq, a_out, b_out)
class IndexBinary(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    d = property(_swigfaiss_avx2.IndexBinary_d_get, _swigfaiss_avx2.IndexBinary_d_set)
    code_size = property(_swigfaiss_avx2.IndexBinary_code_size_get, _swigfaiss_avx2.IndexBinary_code_size_set)
    ntotal = property(_swigfaiss_avx2.IndexBinary_ntotal_get, _swigfaiss_avx2.IndexBinary_ntotal_set)
    verbose = property(_swigfaiss_avx2.IndexBinary_verbose_get, _swigfaiss_avx2.IndexBinary_verbose_set)
    is_trained = property(_swigfaiss_avx2.IndexBinary_is_trained_get, _swigfaiss_avx2.IndexBinary_is_trained_set)
    metric_type = property(_swigfaiss_avx2.IndexBinary_metric_type_get, _swigfaiss_avx2.IndexBinary_metric_type_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinary

    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)

# Register IndexBinary in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinary_swigregister(IndexBinary)

class IndexBinaryFlat(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    xb = property(_swigfaiss_avx2.IndexBinaryFlat_xb_get, _swigfaiss_avx2.IndexBinaryFlat_xb_set)
    use_heap = property(_swigfaiss_avx2.IndexBinaryFlat_use_heap_get, _swigfaiss_avx2.IndexBinaryFlat_use_heap_set)
    query_batch_size = 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):
        _swigfaiss_avx2.IndexBinaryFlat_swiginit(self, _swigfaiss_avx2.new_IndexBinaryFlat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryFlat

# Register IndexBinaryFlat in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryFlat_swigregister(IndexBinaryFlat)

class IndexBinaryIVF(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    invlists = property(_swigfaiss_avx2.IndexBinaryIVF_invlists_get, _swigfaiss_avx2.IndexBinaryIVF_invlists_set)
    own_invlists = property(_swigfaiss_avx2.IndexBinaryIVF_own_invlists_get, _swigfaiss_avx2.IndexBinaryIVF_own_invlists_set)
    nprobe = property(_swigfaiss_avx2.IndexBinaryIVF_nprobe_get, _swigfaiss_avx2.IndexBinaryIVF_nprobe_set)
    max_codes = property(_swigfaiss_avx2.IndexBinaryIVF_max_codes_get, _swigfaiss_avx2.IndexBinaryIVF_max_codes_set)
    use_heap = property(_swigfaiss_avx2.IndexBinaryIVF_use_heap_get, _swigfaiss_avx2.IndexBinaryIVF_use_heap_set)
    direct_map = property(_swigfaiss_avx2.IndexBinaryIVF_direct_map_get, _swigfaiss_avx2.IndexBinaryIVF_direct_map_set)
    quantizer = property(_swigfaiss_avx2.IndexBinaryIVF_quantizer_get, _swigfaiss_avx2.IndexBinaryIVF_quantizer_set)
    nlist = property(_swigfaiss_avx2.IndexBinaryIVF_nlist_get, _swigfaiss_avx2.IndexBinaryIVF_nlist_set)
    own_fields = property(_swigfaiss_avx2.IndexBinaryIVF_own_fields_get, _swigfaiss_avx2.IndexBinaryIVF_own_fields_set)
    cp = property(_swigfaiss_avx2.IndexBinaryIVF_cp_get, _swigfaiss_avx2.IndexBinaryIVF_cp_set)
    clustering_index = property(_swigfaiss_avx2.IndexBinaryIVF_clustering_index_get, _swigfaiss_avx2.IndexBinaryIVF_clustering_index_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryIVF_swiginit(self, _swigfaiss_avx2.new_IndexBinaryIVF(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryIVF

    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 range_search_preassigned(self, n, x, radius, assign, centroid_dis, result):
        return _swigfaiss_avx2.IndexBinaryIVF_range_search_preassigned(self, n, x, radius, assign, centroid_dis, 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)

# Register IndexBinaryIVF in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryIVF_swigregister(IndexBinaryIVF)

class IndexBinaryFromFloat(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    index = property(_swigfaiss_avx2.IndexBinaryFromFloat_index_get, _swigfaiss_avx2.IndexBinaryFromFloat_index_set)
    own_fields = property(_swigfaiss_avx2.IndexBinaryFromFloat_own_fields_get, _swigfaiss_avx2.IndexBinaryFromFloat_own_fields_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryFromFloat_swiginit(self, _swigfaiss_avx2.new_IndexBinaryFromFloat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryFromFloat

    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)

# Register IndexBinaryFromFloat in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryFromFloat_swigregister(IndexBinaryFromFloat)

class IndexBinaryHNSW(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    hnsw = property(_swigfaiss_avx2.IndexBinaryHNSW_hnsw_get, _swigfaiss_avx2.IndexBinaryHNSW_hnsw_set)
    own_fields = property(_swigfaiss_avx2.IndexBinaryHNSW_own_fields_get, _swigfaiss_avx2.IndexBinaryHNSW_own_fields_set)
    storage = property(_swigfaiss_avx2.IndexBinaryHNSW_storage_get, _swigfaiss_avx2.IndexBinaryHNSW_storage_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryHNSW_swiginit(self, _swigfaiss_avx2.new_IndexBinaryHNSW(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryHNSW

    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)

# Register IndexBinaryHNSW in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryHNSW_swigregister(IndexBinaryHNSW)

class IndexBinaryHash(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    invlists = property(_swigfaiss_avx2.IndexBinaryHash_invlists_get, _swigfaiss_avx2.IndexBinaryHash_invlists_set)
    b = property(_swigfaiss_avx2.IndexBinaryHash_b_get, _swigfaiss_avx2.IndexBinaryHash_b_set)
    nflip = property(_swigfaiss_avx2.IndexBinaryHash_nflip_get, _swigfaiss_avx2.IndexBinaryHash_nflip_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryHash_swiginit(self, _swigfaiss_avx2.new_IndexBinaryHash(*args))

    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

# Register IndexBinaryHash in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryHash_swigregister(IndexBinaryHash)

class IndexBinaryHashStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nq = property(_swigfaiss_avx2.IndexBinaryHashStats_nq_get, _swigfaiss_avx2.IndexBinaryHashStats_nq_set)
    n0 = property(_swigfaiss_avx2.IndexBinaryHashStats_n0_get, _swigfaiss_avx2.IndexBinaryHashStats_n0_set)
    nlist = property(_swigfaiss_avx2.IndexBinaryHashStats_nlist_get, _swigfaiss_avx2.IndexBinaryHashStats_nlist_set)
    ndis = property(_swigfaiss_avx2.IndexBinaryHashStats_ndis_get, _swigfaiss_avx2.IndexBinaryHashStats_ndis_set)

    def __init__(self):
        _swigfaiss_avx2.IndexBinaryHashStats_swiginit(self, _swigfaiss_avx2.new_IndexBinaryHashStats())

    def reset(self):
        return _swigfaiss_avx2.IndexBinaryHashStats_reset(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryHashStats

# Register IndexBinaryHashStats in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryHashStats_swigregister(IndexBinaryHashStats)

class IndexBinaryMultiHash(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    storage = property(_swigfaiss_avx2.IndexBinaryMultiHash_storage_get, _swigfaiss_avx2.IndexBinaryMultiHash_storage_set)
    own_fields = property(_swigfaiss_avx2.IndexBinaryMultiHash_own_fields_get, _swigfaiss_avx2.IndexBinaryMultiHash_own_fields_set)
    maps = property(_swigfaiss_avx2.IndexBinaryMultiHash_maps_get, _swigfaiss_avx2.IndexBinaryMultiHash_maps_set)
    nhash = property(_swigfaiss_avx2.IndexBinaryMultiHash_nhash_get, _swigfaiss_avx2.IndexBinaryMultiHash_nhash_set)
    b = property(_swigfaiss_avx2.IndexBinaryMultiHash_b_get, _swigfaiss_avx2.IndexBinaryMultiHash_b_set)
    nflip = property(_swigfaiss_avx2.IndexBinaryMultiHash_nflip_get, _swigfaiss_avx2.IndexBinaryMultiHash_nflip_set)

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryMultiHash_swiginit(self, _swigfaiss_avx2.new_IndexBinaryMultiHash(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryMultiHash

    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)

# Register IndexBinaryMultiHash in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryMultiHash_swigregister(IndexBinaryMultiHash)

class ThreadedIndexBase(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

    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)
    own_fields = property(_swigfaiss_avx2.ThreadedIndexBase_own_fields_get, _swigfaiss_avx2.ThreadedIndexBase_own_fields_set)

# Register ThreadedIndexBase in _swigfaiss_avx2:
_swigfaiss_avx2.ThreadedIndexBase_swigregister(ThreadedIndexBase)

class ThreadedIndexBaseBinary(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

    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)
    own_fields = property(_swigfaiss_avx2.ThreadedIndexBaseBinary_own_fields_get, _swigfaiss_avx2.ThreadedIndexBaseBinary_own_fields_set)

# Register ThreadedIndexBaseBinary in _swigfaiss_avx2:
_swigfaiss_avx2.ThreadedIndexBaseBinary_swigregister(ThreadedIndexBaseBinary)

class IndexShards(ThreadedIndexBase):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexShards_swiginit(self, _swigfaiss_avx2.new_IndexShards(*args))

    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)
    successive_ids = property(_swigfaiss_avx2.IndexShards_successive_ids_get, _swigfaiss_avx2.IndexShards_successive_ids_set)

    def syncWithSubIndexes(self):
        return _swigfaiss_avx2.IndexShards_syncWithSubIndexes(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexShards

# Register IndexShards in _swigfaiss_avx2:
_swigfaiss_avx2.IndexShards_swigregister(IndexShards)

class IndexBinaryShards(ThreadedIndexBaseBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryShards_swiginit(self, _swigfaiss_avx2.new_IndexBinaryShards(*args))

    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)
    successive_ids = property(_swigfaiss_avx2.IndexBinaryShards_successive_ids_get, _swigfaiss_avx2.IndexBinaryShards_successive_ids_set)

    def syncWithSubIndexes(self):
        return _swigfaiss_avx2.IndexBinaryShards_syncWithSubIndexes(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryShards

# Register IndexBinaryShards in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryShards_swigregister(IndexBinaryShards)

class IndexReplicas(ThreadedIndexBase):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexReplicas_swiginit(self, _swigfaiss_avx2.new_IndexReplicas(*args))

    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)

    def syncWithSubIndexes(self):
        return _swigfaiss_avx2.IndexReplicas_syncWithSubIndexes(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexReplicas

# Register IndexReplicas in _swigfaiss_avx2:
_swigfaiss_avx2.IndexReplicas_swigregister(IndexReplicas)

class IndexBinaryReplicas(ThreadedIndexBaseBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryReplicas_swiginit(self, _swigfaiss_avx2.new_IndexBinaryReplicas(*args))

    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)

    def syncWithSubIndexes(self):
        return _swigfaiss_avx2.IndexBinaryReplicas_syncWithSubIndexes(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_IndexBinaryReplicas

# Register IndexBinaryReplicas in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryReplicas_swigregister(IndexBinaryReplicas)

class IndexSplitVectors(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    own_fields = property(_swigfaiss_avx2.IndexSplitVectors_own_fields_get, _swigfaiss_avx2.IndexSplitVectors_own_fields_set)
    threaded = property(_swigfaiss_avx2.IndexSplitVectors_threaded_get, _swigfaiss_avx2.IndexSplitVectors_threaded_set)
    sub_indexes = property(_swigfaiss_avx2.IndexSplitVectors_sub_indexes_get, _swigfaiss_avx2.IndexSplitVectors_sub_indexes_set)
    sum_d = property(_swigfaiss_avx2.IndexSplitVectors_sum_d_get, _swigfaiss_avx2.IndexSplitVectors_sum_d_set)

    def __init__(self, d, threaded=False):
        _swigfaiss_avx2.IndexSplitVectors_swiginit(self, _swigfaiss_avx2.new_IndexSplitVectors(d, threaded))

    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

# Register IndexSplitVectors in _swigfaiss_avx2:
_swigfaiss_avx2.IndexSplitVectors_swigregister(IndexSplitVectors)

class IndexIDMap(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    index = property(_swigfaiss_avx2.IndexIDMap_index_get, _swigfaiss_avx2.IndexIDMap_index_set)
    own_fields = property(_swigfaiss_avx2.IndexIDMap_own_fields_get, _swigfaiss_avx2.IndexIDMap_own_fields_set)
    id_map = 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

    def __init__(self, *args):
        _swigfaiss_avx2.IndexIDMap_swiginit(self, _swigfaiss_avx2.new_IndexIDMap(*args))

# Register IndexIDMap in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIDMap_swigregister(IndexIDMap)

class IndexBinaryIDMap(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    index = property(_swigfaiss_avx2.IndexBinaryIDMap_index_get, _swigfaiss_avx2.IndexBinaryIDMap_index_set)
    own_fields = property(_swigfaiss_avx2.IndexBinaryIDMap_own_fields_get, _swigfaiss_avx2.IndexBinaryIDMap_own_fields_set)
    id_map = 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

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryIDMap_swiginit(self, _swigfaiss_avx2.new_IndexBinaryIDMap(*args))

# Register IndexBinaryIDMap in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryIDMap_swigregister(IndexBinaryIDMap)

class IndexIDMap2(IndexIDMap):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    rev_map = 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

    def __init__(self, *args):
        _swigfaiss_avx2.IndexIDMap2_swiginit(self, _swigfaiss_avx2.new_IndexIDMap2(*args))

# Register IndexIDMap2 in _swigfaiss_avx2:
_swigfaiss_avx2.IndexIDMap2_swigregister(IndexIDMap2)

class IndexBinaryIDMap2(IndexBinaryIDMap):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    rev_map = 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

    def __init__(self, *args):
        _swigfaiss_avx2.IndexBinaryIDMap2_swiginit(self, _swigfaiss_avx2.new_IndexBinaryIDMap2(*args))

# Register IndexBinaryIDMap2 in _swigfaiss_avx2:
_swigfaiss_avx2.IndexBinaryIDMap2_swigregister(IndexBinaryIDMap2)

class RangeSearchResult(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nq = property(_swigfaiss_avx2.RangeSearchResult_nq_get, _swigfaiss_avx2.RangeSearchResult_nq_set)
    lims = property(_swigfaiss_avx2.RangeSearchResult_lims_get, _swigfaiss_avx2.RangeSearchResult_lims_set)
    labels = property(_swigfaiss_avx2.RangeSearchResult_labels_get, _swigfaiss_avx2.RangeSearchResult_labels_set)
    distances = property(_swigfaiss_avx2.RangeSearchResult_distances_get, _swigfaiss_avx2.RangeSearchResult_distances_set)
    buffer_size = property(_swigfaiss_avx2.RangeSearchResult_buffer_size_get, _swigfaiss_avx2.RangeSearchResult_buffer_size_set)

    def __init__(self, nq, alloc_lims=True):
        _swigfaiss_avx2.RangeSearchResult_swiginit(self, _swigfaiss_avx2.new_RangeSearchResult(nq, alloc_lims))

    def do_allocation(self):
        return _swigfaiss_avx2.RangeSearchResult_do_allocation(self)
    __swig_destroy__ = _swigfaiss_avx2.delete_RangeSearchResult

# Register RangeSearchResult in _swigfaiss_avx2:
_swigfaiss_avx2.RangeSearchResult_swigregister(RangeSearchResult)

class IDSelector(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    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

# Register IDSelector in _swigfaiss_avx2:
_swigfaiss_avx2.IDSelector_swigregister(IDSelector)

class IDSelectorRange(IDSelector):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    imin = property(_swigfaiss_avx2.IDSelectorRange_imin_get, _swigfaiss_avx2.IDSelectorRange_imin_set)
    imax = property(_swigfaiss_avx2.IDSelectorRange_imax_get, _swigfaiss_avx2.IDSelectorRange_imax_set)

    def __init__(self, imin, imax):
        _swigfaiss_avx2.IDSelectorRange_swiginit(self, _swigfaiss_avx2.new_IDSelectorRange(imin, imax))

    def is_member(self, id):
        return _swigfaiss_avx2.IDSelectorRange_is_member(self, id)
    __swig_destroy__ = _swigfaiss_avx2.delete_IDSelectorRange

# Register IDSelectorRange in _swigfaiss_avx2:
_swigfaiss_avx2.IDSelectorRange_swigregister(IDSelectorRange)

class IDSelectorArray(IDSelector):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    n = property(_swigfaiss_avx2.IDSelectorArray_n_get, _swigfaiss_avx2.IDSelectorArray_n_set)
    ids = property(_swigfaiss_avx2.IDSelectorArray_ids_get, _swigfaiss_avx2.IDSelectorArray_ids_set)

    def __init__(self, n, ids):
        _swigfaiss_avx2.IDSelectorArray_swiginit(self, _swigfaiss_avx2.new_IDSelectorArray(n, ids))

    def is_member(self, id):
        return _swigfaiss_avx2.IDSelectorArray_is_member(self, id)
    __swig_destroy__ = _swigfaiss_avx2.delete_IDSelectorArray

# Register IDSelectorArray in _swigfaiss_avx2:
_swigfaiss_avx2.IDSelectorArray_swigregister(IDSelectorArray)

class IDSelectorBatch(IDSelector):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nbits = property(_swigfaiss_avx2.IDSelectorBatch_nbits_get, _swigfaiss_avx2.IDSelectorBatch_nbits_set)
    mask = property(_swigfaiss_avx2.IDSelectorBatch_mask_get, _swigfaiss_avx2.IDSelectorBatch_mask_set)

    def __init__(self, n, indices):
        _swigfaiss_avx2.IDSelectorBatch_swiginit(self, _swigfaiss_avx2.new_IDSelectorBatch(n, indices))

    def is_member(self, id):
        return _swigfaiss_avx2.IDSelectorBatch_is_member(self, id)
    __swig_destroy__ = _swigfaiss_avx2.delete_IDSelectorBatch

# Register IDSelectorBatch in _swigfaiss_avx2:
_swigfaiss_avx2.IDSelectorBatch_swigregister(IDSelectorBatch)

class BufferList(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    buffer_size = property(_swigfaiss_avx2.BufferList_buffer_size_get, _swigfaiss_avx2.BufferList_buffer_size_set)
    buffers = property(_swigfaiss_avx2.BufferList_buffers_get, _swigfaiss_avx2.BufferList_buffers_set)
    wp = property(_swigfaiss_avx2.BufferList_wp_get, _swigfaiss_avx2.BufferList_wp_set)

    def __init__(self, buffer_size):
        _swigfaiss_avx2.BufferList_swiginit(self, _swigfaiss_avx2.new_BufferList(buffer_size))
    __swig_destroy__ = _swigfaiss_avx2.delete_BufferList

    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)

# Register BufferList in _swigfaiss_avx2:
_swigfaiss_avx2.BufferList_swigregister(BufferList)

class RangeQueryResult(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    qno = property(_swigfaiss_avx2.RangeQueryResult_qno_get, _swigfaiss_avx2.RangeQueryResult_qno_set)
    nres = property(_swigfaiss_avx2.RangeQueryResult_nres_get, _swigfaiss_avx2.RangeQueryResult_nres_set)
    pres = 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):
        _swigfaiss_avx2.RangeQueryResult_swiginit(self, _swigfaiss_avx2.new_RangeQueryResult())
    __swig_destroy__ = _swigfaiss_avx2.delete_RangeQueryResult

# Register RangeQueryResult in _swigfaiss_avx2:
_swigfaiss_avx2.RangeQueryResult_swigregister(RangeQueryResult)

class RangeSearchPartialResult(BufferList):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    res = property(_swigfaiss_avx2.RangeSearchPartialResult_res_get, _swigfaiss_avx2.RangeSearchPartialResult_res_set)

    def __init__(self, res_in):
        _swigfaiss_avx2.RangeSearchPartialResult_swiginit(self, _swigfaiss_avx2.new_RangeSearchPartialResult(res_in))
    queries = 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)

    @staticmethod
    def merge(partial_results, do_delete=True):
        return _swigfaiss_avx2.RangeSearchPartialResult_merge(partial_results, do_delete)
    __swig_destroy__ = _swigfaiss_avx2.delete_RangeSearchPartialResult

# Register RangeSearchPartialResult in _swigfaiss_avx2:
_swigfaiss_avx2.RangeSearchPartialResult_swigregister(RangeSearchPartialResult)

def RangeSearchPartialResult_merge(partial_results, do_delete=True):
    return _swigfaiss_avx2.RangeSearchPartialResult_merge(partial_results, do_delete)

class DistanceComputer(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    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

# Register DistanceComputer in _swigfaiss_avx2:
_swigfaiss_avx2.DistanceComputer_swigregister(DistanceComputer)

class InterruptCallback(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    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

    @staticmethod
    def clear_instance():
        return _swigfaiss_avx2.InterruptCallback_clear_instance()

    @staticmethod
    def check():
        return _swigfaiss_avx2.InterruptCallback_check()

    @staticmethod
    def is_interrupted():
        return _swigfaiss_avx2.InterruptCallback_is_interrupted()

    @staticmethod
    def get_period_hint(flops):
        return _swigfaiss_avx2.InterruptCallback_get_period_hint(flops)

# Register InterruptCallback in _swigfaiss_avx2:
_swigfaiss_avx2.InterruptCallback_swigregister(InterruptCallback)

def InterruptCallback_clear_instance():
    return _swigfaiss_avx2.InterruptCallback_clear_instance()

def InterruptCallback_check():
    return _swigfaiss_avx2.InterruptCallback_check()

def InterruptCallback_is_interrupted():
    return _swigfaiss_avx2.InterruptCallback_is_interrupted()

def InterruptCallback_get_period_hint(flops):
    return _swigfaiss_avx2.InterruptCallback_get_period_hint(flops)

class VisitedTable(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    visited = property(_swigfaiss_avx2.VisitedTable_visited_get, _swigfaiss_avx2.VisitedTable_visited_set)
    visno = property(_swigfaiss_avx2.VisitedTable_visno_get, _swigfaiss_avx2.VisitedTable_visno_set)

    def __init__(self, size):
        _swigfaiss_avx2.VisitedTable_swiginit(self, _swigfaiss_avx2.new_VisitedTable(size))

    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

# Register VisitedTable in _swigfaiss_avx2:
_swigfaiss_avx2.VisitedTable_swigregister(VisitedTable)

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):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuClonerOptions_swiginit(self, _swigfaiss_avx2.new_GpuClonerOptions())
    indicesOptions = property(_swigfaiss_avx2.GpuClonerOptions_indicesOptions_get, _swigfaiss_avx2.GpuClonerOptions_indicesOptions_set)
    useFloat16CoarseQuantizer = property(_swigfaiss_avx2.GpuClonerOptions_useFloat16CoarseQuantizer_get, _swigfaiss_avx2.GpuClonerOptions_useFloat16CoarseQuantizer_set)
    useFloat16 = property(_swigfaiss_avx2.GpuClonerOptions_useFloat16_get, _swigfaiss_avx2.GpuClonerOptions_useFloat16_set)
    usePrecomputed = property(_swigfaiss_avx2.GpuClonerOptions_usePrecomputed_get, _swigfaiss_avx2.GpuClonerOptions_usePrecomputed_set)
    reserveVecs = property(_swigfaiss_avx2.GpuClonerOptions_reserveVecs_get, _swigfaiss_avx2.GpuClonerOptions_reserveVecs_set)
    storeTransposed = property(_swigfaiss_avx2.GpuClonerOptions_storeTransposed_get, _swigfaiss_avx2.GpuClonerOptions_storeTransposed_set)
    verbose = property(_swigfaiss_avx2.GpuClonerOptions_verbose_get, _swigfaiss_avx2.GpuClonerOptions_verbose_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuClonerOptions

# Register GpuClonerOptions in _swigfaiss_avx2:
_swigfaiss_avx2.GpuClonerOptions_swigregister(GpuClonerOptions)

class GpuMultipleClonerOptions(GpuClonerOptions):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuMultipleClonerOptions_swiginit(self, _swigfaiss_avx2.new_GpuMultipleClonerOptions())
    shard = property(_swigfaiss_avx2.GpuMultipleClonerOptions_shard_get, _swigfaiss_avx2.GpuMultipleClonerOptions_shard_set)
    shard_type = property(_swigfaiss_avx2.GpuMultipleClonerOptions_shard_type_get, _swigfaiss_avx2.GpuMultipleClonerOptions_shard_type_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuMultipleClonerOptions

# Register GpuMultipleClonerOptions in _swigfaiss_avx2:
_swigfaiss_avx2.GpuMultipleClonerOptions_swigregister(GpuMultipleClonerOptions)

class GpuIndexConfig(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuIndexConfig_swiginit(self, _swigfaiss_avx2.new_GpuIndexConfig())
    device = property(_swigfaiss_avx2.GpuIndexConfig_device_get, _swigfaiss_avx2.GpuIndexConfig_device_set)
    memorySpace = property(_swigfaiss_avx2.GpuIndexConfig_memorySpace_get, _swigfaiss_avx2.GpuIndexConfig_memorySpace_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexConfig

# Register GpuIndexConfig in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexConfig_swigregister(GpuIndexConfig)

class GpuIndex(Index):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    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 assign(self, n, x, labels, k=1):
        return _swigfaiss_avx2.GpuIndex_assign(self, n, x, labels, k)

    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

# Register GpuIndex in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndex_swigregister(GpuIndex)

class GpuIndexFlatConfig(GpuIndexConfig):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuIndexFlatConfig_swiginit(self, _swigfaiss_avx2.new_GpuIndexFlatConfig())
    useFloat16 = property(_swigfaiss_avx2.GpuIndexFlatConfig_useFloat16_get, _swigfaiss_avx2.GpuIndexFlatConfig_useFloat16_set)
    storeTransposed = property(_swigfaiss_avx2.GpuIndexFlatConfig_storeTransposed_get, _swigfaiss_avx2.GpuIndexFlatConfig_storeTransposed_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexFlatConfig

# Register GpuIndexFlatConfig in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexFlatConfig_swigregister(GpuIndexFlatConfig)

class GpuIndexFlat(GpuIndex):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.GpuIndexFlat_swiginit(self, _swigfaiss_avx2.new_GpuIndexFlat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexFlat

    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)

# Register GpuIndexFlat in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexFlat_swigregister(GpuIndexFlat)

class GpuIndexFlatL2(GpuIndexFlat):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.GpuIndexFlatL2_swiginit(self, _swigfaiss_avx2.new_GpuIndexFlatL2(*args))

    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

# Register GpuIndexFlatL2 in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexFlatL2_swigregister(GpuIndexFlatL2)

class GpuIndexFlatIP(GpuIndexFlat):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.GpuIndexFlatIP_swiginit(self, _swigfaiss_avx2.new_GpuIndexFlatIP(*args))

    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

# Register GpuIndexFlatIP in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexFlatIP_swigregister(GpuIndexFlatIP)

class GpuIndexIVFConfig(GpuIndexConfig):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuIndexIVFConfig_swiginit(self, _swigfaiss_avx2.new_GpuIndexIVFConfig())
    indicesOptions = property(_swigfaiss_avx2.GpuIndexIVFConfig_indicesOptions_get, _swigfaiss_avx2.GpuIndexIVFConfig_indicesOptions_set)
    flatConfig = property(_swigfaiss_avx2.GpuIndexIVFConfig_flatConfig_get, _swigfaiss_avx2.GpuIndexIVFConfig_flatConfig_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFConfig

# Register GpuIndexIVFConfig in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexIVFConfig_swigregister(GpuIndexIVFConfig)

class GpuIndexIVF(GpuIndex):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

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

    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 getListLength(self, listId):
        return _swigfaiss_avx2.GpuIndexIVF_getListLength(self, listId)

    def getListVectorData(self, listId, gpuFormat=False):
        return _swigfaiss_avx2.GpuIndexIVF_getListVectorData(self, listId, gpuFormat)

    def getListIndices(self, listId):
        return _swigfaiss_avx2.GpuIndexIVF_getListIndices(self, listId)

    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)
    cp = property(_swigfaiss_avx2.GpuIndexIVF_cp_get, _swigfaiss_avx2.GpuIndexIVF_cp_set)
    nlist = property(_swigfaiss_avx2.GpuIndexIVF_nlist_get, _swigfaiss_avx2.GpuIndexIVF_nlist_set)
    nprobe = property(_swigfaiss_avx2.GpuIndexIVF_nprobe_get, _swigfaiss_avx2.GpuIndexIVF_nprobe_set)
    quantizer = property(_swigfaiss_avx2.GpuIndexIVF_quantizer_get, _swigfaiss_avx2.GpuIndexIVF_quantizer_set)

# Register GpuIndexIVF in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexIVF_swigregister(GpuIndexIVF)

class GpuIndexIVFPQConfig(GpuIndexIVFConfig):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuIndexIVFPQConfig_swiginit(self, _swigfaiss_avx2.new_GpuIndexIVFPQConfig())
    useFloat16LookupTables = property(_swigfaiss_avx2.GpuIndexIVFPQConfig_useFloat16LookupTables_get, _swigfaiss_avx2.GpuIndexIVFPQConfig_useFloat16LookupTables_set)
    usePrecomputedTables = property(_swigfaiss_avx2.GpuIndexIVFPQConfig_usePrecomputedTables_get, _swigfaiss_avx2.GpuIndexIVFPQConfig_usePrecomputedTables_set)
    interleavedLayout = property(_swigfaiss_avx2.GpuIndexIVFPQConfig_interleavedLayout_get, _swigfaiss_avx2.GpuIndexIVFPQConfig_interleavedLayout_set)
    useMMCodeDistance = property(_swigfaiss_avx2.GpuIndexIVFPQConfig_useMMCodeDistance_get, _swigfaiss_avx2.GpuIndexIVFPQConfig_useMMCodeDistance_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFPQConfig

# Register GpuIndexIVFPQConfig in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexIVFPQConfig_swigregister(GpuIndexIVFPQConfig)

class GpuIndexIVFPQ(GpuIndexIVF):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.GpuIndexIVFPQ_swiginit(self, _swigfaiss_avx2.new_GpuIndexIVFPQ(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFPQ

    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 getListVectorData(self, listId, gpuFormat=False):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getListVectorData(self, listId, gpuFormat)

    def getListIndices(self, listId):
        return _swigfaiss_avx2.GpuIndexIVFPQ_getListIndices(self, listId)
    pq = property(_swigfaiss_avx2.GpuIndexIVFPQ_pq_get, _swigfaiss_avx2.GpuIndexIVFPQ_pq_set)

# Register GpuIndexIVFPQ in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexIVFPQ_swigregister(GpuIndexIVFPQ)

class GpuIndexIVFFlatConfig(GpuIndexIVFConfig):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuIndexIVFFlatConfig_swiginit(self, _swigfaiss_avx2.new_GpuIndexIVFFlatConfig())
    interleavedLayout = property(_swigfaiss_avx2.GpuIndexIVFFlatConfig_interleavedLayout_get, _swigfaiss_avx2.GpuIndexIVFFlatConfig_interleavedLayout_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFFlatConfig

# Register GpuIndexIVFFlatConfig in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexIVFFlatConfig_swigregister(GpuIndexIVFFlatConfig)

class GpuIndexIVFFlat(GpuIndexIVF):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.GpuIndexIVFFlat_swiginit(self, _swigfaiss_avx2.new_GpuIndexIVFFlat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFFlat

    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)

    def getListLength(self, listId):
        return _swigfaiss_avx2.GpuIndexIVFFlat_getListLength(self, listId)

    def getListVectorData(self, listId, gpuFormat=False):
        return _swigfaiss_avx2.GpuIndexIVFFlat_getListVectorData(self, listId, gpuFormat)

    def getListIndices(self, listId):
        return _swigfaiss_avx2.GpuIndexIVFFlat_getListIndices(self, listId)

# Register GpuIndexIVFFlat in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexIVFFlat_swigregister(GpuIndexIVFFlat)

class GpuIndexIVFScalarQuantizerConfig(GpuIndexIVFConfig):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuIndexIVFScalarQuantizerConfig_swiginit(self, _swigfaiss_avx2.new_GpuIndexIVFScalarQuantizerConfig())
    interleavedLayout = property(_swigfaiss_avx2.GpuIndexIVFScalarQuantizerConfig_interleavedLayout_get, _swigfaiss_avx2.GpuIndexIVFScalarQuantizerConfig_interleavedLayout_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFScalarQuantizerConfig

# Register GpuIndexIVFScalarQuantizerConfig in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexIVFScalarQuantizerConfig_swigregister(GpuIndexIVFScalarQuantizerConfig)

class GpuIndexIVFScalarQuantizer(GpuIndexIVF):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_swiginit(self, _swigfaiss_avx2.new_GpuIndexIVFScalarQuantizer(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexIVFScalarQuantizer

    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)

    def getListLength(self, listId):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_getListLength(self, listId)

    def getListVectorData(self, listId, gpuFormat=False):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_getListVectorData(self, listId, gpuFormat)

    def getListIndices(self, listId):
        return _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_getListIndices(self, listId)
    sq = property(_swigfaiss_avx2.GpuIndexIVFScalarQuantizer_sq_get, _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_sq_set)
    by_residual = property(_swigfaiss_avx2.GpuIndexIVFScalarQuantizer_by_residual_get, _swigfaiss_avx2.GpuIndexIVFScalarQuantizer_by_residual_set)

# Register GpuIndexIVFScalarQuantizer in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexIVFScalarQuantizer_swigregister(GpuIndexIVFScalarQuantizer)

class GpuIndexBinaryFlatConfig(GpuIndexConfig):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuIndexBinaryFlatConfig_swiginit(self, _swigfaiss_avx2.new_GpuIndexBinaryFlatConfig())
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexBinaryFlatConfig

# Register GpuIndexBinaryFlatConfig in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexBinaryFlatConfig_swigregister(GpuIndexBinaryFlatConfig)

class GpuIndexBinaryFlat(IndexBinary):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, *args):
        _swigfaiss_avx2.GpuIndexBinaryFlat_swiginit(self, _swigfaiss_avx2.new_GpuIndexBinaryFlat(*args))
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuIndexBinaryFlat

    def getDevice(self):
        return _swigfaiss_avx2.GpuIndexBinaryFlat_getDevice(self)

    def getResources(self):
        return _swigfaiss_avx2.GpuIndexBinaryFlat_getResources(self)

    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)

# Register GpuIndexBinaryFlat in _swigfaiss_avx2:
_swigfaiss_avx2.GpuIndexBinaryFlat_swigregister(GpuIndexBinaryFlat)

DistanceDataType_F32 = _swigfaiss_avx2.DistanceDataType_F32
DistanceDataType_F16 = _swigfaiss_avx2.DistanceDataType_F16
IndicesDataType_I64 = _swigfaiss_avx2.IndicesDataType_I64
IndicesDataType_I32 = _swigfaiss_avx2.IndicesDataType_I32
class GpuDistanceParams(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self):
        _swigfaiss_avx2.GpuDistanceParams_swiginit(self, _swigfaiss_avx2.new_GpuDistanceParams())
    metric = property(_swigfaiss_avx2.GpuDistanceParams_metric_get, _swigfaiss_avx2.GpuDistanceParams_metric_set)
    metricArg = property(_swigfaiss_avx2.GpuDistanceParams_metricArg_get, _swigfaiss_avx2.GpuDistanceParams_metricArg_set)
    k = property(_swigfaiss_avx2.GpuDistanceParams_k_get, _swigfaiss_avx2.GpuDistanceParams_k_set)
    dims = property(_swigfaiss_avx2.GpuDistanceParams_dims_get, _swigfaiss_avx2.GpuDistanceParams_dims_set)
    vectors = property(_swigfaiss_avx2.GpuDistanceParams_vectors_get, _swigfaiss_avx2.GpuDistanceParams_vectors_set)
    vectorType = property(_swigfaiss_avx2.GpuDistanceParams_vectorType_get, _swigfaiss_avx2.GpuDistanceParams_vectorType_set)
    vectorsRowMajor = property(_swigfaiss_avx2.GpuDistanceParams_vectorsRowMajor_get, _swigfaiss_avx2.GpuDistanceParams_vectorsRowMajor_set)
    numVectors = property(_swigfaiss_avx2.GpuDistanceParams_numVectors_get, _swigfaiss_avx2.GpuDistanceParams_numVectors_set)
    vectorNorms = property(_swigfaiss_avx2.GpuDistanceParams_vectorNorms_get, _swigfaiss_avx2.GpuDistanceParams_vectorNorms_set)
    queries = property(_swigfaiss_avx2.GpuDistanceParams_queries_get, _swigfaiss_avx2.GpuDistanceParams_queries_set)
    queryType = property(_swigfaiss_avx2.GpuDistanceParams_queryType_get, _swigfaiss_avx2.GpuDistanceParams_queryType_set)
    queriesRowMajor = property(_swigfaiss_avx2.GpuDistanceParams_queriesRowMajor_get, _swigfaiss_avx2.GpuDistanceParams_queriesRowMajor_set)
    numQueries = property(_swigfaiss_avx2.GpuDistanceParams_numQueries_get, _swigfaiss_avx2.GpuDistanceParams_numQueries_set)
    outDistances = property(_swigfaiss_avx2.GpuDistanceParams_outDistances_get, _swigfaiss_avx2.GpuDistanceParams_outDistances_set)
    ignoreOutDistances = property(_swigfaiss_avx2.GpuDistanceParams_ignoreOutDistances_get, _swigfaiss_avx2.GpuDistanceParams_ignoreOutDistances_set)
    outIndicesType = property(_swigfaiss_avx2.GpuDistanceParams_outIndicesType_get, _swigfaiss_avx2.GpuDistanceParams_outIndicesType_set)
    outIndices = property(_swigfaiss_avx2.GpuDistanceParams_outIndices_get, _swigfaiss_avx2.GpuDistanceParams_outIndices_set)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuDistanceParams

# Register GpuDistanceParams in _swigfaiss_avx2:
_swigfaiss_avx2.GpuDistanceParams_swigregister(GpuDistanceParams)


def bfKnn(resources, args):
    return _swigfaiss_avx2.bfKnn(resources, args)

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)

def downcast_index(index):
    return _swigfaiss_avx2.downcast_index(index)

def downcast_VectorTransform(vt):
    return _swigfaiss_avx2.downcast_VectorTransform(vt)

def downcast_IndexBinary(index):
    return _swigfaiss_avx2.downcast_IndexBinary(index)

def downcast_InvertedLists(il):
    return _swigfaiss_avx2.downcast_InvertedLists(il)

def write_index(*args):
    return _swigfaiss_avx2.write_index(*args)

def write_index_binary(*args):
    return _swigfaiss_avx2.write_index_binary(*args)

def read_index(*args):
    return _swigfaiss_avx2.read_index(*args)

def read_index_binary(*args):
    return _swigfaiss_avx2.read_index_binary(*args)

def write_VectorTransform(vt, fname):
    return _swigfaiss_avx2.write_VectorTransform(vt, fname)

def read_VectorTransform(fname):
    return _swigfaiss_avx2.read_VectorTransform(fname)

def read_ProductQuantizer(*args):
    return _swigfaiss_avx2.read_ProductQuantizer(*args)

def write_ProductQuantizer(*args):
    return _swigfaiss_avx2.write_ProductQuantizer(*args)

def write_InvertedLists(ils, f):
    return _swigfaiss_avx2.write_InvertedLists(ils, f)

def read_InvertedLists(reader, io_flags=0):
    return _swigfaiss_avx2.read_InvertedLists(reader, io_flags)

def clone_index(arg1):
    return _swigfaiss_avx2.clone_index(arg1)
class Cloner(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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

    def __init__(self):
        _swigfaiss_avx2.Cloner_swiginit(self, _swigfaiss_avx2.new_Cloner())

# Register Cloner in _swigfaiss_avx2:
_swigfaiss_avx2.Cloner_swigregister(Cloner)
IO_FLAG_READ_ONLY = cvar.IO_FLAG_READ_ONLY
IO_FLAG_ONDISK_SAME_DIR = cvar.IO_FLAG_ONDISK_SAME_DIR
IO_FLAG_SKIP_IVF_DATA = cvar.IO_FLAG_SKIP_IVF_DATA
IO_FLAG_MMAP = cvar.IO_FLAG_MMAP

class AutoTuneCriterion(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")

    def __init__(self, *args, **kwargs):
        raise AttributeError("No constructor defined - class is abstract")
    __repr__ = _swig_repr
    nq = property(_swigfaiss_avx2.AutoTuneCriterion_nq_get, _swigfaiss_avx2.AutoTuneCriterion_nq_set)
    nnn = property(_swigfaiss_avx2.AutoTuneCriterion_nnn_get, _swigfaiss_avx2.AutoTuneCriterion_nnn_set)
    gt_nnn = property(_swigfaiss_avx2.AutoTuneCriterion_gt_nnn_get, _swigfaiss_avx2.AutoTuneCriterion_gt_nnn_set)
    gt_D = property(_swigfaiss_avx2.AutoTuneCriterion_gt_D_get, _swigfaiss_avx2.AutoTuneCriterion_gt_D_set)
    gt_I = 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

# Register AutoTuneCriterion in _swigfaiss_avx2:
_swigfaiss_avx2.AutoTuneCriterion_swigregister(AutoTuneCriterion)

class OneRecallAtRCriterion(AutoTuneCriterion):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    R = property(_swigfaiss_avx2.OneRecallAtRCriterion_R_get, _swigfaiss_avx2.OneRecallAtRCriterion_R_set)

    def __init__(self, nq, R):
        _swigfaiss_avx2.OneRecallAtRCriterion_swiginit(self, _swigfaiss_avx2.new_OneRecallAtRCriterion(nq, R))

    def evaluate(self, D, I):
        return _swigfaiss_avx2.OneRecallAtRCriterion_evaluate(self, D, I)
    __swig_destroy__ = _swigfaiss_avx2.delete_OneRecallAtRCriterion

# Register OneRecallAtRCriterion in _swigfaiss_avx2:
_swigfaiss_avx2.OneRecallAtRCriterion_swigregister(OneRecallAtRCriterion)

class IntersectionCriterion(AutoTuneCriterion):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    R = property(_swigfaiss_avx2.IntersectionCriterion_R_get, _swigfaiss_avx2.IntersectionCriterion_R_set)

    def __init__(self, nq, R):
        _swigfaiss_avx2.IntersectionCriterion_swiginit(self, _swigfaiss_avx2.new_IntersectionCriterion(nq, R))

    def evaluate(self, D, I):
        return _swigfaiss_avx2.IntersectionCriterion_evaluate(self, D, I)
    __swig_destroy__ = _swigfaiss_avx2.delete_IntersectionCriterion

# Register IntersectionCriterion in _swigfaiss_avx2:
_swigfaiss_avx2.IntersectionCriterion_swigregister(IntersectionCriterion)

class OperatingPoint(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    perf = property(_swigfaiss_avx2.OperatingPoint_perf_get, _swigfaiss_avx2.OperatingPoint_perf_set)
    t = property(_swigfaiss_avx2.OperatingPoint_t_get, _swigfaiss_avx2.OperatingPoint_t_set)
    key = property(_swigfaiss_avx2.OperatingPoint_key_get, _swigfaiss_avx2.OperatingPoint_key_set)
    cno = property(_swigfaiss_avx2.OperatingPoint_cno_get, _swigfaiss_avx2.OperatingPoint_cno_set)

    def __init__(self):
        _swigfaiss_avx2.OperatingPoint_swiginit(self, _swigfaiss_avx2.new_OperatingPoint())
    __swig_destroy__ = _swigfaiss_avx2.delete_OperatingPoint

# Register OperatingPoint in _swigfaiss_avx2:
_swigfaiss_avx2.OperatingPoint_swigregister(OperatingPoint)

class OperatingPoints(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    all_pts = property(_swigfaiss_avx2.OperatingPoints_all_pts_get, _swigfaiss_avx2.OperatingPoints_all_pts_set)
    optimal_pts = property(_swigfaiss_avx2.OperatingPoints_optimal_pts_get, _swigfaiss_avx2.OperatingPoints_optimal_pts_set)

    def __init__(self):
        _swigfaiss_avx2.OperatingPoints_swiginit(self, _swigfaiss_avx2.new_OperatingPoints())

    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

# Register OperatingPoints in _swigfaiss_avx2:
_swigfaiss_avx2.OperatingPoints_swigregister(OperatingPoints)

class ParameterRange(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    name = property(_swigfaiss_avx2.ParameterRange_name_get, _swigfaiss_avx2.ParameterRange_name_set)
    values = property(_swigfaiss_avx2.ParameterRange_values_get, _swigfaiss_avx2.ParameterRange_values_set)

    def __init__(self):
        _swigfaiss_avx2.ParameterRange_swiginit(self, _swigfaiss_avx2.new_ParameterRange())
    __swig_destroy__ = _swigfaiss_avx2.delete_ParameterRange

# Register ParameterRange in _swigfaiss_avx2:
_swigfaiss_avx2.ParameterRange_swigregister(ParameterRange)

class ParameterSpace(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    parameter_ranges = property(_swigfaiss_avx2.ParameterSpace_parameter_ranges_get, _swigfaiss_avx2.ParameterSpace_parameter_ranges_set)
    verbose = property(_swigfaiss_avx2.ParameterSpace_verbose_get, _swigfaiss_avx2.ParameterSpace_verbose_set)
    n_experiments = property(_swigfaiss_avx2.ParameterSpace_n_experiments_get, _swigfaiss_avx2.ParameterSpace_n_experiments_set)
    batchsize = property(_swigfaiss_avx2.ParameterSpace_batchsize_get, _swigfaiss_avx2.ParameterSpace_batchsize_set)
    thread_over_batches = property(_swigfaiss_avx2.ParameterSpace_thread_over_batches_get, _swigfaiss_avx2.ParameterSpace_thread_over_batches_set)
    min_test_duration = property(_swigfaiss_avx2.ParameterSpace_min_test_duration_get, _swigfaiss_avx2.ParameterSpace_min_test_duration_set)

    def __init__(self):
        _swigfaiss_avx2.ParameterSpace_swiginit(self, _swigfaiss_avx2.new_ParameterSpace())

    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

# Register ParameterSpace in _swigfaiss_avx2:
_swigfaiss_avx2.ParameterSpace_swigregister(ParameterSpace)


def index_factory(*args):
    return _swigfaiss_avx2.index_factory(*args)

def index_binary_factory(d, description):
    return _swigfaiss_avx2.index_binary_factory(d, description)
class MatrixStats(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr

    def __init__(self, n, d, x):
        _swigfaiss_avx2.MatrixStats_swiginit(self, _swigfaiss_avx2.new_MatrixStats(n, d, x))
    comments = property(_swigfaiss_avx2.MatrixStats_comments_get, _swigfaiss_avx2.MatrixStats_comments_set)
    n = property(_swigfaiss_avx2.MatrixStats_n_get, _swigfaiss_avx2.MatrixStats_n_set)
    d = property(_swigfaiss_avx2.MatrixStats_d_get, _swigfaiss_avx2.MatrixStats_d_set)
    n_collision = property(_swigfaiss_avx2.MatrixStats_n_collision_get, _swigfaiss_avx2.MatrixStats_n_collision_set)
    n_valid = property(_swigfaiss_avx2.MatrixStats_n_valid_get, _swigfaiss_avx2.MatrixStats_n_valid_set)
    n0 = property(_swigfaiss_avx2.MatrixStats_n0_get, _swigfaiss_avx2.MatrixStats_n0_set)
    min_norm2 = property(_swigfaiss_avx2.MatrixStats_min_norm2_get, _swigfaiss_avx2.MatrixStats_min_norm2_set)
    max_norm2 = property(_swigfaiss_avx2.MatrixStats_max_norm2_get, _swigfaiss_avx2.MatrixStats_max_norm2_set)
    per_dim_stats = property(_swigfaiss_avx2.MatrixStats_per_dim_stats_get, _swigfaiss_avx2.MatrixStats_per_dim_stats_set)
    occurrences = property(_swigfaiss_avx2.MatrixStats_occurrences_get, _swigfaiss_avx2.MatrixStats_occurrences_set)
    buf = property(_swigfaiss_avx2.MatrixStats_buf_get, _swigfaiss_avx2.MatrixStats_buf_set)
    nbuf = 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

# Register MatrixStats in _swigfaiss_avx2:
_swigfaiss_avx2.MatrixStats_swigregister(MatrixStats)

class GpuParameterSpace(ParameterSpace):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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):
        _swigfaiss_avx2.GpuParameterSpace_swiginit(self, _swigfaiss_avx2.new_GpuParameterSpace())
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuParameterSpace

# Register GpuParameterSpace in _swigfaiss_avx2:
_swigfaiss_avx2.GpuParameterSpace_swigregister(GpuParameterSpace)

class ToCPUCloner(Cloner):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __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):
        _swigfaiss_avx2.ToCPUCloner_swiginit(self, _swigfaiss_avx2.new_ToCPUCloner())
    __swig_destroy__ = _swigfaiss_avx2.delete_ToCPUCloner

# Register ToCPUCloner in _swigfaiss_avx2:
_swigfaiss_avx2.ToCPUCloner_swigregister(ToCPUCloner)

class ToGpuCloner(Cloner, GpuClonerOptions):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    provider = property(_swigfaiss_avx2.ToGpuCloner_provider_get, _swigfaiss_avx2.ToGpuCloner_provider_set)
    device = property(_swigfaiss_avx2.ToGpuCloner_device_get, _swigfaiss_avx2.ToGpuCloner_device_set)

    def __init__(self, prov, device, options):
        _swigfaiss_avx2.ToGpuCloner_swiginit(self, _swigfaiss_avx2.new_ToGpuCloner(prov, device, options))

    def clone_Index(self, index):
        return _swigfaiss_avx2.ToGpuCloner_clone_Index(self, index)
    __swig_destroy__ = _swigfaiss_avx2.delete_ToGpuCloner

# Register ToGpuCloner in _swigfaiss_avx2:
_swigfaiss_avx2.ToGpuCloner_swigregister(ToGpuCloner)

class ToGpuClonerMultiple(Cloner, GpuMultipleClonerOptions):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    sub_cloners = property(_swigfaiss_avx2.ToGpuClonerMultiple_sub_cloners_get, _swigfaiss_avx2.ToGpuClonerMultiple_sub_cloners_set)

    def __init__(self, *args):
        _swigfaiss_avx2.ToGpuClonerMultiple_swiginit(self, _swigfaiss_avx2.new_ToGpuClonerMultiple(*args))

    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

# Register ToGpuClonerMultiple in _swigfaiss_avx2:
_swigfaiss_avx2.ToGpuClonerMultiple_swigregister(ToGpuClonerMultiple)


def index_gpu_to_cpu(gpu_index):
    return _swigfaiss_avx2.index_gpu_to_cpu(gpu_index)

def index_cpu_to_gpu(provider, device, index, options=None):
    return _swigfaiss_avx2.index_cpu_to_gpu(provider, device, index, options)

def index_cpu_to_gpu_multiple(provider, devices, index, options=None):
    return _swigfaiss_avx2.index_cpu_to_gpu_multiple(provider, devices, index, options)
class GpuProgressiveDimIndexFactory(ProgressiveDimIndexFactory):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    options = property(_swigfaiss_avx2.GpuProgressiveDimIndexFactory_options_get, _swigfaiss_avx2.GpuProgressiveDimIndexFactory_options_set)
    vres = property(_swigfaiss_avx2.GpuProgressiveDimIndexFactory_vres_get, _swigfaiss_avx2.GpuProgressiveDimIndexFactory_vres_set)
    devices = property(_swigfaiss_avx2.GpuProgressiveDimIndexFactory_devices_get, _swigfaiss_avx2.GpuProgressiveDimIndexFactory_devices_set)
    ncall = property(_swigfaiss_avx2.GpuProgressiveDimIndexFactory_ncall_get, _swigfaiss_avx2.GpuProgressiveDimIndexFactory_ncall_set)

    def __init__(self, ngpu):
        _swigfaiss_avx2.GpuProgressiveDimIndexFactory_swiginit(self, _swigfaiss_avx2.new_GpuProgressiveDimIndexFactory(ngpu))

    def __call__(self, dim):
        return _swigfaiss_avx2.GpuProgressiveDimIndexFactory___call__(self, dim)
    __swig_destroy__ = _swigfaiss_avx2.delete_GpuProgressiveDimIndexFactory

# Register GpuProgressiveDimIndexFactory in _swigfaiss_avx2:
_swigfaiss_avx2.GpuProgressiveDimIndexFactory_swigregister(GpuProgressiveDimIndexFactory)

class PyCallbackIOWriter(IOWriter):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    callback = property(_swigfaiss_avx2.PyCallbackIOWriter_callback_get, _swigfaiss_avx2.PyCallbackIOWriter_callback_set)
    bs = property(_swigfaiss_avx2.PyCallbackIOWriter_bs_get, _swigfaiss_avx2.PyCallbackIOWriter_bs_set)

    def __init__(self, *args):
        _swigfaiss_avx2.PyCallbackIOWriter_swiginit(self, _swigfaiss_avx2.new_PyCallbackIOWriter(*args))

    def __call__(self, ptrv, size, nitems):
        return _swigfaiss_avx2.PyCallbackIOWriter___call__(self, ptrv, size, nitems)
    __swig_destroy__ = _swigfaiss_avx2.delete_PyCallbackIOWriter

# Register PyCallbackIOWriter in _swigfaiss_avx2:
_swigfaiss_avx2.PyCallbackIOWriter_swigregister(PyCallbackIOWriter)

class PyCallbackIOReader(IOReader):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    callback = property(_swigfaiss_avx2.PyCallbackIOReader_callback_get, _swigfaiss_avx2.PyCallbackIOReader_callback_set)
    bs = property(_swigfaiss_avx2.PyCallbackIOReader_bs_get, _swigfaiss_avx2.PyCallbackIOReader_bs_set)

    def __init__(self, *args):
        _swigfaiss_avx2.PyCallbackIOReader_swiginit(self, _swigfaiss_avx2.new_PyCallbackIOReader(*args))

    def __call__(self, ptrv, size, nitems):
        return _swigfaiss_avx2.PyCallbackIOReader___call__(self, ptrv, size, nitems)
    __swig_destroy__ = _swigfaiss_avx2.delete_PyCallbackIOReader

# Register PyCallbackIOReader in _swigfaiss_avx2:
_swigfaiss_avx2.PyCallbackIOReader_swigregister(PyCallbackIOReader)


def swig_ptr(a):
    return _swigfaiss_avx2.swig_ptr(a)

def rev_swig_ptr(*args):
    return _swigfaiss_avx2.rev_swig_ptr(*args)
class float_minheap_array_t(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nh = property(_swigfaiss_avx2.float_minheap_array_t_nh_get, _swigfaiss_avx2.float_minheap_array_t_nh_set)
    k = property(_swigfaiss_avx2.float_minheap_array_t_k_get, _swigfaiss_avx2.float_minheap_array_t_k_set)
    ids = property(_swigfaiss_avx2.float_minheap_array_t_ids_get, _swigfaiss_avx2.float_minheap_array_t_ids_set)
    val = 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):
        _swigfaiss_avx2.float_minheap_array_t_swiginit(self, _swigfaiss_avx2.new_float_minheap_array_t())
    __swig_destroy__ = _swigfaiss_avx2.delete_float_minheap_array_t

# Register float_minheap_array_t in _swigfaiss_avx2:
_swigfaiss_avx2.float_minheap_array_t_swigregister(float_minheap_array_t)

class int_minheap_array_t(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nh = property(_swigfaiss_avx2.int_minheap_array_t_nh_get, _swigfaiss_avx2.int_minheap_array_t_nh_set)
    k = property(_swigfaiss_avx2.int_minheap_array_t_k_get, _swigfaiss_avx2.int_minheap_array_t_k_set)
    ids = property(_swigfaiss_avx2.int_minheap_array_t_ids_get, _swigfaiss_avx2.int_minheap_array_t_ids_set)
    val = 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):
        _swigfaiss_avx2.int_minheap_array_t_swiginit(self, _swigfaiss_avx2.new_int_minheap_array_t())
    __swig_destroy__ = _swigfaiss_avx2.delete_int_minheap_array_t

# Register int_minheap_array_t in _swigfaiss_avx2:
_swigfaiss_avx2.int_minheap_array_t_swigregister(int_minheap_array_t)

class float_maxheap_array_t(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nh = property(_swigfaiss_avx2.float_maxheap_array_t_nh_get, _swigfaiss_avx2.float_maxheap_array_t_nh_set)
    k = property(_swigfaiss_avx2.float_maxheap_array_t_k_get, _swigfaiss_avx2.float_maxheap_array_t_k_set)
    ids = property(_swigfaiss_avx2.float_maxheap_array_t_ids_get, _swigfaiss_avx2.float_maxheap_array_t_ids_set)
    val = 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):
        _swigfaiss_avx2.float_maxheap_array_t_swiginit(self, _swigfaiss_avx2.new_float_maxheap_array_t())
    __swig_destroy__ = _swigfaiss_avx2.delete_float_maxheap_array_t

# Register float_maxheap_array_t in _swigfaiss_avx2:
_swigfaiss_avx2.float_maxheap_array_t_swigregister(float_maxheap_array_t)

class int_maxheap_array_t(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    nh = property(_swigfaiss_avx2.int_maxheap_array_t_nh_get, _swigfaiss_avx2.int_maxheap_array_t_nh_set)
    k = property(_swigfaiss_avx2.int_maxheap_array_t_k_get, _swigfaiss_avx2.int_maxheap_array_t_k_set)
    ids = property(_swigfaiss_avx2.int_maxheap_array_t_ids_get, _swigfaiss_avx2.int_maxheap_array_t_ids_set)
    val = 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):
        _swigfaiss_avx2.int_maxheap_array_t_swiginit(self, _swigfaiss_avx2.new_int_maxheap_array_t())
    __swig_destroy__ = _swigfaiss_avx2.delete_int_maxheap_array_t

# Register int_maxheap_array_t in _swigfaiss_avx2:
_swigfaiss_avx2.int_maxheap_array_t_swigregister(int_maxheap_array_t)


def CMin_float_partition_fuzzy(vals, ids, n, q_min, q_max, q_out):
    return _swigfaiss_avx2.CMin_float_partition_fuzzy(vals, ids, n, q_min, q_max, q_out)

def CMax_float_partition_fuzzy(vals, ids, n, q_min, q_max, q_out):
    return _swigfaiss_avx2.CMax_float_partition_fuzzy(vals, ids, n, q_min, q_max, q_out)
class AlignedTableUint8(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    tab = property(_swigfaiss_avx2.AlignedTableUint8_tab_get, _swigfaiss_avx2.AlignedTableUint8_tab_set)
    numel = property(_swigfaiss_avx2.AlignedTableUint8_numel_get, _swigfaiss_avx2.AlignedTableUint8_numel_set)

    @staticmethod
    def round_capacity(n):
        return _swigfaiss_avx2.AlignedTableUint8_round_capacity(n)

    def __init__(self, *args):
        _swigfaiss_avx2.AlignedTableUint8_swiginit(self, _swigfaiss_avx2.new_AlignedTableUint8(*args))

    def itemsize(self):
        return _swigfaiss_avx2.AlignedTableUint8_itemsize(self)

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

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

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

    def nbytes(self):
        return _swigfaiss_avx2.AlignedTableUint8_nbytes(self)

    def get(self, *args):
        return _swigfaiss_avx2.AlignedTableUint8_get(self, *args)

    def data(self, *args):
        return _swigfaiss_avx2.AlignedTableUint8_data(self, *args)
    __swig_destroy__ = _swigfaiss_avx2.delete_AlignedTableUint8

# Register AlignedTableUint8 in _swigfaiss_avx2:
_swigfaiss_avx2.AlignedTableUint8_swigregister(AlignedTableUint8)

def AlignedTableUint8_round_capacity(n):
    return _swigfaiss_avx2.AlignedTableUint8_round_capacity(n)

class AlignedTableUint16(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    tab = property(_swigfaiss_avx2.AlignedTableUint16_tab_get, _swigfaiss_avx2.AlignedTableUint16_tab_set)
    numel = property(_swigfaiss_avx2.AlignedTableUint16_numel_get, _swigfaiss_avx2.AlignedTableUint16_numel_set)

    @staticmethod
    def round_capacity(n):
        return _swigfaiss_avx2.AlignedTableUint16_round_capacity(n)

    def __init__(self, *args):
        _swigfaiss_avx2.AlignedTableUint16_swiginit(self, _swigfaiss_avx2.new_AlignedTableUint16(*args))

    def itemsize(self):
        return _swigfaiss_avx2.AlignedTableUint16_itemsize(self)

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

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

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

    def nbytes(self):
        return _swigfaiss_avx2.AlignedTableUint16_nbytes(self)

    def get(self, *args):
        return _swigfaiss_avx2.AlignedTableUint16_get(self, *args)

    def data(self, *args):
        return _swigfaiss_avx2.AlignedTableUint16_data(self, *args)
    __swig_destroy__ = _swigfaiss_avx2.delete_AlignedTableUint16

# Register AlignedTableUint16 in _swigfaiss_avx2:
_swigfaiss_avx2.AlignedTableUint16_swigregister(AlignedTableUint16)

def AlignedTableUint16_round_capacity(n):
    return _swigfaiss_avx2.AlignedTableUint16_round_capacity(n)

class AlignedTableFloat32(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    tab = property(_swigfaiss_avx2.AlignedTableFloat32_tab_get, _swigfaiss_avx2.AlignedTableFloat32_tab_set)
    numel = property(_swigfaiss_avx2.AlignedTableFloat32_numel_get, _swigfaiss_avx2.AlignedTableFloat32_numel_set)

    @staticmethod
    def round_capacity(n):
        return _swigfaiss_avx2.AlignedTableFloat32_round_capacity(n)

    def __init__(self, *args):
        _swigfaiss_avx2.AlignedTableFloat32_swiginit(self, _swigfaiss_avx2.new_AlignedTableFloat32(*args))

    def itemsize(self):
        return _swigfaiss_avx2.AlignedTableFloat32_itemsize(self)

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

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

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

    def nbytes(self):
        return _swigfaiss_avx2.AlignedTableFloat32_nbytes(self)

    def get(self, *args):
        return _swigfaiss_avx2.AlignedTableFloat32_get(self, *args)

    def data(self, *args):
        return _swigfaiss_avx2.AlignedTableFloat32_data(self, *args)
    __swig_destroy__ = _swigfaiss_avx2.delete_AlignedTableFloat32

# Register AlignedTableFloat32 in _swigfaiss_avx2:
_swigfaiss_avx2.AlignedTableFloat32_swigregister(AlignedTableFloat32)

def AlignedTableFloat32_round_capacity(n):
    return _swigfaiss_avx2.AlignedTableFloat32_round_capacity(n)


def CMax_uint16_partition_fuzzy(*args):
    return _swigfaiss_avx2.CMax_uint16_partition_fuzzy(*args)

def CMin_uint16_partition_fuzzy(*args):
    return _swigfaiss_avx2.CMin_uint16_partition_fuzzy(*args)

def omp_set_num_threads(num_threads):
    return _swigfaiss_avx2.omp_set_num_threads(num_threads)

def omp_get_max_threads():
    return _swigfaiss_avx2.omp_get_max_threads()

def memcpy(dest, src, n):
    return _swigfaiss_avx2.memcpy(dest, src, n)

def cast_integer_to_uint8_ptr(x):
    return _swigfaiss_avx2.cast_integer_to_uint8_ptr(x)

def cast_integer_to_float_ptr(x):
    return _swigfaiss_avx2.cast_integer_to_float_ptr(x)

def cast_integer_to_idx_t_ptr(x):
    return _swigfaiss_avx2.cast_integer_to_idx_t_ptr(x)

def cast_integer_to_int_ptr(x):
    return _swigfaiss_avx2.cast_integer_to_int_ptr(x)

def cast_integer_to_void_ptr(x):
    return _swigfaiss_avx2.cast_integer_to_void_ptr(x)
class MapLong2Long(object):
    thisown = property(lambda x: x.this.own(), lambda x, v: x.this.own(v), doc="The membership flag")
    __repr__ = _swig_repr
    map = 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):
        _swigfaiss_avx2.MapLong2Long_swiginit(self, _swigfaiss_avx2.new_MapLong2Long())
    __swig_destroy__ = _swigfaiss_avx2.delete_MapLong2Long

# Register MapLong2Long in _swigfaiss_avx2:
_swigfaiss_avx2.MapLong2Long_swigregister(MapLong2Long)


def wait():
    return _swigfaiss_avx2.wait()


