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

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

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

try:
    import builtins as __builtin__
except ImportError:
    import __builtin__

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


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


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


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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

    def __sub__(self, *args):
        return _BayesianBlocks.SwigPyIterator___sub__(self, *args)
    def __iter__(self):
        return self
SwigPyIterator_swigregister = _BayesianBlocks.SwigPyIterator_swigregister
SwigPyIterator_swigregister(SwigPyIterator)

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

    def iterator(self):
        return _BayesianBlocks.DoubleVector_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _BayesianBlocks.DoubleVector___nonzero__(self)

    def __bool__(self):
        return _BayesianBlocks.DoubleVector___bool__(self)

    def __len__(self):
        return _BayesianBlocks.DoubleVector___len__(self)

    def __getslice__(self, i, j):
        return _BayesianBlocks.DoubleVector___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _BayesianBlocks.DoubleVector___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _BayesianBlocks.DoubleVector___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _BayesianBlocks.DoubleVector___delitem__(self, *args)

    def __getitem__(self, *args):
        return _BayesianBlocks.DoubleVector___getitem__(self, *args)

    def __setitem__(self, *args):
        return _BayesianBlocks.DoubleVector___setitem__(self, *args)

    def pop(self):
        return _BayesianBlocks.DoubleVector_pop(self)

    def append(self, x):
        return _BayesianBlocks.DoubleVector_append(self, x)

    def empty(self):
        return _BayesianBlocks.DoubleVector_empty(self)

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

    def swap(self, v):
        return _BayesianBlocks.DoubleVector_swap(self, v)

    def begin(self):
        return _BayesianBlocks.DoubleVector_begin(self)

    def end(self):
        return _BayesianBlocks.DoubleVector_end(self)

    def rbegin(self):
        return _BayesianBlocks.DoubleVector_rbegin(self)

    def rend(self):
        return _BayesianBlocks.DoubleVector_rend(self)

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

    def get_allocator(self):
        return _BayesianBlocks.DoubleVector_get_allocator(self)

    def pop_back(self):
        return _BayesianBlocks.DoubleVector_pop_back(self)

    def erase(self, *args):
        return _BayesianBlocks.DoubleVector_erase(self, *args)

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

    def push_back(self, x):
        return _BayesianBlocks.DoubleVector_push_back(self, x)

    def front(self):
        return _BayesianBlocks.DoubleVector_front(self)

    def back(self):
        return _BayesianBlocks.DoubleVector_back(self)

    def assign(self, n, x):
        return _BayesianBlocks.DoubleVector_assign(self, n, x)

    def resize(self, *args):
        return _BayesianBlocks.DoubleVector_resize(self, *args)

    def insert(self, *args):
        return _BayesianBlocks.DoubleVector_insert(self, *args)

    def reserve(self, n):
        return _BayesianBlocks.DoubleVector_reserve(self, n)

    def capacity(self):
        return _BayesianBlocks.DoubleVector_capacity(self)
    __swig_destroy__ = _BayesianBlocks.delete_DoubleVector
    __del__ = lambda self: None
DoubleVector_swigregister = _BayesianBlocks.DoubleVector_swigregister
DoubleVector_swigregister(DoubleVector)

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

    def __init__(self, *args):
        this = _BayesianBlocks.new_PairDoubleVector(*args)
        try:
            self.this.append(this)
        except __builtin__.Exception:
            self.this = this
    __swig_setmethods__["first"] = _BayesianBlocks.PairDoubleVector_first_set
    __swig_getmethods__["first"] = _BayesianBlocks.PairDoubleVector_first_get
    if _newclass:
        first = _swig_property(_BayesianBlocks.PairDoubleVector_first_get, _BayesianBlocks.PairDoubleVector_first_set)
    __swig_setmethods__["second"] = _BayesianBlocks.PairDoubleVector_second_set
    __swig_getmethods__["second"] = _BayesianBlocks.PairDoubleVector_second_get
    if _newclass:
        second = _swig_property(_BayesianBlocks.PairDoubleVector_second_get, _BayesianBlocks.PairDoubleVector_second_set)
    def __len__(self):
        return 2
    def __repr__(self):
        return str((self.first, self.second))
    def __getitem__(self, index): 
        if not (index % 2):
            return self.first
        else:
            return self.second
    def __setitem__(self, index, val):
        if not (index % 2):
            self.first = val
        else:
            self.second = val
    __swig_destroy__ = _BayesianBlocks.delete_PairDoubleVector
    __del__ = lambda self: None
PairDoubleVector_swigregister = _BayesianBlocks.PairDoubleVector_swigregister
PairDoubleVector_swigregister(PairDoubleVector)

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

    def iterator(self):
        return _BayesianBlocks.DoubleVectorVector_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _BayesianBlocks.DoubleVectorVector___nonzero__(self)

    def __bool__(self):
        return _BayesianBlocks.DoubleVectorVector___bool__(self)

    def __len__(self):
        return _BayesianBlocks.DoubleVectorVector___len__(self)

    def __getslice__(self, i, j):
        return _BayesianBlocks.DoubleVectorVector___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _BayesianBlocks.DoubleVectorVector___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _BayesianBlocks.DoubleVectorVector___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _BayesianBlocks.DoubleVectorVector___delitem__(self, *args)

    def __getitem__(self, *args):
        return _BayesianBlocks.DoubleVectorVector___getitem__(self, *args)

    def __setitem__(self, *args):
        return _BayesianBlocks.DoubleVectorVector___setitem__(self, *args)

    def pop(self):
        return _BayesianBlocks.DoubleVectorVector_pop(self)

    def append(self, x):
        return _BayesianBlocks.DoubleVectorVector_append(self, x)

    def empty(self):
        return _BayesianBlocks.DoubleVectorVector_empty(self)

    def size(self):
        return _BayesianBlocks.DoubleVectorVector_size(self)

    def swap(self, v):
        return _BayesianBlocks.DoubleVectorVector_swap(self, v)

    def begin(self):
        return _BayesianBlocks.DoubleVectorVector_begin(self)

    def end(self):
        return _BayesianBlocks.DoubleVectorVector_end(self)

    def rbegin(self):
        return _BayesianBlocks.DoubleVectorVector_rbegin(self)

    def rend(self):
        return _BayesianBlocks.DoubleVectorVector_rend(self)

    def clear(self):
        return _BayesianBlocks.DoubleVectorVector_clear(self)

    def get_allocator(self):
        return _BayesianBlocks.DoubleVectorVector_get_allocator(self)

    def pop_back(self):
        return _BayesianBlocks.DoubleVectorVector_pop_back(self)

    def erase(self, *args):
        return _BayesianBlocks.DoubleVectorVector_erase(self, *args)

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

    def push_back(self, x):
        return _BayesianBlocks.DoubleVectorVector_push_back(self, x)

    def front(self):
        return _BayesianBlocks.DoubleVectorVector_front(self)

    def back(self):
        return _BayesianBlocks.DoubleVectorVector_back(self)

    def assign(self, n, x):
        return _BayesianBlocks.DoubleVectorVector_assign(self, n, x)

    def resize(self, *args):
        return _BayesianBlocks.DoubleVectorVector_resize(self, *args)

    def insert(self, *args):
        return _BayesianBlocks.DoubleVectorVector_insert(self, *args)

    def reserve(self, n):
        return _BayesianBlocks.DoubleVectorVector_reserve(self, n)

    def capacity(self):
        return _BayesianBlocks.DoubleVectorVector_capacity(self)
    __swig_destroy__ = _BayesianBlocks.delete_DoubleVectorVector
    __del__ = lambda self: None
DoubleVectorVector_swigregister = _BayesianBlocks.DoubleVectorVector_swigregister
DoubleVectorVector_swigregister(DoubleVectorVector)

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

    def iterator(self):
        return _BayesianBlocks.IntVector_iterator(self)
    def __iter__(self):
        return self.iterator()

    def __nonzero__(self):
        return _BayesianBlocks.IntVector___nonzero__(self)

    def __bool__(self):
        return _BayesianBlocks.IntVector___bool__(self)

    def __len__(self):
        return _BayesianBlocks.IntVector___len__(self)

    def __getslice__(self, i, j):
        return _BayesianBlocks.IntVector___getslice__(self, i, j)

    def __setslice__(self, *args):
        return _BayesianBlocks.IntVector___setslice__(self, *args)

    def __delslice__(self, i, j):
        return _BayesianBlocks.IntVector___delslice__(self, i, j)

    def __delitem__(self, *args):
        return _BayesianBlocks.IntVector___delitem__(self, *args)

    def __getitem__(self, *args):
        return _BayesianBlocks.IntVector___getitem__(self, *args)

    def __setitem__(self, *args):
        return _BayesianBlocks.IntVector___setitem__(self, *args)

    def pop(self):
        return _BayesianBlocks.IntVector_pop(self)

    def append(self, x):
        return _BayesianBlocks.IntVector_append(self, x)

    def empty(self):
        return _BayesianBlocks.IntVector_empty(self)

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

    def swap(self, v):
        return _BayesianBlocks.IntVector_swap(self, v)

    def begin(self):
        return _BayesianBlocks.IntVector_begin(self)

    def end(self):
        return _BayesianBlocks.IntVector_end(self)

    def rbegin(self):
        return _BayesianBlocks.IntVector_rbegin(self)

    def rend(self):
        return _BayesianBlocks.IntVector_rend(self)

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

    def get_allocator(self):
        return _BayesianBlocks.IntVector_get_allocator(self)

    def pop_back(self):
        return _BayesianBlocks.IntVector_pop_back(self)

    def erase(self, *args):
        return _BayesianBlocks.IntVector_erase(self, *args)

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

    def push_back(self, x):
        return _BayesianBlocks.IntVector_push_back(self, x)

    def front(self):
        return _BayesianBlocks.IntVector_front(self)

    def back(self):
        return _BayesianBlocks.IntVector_back(self)

    def assign(self, n, x):
        return _BayesianBlocks.IntVector_assign(self, n, x)

    def resize(self, *args):
        return _BayesianBlocks.IntVector_resize(self, *args)

    def insert(self, *args):
        return _BayesianBlocks.IntVector_insert(self, *args)

    def reserve(self, n):
        return _BayesianBlocks.IntVector_reserve(self, n)

    def capacity(self):
        return _BayesianBlocks.IntVector_capacity(self)
    __swig_destroy__ = _BayesianBlocks.delete_IntVector
    __del__ = lambda self: None
IntVector_swigregister = _BayesianBlocks.IntVector_swigregister
IntVector_swigregister(IntVector)

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

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

    def globalOpt(self, ncp_prior, xx, yy):
        return _BayesianBlocks.BayesianBlocks_globalOpt(self, ncp_prior, xx, yy)

    def blockCost(self, imin, imax):
        return _BayesianBlocks.BayesianBlocks_blockCost(self, imin, imax)

    def blockSize(self, imin, imax):
        return _BayesianBlocks.BayesianBlocks_blockSize(self, imin, imax)

    def blockContent(self, imin, imax):
        return _BayesianBlocks.BayesianBlocks_blockContent(self, imin, imax)

    def cellContent(self):
        return _BayesianBlocks.BayesianBlocks_cellContent(self)

    def cellErrors(self):
        return _BayesianBlocks.BayesianBlocks_cellErrors(self)

    def setCellSizes(self, cellSizes):
        return _BayesianBlocks.BayesianBlocks_setCellSizes(self, cellSizes)
    if _newclass:
        ncp_prior = staticmethod(_BayesianBlocks.BayesianBlocks_ncp_prior)
    else:
        ncp_prior = _BayesianBlocks.BayesianBlocks_ncp_prior
    if _newclass:
        enableFPE = staticmethod(_BayesianBlocks.BayesianBlocks_enableFPE)
    else:
        enableFPE = _BayesianBlocks.BayesianBlocks_enableFPE

    def lightCurve(self, ncp_prior):
        return _BayesianBlocks.BayesianBlocks_lightCurve(self, ncp_prior)
    __swig_destroy__ = _BayesianBlocks.delete_BayesianBlocks
    __del__ = lambda self: None
BayesianBlocks_swigregister = _BayesianBlocks.BayesianBlocks_swigregister
BayesianBlocks_swigregister(BayesianBlocks)

def BayesianBlocks_ncp_prior(nevents, fp_frac):
    return _BayesianBlocks.BayesianBlocks_ncp_prior(nevents, fp_frac)
BayesianBlocks_ncp_prior = _BayesianBlocks.BayesianBlocks_ncp_prior

def BayesianBlocks_enableFPE():
    return _BayesianBlocks.BayesianBlocks_enableFPE()
BayesianBlocks_enableFPE = _BayesianBlocks.BayesianBlocks_enableFPE

# This file is compatible with both classic and new-style classes.


