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





from sys import version_info
if version_info >= (2, 6, 0):
    def swig_import_helper():
        from os.path import dirname
        import imp
        fp = None
        try:
            fp, pathname, description = imp.find_module('_bhtreelib', [dirname(__file__)])
        except ImportError:
            import _bhtreelib
            return _bhtreelib
        if fp is not None:
            try:
                _mod = imp.load_module('_bhtreelib', fp, pathname, description)
            finally:
                fp.close()
            return _mod
    _bhtreelib = swig_import_helper()
    del swig_import_helper
else:
    import _bhtreelib
del version_info
try:
    _swig_property = property
except NameError:
    pass  # Python < 2.2 doesn't have 'property'.


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


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


def _swig_getattr_nondynamic(self, class_type, name, static=1):
    if (name == "thisown"):
        return self.this.own()
    method = class_type.__swig_getmethods__.get(name, None)
    if method:
        return method(self)
    if (not static):
        return object.__getattr__(self, name)
    else:
        raise AttributeError(name)

def _swig_getattr(self, class_type, name):
    return _swig_getattr_nondynamic(self, class_type, name, 0)


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

try:
    _object = object
    _newclass = 1
except AttributeError:
    class _object:
        pass
    _newclass = 0


class BHpoint(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, BHpoint, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, BHpoint, name)
    __repr__ = _swig_repr
    __swig_setmethods__["x"] = _bhtreelib.BHpoint_x_set
    __swig_getmethods__["x"] = _bhtreelib.BHpoint_x_get
    if _newclass:
        x = _swig_property(_bhtreelib.BHpoint_x_get, _bhtreelib.BHpoint_x_set)
    __swig_setmethods__["r"] = _bhtreelib.BHpoint_r_set
    __swig_getmethods__["r"] = _bhtreelib.BHpoint_r_get
    if _newclass:
        r = _swig_property(_bhtreelib.BHpoint_r_get, _bhtreelib.BHpoint_r_set)
    __swig_setmethods__["at"] = _bhtreelib.BHpoint_at_set
    __swig_getmethods__["at"] = _bhtreelib.BHpoint_at_get
    if _newclass:
        at = _swig_property(_bhtreelib.BHpoint_at_get, _bhtreelib.BHpoint_at_set)

    def __init__(self):
        this = _bhtreelib.new_BHpoint()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _bhtreelib.delete_BHpoint
    __del__ = lambda self: None
BHpoint_swigregister = _bhtreelib.BHpoint_swigregister
BHpoint_swigregister(BHpoint)

class BHnode(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, BHnode, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, BHnode, name)
    __repr__ = _swig_repr
    __swig_setmethods__["left"] = _bhtreelib.BHnode_left_set
    __swig_getmethods__["left"] = _bhtreelib.BHnode_left_get
    if _newclass:
        left = _swig_property(_bhtreelib.BHnode_left_get, _bhtreelib.BHnode_left_set)
    __swig_setmethods__["right"] = _bhtreelib.BHnode_right_set
    __swig_getmethods__["right"] = _bhtreelib.BHnode_right_get
    if _newclass:
        right = _swig_property(_bhtreelib.BHnode_right_get, _bhtreelib.BHnode_right_set)
    __swig_setmethods__["atom"] = _bhtreelib.BHnode_atom_set
    __swig_getmethods__["atom"] = _bhtreelib.BHnode_atom_get
    if _newclass:
        atom = _swig_property(_bhtreelib.BHnode_atom_get, _bhtreelib.BHnode_atom_set)
    __swig_setmethods__["cut"] = _bhtreelib.BHnode_cut_set
    __swig_getmethods__["cut"] = _bhtreelib.BHnode_cut_get
    if _newclass:
        cut = _swig_property(_bhtreelib.BHnode_cut_get, _bhtreelib.BHnode_cut_set)
    __swig_setmethods__["dim"] = _bhtreelib.BHnode_dim_set
    __swig_getmethods__["dim"] = _bhtreelib.BHnode_dim_get
    if _newclass:
        dim = _swig_property(_bhtreelib.BHnode_dim_get, _bhtreelib.BHnode_dim_set)
    __swig_setmethods__["n"] = _bhtreelib.BHnode_n_set
    __swig_getmethods__["n"] = _bhtreelib.BHnode_n_get
    if _newclass:
        n = _swig_property(_bhtreelib.BHnode_n_get, _bhtreelib.BHnode_n_set)

    def __init__(self):
        this = _bhtreelib.new_BHnode()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _bhtreelib.delete_BHnode
    __del__ = lambda self: None
BHnode_swigregister = _bhtreelib.BHnode_swigregister
BHnode_swigregister(BHnode)

class BHtree(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, BHtree, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, BHtree, name)
    __repr__ = _swig_repr
    __swig_setmethods__["root"] = _bhtreelib.BHtree_root_set
    __swig_getmethods__["root"] = _bhtreelib.BHtree_root_get
    if _newclass:
        root = _swig_property(_bhtreelib.BHtree_root_get, _bhtreelib.BHtree_root_set)
    __swig_setmethods__["atom"] = _bhtreelib.BHtree_atom_set
    __swig_getmethods__["atom"] = _bhtreelib.BHtree_atom_get
    if _newclass:
        atom = _swig_property(_bhtreelib.BHtree_atom_get, _bhtreelib.BHtree_atom_set)
    __swig_setmethods__["xmin"] = _bhtreelib.BHtree_xmin_set
    __swig_getmethods__["xmin"] = _bhtreelib.BHtree_xmin_get
    if _newclass:
        xmin = _swig_property(_bhtreelib.BHtree_xmin_get, _bhtreelib.BHtree_xmin_set)
    __swig_setmethods__["xmax"] = _bhtreelib.BHtree_xmax_set
    __swig_getmethods__["xmax"] = _bhtreelib.BHtree_xmax_get
    if _newclass:
        xmax = _swig_property(_bhtreelib.BHtree_xmax_get, _bhtreelib.BHtree_xmax_set)
    __swig_setmethods__["maxr"] = _bhtreelib.BHtree_maxr_set
    __swig_getmethods__["maxr"] = _bhtreelib.BHtree_maxr_get
    if _newclass:
        maxr = _swig_property(_bhtreelib.BHtree_maxr_get, _bhtreelib.BHtree_maxr_set)
    __swig_setmethods__["rm"] = _bhtreelib.BHtree_rm_set
    __swig_getmethods__["rm"] = _bhtreelib.BHtree_rm_get
    if _newclass:
        rm = _swig_property(_bhtreelib.BHtree_rm_get, _bhtreelib.BHtree_rm_set)
    __swig_setmethods__["nodeLookUp"] = _bhtreelib.BHtree_nodeLookUp_set
    __swig_getmethods__["nodeLookUp"] = _bhtreelib.BHtree_nodeLookUp_get
    if _newclass:
        nodeLookUp = _swig_property(_bhtreelib.BHtree_nodeLookUp_get, _bhtreelib.BHtree_nodeLookUp_set)
    __swig_setmethods__["nbp"] = _bhtreelib.BHtree_nbp_set
    __swig_getmethods__["nbp"] = _bhtreelib.BHtree_nbp_get
    if _newclass:
        nbp = _swig_property(_bhtreelib.BHtree_nbp_get, _bhtreelib.BHtree_nbp_set)
    __swig_setmethods__["bfl"] = _bhtreelib.BHtree_bfl_set
    __swig_getmethods__["bfl"] = _bhtreelib.BHtree_bfl_get
    if _newclass:
        bfl = _swig_property(_bhtreelib.BHtree_bfl_get, _bhtreelib.BHtree_bfl_set)

    def __init__(self, xyz, rad, granularity):
        this = _bhtreelib.new_BHtree(xyz, rad, granularity)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _bhtreelib.delete_BHtree
    __del__ = lambda self: None

    def closePoints(self, pt, cutoff, result, maxn):
        return _bhtreelib.BHtree_closePoints(self, pt, cutoff, result, maxn)

    def closePointsDist(self, pt, cutoff, result, maxn, dist_2, maxd):
        return _bhtreelib.BHtree_closePointsDist(self, pt, cutoff, result, maxn, dist_2, maxd)

    def closePointsDist2(self, pt, cutoff, result, maxn, dist_2, maxd):
        return _bhtreelib.BHtree_closePointsDist2(self, pt, cutoff, result, maxn, dist_2, maxd)

    def closePointsPairsInTree(self, tolerance):
        return _bhtreelib.BHtree_closePointsPairsInTree(self, tolerance)

    def closePointsPairs(self, xyz, rad, tolerance):
        return _bhtreelib.BHtree_closePointsPairs(self, xyz, rad, tolerance)

    def closestPointsArray(self, xyz, cut, returnNullIfFail=1):
        return _bhtreelib.BHtree_closestPointsArray(self, xyz, cut, returnNullIfFail)

    def closestPointsArrayDist2(self, xyz, cut, returnNullIfFail=1):
        return _bhtreelib.BHtree_closestPointsArrayDist2(self, xyz, cut, returnNullIfFail)
BHtree_swigregister = _bhtreelib.BHtree_swigregister
BHtree_swigregister(BHtree)


def generateBHtree(atoms, nbat, granularity):
    return _bhtreelib.generateBHtree(atoms, nbat, granularity)
generateBHtree = _bhtreelib.generateBHtree

def findBHnode(tree, x):
    return _bhtreelib.findBHnode(tree, x)
findBHnode = _bhtreelib.findBHnode

def findBHcloseAtoms(tree, x, cutoff, atom, maxn):
    return _bhtreelib.findBHcloseAtoms(tree, x, cutoff, atom, maxn)
findBHcloseAtoms = _bhtreelib.findBHcloseAtoms

def findBHcloseAtomsdist(tree, x, cutoff, atom, d, maxn):
    return _bhtreelib.findBHcloseAtomsdist(tree, x, cutoff, atom, d, maxn)
findBHcloseAtomsdist = _bhtreelib.findBHcloseAtomsdist

def findBHcloseAtomsdist2(tree, x, cutoff, atom, dist, maxn):
    return _bhtreelib.findBHcloseAtomsdist2(tree, x, cutoff, atom, dist, maxn)
findBHcloseAtomsdist2 = _bhtreelib.findBHcloseAtomsdist2

def freeBHtree(tree):
    return _bhtreelib.freeBHtree(tree)
freeBHtree = _bhtreelib.freeBHtree

def divideBHnode(node, xmin, xmax, granularity):
    return _bhtreelib.divideBHnode(node, xmin, xmax, granularity)
divideBHnode = _bhtreelib.divideBHnode

def freeBHnode(node):
    return _bhtreelib.freeBHnode(node)
freeBHnode = _bhtreelib.freeBHnode

def findClosePairsInTree(bht, tolerance):
    return _bhtreelib.findClosePairsInTree(bht, tolerance)
findClosePairsInTree = _bhtreelib.findClosePairsInTree

def findClosePairs(bht, xyz, rad, tolerance):
    return _bhtreelib.findClosePairs(bht, xyz, rad, tolerance)
findClosePairs = _bhtreelib.findClosePairs

def findClosestAtoms(bht, xyz, cut, returnNullIfFail):
    return _bhtreelib.findClosestAtoms(bht, xyz, cut, returnNullIfFail)
findClosestAtoms = _bhtreelib.findClosestAtoms

def findClosestAtomsDist2(bht, xyz, cut, returnNullIfFail):
    return _bhtreelib.findClosestAtomsDist2(bht, xyz, cut, returnNullIfFail)
findClosestAtomsDist2 = _bhtreelib.findClosestAtomsDist2

_bhtreelib.BH_MAXFINDCOUNT_swigconstant(_bhtreelib)
BH_MAXFINDCOUNT = _bhtreelib.BH_MAXFINDCOUNT

_bhtreelib.BH_FINDCOUNT_swigconstant(_bhtreelib)
BH_FINDCOUNT = _bhtreelib.BH_FINDCOUNT

_bhtreelib.BH_MAXBOX_swigconstant(_bhtreelib)
BH_MAXBOX = _bhtreelib.BH_MAXBOX

_bhtreelib.BH_PADDING_swigconstant(_bhtreelib)
BH_PADDING = _bhtreelib.BH_PADDING

_bhtreelib.BH_SEARCH_UP_swigconstant(_bhtreelib)
BH_SEARCH_UP = _bhtreelib.BH_SEARCH_UP

_bhtreelib.BH_SEARCH_DOWN_swigconstant(_bhtreelib)
BH_SEARCH_DOWN = _bhtreelib.BH_SEARCH_DOWN

_bhtreelib.RBH_INSERTPADDING_swigconstant(_bhtreelib)
RBH_INSERTPADDING = _bhtreelib.RBH_INSERTPADDING

_bhtreelib.RBH_DELETEPADDING_swigconstant(_bhtreelib)
RBH_DELETEPADDING = _bhtreelib.RBH_DELETEPADDING

_bhtreelib.RBH_SPACEPADDING_swigconstant(_bhtreelib)
RBH_SPACEPADDING = _bhtreelib.RBH_SPACEPADDING

_bhtreelib.BH_LARGE_SPACE_PADDING_swigconstant(_bhtreelib)
BH_LARGE_SPACE_PADDING = _bhtreelib.BH_LARGE_SPACE_PADDING

_bhtreelib.BH_LEAFPADDING_swigconstant(_bhtreelib)
BH_LEAFPADDING = _bhtreelib.BH_LEAFPADDING

_bhtreelib.BH_OUTSIDE_TREE_swigconstant(_bhtreelib)
BH_OUTSIDE_TREE = _bhtreelib.BH_OUTSIDE_TREE

_bhtreelib.BH_FILLED_PADDING_swigconstant(_bhtreelib)
BH_FILLED_PADDING = _bhtreelib.BH_FILLED_PADDING

_bhtreelib.BH_EMPTY_BOX_swigconstant(_bhtreelib)
BH_EMPTY_BOX = _bhtreelib.BH_EMPTY_BOX

_bhtreelib.BH_ALREADY_DELETED_swigconstant(_bhtreelib)
BH_ALREADY_DELETED = _bhtreelib.BH_ALREADY_DELETED

_bhtreelib.BH_INVALID_POINT_swigconstant(_bhtreelib)
BH_INVALID_POINT = _bhtreelib.BH_INVALID_POINT

_bhtreelib.BH_MEMORY_ERROR_swigconstant(_bhtreelib)
BH_MEMORY_ERROR = _bhtreelib.BH_MEMORY_ERROR

_bhtreelib.BH_X_swigconstant(_bhtreelib)
BH_X = _bhtreelib.BH_X

_bhtreelib.BH_Y_swigconstant(_bhtreelib)
BH_Y = _bhtreelib.BH_Y

_bhtreelib.BH_Z_swigconstant(_bhtreelib)
BH_Z = _bhtreelib.BH_Z

_bhtreelib.BH_YES_swigconstant(_bhtreelib)
BH_YES = _bhtreelib.BH_YES

_bhtreelib.BH_NO_swigconstant(_bhtreelib)
BH_NO = _bhtreelib.BH_NO

_bhtreelib.NSTEPS_swigconstant(_bhtreelib)
NSTEPS = _bhtreelib.NSTEPS

_bhtreelib.FLAG_OWNSMEMORY_swigconstant(_bhtreelib)
FLAG_OWNSMEMORY = _bhtreelib.FLAG_OWNSMEMORY

_bhtreelib.FLAG_EMPTY_TREE_swigconstant(_bhtreelib)
FLAG_EMPTY_TREE = _bhtreelib.FLAG_EMPTY_TREE
class TBHPoint(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, TBHPoint, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, TBHPoint, name)
    __repr__ = _swig_repr
    __swig_setmethods__["Pos"] = _bhtreelib.TBHPoint_Pos_set
    __swig_getmethods__["Pos"] = _bhtreelib.TBHPoint_Pos_get
    if _newclass:
        Pos = _swig_property(_bhtreelib.TBHPoint_Pos_get, _bhtreelib.TBHPoint_Pos_set)
    __swig_setmethods__["Rad"] = _bhtreelib.TBHPoint_Rad_set
    __swig_getmethods__["Rad"] = _bhtreelib.TBHPoint_Rad_get
    if _newclass:
        Rad = _swig_property(_bhtreelib.TBHPoint_Rad_get, _bhtreelib.TBHPoint_Rad_set)
    __swig_setmethods__["Data"] = _bhtreelib.TBHPoint_Data_set
    __swig_getmethods__["Data"] = _bhtreelib.TBHPoint_Data_get
    if _newclass:
        Data = _swig_property(_bhtreelib.TBHPoint_Data_get, _bhtreelib.TBHPoint_Data_set)
    __swig_setmethods__["uInt"] = _bhtreelib.TBHPoint_uInt_set
    __swig_getmethods__["uInt"] = _bhtreelib.TBHPoint_uInt_get
    if _newclass:
        uInt = _swig_property(_bhtreelib.TBHPoint_uInt_get, _bhtreelib.TBHPoint_uInt_set)
    __swig_setmethods__["ID"] = _bhtreelib.TBHPoint_ID_set
    __swig_getmethods__["ID"] = _bhtreelib.TBHPoint_ID_get
    if _newclass:
        ID = _swig_property(_bhtreelib.TBHPoint_ID_get, _bhtreelib.TBHPoint_ID_set)
    __swig_setmethods__["Box"] = _bhtreelib.TBHPoint_Box_set
    __swig_getmethods__["Box"] = _bhtreelib.TBHPoint_Box_get
    if _newclass:
        Box = _swig_property(_bhtreelib.TBHPoint_Box_get, _bhtreelib.TBHPoint_Box_set)

    def __init__(self):
        this = _bhtreelib.new_TBHPoint()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _bhtreelib.delete_TBHPoint
    __del__ = lambda self: None
TBHPoint_swigregister = _bhtreelib.TBHPoint_swigregister
TBHPoint_swigregister(TBHPoint)

class TBHIndex(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, TBHIndex, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, TBHIndex, name)
    __repr__ = _swig_repr
    __swig_setmethods__["Pts"] = _bhtreelib.TBHIndex_Pts_set
    __swig_getmethods__["Pts"] = _bhtreelib.TBHIndex_Pts_get
    if _newclass:
        Pts = _swig_property(_bhtreelib.TBHIndex_Pts_get, _bhtreelib.TBHIndex_Pts_set)
    __swig_setmethods__["NumPts"] = _bhtreelib.TBHIndex_NumPts_set
    __swig_getmethods__["NumPts"] = _bhtreelib.TBHIndex_NumPts_get
    if _newclass:
        NumPts = _swig_property(_bhtreelib.TBHIndex_NumPts_get, _bhtreelib.TBHIndex_NumPts_set)
    __swig_setmethods__["Size"] = _bhtreelib.TBHIndex_Size_set
    __swig_getmethods__["Size"] = _bhtreelib.TBHIndex_Size_get
    if _newclass:
        Size = _swig_property(_bhtreelib.TBHIndex_Size_get, _bhtreelib.TBHIndex_Size_set)

    def __init__(self):
        this = _bhtreelib.new_TBHIndex()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _bhtreelib.delete_TBHIndex
    __del__ = lambda self: None
TBHIndex_swigregister = _bhtreelib.TBHIndex_swigregister
TBHIndex_swigregister(TBHIndex)

class TBHNode(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, TBHNode, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, TBHNode, name)
    __repr__ = _swig_repr
    __swig_setmethods__["Left"] = _bhtreelib.TBHNode_Left_set
    __swig_getmethods__["Left"] = _bhtreelib.TBHNode_Left_get
    if _newclass:
        Left = _swig_property(_bhtreelib.TBHNode_Left_get, _bhtreelib.TBHNode_Left_set)
    __swig_setmethods__["Right"] = _bhtreelib.TBHNode_Right_set
    __swig_getmethods__["Right"] = _bhtreelib.TBHNode_Right_get
    if _newclass:
        Right = _swig_property(_bhtreelib.TBHNode_Right_get, _bhtreelib.TBHNode_Right_set)
    __swig_setmethods__["Parent"] = _bhtreelib.TBHNode_Parent_set
    __swig_getmethods__["Parent"] = _bhtreelib.TBHNode_Parent_get
    if _newclass:
        Parent = _swig_property(_bhtreelib.TBHNode_Parent_get, _bhtreelib.TBHNode_Parent_set)
    __swig_setmethods__["Buffer"] = _bhtreelib.TBHNode_Buffer_set
    __swig_getmethods__["Buffer"] = _bhtreelib.TBHNode_Buffer_get
    if _newclass:
        Buffer = _swig_property(_bhtreelib.TBHNode_Buffer_get, _bhtreelib.TBHNode_Buffer_set)
    __swig_setmethods__["Index"] = _bhtreelib.TBHNode_Index_set
    __swig_getmethods__["Index"] = _bhtreelib.TBHNode_Index_get
    if _newclass:
        Index = _swig_property(_bhtreelib.TBHNode_Index_get, _bhtreelib.TBHNode_Index_set)
    __swig_setmethods__["xmin"] = _bhtreelib.TBHNode_xmin_set
    __swig_getmethods__["xmin"] = _bhtreelib.TBHNode_xmin_get
    if _newclass:
        xmin = _swig_property(_bhtreelib.TBHNode_xmin_get, _bhtreelib.TBHNode_xmin_set)
    __swig_setmethods__["xmax"] = _bhtreelib.TBHNode_xmax_set
    __swig_getmethods__["xmax"] = _bhtreelib.TBHNode_xmax_get
    if _newclass:
        xmax = _swig_property(_bhtreelib.TBHNode_xmax_get, _bhtreelib.TBHNode_xmax_set)
    __swig_setmethods__["cut"] = _bhtreelib.TBHNode_cut_set
    __swig_getmethods__["cut"] = _bhtreelib.TBHNode_cut_get
    if _newclass:
        cut = _swig_property(_bhtreelib.TBHNode_cut_get, _bhtreelib.TBHNode_cut_set)
    __swig_setmethods__["dim"] = _bhtreelib.TBHNode_dim_set
    __swig_getmethods__["dim"] = _bhtreelib.TBHNode_dim_get
    if _newclass:
        dim = _swig_property(_bhtreelib.TBHNode_dim_get, _bhtreelib.TBHNode_dim_set)

    def __init__(self):
        this = _bhtreelib.new_TBHNode()
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _bhtreelib.delete_TBHNode
    __del__ = lambda self: None
TBHNode_swigregister = _bhtreelib.TBHNode_swigregister
TBHNode_swigregister(TBHNode)

class TBHTree(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, TBHTree, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, TBHTree, name)
    __repr__ = _swig_repr
    __swig_setmethods__["Root"] = _bhtreelib.TBHTree_Root_set
    __swig_getmethods__["Root"] = _bhtreelib.TBHTree_Root_get
    if _newclass:
        Root = _swig_property(_bhtreelib.TBHTree_Root_get, _bhtreelib.TBHTree_Root_set)
    __swig_setmethods__["Pts"] = _bhtreelib.TBHTree_Pts_set
    __swig_getmethods__["Pts"] = _bhtreelib.TBHTree_Pts_get
    if _newclass:
        Pts = _swig_property(_bhtreelib.TBHTree_Pts_get, _bhtreelib.TBHTree_Pts_set)
    __swig_setmethods__["NumPts"] = _bhtreelib.TBHTree_NumPts_set
    __swig_getmethods__["NumPts"] = _bhtreelib.TBHTree_NumPts_get
    if _newclass:
        NumPts = _swig_property(_bhtreelib.TBHTree_NumPts_get, _bhtreelib.TBHTree_NumPts_set)
    __swig_setmethods__["xmin"] = _bhtreelib.TBHTree_xmin_set
    __swig_getmethods__["xmin"] = _bhtreelib.TBHTree_xmin_get
    if _newclass:
        xmin = _swig_property(_bhtreelib.TBHTree_xmin_get, _bhtreelib.TBHTree_xmin_set)
    __swig_setmethods__["xmax"] = _bhtreelib.TBHTree_xmax_set
    __swig_getmethods__["xmax"] = _bhtreelib.TBHTree_xmax_get
    if _newclass:
        xmax = _swig_property(_bhtreelib.TBHTree_xmax_get, _bhtreelib.TBHTree_xmax_set)
    __swig_setmethods__["rm"] = _bhtreelib.TBHTree_rm_set
    __swig_getmethods__["rm"] = _bhtreelib.TBHTree_rm_get
    if _newclass:
        rm = _swig_property(_bhtreelib.TBHTree_rm_get, _bhtreelib.TBHTree_rm_set)
    __swig_setmethods__["bfl"] = _bhtreelib.TBHTree_bfl_set
    __swig_getmethods__["bfl"] = _bhtreelib.TBHTree_bfl_get
    if _newclass:
        bfl = _swig_property(_bhtreelib.TBHTree_bfl_get, _bhtreelib.TBHTree_bfl_set)

    def __init__(self, points3D, dims, ids, Granularity, LeafPadding, SpacePadding):
        this = _bhtreelib.new_TBHTree(points3D, dims, ids, Granularity, LeafPadding, SpacePadding)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _bhtreelib.delete_TBHTree
    __del__ = lambda self: None

    def ClosePoints(self, pt, cutoff, result, maxn):
        return _bhtreelib.TBHTree_ClosePoints(self, pt, cutoff, result, maxn)

    def ClosePointsDist2(self, pt, cutoff, result, maxn, dist_2, maxd):
        return _bhtreelib.TBHTree_ClosePointsDist2(self, pt, cutoff, result, maxn, dist_2, maxd)
TBHTree_swigregister = _bhtreelib.TBHTree_swigregister
TBHTree_swigregister(TBHTree)

class RBHTree(_object):
    __swig_setmethods__ = {}
    __setattr__ = lambda self, name, value: _swig_setattr(self, RBHTree, name, value)
    __swig_getmethods__ = {}
    __getattr__ = lambda self, name: _swig_getattr(self, RBHTree, name)
    __repr__ = _swig_repr
    __swig_setmethods__["Root"] = _bhtreelib.RBHTree_Root_set
    __swig_getmethods__["Root"] = _bhtreelib.RBHTree_Root_get
    if _newclass:
        Root = _swig_property(_bhtreelib.RBHTree_Root_get, _bhtreelib.RBHTree_Root_set)
    __swig_setmethods__["Pts"] = _bhtreelib.RBHTree_Pts_set
    __swig_getmethods__["Pts"] = _bhtreelib.RBHTree_Pts_get
    if _newclass:
        Pts = _swig_property(_bhtreelib.RBHTree_Pts_get, _bhtreelib.RBHTree_Pts_set)
    __swig_setmethods__["FreePts"] = _bhtreelib.RBHTree_FreePts_set
    __swig_getmethods__["FreePts"] = _bhtreelib.RBHTree_FreePts_get
    if _newclass:
        FreePts = _swig_property(_bhtreelib.RBHTree_FreePts_get, _bhtreelib.RBHTree_FreePts_set)
    __swig_setmethods__["NumPts"] = _bhtreelib.RBHTree_NumPts_set
    __swig_getmethods__["NumPts"] = _bhtreelib.RBHTree_NumPts_get
    if _newclass:
        NumPts = _swig_property(_bhtreelib.RBHTree_NumPts_get, _bhtreelib.RBHTree_NumPts_set)
    __swig_setmethods__["SizePts"] = _bhtreelib.RBHTree_SizePts_set
    __swig_getmethods__["SizePts"] = _bhtreelib.RBHTree_SizePts_get
    if _newclass:
        SizePts = _swig_property(_bhtreelib.RBHTree_SizePts_get, _bhtreelib.RBHTree_SizePts_set)
    __swig_setmethods__["xmin"] = _bhtreelib.RBHTree_xmin_set
    __swig_getmethods__["xmin"] = _bhtreelib.RBHTree_xmin_get
    if _newclass:
        xmin = _swig_property(_bhtreelib.RBHTree_xmin_get, _bhtreelib.RBHTree_xmin_set)
    __swig_setmethods__["xmax"] = _bhtreelib.RBHTree_xmax_set
    __swig_getmethods__["xmax"] = _bhtreelib.RBHTree_xmax_get
    if _newclass:
        xmax = _swig_property(_bhtreelib.RBHTree_xmax_get, _bhtreelib.RBHTree_xmax_set)
    __swig_setmethods__["rm"] = _bhtreelib.RBHTree_rm_set
    __swig_getmethods__["rm"] = _bhtreelib.RBHTree_rm_get
    if _newclass:
        rm = _swig_property(_bhtreelib.RBHTree_rm_get, _bhtreelib.RBHTree_rm_set)
    __swig_setmethods__["bfl"] = _bhtreelib.RBHTree_bfl_set
    __swig_getmethods__["bfl"] = _bhtreelib.RBHTree_bfl_get
    if _newclass:
        bfl = _swig_property(_bhtreelib.RBHTree_bfl_get, _bhtreelib.RBHTree_bfl_set)
    __swig_setmethods__["Flags"] = _bhtreelib.RBHTree_Flags_set
    __swig_getmethods__["Flags"] = _bhtreelib.RBHTree_Flags_get
    if _newclass:
        Flags = _swig_property(_bhtreelib.RBHTree_Flags_get, _bhtreelib.RBHTree_Flags_set)
    __swig_setmethods__["Granularity"] = _bhtreelib.RBHTree_Granularity_set
    __swig_getmethods__["Granularity"] = _bhtreelib.RBHTree_Granularity_get
    if _newclass:
        Granularity = _swig_property(_bhtreelib.RBHTree_Granularity_get, _bhtreelib.RBHTree_Granularity_set)
    __swig_setmethods__["LeafPadding"] = _bhtreelib.RBHTree_LeafPadding_set
    __swig_getmethods__["LeafPadding"] = _bhtreelib.RBHTree_LeafPadding_get
    if _newclass:
        LeafPadding = _swig_property(_bhtreelib.RBHTree_LeafPadding_get, _bhtreelib.RBHTree_LeafPadding_set)
    __swig_setmethods__["SpacePadding"] = _bhtreelib.RBHTree_SpacePadding_set
    __swig_getmethods__["SpacePadding"] = _bhtreelib.RBHTree_SpacePadding_get
    if _newclass:
        SpacePadding = _swig_property(_bhtreelib.RBHTree_SpacePadding_get, _bhtreelib.RBHTree_SpacePadding_set)

    def __init__(self, points3D, dims, ids, Granularity, LeafPadding, InsertPadding, DeletePadding, SpacePadding, OwnsMemory):
        this = _bhtreelib.new_RBHTree(points3D, dims, ids, Granularity, LeafPadding, InsertPadding, DeletePadding, SpacePadding, OwnsMemory)
        try:
            self.this.append(this)
        except:
            self.this = this
    __swig_destroy__ = _bhtreelib.delete_RBHTree
    __del__ = lambda self: None

    def ClosePoints(self, pt, cutoff, result, maxn):
        return _bhtreelib.RBHTree_ClosePoints(self, pt, cutoff, result, maxn)

    def ClosePointsDist2(self, pt, cutoff, result, maxn, dist_2, maxd):
        return _bhtreelib.RBHTree_ClosePointsDist2(self, pt, cutoff, result, maxn, dist_2, maxd)

    def InsertRBHPoint(self, Pos, Rad, Data, uInt, ID):
        return _bhtreelib.RBHTree_InsertRBHPoint(self, Pos, Rad, Data, uInt, ID)

    def DeleteRBHPoint(self, ID):
        return _bhtreelib.RBHTree_DeleteRBHPoint(self, ID)

    def MoveRBHPoint(self, ID, NewPos, FindDirection):
        return _bhtreelib.RBHTree_MoveRBHPoint(self, ID, NewPos, FindDirection)
RBHTree_swigregister = _bhtreelib.RBHTree_swigregister
RBHTree_swigregister(RBHTree)


def GenerateTBHTree(Pts, NumPts, Granularity, LeafPadding, SpacePadding):
    return _bhtreelib.GenerateTBHTree(Pts, NumPts, Granularity, LeafPadding, SpacePadding)
GenerateTBHTree = _bhtreelib.GenerateTBHTree

def FindTBHNodeUp(node, x):
    return _bhtreelib.FindTBHNodeUp(node, x)
FindTBHNodeUp = _bhtreelib.FindTBHNodeUp

def FindTBHNode(tree, x):
    return _bhtreelib.FindTBHNode(tree, x)
FindTBHNode = _bhtreelib.FindTBHNode

def FreeTBHTree(tree):
    return _bhtreelib.FreeTBHTree(tree)
FreeTBHTree = _bhtreelib.FreeTBHTree

def FreeTBHNode(node):
    return _bhtreelib.FreeTBHNode(node)
FreeTBHNode = _bhtreelib.FreeTBHNode

def MoveTBHPoint(tree, ID, NewPos, FindDirection):
    return _bhtreelib.MoveTBHPoint(tree, ID, NewPos, FindDirection)
MoveTBHPoint = _bhtreelib.MoveTBHPoint

def DivideTBHNode(node, xmin, xmax, sxmin, sxmax, granularity, LeafPadding):
    return _bhtreelib.DivideTBHNode(node, xmin, xmax, sxmin, sxmax, granularity, LeafPadding)
DivideTBHNode = _bhtreelib.DivideTBHNode

def FindTBHCloseAtomsDist(tree, x, cutoff, atom, dist, maxn):
    return _bhtreelib.FindTBHCloseAtomsDist(tree, x, cutoff, atom, dist, maxn)
FindTBHCloseAtomsDist = _bhtreelib.FindTBHCloseAtomsDist

def FindTBHCloseAtomsInNodeDist(node, x, cutoff, atom, dist, maxn):
    return _bhtreelib.FindTBHCloseAtomsInNodeDist(node, x, cutoff, atom, dist, maxn)
FindTBHCloseAtomsInNodeDist = _bhtreelib.FindTBHCloseAtomsInNodeDist

def FindTBHCloseAtoms(tree, x, cutoff, atom, maxn):
    return _bhtreelib.FindTBHCloseAtoms(tree, x, cutoff, atom, maxn)
FindTBHCloseAtoms = _bhtreelib.FindTBHCloseAtoms

def FindTBHCloseAtomsInNode(node, x, cutoff, atom, maxn):
    return _bhtreelib.FindTBHCloseAtomsInNode(node, x, cutoff, atom, maxn)
FindTBHCloseAtomsInNode = _bhtreelib.FindTBHCloseAtomsInNode

def ModifyBHPoint(tree, ID, Rad):
    return _bhtreelib.ModifyBHPoint(tree, ID, Rad)
ModifyBHPoint = _bhtreelib.ModifyBHPoint

def GenerateRBHTree(Pts, NumPts, MaxPts, Granularity, LeafPadding, DeletePadding, SpacePadding, OwnsMemory):
    return _bhtreelib.GenerateRBHTree(Pts, NumPts, MaxPts, Granularity, LeafPadding, DeletePadding, SpacePadding, OwnsMemory)
GenerateRBHTree = _bhtreelib.GenerateRBHTree

def FindRBHNode(tree, x):
    return _bhtreelib.FindRBHNode(tree, x)
FindRBHNode = _bhtreelib.FindRBHNode

def FreeRBHTree(tree):
    return _bhtreelib.FreeRBHTree(tree)
FreeRBHTree = _bhtreelib.FreeRBHTree

def InsertRBHPoint(tree, Pos, Rad, Data, uInt, ID):
    return _bhtreelib.InsertRBHPoint(tree, Pos, Rad, Data, uInt, ID)
InsertRBHPoint = _bhtreelib.InsertRBHPoint

def DeleteRBHPoint(tree, ID):
    return _bhtreelib.DeleteRBHPoint(tree, ID)
DeleteRBHPoint = _bhtreelib.DeleteRBHPoint

def MoveRBHPoint(tree, ID, NewPos, FindDirection):
    return _bhtreelib.MoveRBHPoint(tree, ID, NewPos, FindDirection)
MoveRBHPoint = _bhtreelib.MoveRBHPoint

def ModifyRBHPoint(tree, ID, Rad):
    return _bhtreelib.ModifyRBHPoint(tree, ID, Rad)
ModifyRBHPoint = _bhtreelib.ModifyRBHPoint

def FindRBHCloseAtomsDist(tree, x, cutoff, atom, dist, maxn):
    return _bhtreelib.FindRBHCloseAtomsDist(tree, x, cutoff, atom, dist, maxn)
FindRBHCloseAtomsDist = _bhtreelib.FindRBHCloseAtomsDist

def FindRBHCloseAtoms(tree, x, cutoff, atom, maxn):
    return _bhtreelib.FindRBHCloseAtoms(tree, x, cutoff, atom, maxn)
FindRBHCloseAtoms = _bhtreelib.FindRBHCloseAtoms

def findFaceSubset(vs, fs, nbVert):
    return _bhtreelib.findFaceSubset(vs, fs, nbVert)
findFaceSubset = _bhtreelib.findFaceSubset
# This file is compatible with both classic and new-style classes.


